KLocaleConfigNumber::KLocaleConfigNumber(KLocale *locale, QWidget *parent, const char *name) : QWidget(parent, name), m_locale(locale) { QGridLayout *lay = new QGridLayout(this, 5, 2, KDialog::marginHint(), KDialog::spacingHint()); lay->setAutoAdd(TRUE); m_labDecSym = new QLabel(this, I18N_NOOP("&Decimal symbol:")); m_edDecSym = new QLineEdit(this); connect(m_edDecSym, SIGNAL(textChanged(const QString &)), this, SLOT(slotDecSymChanged(const QString &))); m_labDecSym->setBuddy(m_edDecSym); m_labThoSep = new QLabel(this, I18N_NOOP("Tho&usands separator:")); m_edThoSep = new QLineEdit(this); connect(m_edThoSep, SIGNAL(textChanged(const QString &)), this, SLOT(slotThoSepChanged(const QString &))); m_labThoSep->setBuddy(m_edThoSep); m_labMonPosSign = new QLabel(this, I18N_NOOP("Positive si&gn:")); m_edMonPosSign = new QLineEdit(this); connect(m_edMonPosSign, SIGNAL(textChanged(const QString &)), this, SLOT(slotMonPosSignChanged(const QString &))); m_labMonPosSign->setBuddy(m_edMonPosSign); m_labMonNegSign = new QLabel(this, I18N_NOOP("&Negative sign:")); m_edMonNegSign = new QLineEdit(this); connect(m_edMonNegSign, SIGNAL(textChanged(const QString &)), this, SLOT(slotMonNegSignChanged(const QString &))); m_labMonNegSign->setBuddy(m_edMonNegSign); lay->setColStretch(1, 1); connect(this, SIGNAL(localeChanged()), SLOT(slotLocaleChanged())); }
LocaleConfigMoney::LocaleConfigMoney(Locale *locale, QWidget *parent) : QWidget(parent), m_locale(locale) { setupUi(this); // Money m_labMonCurSym->setObjectName( I18N_NOOP("Currency symbol:") ); /* m_labMonDecSym->setObjectName( I18N_NOOP("Decimal symbol:") ); m_labMonThoSep->setObjectName( I18N_NOOP("Thousands separator:") );*/ m_labMonFraDig->setObjectName( I18N_NOOP("Fract digits:") ); m_positiveGB->setObjectName( I18N_NOOP("Positive") ); m_chMonPosPreCurSym->setObjectName(I18N_NOOP("Prefix currency symbol")); m_labMonPosMonSignPos->setObjectName( I18N_NOOP("Sign position:") ); m_negativeGB->setObjectName( I18N_NOOP("Negative") ); m_chMonNegPreCurSym->setObjectName(I18N_NOOP("Prefix currency symbol")); m_labMonNegMonSignPos->setObjectName( I18N_NOOP("Sign position:") ); // m_labMonDigSet->setObjectName( I18N_NOOP("Digit set:") ); connect( m_edMonCurSym, SIGNAL(textChanged(QString)), SLOT(slotMonCurSymChanged(QString)) ); // connect( m_edMonDecSym, SIGNAL(textChanged(QString)), // SLOT(slotMonDecSymChanged(QString)) ); // // connect( m_edMonThoSep, SIGNAL(textChanged(QString)), // SLOT(slotMonThoSepChanged(QString)) ); // connect( m_inMonFraDig, SIGNAL(valueChanged(int)), SLOT(slotMonFraDigChanged(int)) ); connect( m_chMonPosPreCurSym, SIGNAL(clicked()), SLOT(slotMonPosPreCurSymChanged()) ); connect( m_cmbMonPosMonSignPos, SIGNAL(activated(int)), SLOT(slotMonPosMonSignPosChanged(int)) ); connect( m_chMonNegPreCurSym, SIGNAL(clicked()), SLOT(slotMonNegPreCurSymChanged()) ); connect( m_cmbMonNegMonSignPos, SIGNAL(activated(int)), SLOT(slotMonNegMonSignPosChanged(int)) ); // connect( m_cmbMonDigSet, SIGNAL(activated(int)), // SLOT(slotMonDigSetChanged(int)) ); m_inMonFraDig->setRange(0, 10); m_inMonFraDig->setSingleStep(1); slotTranslate(); slotLocaleChanged(); }
void PCDMgui::slotChangeLocale(){ //Open the selector wLoc = new widgetLocale(); QLocale currLocale = this->locale(); Backend::log("Current PCDM Locale: " + currLocale.name() ); wLoc->setCurrentLocale(currLocale.name()); wLoc->setWindowModality(Qt::ApplicationModal); wLoc->show(); wLoc->raise(); //Connect the language changed signal connect(wLoc,SIGNAL(languageChanged(QString)),this,SLOT(slotLocaleChanged(QString)) ); }
LocaleConfigMoney::LocaleConfigMoney(Locale *locale, QWidget *parent) : QWidget(parent), m_locale(locale) { setupUi(this); // Money m_labMonCurSym->setObjectName( I18N_NOOP("Currency symbol:") ); m_labMonFraDig->setObjectName( I18N_NOOP("Fract digits:") ); connect(m_edMonCurSym,SIGNAL(textChanged(QString)),SLOT(slotMonCurSymChanged(QString))); connect(m_inMonFraDig,SIGNAL(valueChanged(int)),SLOT(slotMonFraDigChanged(int))); m_inMonFraDig->setRange(0, 10); m_inMonFraDig->setSingleStep(1); slotTranslate(); slotLocaleChanged(); }
WelcomeDialog::WelcomeDialog() : QDialog(NULL, "WelcomeDialog", true) { setCaption(tr("Welcome To Quasar")); QLabel* image = new QLabel(this); image->setPixmap(login_image); QFrame* right = new QFrame(this); _localeBox = new QGroupBox(right); QGridLayout* localeGrid = new QGridLayout(_localeBox, 2, 2, _localeBox->frameWidth() * 2); localeGrid->addRowSpacing(0, _localeBox->fontMetrics().height()); localeGrid->setMargin(6); localeGrid->setSpacing(3); localeGrid->setColStretch(1, 1); _localeMsg = new QLabel(_localeBox); _localeLabel = new QLabel(_localeBox); _locale = new ComboBox(_localeBox); _localeLabel->setBuddy(_locale); _locale->setMaximumWidth(320); localeGrid->addMultiCellWidget(_localeMsg, 1, 1, 0, 1); localeGrid->addWidget(_localeLabel, 2, 0); localeGrid->addWidget(_locale, 2, 1, AlignLeft | AlignVCenter); _serverBox = new QGroupBox(right); QGridLayout* serverGrid = new QGridLayout(_serverBox, 2, 2, _serverBox->frameWidth() * 2); serverGrid->addRowSpacing(0, _serverBox->fontMetrics().height()); serverGrid->setMargin(6); serverGrid->setSpacing(3); serverGrid->setColStretch(1, 1); _serverMsg = new QLabel(_serverBox); _serverLabel = new QLabel(_serverBox); _server = new LineEdit(_serverBox); _serverLabel->setBuddy(_server); serverGrid->addMultiCellWidget(_serverMsg, 1, 1, 0, 1); serverGrid->addWidget(_serverLabel, 2, 0); serverGrid->addWidget(_server, 2, 1, AlignLeft | AlignVCenter); QGridLayout* rightGrid = new QGridLayout(right); rightGrid->setSpacing(3); rightGrid->setMargin(3); rightGrid->setRowStretch(1, 1); rightGrid->setRowStretch(3, 1); rightGrid->setColStretch(0, 1); rightGrid->addWidget(_localeBox, 0, 0); rightGrid->addWidget(_serverBox, 2, 0); QFrame* buttons = new QFrame(this); _status = new QLabel(buttons); _ok = new QPushButton(tr("OK"), buttons); _cancel = new QPushButton(tr("Cancel"), buttons); _ok->setDefault(true); _ok->setMinimumSize(_cancel->sizeHint()); _cancel->setMinimumSize(_cancel->sizeHint()); connect(_ok, SIGNAL(clicked()), SLOT(accept())); connect(_cancel, SIGNAL(clicked()), SLOT(reject())); QGridLayout* buttonGrid = new QGridLayout(buttons); buttonGrid->setSpacing(6); buttonGrid->setMargin(3); buttonGrid->setColStretch(0, 1); buttonGrid->addWidget(_status, 0, 0); buttonGrid->addWidget(_ok, 0, 1); buttonGrid->addWidget(_cancel, 0, 2); _locales = Locale::getAvailableLocales(_localesCnt); slotLocaleChanged(); QGridLayout* grid = new QGridLayout(this); grid->setSpacing(3); grid->setMargin(6); grid->setRowStretch(0, 1); grid->setColStretch(1, 1); grid->addWidget(image, 0, 0); grid->addWidget(right, 0, 1); grid->addMultiCellWidget(buttons, 1, 1, 0, 1); _quasar = new QuasarClient(this); _timer = new QTimer(this); connect(_locale, SIGNAL(activated(int)), SLOT(slotLocaleChanged())); connect(_quasar, SIGNAL(hostFound()), SLOT(slotHostFound())); connect(_quasar, SIGNAL(connected()), SLOT(slotConnected())); connect(_quasar, SIGNAL(connectionError(int)), SLOT(slotConnectionError(int))); connect(_timer, SIGNAL(timeout()), SLOT(slotTimeout())); _server->setText("localhost"); _locale->setFocus(); }