author | zautrix <zautrix> | 2004-12-13 13:00:08 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-12-13 13:00:08 (UTC) |
commit | b8410daa179dbff2ebb833071ba50b9da36e6330 (patch) (unidiff) | |
tree | 9ae559c8ecc68a78e52003daa2240c8861a0fa34 | |
parent | 7ac6c21e832b7d16bd0888d0b66252b6e152005a (diff) | |
download | kdepimpi-b8410daa179dbff2ebb833071ba50b9da36e6330.zip kdepimpi-b8410daa179dbff2ebb833071ba50b9da36e6330.tar.gz kdepimpi-b8410daa179dbff2ebb833071ba50b9da36e6330.tar.bz2 |
fixed height of global confog dialog
-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index 4817a3f..20594c6 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp | |||
@@ -86,49 +86,49 @@ KDEPIMConfigWidget::KDEPIMConfigWidget(KPimGlobalPrefs *prefs, QWidget *parent, | |||
86 | { | 86 | { |
87 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); | 87 | mExternalAppsMap.insert(ExternalAppHandler::EMAIL, i18n("Email")); |
88 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); | 88 | mExternalAppsMap.insert(ExternalAppHandler::PHONE, i18n("Phone")); |
89 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); | 89 | mExternalAppsMap.insert(ExternalAppHandler::SMS, i18n("SMS")); |
90 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); | 90 | mExternalAppsMap.insert(ExternalAppHandler::FAX, i18n("Fax")); |
91 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); | 91 | mExternalAppsMap.insert(ExternalAppHandler::PAGER, i18n("Pager")); |
92 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); | 92 | mExternalAppsMap.insert(ExternalAppHandler::SIP, i18n("SIP")); |
93 | 93 | ||
94 | 94 | ||
95 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, | 95 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, |
96 | KDialog::spacingHint() ); | 96 | KDialog::spacingHint() ); |
97 | 97 | ||
98 | tabWidget = new QTabWidget( this ); | 98 | tabWidget = new QTabWidget( this ); |
99 | topLayout->addWidget( tabWidget ); | 99 | topLayout->addWidget( tabWidget ); |
100 | 100 | ||
101 | 101 | ||
102 | setupLocaleTab(); | 102 | setupLocaleTab(); |
103 | setupLocaleDateTab(); | 103 | setupLocaleDateTab(); |
104 | setupTimeZoneTab(); | 104 | setupTimeZoneTab(); |
105 | setupExternalAppTab(); | 105 | setupExternalAppTab(); |
106 | 106 | ||
107 | } | 107 | } |
108 | void KDEPIMConfigWidget::showTimeZoneTab() | 108 | void KDEPIMConfigWidget::showTimeZoneTab() |
109 | { | 109 | { |
110 | tabWidget->setCurrentPage ( 2 ) ; | 110 | tabWidget->setCurrentPage ( 3 ) ; |
111 | } | 111 | } |
112 | void KDEPIMConfigWidget::setupExternalAppTab() | 112 | void KDEPIMConfigWidget::setupExternalAppTab() |
113 | { | 113 | { |
114 | QWidget *externalAppsPage = new QWidget( this ); | 114 | QWidget *externalAppsPage = new QWidget( this ); |
115 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), | 115 | QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), |
116 | KDialog::spacingHintSmall() ); | 116 | KDialog::spacingHintSmall() ); |
117 | 117 | ||
118 | mExternalApps = new QComboBox( externalAppsPage ); | 118 | mExternalApps = new QComboBox( externalAppsPage ); |
119 | 119 | ||
120 | QMap<ExternalAppHandler::Types, QString>::Iterator it; | 120 | QMap<ExternalAppHandler::Types, QString>::Iterator it; |
121 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) | 121 | for( it = mExternalAppsMap.begin(); it != mExternalAppsMap.end(); ++it ) |
122 | mExternalApps->insertItem( it.data(), it.key() ); | 122 | mExternalApps->insertItem( it.data(), it.key() ); |
123 | 123 | ||
124 | layout->addWidget( mExternalApps ); | 124 | layout->addWidget( mExternalApps ); |
125 | 125 | ||
126 | connect( mExternalApps, SIGNAL( activated( int ) ), | 126 | connect( mExternalApps, SIGNAL( activated( int ) ), |
127 | this, SLOT (externalapp_changed( int ) ) ); | 127 | this, SLOT (externalapp_changed( int ) ) ); |
128 | 128 | ||
129 | 129 | ||
130 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); | 130 | mExternalAppGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Used Mail Client" ), externalAppsPage ); |
131 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); | 131 | QGridLayout *boxLayout = new QGridLayout( mExternalAppGroupBox->layout(), 4, 2, -1, "gridlayout" ); |
132 | mExternalAppGroupBox->layout()->setMargin(5); | 132 | mExternalAppGroupBox->layout()->setMargin(5); |
133 | 133 | ||
134 | mClient = new QComboBox( mExternalAppGroupBox ); | 134 | mClient = new QComboBox( mExternalAppGroupBox ); |
@@ -254,65 +254,73 @@ void KDEPIMConfigWidget::setupLocaleDateTab() | |||
254 | 254 | ||
255 | void KDEPIMConfigWidget::setupLocaleTab() | 255 | void KDEPIMConfigWidget::setupLocaleTab() |
256 | { | 256 | { |
257 | 257 | ||
258 | QWidget *topFrame = new QWidget( this ); | 258 | QWidget *topFrame = new QWidget( this ); |
259 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 259 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
260 | 260 | ||
261 | topLayout->setSpacing(KDialog::spacingHint()); | 261 | topLayout->setSpacing(KDialog::spacingHint()); |
262 | topLayout->setMargin(KDialog::marginHint()); | 262 | topLayout->setMargin(KDialog::marginHint()); |
263 | int iii = 0; | 263 | int iii = 0; |
264 | KPrefsWidRadios *syncPrefsGroup = | 264 | KPrefsWidRadios *syncPrefsGroup = |
265 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); | 265 | addWidRadios(i18n("Language:(needs restart)"),&(KPimGlobalPrefs::instance()->mPreferredLanguage),topFrame); |
266 | syncPrefsGroup->addRadio(i18n("English")); | 266 | syncPrefsGroup->addRadio(i18n("English")); |
267 | syncPrefsGroup->addRadio(i18n("German")); | 267 | syncPrefsGroup->addRadio(i18n("German")); |
268 | syncPrefsGroup->addRadio(i18n("French")); | 268 | syncPrefsGroup->addRadio(i18n("French")); |
269 | syncPrefsGroup->addRadio(i18n("Italian")); | 269 | syncPrefsGroup->addRadio(i18n("Italian")); |
270 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 270 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
271 | if ( QApplication::desktop()->width() < 300 ) { | 271 | if ( QApplication::desktop()->width() < 300 ) { |
272 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); | 272 | syncPrefsGroup->groupBox()->layout()->setMargin( 5 ); |
273 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); | 273 | syncPrefsGroup->groupBox()->layout()->setSpacing( 0 ); |
274 | } | 274 | } |
275 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); | 275 | topLayout->addMultiCellWidget( (QWidget*)syncPrefsGroup->groupBox(),iii,iii,0,1); |
276 | ++iii; | 276 | ++iii; |
277 | 277 | ||
278 | |||
279 | tabWidget->addTab( topFrame, i18n( "Language" ) ); | ||
280 | topFrame = new QWidget( this ); | ||
281 | topLayout = new QGridLayout(topFrame,4,2); | ||
282 | |||
283 | topLayout->setSpacing(KDialog::spacingHint()); | ||
284 | topLayout->setMargin(KDialog::marginHint()); | ||
285 | iii = 0; | ||
278 | syncPrefsGroup = | 286 | syncPrefsGroup = |
279 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); | 287 | addWidRadios(i18n("Time Format(nr):"),&(KPimGlobalPrefs::instance()->mPreferredTime),topFrame); |
280 | if ( QApplication::desktop()->width() > 300 ) | 288 | if ( QApplication::desktop()->width() > 300 ) |
281 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 289 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
282 | syncPrefsGroup->addRadio(i18n("24:00")); | 290 | syncPrefsGroup->addRadio(i18n("24:00")); |
283 | syncPrefsGroup->addRadio(i18n("12:00am")); | 291 | syncPrefsGroup->addRadio(i18n("12:00am")); |
284 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); | 292 | syncPrefsGroup->groupBox()->setOrientation (Qt::Vertical); |
285 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 293 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
286 | ++iii; | 294 | ++iii; |
287 | 295 | ||
288 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), | 296 | KPrefsWidBool *sb = addWidBool(i18n("Week starts on Sunday"), |
289 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); | 297 | &(KPimGlobalPrefs::instance()->mWeekStartsOnSunday),topFrame); |
290 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); | 298 | topLayout->addMultiCellWidget((QWidget*)sb->checkBox(), iii,iii,0,1); |
291 | ++iii; | 299 | ++iii; |
292 | 300 | ||
293 | 301 | ||
294 | tabWidget->addTab( topFrame, i18n( "Locale" ) ); | 302 | tabWidget->addTab( topFrame, i18n( "Time Format" ) ); |
295 | 303 | ||
296 | } | 304 | } |
297 | 305 | ||
298 | 306 | ||
299 | void KDEPIMConfigWidget::setupTimeZoneTab() | 307 | void KDEPIMConfigWidget::setupTimeZoneTab() |
300 | { | 308 | { |
301 | QWidget *topFrame = new QWidget( this ); | 309 | QWidget *topFrame = new QWidget( this ); |
302 | QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); | 310 | QGridLayout *topLayout = new QGridLayout( topFrame, 5, 2); |
303 | topLayout->setSpacing(KDialog::spacingHintSmall()); | 311 | topLayout->setSpacing(KDialog::spacingHintSmall()); |
304 | topLayout->setMargin(KDialog::marginHintSmall()); | 312 | topLayout->setMargin(KDialog::marginHintSmall()); |
305 | 313 | ||
306 | QHBox *timeZoneBox = new QHBox( topFrame ); | 314 | QHBox *timeZoneBox = new QHBox( topFrame ); |
307 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 315 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
308 | 316 | ||
309 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 317 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
310 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 318 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
311 | if ( QApplication::desktop()->width() < 300 ) { | 319 | if ( QApplication::desktop()->width() < 300 ) { |
312 | mTimeZoneCombo->setMaximumWidth(150); | 320 | mTimeZoneCombo->setMaximumWidth(150); |
313 | } | 321 | } |
314 | 322 | ||
315 | QStringList list; | 323 | QStringList list; |
316 | list = KGlobal::locale()->timeZoneList(); | 324 | list = KGlobal::locale()->timeZoneList(); |
317 | mTimeZoneCombo->insertStringList(list); | 325 | mTimeZoneCombo->insertStringList(list); |
318 | 326 | ||