summaryrefslogtreecommitdiffabout
path: root/kmicromail/koprefsdialog.cpp
Unidiff
Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/koprefsdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp
index 9cde5cf..7de7064 100644
--- a/kmicromail/koprefsdialog.cpp
+++ b/kmicromail/koprefsdialog.cpp
@@ -1,167 +1,167 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23#include <kdialog.h> 23#include <kdialog.h>
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qlabel.h> 25#include <qlabel.h>
26#include <qgroupbox.h> 26#include <qgroupbox.h>
27#include <qbuttongroup.h> 27#include <qbuttongroup.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29#include <qfont.h> 29#include <qfont.h>
30#include <qslider.h> 30#include <qslider.h>
31#include <qfile.h> 31#include <qfile.h>
32#include <qtextstream.h> 32#include <qtextstream.h>
33#include <qcombobox.h> 33#include <qcombobox.h>
34#include <qvbox.h> 34#include <qvbox.h>
35#include <qhbox.h> 35#include <qhbox.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qspinbox.h> 37#include <qspinbox.h>
38#include <qdatetime.h> 38#include <qdatetime.h>
39#include <qcheckbox.h> 39#include <qcheckbox.h>
40#include <qradiobutton.h> 40#include <qradiobutton.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qstrlist.h> 42#include <qstrlist.h>
43#include <qapplication.h> 43#include <qapplication.h>
44 44
45#include <kcolorbutton.h> 45#include <kcolorbutton.h>
46#include <kdebug.h> 46#include <kdebug.h>
47#include <klocale.h> 47#include <klocale.h>
48#include <kglobal.h> 48#include <kglobal.h>
49#include <kfontdialog.h> 49#include <kfontdialog.h>
50#include <kfiledialog.h> 50#include <kfiledialog.h>
51#include <kmessagebox.h> 51#include <kmessagebox.h>
52#include <kcolordialog.h> 52#include <kcolordialog.h>
53#include <kiconloader.h> 53#include <kiconloader.h>
54#include <kemailsettings.h> 54#include <kemailsettings.h>
55#include <kstandarddirs.h> 55#include <kstandarddirs.h>
56#include <kglobalsettings.h> 56#include <kglobalsettings.h>
57 57
58#include <klineedit.h> 58#include <klineedit.h>
59 59
60 60
61#include "koprefs.h" 61#include "koprefs.h"
62 62
63#include "koprefsdialog.h" 63#include "koprefsdialog.h"
64//#include <kprefswidget.h> 64//#include <kprefswidget.h>
65 65
66 66
67KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : 67KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) :
68 KPrefsDialog(KOPrefs::instance(),parent,name,true) 68 KPrefsDialog(KOPrefs::instance(),parent,name,true)
69{ 69{
70 70
71 setFont( KGlobalSettings::generalFont() ); 71 setFont( KGlobalSettings::generalMaxFont() );
72 setCaption( i18n("Settings - some need a restart (nr)")); 72 setCaption( i18n("Settings - some need a restart (nr)"));
73 setupGlobalTab(); 73 setupGlobalTab();
74 setupMainTab(); 74 setupMainTab();
75 setupMailTab();; 75 setupMailTab();;
76 setupFontsTab(); 76 setupFontsTab();
77 readConfig(); 77 readConfig();
78#ifndef DESKTOP_VERSION 78#ifndef DESKTOP_VERSION
79 if ( QApplication::desktop()->height() == 480 ) 79 if ( QApplication::desktop()->height() == 480 )
80 hideButtons(); 80 hideButtons();
81#endif 81#endif
82 82
83#if 0 83#if 0
84 84
85 setupMainTab(); 85 setupMainTab();
86 setupLocaleTab(); 86 setupLocaleTab();
87 setupTimeZoneTab(); 87 setupTimeZoneTab();
88 setupTimeTab(); 88 setupTimeTab();
89 setupLocaleDateTab(); 89 setupLocaleDateTab();
90 setupFontsTab(); 90 setupFontsTab();
91 setupColorsTab(); 91 setupColorsTab();
92 setupViewsTab(); 92 setupViewsTab();
93 //setupSyncTab(); 93 //setupSyncTab();
94 //setupSyncAlgTab(); 94 //setupSyncAlgTab();
95 //setupPrinterTab(); 95 //setupPrinterTab();
96 //setupGroupSchedulingTab(); 96 //setupGroupSchedulingTab();
97 //setupGroupAutomationTab(); 97 //setupGroupAutomationTab();
98#endif 98#endif
99} 99}
100 100
101#include "kpimglobalprefs.h" 101#include "kpimglobalprefs.h"
102 102
103KOPrefsDialog::~KOPrefsDialog() 103KOPrefsDialog::~KOPrefsDialog()
104{ 104{
105} 105}
106void KOPrefsDialog::setupGlobalTab() 106void KOPrefsDialog::setupGlobalTab()
107{ 107{
108 QFrame *topFrame = addPage(i18n("Global"),0,0); 108 QFrame *topFrame = addPage(i18n("Global"),0,0);
109 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); 109 kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" );
110 QVBoxLayout *topLayout = new QVBoxLayout(topFrame); 110 QVBoxLayout *topLayout = new QVBoxLayout(topFrame);
111 topLayout->addWidget( kdelibcfg ); 111 topLayout->addWidget( kdelibcfg );
112 112
113 113
114} 114}
115void KOPrefsDialog::setupMainTab() 115void KOPrefsDialog::setupMainTab()
116{ 116{
117 QFrame *topFrame = addPage(i18n("General"),0,0); 117 QFrame *topFrame = addPage(i18n("General"),0,0);
118 118
119 QGridLayout *topLayout = new QGridLayout(topFrame,6,2); 119 QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
120 topLayout->setSpacing(spacingHint()); 120 topLayout->setSpacing(spacingHint());
121 topLayout->setMargin(marginHint()); 121 topLayout->setMargin(marginHint());
122 122
123 123
124 mNameEdit = new QLineEdit(topFrame); 124 mNameEdit = new QLineEdit(topFrame);
125 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); 125 mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame);
126 topLayout->addWidget(mNameLabel,0,0); 126 topLayout->addWidget(mNameLabel,0,0);
127 topLayout->addWidget(mNameEdit,0,1); 127 topLayout->addWidget(mNameEdit,0,1);
128 128
129 mEmailEdit = new QLineEdit(topFrame); 129 mEmailEdit = new QLineEdit(topFrame);
130 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); 130 mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame);
131 topLayout->addWidget(mEmailLabel,1,0); 131 topLayout->addWidget(mEmailLabel,1,0);
132 topLayout->addWidget(mEmailEdit,1,1); 132 topLayout->addWidget(mEmailEdit,1,1);
133 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); 133 QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame);
134 topLayout->addMultiCellWidget(lab,2,2,0,1); 134 topLayout->addMultiCellWidget(lab,2,2,0,1);
135 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), 135 KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"),
136 &(KOPrefs::instance()->mUseKapi),topFrame); 136 &(KOPrefs::instance()->mUseKapi),topFrame);
137 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); 137 topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1);
138} 138}
139 139
140void KOPrefsDialog::setupMailTab() 140void KOPrefsDialog::setupMailTab()
141{ 141{
142 QFrame *topFrame = addPage(i18n("Mail"),0,0); 142 QFrame *topFrame = addPage(i18n("Mail"),0,0);
143 143
144 QGridLayout *topLayout = new QGridLayout(topFrame,4,2); 144 QGridLayout *topLayout = new QGridLayout(topFrame,4,2);
145 topLayout->setSpacing(spacingHint()); 145 topLayout->setSpacing(spacingHint());
146 topLayout->setMargin(marginHint()); 146 topLayout->setMargin(marginHint());
147 147
148 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), 148 KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"),
149 &(KOPrefs::instance()->mViewAsHtml),topFrame); 149 &(KOPrefs::instance()->mViewAsHtml),topFrame);
150 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); 150 topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1);
151 151
152 152
153 ttt = addWidBool(i18n("Send mails later"), 153 ttt = addWidBool(i18n("Send mails later"),
154 &(KOPrefs::instance()->mSendLater),topFrame); 154 &(KOPrefs::instance()->mSendLater),topFrame);
155 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); 155 topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1);
156 ttt = addWidBool(i18n("Show \"To\" field in list view"), 156 ttt = addWidBool(i18n("Show \"To\" field in list view"),
157 &(KOPrefs::instance()->mShowToField),topFrame); 157 &(KOPrefs::instance()->mShowToField),topFrame);
158 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); 158 topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1);
159 159
160 int iii =3; 160 int iii =3;
161 ttt = addWidBool(i18n("Show info fields at startup"), 161 ttt = addWidBool(i18n("Show info fields at startup"),
162 &(KOPrefs::instance()->mShowInfoStart),topFrame); 162 &(KOPrefs::instance()->mShowInfoStart),topFrame);
163 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 163 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);
164 ++iii; 164 ++iii;
165 ttt = addWidBool(i18n("Show \"Subject\" info field"), 165 ttt = addWidBool(i18n("Show \"Subject\" info field"),
166 &(KOPrefs::instance()->mShowInfoSub),topFrame); 166 &(KOPrefs::instance()->mShowInfoSub),topFrame);
167 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); 167 topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1);