summaryrefslogtreecommitdiffabout
path: root/kmicromail/koprefsdialog.cpp
Side-by-side diff
Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefsdialog.cpp149
1 files changed, 77 insertions, 72 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 017f1f7..e3102a4 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -10,50 +10,55 @@
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <kdialog.h>
#include <qlayout.h>
#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
+#include <q3groupbox.h>
+#include <q3buttongroup.h>
#include <qlineedit.h>
#include <qfont.h>
#include <qslider.h>
#include <qfile.h>
-#include <qtextstream.h>
+#include <q3textstream.h>
#include <qcombobox.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <q3vbox.h>
+#include <q3hbox.h>
#include <qregexp.h>
#include <qspinbox.h>
#include <qdatetime.h>
#include <qcheckbox.h>
#include <qradiobutton.h>
#include <qpushbutton.h>
-#include <qstrlist.h>
+#include <q3strlist.h>
#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3HBoxLayout>
+#include <Q3GridLayout>
+#include <QPixmap>
+#include <Q3Frame>
#include <kcolorbutton.h>
#include <kdebug.h>
#include <klocale.h>
#include <kglobal.h>
#include <kfontdialog.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
#include <kcolordialog.h>
#include <kiconloader.h>
#include <kemailsettings.h>
#include <kstandarddirs.h>
#include <kglobalsettings.h>
#include <klineedit.h>
@@ -98,60 +103,60 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
#endif
}
#include "kpimglobalprefs.h"
KOPrefsDialog::~KOPrefsDialog()
{
}
void KOPrefsDialog::setupGlobalTab()
{
}
void KOPrefsDialog::setupMainTab()
{
- QFrame *topFrame = addPage(i18n("General"),0,0);
+ Q3Frame *topFrame = addPage(i18n("General"),0,0);
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
mNameEdit = new QLineEdit(topFrame);
mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
topLayout->addWidget(mNameLabel,0,0);
topLayout->addWidget(mNameEdit,0,1);
mEmailEdit = new QLineEdit(topFrame);
mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
topLayout->addWidget(mEmailLabel,1,0);
topLayout->addWidget(mEmailEdit,1,1);
QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
topLayout->addMultiCellWidget(lab,2,2,0,1);
KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
&(KOPrefs::instance()->mUseKapi),topFrame);
topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
}
void KOPrefsDialog::setupMailTab()
{
- QFrame *topFrame = addPage(i18n("Mail"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Mail"),0,0);
- QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"),
&(KOPrefs::instance()->mViewAsHtml),topFrame);
topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1);
ttt = addWidBool(i18n("Send mails later"),
&(KOPrefs::instance()->mSendLater),topFrame);
topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
ttt = addWidBool(i18n("Show \"To\" field in list view"),
&(KOPrefs::instance()->mShowToField),topFrame);
topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1);
int iii =3;
@@ -169,36 +174,36 @@ void KOPrefsDialog::setupMailTab()
++iii;
ttt = addWidBool(i18n("Show \"To\" info field"),
&(KOPrefs::instance()->mShowInfoTo),topFrame);
topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
++iii;
/*
mCodecEdit = new QLineEdit(topFrame);
topLayout->addMultiCellWidget( new QLabel(mCodecEdit, i18n("User defined codec for new mails:"), topFrame),2,2,0,1);
topLayout->addMultiCellWidget(mCodecEdit,3,3,0,1);
topLayout->addMultiCellWidget( new QLabel(0, i18n("Example: iso-8859-15"), topFrame),4,4,0,1);
*/
}
void KOPrefsDialog::setupFontsTab()
{
- QFrame *topFrame = addPage(i18n("Fonts"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Fonts"),0,0);
// DesktopIcon("fonts",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3);
topLayout->setSpacing(1);
topLayout->setMargin(3);
KPrefsDialogWidFont * tVFont;
int i = 0;
KPrefsDialogWidFont *timeLabelsFont =
addWidFont(i18n("OK"),i18n("Application(nr)"),
&(KOPrefs::instance()->mAppFont),topFrame);
topLayout->addWidget(timeLabelsFont->label(),i,0);
topLayout->addWidget(timeLabelsFont->preview(),i,1);
topLayout->addWidget(timeLabelsFont->button(),i,2);
++i;
timeLabelsFont =
addWidFont(i18n("Dear Mr."),i18n("Compose mail:"),
&(KOPrefs::instance()->mComposeFont),topFrame);
@@ -225,34 +230,34 @@ void KOPrefsDialog::usrReadConfig()
mNameEdit->setText(KOPrefs::instance()->mName);
mEmailEdit->setText(KOPrefs::instance()->mEmail);
//mCodecEdit->setText(KOPrefs::instance()->mSendCodec);
}
void KOPrefsDialog::usrWriteConfig()
{
KOPrefs::instance()->mName = mNameEdit->text();
KOPrefs::instance()->mEmail = mEmailEdit->text();
//KOPrefs::instance()->mSendCodec = mCodecEdit->text();
}
#if 0
void KOPrefsDialog::setupLocaleDateTab()
{
-QFrame *topFrame = addPage(i18n("Date Format"),0,0);
- QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
+Q3Frame *topFrame = addPage(i18n("Date Format"),0,0);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,3,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
int iii = 0;
KPrefsWidRadios *syncPrefsGroup =
addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame);
QString format;
if ( QApplication::desktop()->width() < 480 )
format = "(%d.%m.%Y)";
else
format = "(%d.%m.%Y|%A %d %B %Y)";
syncPrefsGroup->addRadio(i18n("24.03.2004 "+format));
if ( QApplication::desktop()->width() < 480 )
format = "(%m.%d.%Y)";
else
@@ -279,34 +284,34 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0);
topLayout->addWidget(mUserDateFormatShort,iii,1);
++iii;
lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame);
topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
++iii;
lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame);
topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
++iii;
lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame);
topLayout->addMultiCellWidget(lab ,iii,iii,0,1);
++iii;
}
void KOPrefsDialog::setupLocaleTab()
{
- QFrame *topFrame = addPage(i18n("Locale"),0,0);
- QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
+ Q3Frame *topFrame = addPage(i18n("Locale"),0,0);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
int iii = 0;
KPrefsWidRadios *syncPrefsGroup =
addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
syncPrefsGroup->addRadio(i18n("English"));
syncPrefsGroup->addRadio(i18n("German"));
syncPrefsGroup->addRadio(i18n("French"));
syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)"));
if ( QApplication::desktop()->width() < 300 )
;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical);
topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
++iii;
syncPrefsGroup =
addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame);
@@ -318,65 +323,65 @@ void KOPrefsDialog::setupLocaleTab()
topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1);
++iii;
KPrefsDialogWidBool *sb;
if ( QApplication::desktop()->width() < 300 ) {
sb =
addWidBool(i18n("Week starts on Sunday"),
&(KOPrefs::instance()->mWeekStartsOnSunday),topFrame);
topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
++iii;
sb =
addWidBool(i18n("Use short date in (WN/E) view"),
&(KOPrefs::instance()->mShortDateInViewer),topFrame);
topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
}
else {
QWidget * hb = new QWidget( topFrame );
- QHBoxLayout *hbLayout = new QHBoxLayout(hb);
+ Q3HBoxLayout *hbLayout = new Q3HBoxLayout(hb);
sb =
addWidBool(i18n("Week starts on Sunday"),
&(KOPrefs::instance()->mWeekStartsOnSunday),hb);
hbLayout->addWidget(sb->checkBox() );
sb =
addWidBool(i18n("Use short date in (WN/E) view"),
&(KOPrefs::instance()->mShortDateInViewer),hb);
hbLayout->addWidget(sb->checkBox() );
topLayout->addMultiCellWidget(hb, iii,iii,0,1);
}
//#ifndef DESKTOP_VERSION
#if 0
++iii;
sb =
addWidBool(i18n("Quick load/save (w/o Unicode)"),
&(KOPrefs::instance()->mUseQuicksave),topFrame);
topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
#endif
}
void KOPrefsDialog::showSyncPage()
{
showPage ( 2 ) ;
}
void KOPrefsDialog::setupSyncAlgTab()
{
#if 0
QLabel * lab;
- QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Sync Prefs"),0,0);
mSetupSyncAlgTab = topFrame;
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
int iii = 0;
KPrefsDialogWidBool *sb =
addWidBool(i18n("Ask for preferences before syncing"),
&(KOPrefs::instance()->mAskForPreferences),topFrame);
topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
++iii;
KPrefsWidRadios *syncPrefsGroup =
addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs),
topFrame);
syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
@@ -390,34 +395,34 @@ void KOPrefsDialog::setupSyncAlgTab()
addWidBool(i18n("Show summary after syncing"),
&(KOPrefs::instance()->mShowSyncSummary),topFrame);
topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1);
++iii;
#endif
}
void KOPrefsDialog::setupSyncTab()
{
#if 0
QLabel * lab;
- QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ Q3Frame *topFrame = addPage(i18n("Sync Network"),0,0);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
int iii = 0;
topLayout->addMultiCellWidget(lab , iii,iii,0,1);
++iii;
mRemoteIPEdit = new QLineEdit(topFrame);
lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame);
topLayout->addWidget(lab ,iii,0);
topLayout->addWidget(mRemoteIPEdit,iii,1);
++iii;
mRemoteUser = new QLineEdit(topFrame);
lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame);
topLayout->addWidget(lab ,iii,0);
topLayout->addWidget(mRemoteUser, iii,1);
@@ -438,111 +443,111 @@ void KOPrefsDialog::setupSyncTab()
KPrefsDialogWidBool *wb =
addWidBool(i18n("Write back synced file"),
&(KOPrefs::instance()->mWriteBackFile),topFrame);
topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
++iii;
wb =
addWidBool(i18n("Write back existing entries only"),
&(KOPrefs::instance()->mWriteBackExistingOnly),topFrame);
topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1);
++iii;
#endif
}
void KOPrefsDialog::setupMainTab()
{
- QFrame *topFrame = addPage(i18n("General"),0,0);
+ Q3Frame *topFrame = addPage(i18n("General"),0,0);
// DesktopIcon("identity",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
// KPrefsDialogWidBool *emailControlCenter =
// addWidBool(i18n("&Use email settings from Control Center"),
// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
// topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1);
// connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)),
// SLOT(toggleEmailSettings(bool)));
mNameEdit = new QLineEdit(topFrame);
mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
topLayout->addWidget(mNameLabel,0,0);
topLayout->addWidget(mNameEdit,0,1);
mEmailEdit = new QLineEdit(topFrame);
mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
topLayout->addWidget(mEmailLabel,1,0);
topLayout->addWidget(mEmailEdit,1,1);
KPrefsDialogWidBool *wb;
- QHBox *dummy;
+ Q3HBox *dummy;
if ( QApplication::desktop()->width() > 480 ) {
- dummy = new QHBox(topFrame);
+ dummy = new Q3HBox(topFrame);
} else {
- dummy = new QVBox(topFrame);
+ dummy = new Q3VBox(topFrame);
}
topLayout->addMultiCellWidget(dummy, 2,2,0,1);
addWidBool(i18n("Full menu bar(nr)"),
&(KOPrefs::instance()->mShowFullMenu),dummy);
addWidBool(i18n("Mini icons in toolbar(nr)"),
&(KOPrefs::instance()->mToolBarMiniIcons),dummy);
- dummy = new QHBox(topFrame);
+ dummy = new Q3HBox(topFrame);
new QLabel(i18n("Days in What's Next:"),dummy);
mWhatsNextSpin = new QSpinBox(1,14,1,dummy);
topLayout->addMultiCellWidget(dummy,3,3,0,1);
- dummy = new QHBox(topFrame);
+ dummy = new Q3HBox(topFrame);
new QLabel(i18n("Days in Next-X-Days:"),dummy);
mNextXDaysSpin = new QSpinBox(2,14,1,dummy);
topLayout->addMultiCellWidget(dummy,4,4,0,1);
- QHBox *prioBox = new QHBox(topFrame);
+ Q3HBox *prioBox = new Q3HBox(topFrame);
// intervalBox->setSpacing(spacingHint());
topLayout->addMultiCellWidget(prioBox,5,5,0,1);
QString messa = i18n("Show topmost todo prios in What's Next:");
if ( QApplication::desktop()->width() < 300 )
messa = i18n("Show topmost todo prios in What's N.:");
QLabel *prioLabel = new QLabel(messa, prioBox);
mPrioSpin = new QSpinBox(0,5,1,prioBox);
if ( QApplication::desktop()->width() < 300 )
mPrioSpin->setFixedWidth( 40 );
// KPrefsDialogWidBool *bcc =
// addWidBool(i18n("Send copy to owner when mailing events"),
// &(KOPrefs::instance()->mBcc),topFrame);
// topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1);
// QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame);
//topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1);
// addWidBool(i18n("Enable automatic saving of calendar"),
// &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
- QHBox *intervalBox = new QHBox(topFrame);
+ Q3HBox *intervalBox = new Q3HBox(topFrame);
// intervalBox->setSpacing(spacingHint());
topLayout->addMultiCellWidget(intervalBox,6,6,0,1);
QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox);
mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox);
autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin);
/*
QHBox * agendasize = new QHBox ( topFrame );
new QLabel (i18n("AllDayAgenda Height:"), agendasize );
mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize);
topLayout->addMultiCellWidget(agendasize,7,7,0,1);
*/
KPrefsDialogWidBool *verticalScreen =
addWidBool(i18n("Show vertical screen (Needs restart)"),
@@ -607,109 +612,109 @@ void KOPrefsDialog::setupMainTab()
topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1);
KPrefsWidRadios *destinationGroup =
addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination),
topFrame);
destinationGroup->addRadio(i18n("be added to the standard resource"));
destinationGroup->addRadio(i18n("be asked which resource to use"));
topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1);
topLayout->setRowStretch(14,1);
*/
}
void KOPrefsDialog::setupTimeTab()
{
- QFrame *topFrame = addPage(i18n("Time"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Time"),0,0);
// DesktopIcon("clock",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,4,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
- QHBox *dummy = new QHBox(topFrame);
+ Q3HBox *dummy = new Q3HBox(topFrame);
KPrefsWidTime *dayBegins =
addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
dummy);
//topLayout->addWidget(dayBegins->label(),2,0);
//topLayout->addWidget(dayBegins->spinBox(),2,1);
topLayout->addMultiCellWidget(dummy,0,0,0,1);
topLayout->addWidget(new QLabel(i18n("Default appointment time:"),
topFrame),1,0);
mStartTimeSpin = new QSpinBox(0,23,1,topFrame);
mStartTimeSpin->setSuffix(":00");
topLayout->addWidget(mStartTimeSpin,1,1);
topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"),
topFrame),2,0);
mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame);
mDefaultDurationSpin->setSuffix(":00");
topLayout->addWidget(mDefaultDurationSpin,2,1);
QStringList alarmList;
alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes")
<< i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ;
topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame),
3,0);
mAlarmTimeCombo = new QComboBox(topFrame);
mAlarmTimeCombo->insertStringList(alarmList);
topLayout->addWidget(mAlarmTimeCombo,3,1);
- QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal,
+ Q3GroupBox *workingHoursGroup = new Q3GroupBox(1,Qt::Horizontal,
i18n("Working Hours"),
topFrame);
topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1);
workingHoursGroup->layout()->setSpacing( 0 );
workingHoursGroup->layout()->setMargin( 4 );
- QHBox *workStartBox = new QHBox(workingHoursGroup);
+ Q3HBox *workStartBox = new Q3HBox(workingHoursGroup);
// workStartBox->setMargin( 0 );
addWidTime(i18n("Daily starting hour:"),
&(KOPrefs::instance()->mWorkingHoursStart),workStartBox);
- QHBox *workEndBox = new QHBox(workingHoursGroup);
+ Q3HBox *workEndBox = new Q3HBox(workingHoursGroup);
//workEndBox->setMargin( 0 );
addWidTime(i18n("Daily ending hour:"),
&(KOPrefs::instance()->mWorkingHoursEnd),workEndBox);
- QVBox *excludeBox = new QVBox(workingHoursGroup);
+ Q3VBox *excludeBox = new Q3VBox(workingHoursGroup);
//excludeBox->setMargin( 0 );
addWidBool(i18n("Exclude holidays"),
&(KOPrefs::instance()->mExcludeHolidays),excludeBox);
addWidBool(i18n("Exclude Saturdays"),
&(KOPrefs::instance()->mExcludeSaturdays),excludeBox);
// KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"),
// &(KOPrefs::instance()->mMarcusBainsShowSeconds),
// topFrame);
// topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0);
// topLayout->setRowStretch(6,1);
}
void KOPrefsDialog::setupViewsTab()
{
- QFrame *topFrame = addPage(i18n("Views"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Views"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,1);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
// QBoxLayout *dayBeginsLayout = new QHBoxLayout;
// topLayout->addLayout(dayBeginsLayout,0,0);
// KPrefsWidTime *dayBegins =
// addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
// topFrame);
// dayBeginsLayout->addWidget(dayBegins->label());
// dayBeginsLayout->addStretch(1);
// dayBeginsLayout->addWidget(dayBegins->spinBox());
// QBoxLayout *nextDaysLayout = new QHBoxLayout;
// topLayout->addLayout(nextDaysLayout,1,0);
// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame));
@@ -772,33 +777,33 @@ void KOPrefsDialog::setupViewsTab()
&(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0);
// topLayout->addWidget(hourSizeGroup,ii++,0);
// topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0);
//topLayout->setRowStretch(11,1);
topFrame = addPage(i18n("ViewChange"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,6,1);
+ topLayout = new Q3GridLayout(topFrame,6,1);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
ii = 0;
dummy =
addWidBool(i18n("Hold fullscreen on view change"),
&(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
dummy =
addWidBool(i18n("Hold non-fullscreen on view change"),
&(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
@@ -825,60 +830,60 @@ void KOPrefsDialog::setupViewsTab()
dummy =
addWidBool(i18n("Listview uses monthly timespan"),
&(KOPrefs::instance()->mListViewMonthTimespan),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
dummy =
addWidBool(i18n("Highlight selection in Time Edit"),
&(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame);
topLayout->addWidget( dummy->checkBox(), ii++,0);
topFrame = addPage(i18n("Month View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,5,1);
+ topLayout = new Q3GridLayout(topFrame,5,1);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
ii = 0;
QLabel *lab;
- QHBox *habo = new QHBox( topFrame );
+ Q3HBox *habo = new Q3HBox( topFrame );
if ( QApplication::desktop()->width() < 320 ) {
lab = new QLabel ( i18n("Show events that recur "), topFrame );
topLayout->addMultiCellWidget(lab,ii, ii,0,1);
ii++;
} else {
new QLabel ( i18n("Show events that recur "), habo );
}
dailyRecur =
addWidBool(i18n("daily"),
&(KOPrefs::instance()->mMonthDailyRecur),habo);
// topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
weeklyRecur =
addWidBool(i18n("weekly"),
&(KOPrefs::instance()->mMonthWeeklyRecur),habo);
topLayout->addMultiCellWidget(habo,ii, ii,0,1);
ii++;
- habo = new QHBox( topFrame );
+ habo = new Q3HBox( topFrame );
if ( QApplication::desktop()->width() < 320 ) {
lab = new QLabel (i18n("Show in every cell ") , topFrame );
topLayout->addMultiCellWidget(lab,ii, ii,0,1);
ii++;
} else {
new QLabel ( i18n("Show in every cell "), habo );
}
weeklyRecur =
addWidBool(i18n("short month"),
&(KOPrefs::instance()->mMonthShowShort),habo);
weeklyRecur =
addWidBool(i18n("icons"),
&(KOPrefs::instance()->mMonthShowIcons),habo);
topLayout->addMultiCellWidget(habo,ii, ii,0,1);
@@ -920,142 +925,142 @@ void KOPrefsDialog::setupViewsTab()
&(KOPrefs::instance()->mMonthViewEvenColor),topFrame);
topLayout->addWidget(holidayColor->label(),ii,0);
topLayout->addWidget(holidayColor->button(),ii++,1);
holidayColor =
addWidColor(i18n("Color for Sundays + category \"Holiday\""),
&(KOPrefs::instance()->mMonthViewHolidayColor),topFrame);
topLayout->addWidget(holidayColor->label(),ii,0);
topLayout->addWidget(holidayColor->button(),ii++,1);
// *********************** Todo View
topFrame = addPage(i18n("Todo View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,4,1);
+ topLayout = new Q3GridLayout(topFrame,4,1);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
ii = 0;
KPrefsDialogWidBool *showCompletedTodo =
addWidBool(i18n("To-do view shows completed Todos"),
&(KOPrefs::instance()->mShowCompletedTodo),topFrame);
topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0);
dummy =
addWidBool(i18n("To-do view shows complete as 'xx %'"),
&(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
dummy =
addWidBool(i18n("Small To-do view uses smaller font"),
&(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
dummy =
addWidBool(i18n("Todo view uses category colors"),
&(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
QWidget* wid = new QWidget( topFrame );
// Todo due today color
KPrefsWidColor *todoDueTodayColor =
addWidColor(i18n("Todo due today color:"),
&(KOPrefs::instance()->mTodoDueTodayColor),wid);
- QHBoxLayout *widLayout = new QHBoxLayout(wid);
+ Q3HBoxLayout *widLayout = new Q3HBoxLayout(wid);
widLayout->addWidget( todoDueTodayColor->label() );
widLayout->addWidget( todoDueTodayColor->button() );
topLayout->addWidget(wid,ii++,0);
//topLayout->addWidget(todoDueTodayColor->button(),ii++,1);
// Todo overdue color
wid = new QWidget( topFrame );
- widLayout = new QHBoxLayout(wid);
+ widLayout = new Q3HBoxLayout(wid);
KPrefsWidColor *todoOverdueColor =
addWidColor(i18n("Todo overdue color:"),
&(KOPrefs::instance()->mTodoOverdueColor),wid);
widLayout->addWidget(todoOverdueColor->label());
widLayout->addWidget(todoOverdueColor->button());
topLayout->addWidget(wid,ii++,0);
dummy =
addWidBool(i18n("Colors are applied to text"),
&(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
dummy =
addWidBool(i18n("Allday Agenda view shows todos"),
&(KOPrefs::instance()->mShowTodoInAgenda),topFrame);
topLayout->addWidget(dummy->checkBox(),ii++,0);
topFrame = addPage(i18n("Alarm"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,2,1);
+ topLayout = new Q3GridLayout(topFrame,2,1);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
int iii = 0;
dummy =
addWidBool(i18n("Use internal alarm notification"),
&(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame);
topLayout->addWidget(dummy->checkBox(),iii++,0);
lab = new QLabel( i18n("Note: KO/Pi must be running to notify you about an alarm. Recommended for use on Zaurus: Disable this option and install KO/Pi alarm applet.\n"), topFrame);
topLayout->addWidget(lab ,iii++,0);
#ifndef DESKTOP_VERSION
- lab->setAlignment( AlignLeft|WordBreak|AlignTop);
+ lab->setAlignment( Qt::AlignLeft|Qt::TextWordWrap|Qt::AlignTop);
#else
- lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop);
+ lab->setAlignment( Qt::AlignLeft|Qt::TextWrapAnywhere|Qt::TextWordWrap|Qt::AlignTop);
lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
#endif
- QHBox* dummyBox = new QHBox(topFrame);
+ Q3HBox* dummyBox = new Q3HBox(topFrame);
new QLabel(i18n("Play beeps count:"),dummyBox);
mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
- dummyBox = new QHBox(topFrame);
+ dummyBox = new Q3HBox(topFrame);
new QLabel(i18n("Beeps interval in sec:"),dummyBox);
mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
- dummyBox = new QHBox(topFrame);
+ dummyBox = new Q3HBox(topFrame);
new QLabel(i18n("Default suspend time in min:"),dummyBox);
mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
- dummyBox = new QHBox(topFrame);
+ dummyBox = new Q3HBox(topFrame);
new QLabel(i18n("Auto suspend count:"),dummyBox);
mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox);
topLayout->addWidget(dummyBox,iii++,0);
- QHBox* hbo = new QHBox ( topFrame );
+ Q3HBox* hbo = new Q3HBox ( topFrame );
mDefaultAlarmFile = new QLineEdit(hbo);
QPushButton * loadTemplate = new QPushButton(hbo);
QPixmap icon;
if ( QApplication::desktop()->width() < 321 )
icon = SmallIcon("fileimport16");
else
icon = SmallIcon("fileimport");
loadTemplate->setIconSet (icon ) ;
connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( selectSoundFile() ) );
int size = loadTemplate->sizeHint().height();
loadTemplate->setFixedSize( size, size );
//lab = new QLabel( i18n("This setting is useless for 5500 user!"), topFrame);
// topLayout->addWidget(lab ,iii++,0);
lab = new QLabel( i18n("Alarm *.wav file for newly created alarm:"), topFrame);
topLayout->addWidget(lab ,iii++,0);
topLayout->addWidget(hbo,iii++,0);
@@ -1069,36 +1074,36 @@ void KOPrefsDialog::setupViewsTab()
// lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) );
// #endif
}
void KOPrefsDialog::selectSoundFile()
{
QString fileName = mDefaultAlarmFile->text();
fileName = KFileDialog::getSaveFileName( mDefaultAlarmFile->text() , "Choose default alarm file", this );
if ( fileName.length() > 0 )
mDefaultAlarmFile->setText( fileName );
}
void KOPrefsDialog::setupFontsTab()
{
- QFrame *topFrame = addPage(i18n("Fonts"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Fonts"),0,0);
// DesktopIcon("fonts",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,7,3);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,7,3);
topLayout->setSpacing(1);
topLayout->setMargin(3);
KPrefsDialogWidFont * tVFont;
int i = 0;
KPrefsDialogWidFont *timeLabelsFont =
addWidFont(i18n("23"),i18n("DateNavigator:(nr)"),
&(KOPrefs::instance()->mDateNavigatorFont),topFrame);
topLayout->addWidget(timeLabelsFont->label(),i,0);
topLayout->addWidget(timeLabelsFont->preview(),i,1);
topLayout->addWidget(timeLabelsFont->button(),i,2);
++i;
timeLabelsFont =
addWidFont(i18n("Mon 15"),i18n("Date Labels:"),
&(KOPrefs::instance()->mTimeLabelsFont),topFrame);
@@ -1139,33 +1144,33 @@ void KOPrefsDialog::setupFontsTab()
&(KOPrefs::instance()->mEditBoxFont),topFrame);
topLayout->addWidget(tVFont->label(),i,0);
topLayout->addWidget(tVFont->preview(),i,1);
topLayout->addWidget(tVFont->button(),i,2);
++i;
topLayout->setColStretch(1,1);
topLayout->setRowStretch(4,1);
i = 0;
topFrame = addPage(i18n("View Fonts"),0,
DesktopIcon("fonts",KIcon::SizeMedium));
- topLayout = new QGridLayout(topFrame,7,3);
+ topLayout = new Q3GridLayout(topFrame,7,3);
topLayout->setSpacing(1);
topLayout->setMargin(3);
tVFont =
addWidFont(i18n("Configure KO"),i18n("What's Next View:"),
&(KOPrefs::instance()->mWhatsNextFont),topFrame);
topLayout->addWidget(tVFont->label(),i,0);
topLayout->addWidget(tVFont->preview(),i,1);
topLayout->addWidget(tVFont->button(),i,2);
++i;
KPrefsDialogWidFont *agendaViewFont =
addWidFont(i18n("Event text"),i18n("Agenda view:"),
&(KOPrefs::instance()->mAgendaViewFont),topFrame);
topLayout->addWidget(agendaViewFont->label(),i,0);
topLayout->addWidget(agendaViewFont->preview(),i,1);
topLayout->addWidget(agendaViewFont->button(),i,2);
@@ -1207,46 +1212,46 @@ void KOPrefsDialog::setupFontsTab()
topLayout->addWidget(tVFont->button(),i,2);
++i;
topLayout->setColStretch(1,1);
topLayout->setRowStretch(4,1);
}
void KOPrefsDialog::setupColorsTab()
{
- QFrame *topFrame = addPage(i18n("Colors"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Colors"),0,0);
// DesktopIcon("colorize",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2);
// topLayout->setSpacing(spacingHint());
// topLayout->setMargin(marginHint());
topLayout->setSpacing(2);
topLayout->setMargin(3);
int ii = 1;
- QGroupBox *categoryGroup ;
+ Q3GroupBox *categoryGroup ;
- categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"),
+ categoryGroup = new Q3GroupBox(1,Qt::Vertical,i18n("Categories"),
topFrame);
topLayout->addMultiCellWidget(categoryGroup,0,0,0,1);
mCategoryCombo = new QComboBox(categoryGroup);
mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories);
connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor()));
mCategoryButton = new KColorButton(categoryGroup);
connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor()));
updateCategoryColor();
// Holiday Color
KPrefsWidColor *holidayColor =
addWidColor(i18n("Holiday color:"),
@@ -1313,97 +1318,97 @@ void KOPrefsDialog::updateCategoryColor()
{
QString cat = mCategoryCombo->currentText();
QColor *color = mCategoryDict.find(cat);
if (!color) {
color = KOPrefs::instance()->categoryColor(cat);
}
if (color) {
mCategoryButton->setColor(*color);
}
}
void KOPrefsDialog::setupPrinterTab()
{
mPrinterTab = addPage(i18n("Printing"),0,
DesktopIcon("fileprint",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(mPrinterTab,5,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
topLayout->setRowStretch(4,1);
}
void KOPrefsDialog::setupGroupSchedulingTab()
{
#if 0
- QFrame *topFrame = addPage(i18n("Group Scheduling"),0,
+ Q3Frame *topFrame = addPage(i18n("Group Scheduling"),0,
DesktopIcon("personal",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
#if 0
KPrefsWidRadios *schedulerGroup =
addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler),
topFrame);
schedulerGroup->addRadio("Dummy"); // Only for debugging
schedulerGroup->addRadio(i18n("Mail client"));
topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1);
#endif
KPrefsWidRadios *sendGroup =
addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend),
topFrame);
sendGroup->addRadio(i18n("Send to outbox"));
sendGroup->addRadio(i18n("Send directly"));
topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1);
topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1);
- mAMails = new QListView(topFrame);
+ mAMails = new Q3ListView(topFrame);
mAMails->addColumn(i18n("Email"),300);
topLayout->addMultiCellWidget(mAMails,3,3,0,1);
topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0);
aEmailsEdit = new QLineEdit(topFrame);
aEmailsEdit->setEnabled(false);
topLayout->addWidget(aEmailsEdit,4,1);
QPushButton *add = new QPushButton(i18n("New"),topFrame,"new");
topLayout->addWidget(add,5,0);
QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove");
topLayout->addWidget(del,5,1);
//topLayout->setRowStretch(2,1);
connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) );
connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) );
connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem()));
- connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput()));
+ connect(mAMails,SIGNAL(selectionChanged(Q3ListViewItem *)),SLOT(updateInput()));
#endif
}
void KOPrefsDialog::setupGroupAutomationTab()
{
return;
- QFrame *topFrame = addPage(i18n("Group Automation"),0,
+ Q3Frame *topFrame = addPage(i18n("Group Automation"),0,
DesktopIcon("personal",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,5,1);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,1);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
KPrefsWidRadios *autoRefreshGroup =
addWidRadios(i18n("Auto Send Refresh"),
&(KOPrefs::instance()->mIMIPAutoRefresh),topFrame);
autoRefreshGroup->addRadio(i18n("Never"));
autoRefreshGroup->addRadio(i18n("If attendee is in addressbook"));
//autoRefreshGroup->addRadio(i18n("selected emails"));
topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0);
KPrefsWidRadios *autoInsertGroup =
addWidRadios(i18n("Auto Insert IMIP Replies"),
&(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame);
autoInsertGroup->addRadio(i18n("Never"));
autoInsertGroup->addRadio(i18n("If attendee is in addressbook"));
@@ -1530,33 +1535,33 @@ void KOPrefsDialog::usrWriteConfig()
sub = 1;
KOPrefs::instance()->mDaylightsavingStart = date.dayOfYear()-sub;
date = mEndDateSavingEdit->date();
if ( QDate::leapYear( date.year() ) && date.dayOfYear() > 59 )
sub = 1;
else
sub = 0;
KOPrefs::instance()->mDaylightsavingEnd = date.dayOfYear()-sub;
// KOPrefs::instance()->mTimeZoneOffset = mTimezoneOffsetSpin->value();
KOPrefs::instance()->mStartTime = mStartTimeSpin->value();
KOPrefs::instance()->mDefaultDuration = mDefaultDurationSpin->value();
KOPrefs::instance()->mAlarmTime = mAlarmTimeCombo->currentItem();
//KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value();
- QDictIterator<QColor> it(mCategoryDict);
+ Q3DictIterator<QColor> it(mCategoryDict);
while (it.current()) {
KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
++it;
}
KOPrefs::instance()->mNextXDays = mNextXDaysSpin->value();
KOPrefs::instance()->mWhatsNextDays = mWhatsNextSpin->value();
KOPrefs::instance()->mWhatsNextPrios = mPrioSpin->value();
KOPrefs::instance()->mAdditionalMails.clear();
// QListViewItem *item;
// item = mAMails->firstChild();
// while (item)
// {
// KOPrefs::instance()->mAdditionalMails.append( item->text(0) );
// item = item->nextSibling();
@@ -1670,40 +1675,40 @@ void KOPrefsDialog::updateTimezoneOffset( int index )
} else {
if ( index == 24 ) {
mTimezoneOffsetSpin->setEnabled ( true );
mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset);
} else {
mTimezoneOffsetSpin->setEnabled ( false );
mTimezoneOffsetSpin->setValue( 0 );
}
}
*/
}
void KOPrefsDialog::setupTimeZoneTab()
{
- QFrame *topFrame = addPage(i18n("Time Zone"),0,0);
+ Q3Frame *topFrame = addPage(i18n("Time Zone"),0,0);
// DesktopIcon("clock",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
+ Q3GridLayout *topLayout = new Q3GridLayout(topFrame,5,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
- QHBox *timeZoneBox = new QHBox( topFrame );
+ Q3HBox *timeZoneBox = new Q3HBox( topFrame );
topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );
new QLabel( i18n("Timezone:"), timeZoneBox );
mTimeZoneCombo = new QComboBox( timeZoneBox );
if ( QApplication::desktop()->width() < 300 ) {
mTimeZoneCombo->setMaximumWidth(150);
}
QStringList list;
list = KGlobal::locale()->timeZoneList();
mTimeZoneCombo->insertStringList(list);
// find the currently set time zone and select it
QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId;
int nCurrentlySet = 11;
for (int i = 0; i < mTimeZoneCombo->count(); i++)