summaryrefslogtreecommitdiffabout
path: root/korganizer/koprefsdialog.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koprefsdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koprefsdialog.cpp98
1 files changed, 52 insertions, 46 deletions
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index 74037e6..8439b81 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -52,8 +52,9 @@
#include <kcolordialog.h>
#include <kiconloader.h>
#include <kemailsettings.h>
#include <kstandarddirs.h>
+#include <kglobalsettings.h>
#include <kurlrequester.h>
#include <klineedit.h>
@@ -73,12 +74,19 @@
KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
KPrefsDialog(KOPrefs::instance(),parent,name,true)
{
+ setFont( KGlobalSettings::generalFont() );
setCaption( i18n("Preferences - some settings need a restart (nr)"));
mCategoryDict.setAutoDelete(true);
KGlobal::locale()->insertCatalogue("timezones");
+ mSpacingHint = spacingHintSmall();
+ mMarginHint = marginHintSmall();
+#ifndef DESKTOP_VERSION
+ if ( QApplication::desktop()->height() == 480 )
+ hideButtons();
+#endif
setupGlobalTab();
setupMainTab();
// setupLocaleTab();
@@ -93,12 +101,9 @@ KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
//setupPrinterTab();
//setupGroupSchedulingTab();
//setupGroupAutomationTab();
-#ifndef DESKTOP_VERSION
- if ( QApplication::desktop()->height() == 480 )
- hideButtons();
-#endif
+
}
KOPrefsDialog::~KOPrefsDialog()
@@ -117,10 +122,10 @@ void KOPrefsDialog::setupLocaleDateTab()
{
#if 0
QFrame *topFrame = addPage(i18n("Date Format"),0,0);
QGridLayout *topLayout = new QGridLayout(topFrame,3,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
int iii = 0;
KPrefsDialogWidRadios *syncPrefsGroup =
@@ -173,10 +178,10 @@ void KOPrefsDialog::setupLocaleTab()
{
#if 0
QFrame *topFrame = addPage(i18n("Locale"),0,0);
QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
int iii = 0;
KPrefsDialogWidRadios *syncPrefsGroup =
addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame);
syncPrefsGroup->addRadio(i18n("English"));
@@ -245,10 +250,10 @@ void KOPrefsDialog::setupSyncAlgTab()
QLabel * lab;
QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0);
mSetupSyncAlgTab = topFrame;
QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
int iii = 0;
KPrefsDialogWidBool *sb =
addWidBool(i18n("Ask for preferences before syncing"),
@@ -286,10 +291,10 @@ void KOPrefsDialog::setupSyncTab()
#if 0
QLabel * lab;
QFrame *topFrame = addPage(i18n("Sync Network"),0,0);
QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame);
int iii = 0;
topLayout->addMultiCellWidget(lab , iii,iii,0,1);
++iii;
@@ -336,10 +341,10 @@ void KOPrefsDialog::setupMainTab()
QFrame *topFrame = addPage(i18n("General"),0,0);
// DesktopIcon("identity",KIcon::SizeMedium));
QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
// KPrefsDialogWidBool *emailControlCenter =
// addWidBool(i18n("&Use email settings from Control Center"),
// &(KOPrefs::instance()->mEmailControlCenter),topFrame);
@@ -397,9 +402,9 @@ void KOPrefsDialog::setupMainTab()
// addWidBool(i18n("Enable automatic saving of calendar"),
// &(KOPrefs::instance()->mAutoSave),autoSaveGroup);
QHBox *intervalBox = new QHBox(topFrame);
- // intervalBox->setSpacing(spacingHint());
+ // intervalBox->setSpacing(mSpacingHint);
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);
@@ -487,10 +492,10 @@ void KOPrefsDialog::setupTimeTab()
QFrame *topFrame = addPage(i18n("Time"),0,0);
// DesktopIcon("clock",KIcon::SizeMedium));
QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
QHBox *dummy = new QHBox(topFrame);
KPrefsDialogWidTime *dayBegins =
addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins),
@@ -560,10 +565,10 @@ void KOPrefsDialog::setupViewsTab()
QFrame *topFrame = addPage(i18n("Views"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
QGridLayout *topLayout = new QGridLayout(topFrame,6,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
// QBoxLayout *dayBeginsLayout = new QHBoxLayout;
// topLayout->addLayout(dayBeginsLayout,0,0);
@@ -605,10 +610,10 @@ void KOPrefsDialog::setupViewsTab()
topFrame = addPage(i18n("ViewChange"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
topLayout = new QGridLayout(topFrame,6,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
ii = 0;
#endif
@@ -652,22 +657,22 @@ void KOPrefsDialog::setupViewsTab()
addWidBool(i18n("Show ev. that recur weekly in date nav."),
&(KOPrefs::instance()->mWeeklyRecur),topFrame);
topLayout->addWidget(weeklyRecur->checkBox(),ii++,0);
-
+#ifdef DESKTOP_VERSION
KPrefsDialogWidBool *enableToolTips =
addWidBool(i18n("Enable tooltips displaying summary of ev."),
&(KOPrefs::instance()->mEnableToolTips),topFrame);
topLayout->addWidget(enableToolTips->checkBox(),ii++,0);
-
+#endif
// *********************************************************
topFrame = addPage(i18n("Agenda View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
topLayout = new QGridLayout(topFrame,5,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
ii = 0;
dummy =
@@ -711,10 +716,11 @@ void KOPrefsDialog::setupViewsTab()
topFrame = addPage(i18n("Month View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
topLayout = new QGridLayout(topFrame,5,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
+ qDebug("%d %d ",mSpacingHint, mMarginHint );
ii = 0;
QLabel *lab;
QHBox *habo = new QHBox( topFrame );
if ( QApplication::desktop()->width() <= 480 ) {
@@ -805,10 +811,10 @@ void KOPrefsDialog::setupViewsTab()
topFrame = addPage(i18n("What's Next View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
topLayout = new QGridLayout(topFrame,4,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
ii = 0;
QHBox* hdummy = new QHBox(topFrame);
@@ -817,9 +823,9 @@ void KOPrefsDialog::setupViewsTab()
topLayout->addWidget(hdummy,ii++,0);
QHBox *prioBox = new QHBox(topFrame);
- // intervalBox->setSpacing(spacingHint());
+ // intervalBox->setSpacing(mSpacingHint);
topLayout->addWidget(prioBox,ii++,0);
QString messa = i18n("Show topmost todo prios in What's Next:");
if ( QApplication::desktop()->width() < 300 )
@@ -861,10 +867,10 @@ void KOPrefsDialog::setupViewsTab()
topFrame = addPage(i18n("Todo View"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
topLayout = new QGridLayout(topFrame,4,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
ii = 0;
dummy =
addWidBool(i18n("Hide not running Todos in To-do view"),
&(KOPrefs::instance()->mHideNonStartedTodos),topFrame);
@@ -927,10 +933,10 @@ dummy =
topFrame = addPage(i18n("View Options"),0,0);
topLayout = new QGridLayout(topFrame,4,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
ii = 0;
lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame);
topLayout->addWidget(lab ,ii++,0);
@@ -962,10 +968,10 @@ dummy =
topFrame = addPage(i18n("Alarm"),0,0);
// DesktopIcon("viewmag",KIcon::SizeMedium));
topLayout = new QGridLayout(topFrame,2,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
int iii = 0;
dummy =
addWidBool(i18n("Use internal alarm notification"),
@@ -1188,10 +1194,10 @@ void KOPrefsDialog::setupColorsTab()
QFrame *topFrame = addPage(i18n("Colors"),0,0);
// DesktopIcon("colorize",KIcon::SizeMedium));
QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
- // topLayout->setSpacing(spacingHint());
- // topLayout->setMargin(marginHint());
+ // topLayout->setSpacing(mSpacingHint);
+ // topLayout->setMargin(mMarginHint);
topLayout->setSpacing(2);
topLayout->setMargin(3);
@@ -1297,10 +1303,10 @@ void KOPrefsDialog::setupPrinterTab()
mPrinterTab = addPage(i18n("Printing"),0,
DesktopIcon("fileprint",KIcon::SizeMedium));
QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
topLayout->setRowStretch(4,1);
}
@@ -1310,10 +1316,10 @@ void KOPrefsDialog::setupGroupSchedulingTab()
QFrame *topFrame = addPage(i18n("Group Scheduling"),0,
DesktopIcon("personal",KIcon::SizeMedium));
QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
#if 0
KPrefsDialogWidRadios *schedulerGroup =
addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler),
@@ -1361,10 +1367,10 @@ void KOPrefsDialog::setupGroupAutomationTab()
QFrame *topFrame = addPage(i18n("Group Automation"),0,
DesktopIcon("personal",KIcon::SizeMedium));
QGridLayout *topLayout = new QGridLayout(topFrame,5,1);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
KPrefsDialogWidRadios *autoRefreshGroup =
addWidRadios(i18n("Auto Send Refresh"),
&(KOPrefs::instance()->mIMIPAutoRefresh),topFrame);
@@ -1660,10 +1666,10 @@ void KOPrefsDialog::setupTimeZoneTab()
QFrame *topFrame = addPage(i18n("Time Zone"),0,0);
// DesktopIcon("clock",KIcon::SizeMedium));
QGridLayout *topLayout = new QGridLayout(topFrame,5,2);
- topLayout->setSpacing(spacingHint());
- topLayout->setMargin(marginHint());
+ topLayout->setSpacing(mSpacingHint);
+ topLayout->setMargin(mMarginHint);
QHBox *timeZoneBox = new QHBox( topFrame );
topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 );