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
@@ -23,24 +23,29 @@
#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>
@@ -111,9 +116,9 @@ 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());
@@ -136,9 +141,9 @@ void KOPrefsDialog::setupMainTab()
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());
@@ -182,10 +187,10 @@ void KOPrefsDialog::setupMailTab()
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;
@@ -238,8 +243,8 @@ void KOPrefsDialog::usrWriteConfig()
#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;
@@ -292,8 +297,8 @@ QFrame *topFrame = addPage(i18n("Date Format"),0,0);
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;
@@ -331,7 +336,7 @@ void KOPrefsDialog::setupLocaleTab()
}
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);
@@ -361,9 +366,9 @@ 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;
@@ -403,8 +408,8 @@ 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);
@@ -451,10 +456,10 @@ void KOPrefsDialog::setupSyncTab()
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());
@@ -475,11 +480,11 @@ void KOPrefsDialog::setupMainTab()
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);
@@ -491,7 +496,7 @@ void KOPrefsDialog::setupMainTab()
&(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);
@@ -499,13 +504,13 @@ void KOPrefsDialog::setupMainTab()
- 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:");
@@ -529,7 +534,7 @@ void KOPrefsDialog::setupMainTab()
// 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);
@@ -620,14 +625,14 @@ void KOPrefsDialog::setupMainTab()
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);
@@ -658,22 +663,22 @@ void KOPrefsDialog::setupTimeTab()
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);
@@ -693,10 +698,10 @@ void KOPrefsDialog::setupTimeTab()
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());
@@ -785,7 +790,7 @@ void KOPrefsDialog::setupViewsTab()
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;
@@ -838,12 +843,12 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -865,7 +870,7 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -933,7 +938,7 @@ void KOPrefsDialog::setupViewsTab()
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;
@@ -965,7 +970,7 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -973,7 +978,7 @@ void KOPrefsDialog::setupViewsTab()
// 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);
@@ -997,7 +1002,7 @@ void KOPrefsDialog::setupViewsTab()
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;
@@ -1010,28 +1015,28 @@ void KOPrefsDialog::setupViewsTab()
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);
@@ -1042,7 +1047,7 @@ void KOPrefsDialog::setupViewsTab()
- QHBox* hbo = new QHBox ( topFrame );
+ Q3HBox* hbo = new Q3HBox ( topFrame );
mDefaultAlarmFile = new QLineEdit(hbo);
QPushButton * loadTemplate = new QPushButton(hbo);
QPixmap icon;
@@ -1082,10 +1087,10 @@ void KOPrefsDialog::selectSoundFile()
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;
@@ -1152,7 +1157,7 @@ void KOPrefsDialog::setupFontsTab()
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);
@@ -1220,10 +1225,10 @@ void KOPrefsDialog::setupFontsTab()
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());
@@ -1231,9 +1236,9 @@ void KOPrefsDialog::setupColorsTab()
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);
@@ -1326,7 +1331,7 @@ 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());
@@ -1336,10 +1341,10 @@ void KOPrefsDialog::setupPrinterTab()
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());
@@ -1362,7 +1367,7 @@ void KOPrefsDialog::setupGroupSchedulingTab()
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);
@@ -1380,17 +1385,17 @@ void KOPrefsDialog::setupGroupSchedulingTab()
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());
@@ -1543,7 +1548,7 @@ void KOPrefsDialog::usrWriteConfig()
//KOPrefs::instance()->mAllDaySize = mHourSizeSlider->value();
- QDictIterator<QColor> it(mCategoryDict);
+ Q3DictIterator<QColor> it(mCategoryDict);
while (it.current()) {
KOPrefs::instance()->setCategoryColor(it.currentKey(),*it.current());
++it;
@@ -1683,14 +1688,14 @@ void KOPrefsDialog::updateTimezoneOffset( int index )
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 );