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())); }
KLocaleConfigTime::KLocaleConfigTime(KLocale *_locale, QWidget *parent, const char*name) : QWidget(parent, name), m_locale(_locale) { // Time QGridLayout *lay = new QGridLayout(this, 7, 2, KDialog::marginHint(), KDialog::spacingHint()); lay->setAutoAdd(TRUE); m_labCalendarSystem = new QLabel(this, I18N_NOOP("Calendar system:")); m_comboCalendarSystem = new QComboBox(false, this); connect(m_comboCalendarSystem, SIGNAL(activated(int)), this, SLOT(slotCalendarSystemChanged(int))); QStringList tmpCalendars; tmpCalendars << QString::null << QString::null; m_comboCalendarSystem->insertStringList(tmpCalendars); m_labTimeFmt = new QLabel(this, I18N_NOOP("Time format:")); m_comboTimeFmt = new QComboBox(true, this); //m_edTimeFmt = m_comboTimeFmt->lineEdit(); //m_edTimeFmt = new QLineEdit(this); connect( m_comboTimeFmt, SIGNAL( textChanged(const QString &) ), this, SLOT( slotTimeFmtChanged(const QString &) ) ); m_labDateFmt = new QLabel(this, I18N_NOOP("Date format:")); m_comboDateFmt = new QComboBox(true, this); connect( m_comboDateFmt, SIGNAL( textChanged(const QString &) ), this, SLOT( slotDateFmtChanged(const QString &) ) ); m_labDateFmtShort = new QLabel(this, I18N_NOOP("Short date format:")); m_comboDateFmtShort = new QComboBox(true, this); connect( m_comboDateFmtShort, SIGNAL( textChanged(const QString &) ), this, SLOT( slotDateFmtShortChanged(const QString &) ) ); m_labWeekStartDay = new QLabel(this, I18N_NOOP("First day of the week:")); m_comboWeekStartDay = new QComboBox(false, this); connect (m_comboWeekStartDay, SIGNAL(activated(int)), this, SLOT(slotWeekStartDayChanged(int))); updateWeekDayNames(); m_chDateMonthNamePossessive = new QCheckBox(this, I18N_NOOP("Use declined form of month name")); connect( m_chDateMonthNamePossessive, SIGNAL( clicked() ), SLOT( slotDateMonthNamePossChanged() ) ); lay->setColStretch(1, 1); }
void KSSLCertBox::setValues(QString certName, QWidget *mailCatcher) { if(_frame) { removeChild(_frame); delete _frame; } if(certName.isEmpty()) { _frame = new QFrame(this); addChild(_frame); viewport()->setBackgroundMode(_frame->backgroundMode()); _frame->show(); updateScrollBars(); show(); return; } KSSLX509Map cert(certName); QString tmp; viewport()->setBackgroundMode(QWidget::PaletteButton); _frame = new QFrame(this); QGridLayout *grid = new QGridLayout(_frame, 1, 2, KDialog::marginHint(), KDialog::spacingHint()); grid->setAutoAdd(true); QLabel *label = 0L; if(!(tmp = cert.getValue("O")).isEmpty()) { label = new QLabel(i18n("Organization:"), _frame); label->setAlignment(Qt::AlignLeft | Qt::AlignTop); new QLabel(tmp, _frame); } if(!(tmp = cert.getValue("OU")).isEmpty()) { label = new QLabel(i18n("Organizational unit:"), _frame); label->setAlignment(Qt::AlignLeft | Qt::AlignTop); new QLabel(tmp, _frame); } if(!(tmp = cert.getValue("L")).isEmpty()) { label = new QLabel(i18n("Locality:"), _frame); label->setAlignment(Qt::AlignLeft | Qt::AlignTop); new QLabel(tmp, _frame); } if(!(tmp = cert.getValue("ST")).isEmpty()) { label = new QLabel(i18n("Federal State", "State:"), _frame); label->setAlignment(Qt::AlignLeft | Qt::AlignTop); new QLabel(tmp, _frame); } if(!(tmp = cert.getValue("C")).isEmpty()) { label = new QLabel(i18n("Country:"), _frame); label->setAlignment(Qt::AlignLeft | Qt::AlignTop); new QLabel(tmp, _frame); } if(!(tmp = cert.getValue("CN")).isEmpty()) { label = new QLabel(i18n("Common name:"), _frame); label->setAlignment(Qt::AlignLeft | Qt::AlignTop); new QLabel(tmp, _frame); } if(!(tmp = cert.getValue("Email")).isEmpty()) { label = new QLabel(i18n("Email:"), _frame); label->setAlignment(Qt::AlignLeft | Qt::AlignTop); if(mailCatcher) { KURLLabel *mail = new KURLLabel(tmp, tmp, _frame); connect(mail, SIGNAL(leftClickedURL(const QString &)), mailCatcher, SLOT(mailClicked(const QString &))); } else { label = new QLabel(tmp, _frame); } } if(label && viewport()) { viewport()->setBackgroundMode(label->backgroundMode()); } addChild(_frame); updateScrollBars(); _frame->show(); show(); }