Diffstat (limited to 'kmicromail/koprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/koprefsdialog.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kmicromail/koprefsdialog.cpp b/kmicromail/koprefsdialog.cpp index 4af4a8c..40347cc 100644 --- a/kmicromail/koprefsdialog.cpp +++ b/kmicromail/koprefsdialog.cpp | |||
@@ -1,171 +1,175 @@ | |||
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 | 56 | ||
57 | #include <klineedit.h> | 57 | #include <klineedit.h> |
58 | 58 | ||
59 | 59 | ||
60 | #include "koprefs.h" | 60 | #include "koprefs.h" |
61 | 61 | ||
62 | #include "koprefsdialog.h" | 62 | #include "koprefsdialog.h" |
63 | //#include <kprefswidget.h> | 63 | //#include <kprefswidget.h> |
64 | 64 | ||
65 | 65 | ||
66 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 66 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
67 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 67 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
68 | { | 68 | { |
69 | 69 | ||
70 | setCaption( i18n("Settings - some need a restart (nr)")); | 70 | setCaption( i18n("Settings - some need a restart (nr)")); |
71 | setupGlobalTab(); | 71 | setupGlobalTab(); |
72 | setupMainTab(); | 72 | setupMainTab(); |
73 | setupMailTab();; | 73 | setupMailTab();; |
74 | setupFontsTab(); | 74 | setupFontsTab(); |
75 | readConfig(); | 75 | readConfig(); |
76 | #ifndef DESKTOP_VERSION | ||
77 | if ( QApplication::desktop()->height() == 480 ) | ||
78 | hideButtons(); | ||
79 | #endif | ||
76 | 80 | ||
77 | #if 0 | 81 | #if 0 |
78 | 82 | ||
79 | setupMainTab(); | 83 | setupMainTab(); |
80 | setupLocaleTab(); | 84 | setupLocaleTab(); |
81 | setupTimeZoneTab(); | 85 | setupTimeZoneTab(); |
82 | setupTimeTab(); | 86 | setupTimeTab(); |
83 | setupLocaleDateTab(); | 87 | setupLocaleDateTab(); |
84 | setupFontsTab(); | 88 | setupFontsTab(); |
85 | setupColorsTab(); | 89 | setupColorsTab(); |
86 | setupViewsTab(); | 90 | setupViewsTab(); |
87 | //setupSyncTab(); | 91 | //setupSyncTab(); |
88 | //setupSyncAlgTab(); | 92 | //setupSyncAlgTab(); |
89 | //setupPrinterTab(); | 93 | //setupPrinterTab(); |
90 | //setupGroupSchedulingTab(); | 94 | //setupGroupSchedulingTab(); |
91 | //setupGroupAutomationTab(); | 95 | //setupGroupAutomationTab(); |
92 | #endif | 96 | #endif |
93 | } | 97 | } |
94 | 98 | ||
95 | #include "kpimglobalprefs.h" | 99 | #include "kpimglobalprefs.h" |
96 | 100 | ||
97 | KOPrefsDialog::~KOPrefsDialog() | 101 | KOPrefsDialog::~KOPrefsDialog() |
98 | { | 102 | { |
99 | } | 103 | } |
100 | void KOPrefsDialog::setupGlobalTab() | 104 | void KOPrefsDialog::setupGlobalTab() |
101 | { | 105 | { |
102 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 106 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
103 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 107 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
104 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 108 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
105 | topLayout->addWidget( kdelibcfg ); | 109 | topLayout->addWidget( kdelibcfg ); |
106 | 110 | ||
107 | 111 | ||
108 | } | 112 | } |
109 | void KOPrefsDialog::setupMainTab() | 113 | void KOPrefsDialog::setupMainTab() |
110 | { | 114 | { |
111 | QFrame *topFrame = addPage(i18n("General"),0,0); | 115 | QFrame *topFrame = addPage(i18n("General"),0,0); |
112 | 116 | ||
113 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 117 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
114 | topLayout->setSpacing(spacingHint()); | 118 | topLayout->setSpacing(spacingHint()); |
115 | topLayout->setMargin(marginHint()); | 119 | topLayout->setMargin(marginHint()); |
116 | 120 | ||
117 | 121 | ||
118 | mNameEdit = new QLineEdit(topFrame); | 122 | mNameEdit = new QLineEdit(topFrame); |
119 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 123 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
120 | topLayout->addWidget(mNameLabel,0,0); | 124 | topLayout->addWidget(mNameLabel,0,0); |
121 | topLayout->addWidget(mNameEdit,0,1); | 125 | topLayout->addWidget(mNameEdit,0,1); |
122 | 126 | ||
123 | mEmailEdit = new QLineEdit(topFrame); | 127 | mEmailEdit = new QLineEdit(topFrame); |
124 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 128 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
125 | topLayout->addWidget(mEmailLabel,1,0); | 129 | topLayout->addWidget(mEmailLabel,1,0); |
126 | topLayout->addWidget(mEmailEdit,1,1); | 130 | topLayout->addWidget(mEmailEdit,1,1); |
127 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); | 131 | QLabel *lab = new QLabel( i18n("HINT: Separate multiple\neMail addresses by \";\""), topFrame); |
128 | topLayout->addMultiCellWidget(lab,2,2,0,1); | 132 | topLayout->addMultiCellWidget(lab,2,2,0,1); |
129 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), | 133 | KPrefsDialogWidBool* ttt = addWidBool(i18n("Ignore above settings and\nuse KA/Pi \"Who am I\" instead!"), |
130 | &(KOPrefs::instance()->mUseKapi),topFrame); | 134 | &(KOPrefs::instance()->mUseKapi),topFrame); |
131 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); | 135 | topLayout->addMultiCellWidget(ttt->checkBox(),3,3,0,1); |
132 | } | 136 | } |
133 | 137 | ||
134 | void KOPrefsDialog::setupMailTab() | 138 | void KOPrefsDialog::setupMailTab() |
135 | { | 139 | { |
136 | QFrame *topFrame = addPage(i18n("Mail"),0,0); | 140 | QFrame *topFrame = addPage(i18n("Mail"),0,0); |
137 | 141 | ||
138 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 142 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
139 | topLayout->setSpacing(spacingHint()); | 143 | topLayout->setSpacing(spacingHint()); |
140 | topLayout->setMargin(marginHint()); | 144 | topLayout->setMargin(marginHint()); |
141 | 145 | ||
142 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), | 146 | KPrefsDialogWidBool* ttt = addWidBool(i18n("View mail as html"), |
143 | &(KOPrefs::instance()->mViewAsHtml),topFrame); | 147 | &(KOPrefs::instance()->mViewAsHtml),topFrame); |
144 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); | 148 | topLayout->addMultiCellWidget(ttt->checkBox(),0,0,0,1); |
145 | 149 | ||
146 | 150 | ||
147 | ttt = addWidBool(i18n("Send mails later"), | 151 | ttt = addWidBool(i18n("Send mails later"), |
148 | &(KOPrefs::instance()->mSendLater),topFrame); | 152 | &(KOPrefs::instance()->mSendLater),topFrame); |
149 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); | 153 | topLayout->addMultiCellWidget(ttt->checkBox(),1,1,0,1); |
150 | ttt = addWidBool(i18n("Show \"To\" field in list view"), | 154 | ttt = addWidBool(i18n("Show \"To\" field in list view"), |
151 | &(KOPrefs::instance()->mShowToField),topFrame); | 155 | &(KOPrefs::instance()->mShowToField),topFrame); |
152 | topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); | 156 | topLayout->addMultiCellWidget(ttt->checkBox(),2,2,0,1); |
153 | 157 | ||
154 | int iii =3; | 158 | int iii =3; |
155 | ttt = addWidBool(i18n("Show info fields at startup"), | 159 | ttt = addWidBool(i18n("Show info fields at startup"), |
156 | &(KOPrefs::instance()->mShowInfoStart),topFrame); | 160 | &(KOPrefs::instance()->mShowInfoStart),topFrame); |
157 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); | 161 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); |
158 | ++iii; | 162 | ++iii; |
159 | ttt = addWidBool(i18n("Show \"Subject\" info field"), | 163 | ttt = addWidBool(i18n("Show \"Subject\" info field"), |
160 | &(KOPrefs::instance()->mShowInfoSub),topFrame); | 164 | &(KOPrefs::instance()->mShowInfoSub),topFrame); |
161 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); | 165 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); |
162 | ++iii; | 166 | ++iii; |
163 | ttt = addWidBool(i18n("Show \"From\" info field"), | 167 | ttt = addWidBool(i18n("Show \"From\" info field"), |
164 | &(KOPrefs::instance()->mShowInfoFrom),topFrame); | 168 | &(KOPrefs::instance()->mShowInfoFrom),topFrame); |
165 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); | 169 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); |
166 | ++iii; | 170 | ++iii; |
167 | ttt = addWidBool(i18n("Show \"To\" info field"), | 171 | ttt = addWidBool(i18n("Show \"To\" info field"), |
168 | &(KOPrefs::instance()->mShowInfoTo),topFrame); | 172 | &(KOPrefs::instance()->mShowInfoTo),topFrame); |
169 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); | 173 | topLayout->addMultiCellWidget(ttt->checkBox(),iii,iii,0,1); |
170 | ++iii; | 174 | ++iii; |
171 | 175 | ||