-rw-r--r-- | korganizer/koprefsdialog.cpp | 98 |
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 | |||
@@ -8,1008 +8,1014 @@ | |||
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 | 23 | ||
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 | 57 | ||
57 | #include <kurlrequester.h> | 58 | #include <kurlrequester.h> |
58 | #include <klineedit.h> | 59 | #include <klineedit.h> |
59 | 60 | ||
60 | #if defined(USE_SOLARIS) | 61 | #if defined(USE_SOLARIS) |
61 | #include <sys/param.h> | 62 | #include <sys/param.h> |
62 | 63 | ||
63 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" | 64 | #define ZONEINFODIR "/usr/share/lib/zoneinfo" |
64 | #define INITFILE "/etc/default/init" | 65 | #define INITFILE "/etc/default/init" |
65 | #endif | 66 | #endif |
66 | 67 | ||
67 | #include "koprefs.h" | 68 | #include "koprefs.h" |
68 | 69 | ||
69 | #include "koprefsdialog.h" | 70 | #include "koprefsdialog.h" |
70 | #include "kpimglobalprefs.h" | 71 | #include "kpimglobalprefs.h" |
71 | 72 | ||
72 | 73 | ||
73 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : | 74 | KOPrefsDialog::KOPrefsDialog(QWidget *parent, char *name, bool modal) : |
74 | KPrefsDialog(KOPrefs::instance(),parent,name,true) | 75 | KPrefsDialog(KOPrefs::instance(),parent,name,true) |
75 | { | 76 | { |
76 | 77 | ||
78 | setFont( KGlobalSettings::generalFont() ); | ||
77 | setCaption( i18n("Preferences - some settings need a restart (nr)")); | 79 | setCaption( i18n("Preferences - some settings need a restart (nr)")); |
78 | mCategoryDict.setAutoDelete(true); | 80 | mCategoryDict.setAutoDelete(true); |
79 | 81 | ||
80 | KGlobal::locale()->insertCatalogue("timezones"); | 82 | KGlobal::locale()->insertCatalogue("timezones"); |
83 | mSpacingHint = spacingHintSmall(); | ||
84 | mMarginHint = marginHintSmall(); | ||
85 | #ifndef DESKTOP_VERSION | ||
86 | if ( QApplication::desktop()->height() == 480 ) | ||
87 | hideButtons(); | ||
88 | #endif | ||
81 | 89 | ||
82 | setupGlobalTab(); | 90 | setupGlobalTab(); |
83 | setupMainTab(); | 91 | setupMainTab(); |
84 | // setupLocaleTab(); | 92 | // setupLocaleTab(); |
85 | //setupTimeZoneTab(); | 93 | //setupTimeZoneTab(); |
86 | setupTimeTab(); | 94 | setupTimeTab(); |
87 | //setupLocaleDateTab(); | 95 | //setupLocaleDateTab(); |
88 | setupFontsTab(); | 96 | setupFontsTab(); |
89 | setupColorsTab(); | 97 | setupColorsTab(); |
90 | setupViewsTab(); | 98 | setupViewsTab(); |
91 | //setupSyncTab(); | 99 | //setupSyncTab(); |
92 | //setupSyncAlgTab(); | 100 | //setupSyncAlgTab(); |
93 | //setupPrinterTab(); | 101 | //setupPrinterTab(); |
94 | //setupGroupSchedulingTab(); | 102 | //setupGroupSchedulingTab(); |
95 | //setupGroupAutomationTab(); | 103 | //setupGroupAutomationTab(); |
96 | 104 | ||
97 | #ifndef DESKTOP_VERSION | 105 | |
98 | if ( QApplication::desktop()->height() == 480 ) | ||
99 | hideButtons(); | ||
100 | #endif | ||
101 | } | 106 | } |
102 | 107 | ||
103 | 108 | ||
104 | KOPrefsDialog::~KOPrefsDialog() | 109 | KOPrefsDialog::~KOPrefsDialog() |
105 | { | 110 | { |
106 | } | 111 | } |
107 | void KOPrefsDialog::setupGlobalTab() | 112 | void KOPrefsDialog::setupGlobalTab() |
108 | { | 113 | { |
109 | QFrame *topFrame = addPage(i18n("Global"),0,0); | 114 | QFrame *topFrame = addPage(i18n("Global"),0,0); |
110 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); | 115 | kdelibcfg = new KDEPIMConfigWidget( KPimGlobalPrefs::instance(), topFrame, "KCMKdeLibConfig" ); |
111 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); | 116 | QVBoxLayout *topLayout = new QVBoxLayout(topFrame); |
112 | topLayout->addWidget( kdelibcfg ); | 117 | topLayout->addWidget( kdelibcfg ); |
113 | 118 | ||
114 | 119 | ||
115 | } | 120 | } |
116 | void KOPrefsDialog::setupLocaleDateTab() | 121 | void KOPrefsDialog::setupLocaleDateTab() |
117 | { | 122 | { |
118 | #if 0 | 123 | #if 0 |
119 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); | 124 | QFrame *topFrame = addPage(i18n("Date Format"),0,0); |
120 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); | 125 | QGridLayout *topLayout = new QGridLayout(topFrame,3,2); |
121 | topLayout->setSpacing(spacingHint()); | 126 | topLayout->setSpacing(mSpacingHint); |
122 | topLayout->setMargin(marginHint()); | 127 | topLayout->setMargin(mMarginHint); |
123 | int iii = 0; | 128 | int iii = 0; |
124 | 129 | ||
125 | 130 | ||
126 | KPrefsDialogWidRadios *syncPrefsGroup = | 131 | KPrefsDialogWidRadios *syncPrefsGroup = |
127 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); | 132 | addWidRadios(i18n("Date Format:"),&(KOPrefs::instance()->mPreferredDate),topFrame); |
128 | QString format; | 133 | QString format; |
129 | if ( QApplication::desktop()->width() < 480 ) | 134 | if ( QApplication::desktop()->width() < 480 ) |
130 | format = "(%d.%m.%Y)"; | 135 | format = "(%d.%m.%Y)"; |
131 | else | 136 | else |
132 | format = "(%d.%m.%Y|%A %d %B %Y)"; | 137 | format = "(%d.%m.%Y|%A %d %B %Y)"; |
133 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); | 138 | syncPrefsGroup->addRadio(i18n("24.03.2004 "+format)); |
134 | if ( QApplication::desktop()->width() < 480 ) | 139 | if ( QApplication::desktop()->width() < 480 ) |
135 | format = "(%m.%d.%Y)"; | 140 | format = "(%m.%d.%Y)"; |
136 | else | 141 | else |
137 | format = "(%m.%d.%Y|%A %B %d %Y)"; | 142 | format = "(%m.%d.%Y|%A %B %d %Y)"; |
138 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); | 143 | syncPrefsGroup->addRadio(i18n("03.24.2004 "+format)); |
139 | if ( QApplication::desktop()->width() < 480 ) | 144 | if ( QApplication::desktop()->width() < 480 ) |
140 | format = "(%Y-%m-%d)"; | 145 | format = "(%Y-%m-%d)"; |
141 | else | 146 | else |
142 | format = "(%Y-%m-%d|%A %Y %B %d)"; | 147 | format = "(%Y-%m-%d|%A %Y %B %d)"; |
143 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); | 148 | syncPrefsGroup->addRadio(i18n("2004-03-24 "+format)); |
144 | syncPrefsGroup->addRadio(i18n("User defined")); | 149 | syncPrefsGroup->addRadio(i18n("User defined")); |
145 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 150 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
146 | ++iii; | 151 | ++iii; |
147 | ++iii; | 152 | ++iii; |
148 | QLabel * lab; | 153 | QLabel * lab; |
149 | mUserDateFormatLong = new QLineEdit(topFrame); | 154 | mUserDateFormatLong = new QLineEdit(topFrame); |
150 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); | 155 | lab = new QLabel(mUserDateFormatLong, i18n("User long date:"), topFrame); |
151 | topLayout->addWidget(lab ,iii,0); | 156 | topLayout->addWidget(lab ,iii,0); |
152 | topLayout->addWidget(mUserDateFormatLong,iii,1); | 157 | topLayout->addWidget(mUserDateFormatLong,iii,1); |
153 | ++iii; | 158 | ++iii; |
154 | mUserDateFormatShort = new QLineEdit(topFrame); | 159 | mUserDateFormatShort = new QLineEdit(topFrame); |
155 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); | 160 | lab = new QLabel(mUserDateFormatShort, i18n("User short date:"), topFrame); |
156 | topLayout->addWidget(lab ,iii,0); | 161 | topLayout->addWidget(lab ,iii,0); |
157 | topLayout->addWidget(mUserDateFormatShort,iii,1); | 162 | topLayout->addWidget(mUserDateFormatShort,iii,1); |
158 | ++iii; | 163 | ++iii; |
159 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); | 164 | lab = new QLabel( i18n("Monday 19 April 2004: %A %d %B %Y"), topFrame); |
160 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 165 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
161 | ++iii; | 166 | ++iii; |
162 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); | 167 | lab = new QLabel( i18n("Mon 19.04.04: %a %d.%m.%y"), topFrame); |
163 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 168 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
164 | ++iii; | 169 | ++iii; |
165 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); | 170 | lab = new QLabel( i18n("Mon, 19.Apr.04: %a, %d.%b.%y"), topFrame); |
166 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); | 171 | topLayout->addMultiCellWidget(lab ,iii,iii,0,1); |
167 | ++iii; | 172 | ++iii; |
168 | #endif | 173 | #endif |
169 | 174 | ||
170 | } | 175 | } |
171 | 176 | ||
172 | void KOPrefsDialog::setupLocaleTab() | 177 | void KOPrefsDialog::setupLocaleTab() |
173 | { | 178 | { |
174 | #if 0 | 179 | #if 0 |
175 | QFrame *topFrame = addPage(i18n("Locale"),0,0); | 180 | QFrame *topFrame = addPage(i18n("Locale"),0,0); |
176 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 181 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
177 | topLayout->setSpacing(spacingHint()); | 182 | topLayout->setSpacing(mSpacingHint); |
178 | topLayout->setMargin(marginHint()); | 183 | topLayout->setMargin(mMarginHint); |
179 | int iii = 0; | 184 | int iii = 0; |
180 | KPrefsDialogWidRadios *syncPrefsGroup = | 185 | KPrefsDialogWidRadios *syncPrefsGroup = |
181 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); | 186 | addWidRadios(i18n("Language:(needs restart)"),&(KOPrefs::instance()->mPreferredLanguage),topFrame); |
182 | syncPrefsGroup->addRadio(i18n("English")); | 187 | syncPrefsGroup->addRadio(i18n("English")); |
183 | syncPrefsGroup->addRadio(i18n("German")); | 188 | syncPrefsGroup->addRadio(i18n("German")); |
184 | syncPrefsGroup->addRadio(i18n("French")); | 189 | syncPrefsGroup->addRadio(i18n("French")); |
185 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); | 190 | syncPrefsGroup->addRadio(i18n("User defined (usertranslation.txt)")); |
186 | if ( QApplication::desktop()->width() < 300 ) | 191 | if ( QApplication::desktop()->width() < 300 ) |
187 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 192 | ;// syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
188 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 193 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
189 | ++iii; | 194 | ++iii; |
190 | 195 | ||
191 | syncPrefsGroup = | 196 | syncPrefsGroup = |
192 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); | 197 | addWidRadios(i18n("Time Format(nr):"),&(KOPrefs::instance()->mPreferredTime),topFrame); |
193 | if ( QApplication::desktop()->width() > 300 ) | 198 | if ( QApplication::desktop()->width() > 300 ) |
194 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 199 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
195 | syncPrefsGroup->addRadio(i18n("24:00")); | 200 | syncPrefsGroup->addRadio(i18n("24:00")); |
196 | syncPrefsGroup->addRadio(i18n("12:00am")); | 201 | syncPrefsGroup->addRadio(i18n("12:00am")); |
197 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); | 202 | syncPrefsGroup->groupBox()-> setOrientation (Qt::Vertical); |
198 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 203 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
199 | ++iii; | 204 | ++iii; |
200 | KPrefsDialogWidBool *sb; | 205 | KPrefsDialogWidBool *sb; |
201 | if ( QApplication::desktop()->width() < 300 ) { | 206 | if ( QApplication::desktop()->width() < 300 ) { |
202 | sb = | 207 | sb = |
203 | addWidBool(i18n("Week starts on Sunday"), | 208 | addWidBool(i18n("Week starts on Sunday"), |
204 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); | 209 | &(KOPrefs::instance()->mWeekStartsOnSunday),topFrame); |
205 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 210 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
206 | ++iii; | 211 | ++iii; |
207 | sb = | 212 | sb = |
208 | addWidBool(i18n("Use short date in (WN/E) view"), | 213 | addWidBool(i18n("Use short date in (WN/E) view"), |
209 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 214 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
210 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 215 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
211 | } | 216 | } |
212 | else { | 217 | else { |
213 | QWidget * hb = new QWidget( topFrame ); | 218 | QWidget * hb = new QWidget( topFrame ); |
214 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); | 219 | QHBoxLayout *hbLayout = new QHBoxLayout(hb); |
215 | sb = | 220 | sb = |
216 | addWidBool(i18n("Week starts on Sunday"), | 221 | addWidBool(i18n("Week starts on Sunday"), |
217 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); | 222 | &(KOPrefs::instance()->mWeekStartsOnSunday),hb); |
218 | hbLayout->addWidget(sb->checkBox() ); | 223 | hbLayout->addWidget(sb->checkBox() ); |
219 | sb = | 224 | sb = |
220 | addWidBool(i18n("Use short date in (WN/E) view"), | 225 | addWidBool(i18n("Use short date in (WN/E) view"), |
221 | &(KOPrefs::instance()->mShortDateInViewer),hb); | 226 | &(KOPrefs::instance()->mShortDateInViewer),hb); |
222 | hbLayout->addWidget(sb->checkBox() ); | 227 | hbLayout->addWidget(sb->checkBox() ); |
223 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); | 228 | topLayout->addMultiCellWidget(hb, iii,iii,0,1); |
224 | 229 | ||
225 | } | 230 | } |
226 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION | 231 | // KPrefsDialogWidBool *sb; //#ifndef DESKTOP_VERSION |
227 | #if 0 | 232 | #if 0 |
228 | ++iii; | 233 | ++iii; |
229 | sb = | 234 | sb = |
230 | addWidBool(i18n("Quick load/save (w/o Unicode)"), | 235 | addWidBool(i18n("Quick load/save (w/o Unicode)"), |
231 | &(KOPrefs::instance()->mUseQuicksave),topFrame); | 236 | &(KOPrefs::instance()->mUseQuicksave),topFrame); |
232 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 237 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
233 | #endif | 238 | #endif |
234 | #endif | 239 | #endif |
235 | } | 240 | } |
236 | void KOPrefsDialog::showSyncPage() | 241 | void KOPrefsDialog::showSyncPage() |
237 | { | 242 | { |
238 | showPage ( 0 ) ; | 243 | showPage ( 0 ) ; |
239 | kdelibcfg->showTimeZoneTab() ; | 244 | kdelibcfg->showTimeZoneTab() ; |
240 | 245 | ||
241 | } | 246 | } |
242 | void KOPrefsDialog::setupSyncAlgTab() | 247 | void KOPrefsDialog::setupSyncAlgTab() |
243 | { | 248 | { |
244 | #if 0 | 249 | #if 0 |
245 | QLabel * lab; | 250 | QLabel * lab; |
246 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); | 251 | QFrame *topFrame = addPage(i18n("Sync Prefs"),0,0); |
247 | mSetupSyncAlgTab = topFrame; | 252 | mSetupSyncAlgTab = topFrame; |
248 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 253 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
249 | topLayout->setSpacing(spacingHint()); | 254 | topLayout->setSpacing(mSpacingHint); |
250 | topLayout->setMargin(marginHint()); | 255 | topLayout->setMargin(mMarginHint); |
251 | int iii = 0; | 256 | int iii = 0; |
252 | 257 | ||
253 | KPrefsDialogWidBool *sb = | 258 | KPrefsDialogWidBool *sb = |
254 | addWidBool(i18n("Ask for preferences before syncing"), | 259 | addWidBool(i18n("Ask for preferences before syncing"), |
255 | &(KOPrefs::instance()->mAskForPreferences),topFrame); | 260 | &(KOPrefs::instance()->mAskForPreferences),topFrame); |
256 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 261 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
257 | 262 | ||
258 | ++iii; | 263 | ++iii; |
259 | 264 | ||
260 | KPrefsDialogWidRadios *syncPrefsGroup = | 265 | KPrefsDialogWidRadios *syncPrefsGroup = |
261 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), | 266 | addWidRadios(i18n("Sync preferences:"),&(KOPrefs::instance()->mSyncAlgoPrefs), |
262 | topFrame); | 267 | topFrame); |
263 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); | 268 | syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); |
264 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); | 269 | syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); |
265 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); | 270 | syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); |
266 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); | 271 | syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); |
267 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); | 272 | syncPrefsGroup->addRadio(i18n("Force take local entry always")); |
268 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); | 273 | syncPrefsGroup->addRadio(i18n("Force take remote entry always")); |
269 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); | 274 | topLayout->addMultiCellWidget( syncPrefsGroup->groupBox(),iii,iii,0,1); |
270 | ++iii; | 275 | ++iii; |
271 | sb = | 276 | sb = |
272 | addWidBool(i18n("Show summary after syncing"), | 277 | addWidBool(i18n("Show summary after syncing"), |
273 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); | 278 | &(KOPrefs::instance()->mShowSyncSummary),topFrame); |
274 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 279 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
275 | 280 | ||
276 | ++iii; | 281 | ++iii; |
277 | #endif | 282 | #endif |
278 | 283 | ||
279 | 284 | ||
280 | 285 | ||
281 | } | 286 | } |
282 | 287 | ||
283 | 288 | ||
284 | void KOPrefsDialog::setupSyncTab() | 289 | void KOPrefsDialog::setupSyncTab() |
285 | { | 290 | { |
286 | #if 0 | 291 | #if 0 |
287 | QLabel * lab; | 292 | QLabel * lab; |
288 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); | 293 | QFrame *topFrame = addPage(i18n("Sync Network"),0,0); |
289 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 294 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
290 | topLayout->setSpacing(spacingHint()); | 295 | topLayout->setSpacing(mSpacingHint); |
291 | topLayout->setMargin(marginHint()); | 296 | topLayout->setMargin(mMarginHint); |
292 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); | 297 | lab = new QLabel(i18n("Remote syncing (via ssh/scp)\nnetwork settings "), topFrame); |
293 | int iii = 0; | 298 | int iii = 0; |
294 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); | 299 | topLayout->addMultiCellWidget(lab , iii,iii,0,1); |
295 | ++iii; | 300 | ++iii; |
296 | 301 | ||
297 | mRemoteIPEdit = new QLineEdit(topFrame); | 302 | mRemoteIPEdit = new QLineEdit(topFrame); |
298 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); | 303 | lab = new QLabel(mRemoteIPEdit, i18n("Remote IP:"), topFrame); |
299 | topLayout->addWidget(lab ,iii,0); | 304 | topLayout->addWidget(lab ,iii,0); |
300 | topLayout->addWidget(mRemoteIPEdit,iii,1); | 305 | topLayout->addWidget(mRemoteIPEdit,iii,1); |
301 | ++iii; | 306 | ++iii; |
302 | mRemoteUser = new QLineEdit(topFrame); | 307 | mRemoteUser = new QLineEdit(topFrame); |
303 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); | 308 | lab = new QLabel(mRemoteUser, i18n("Remote user:"), topFrame); |
304 | topLayout->addWidget(lab ,iii,0); | 309 | topLayout->addWidget(lab ,iii,0); |
305 | topLayout->addWidget(mRemoteUser, iii,1); | 310 | topLayout->addWidget(mRemoteUser, iii,1); |
306 | ++iii; | 311 | ++iii; |
307 | 312 | ||
308 | mRemoteFile = new QLineEdit(topFrame); | 313 | mRemoteFile = new QLineEdit(topFrame); |
309 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); | 314 | lab = new QLabel(mRemoteFile, i18n("Remote file:"), topFrame); |
310 | topLayout->addWidget(lab ,iii,0); | 315 | topLayout->addWidget(lab ,iii,0); |
311 | topLayout->addWidget(mRemoteFile,iii,1); | 316 | topLayout->addWidget(mRemoteFile,iii,1); |
312 | ++iii; | 317 | ++iii; |
313 | 318 | ||
314 | mLocalTempFile = new QLineEdit(topFrame); | 319 | mLocalTempFile = new QLineEdit(topFrame); |
315 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); | 320 | lab = new QLabel(mLocalTempFile, i18n("Local temp file:"), topFrame); |
316 | topLayout->addWidget(lab ,iii,0); | 321 | topLayout->addWidget(lab ,iii,0); |
317 | topLayout->addWidget(mLocalTempFile,iii,1); | 322 | topLayout->addWidget(mLocalTempFile,iii,1); |
318 | ++iii; | 323 | ++iii; |
319 | 324 | ||
320 | KPrefsDialogWidBool *wb = | 325 | KPrefsDialogWidBool *wb = |
321 | addWidBool(i18n("Write back synced file"), | 326 | addWidBool(i18n("Write back synced file"), |
322 | &(KOPrefs::instance()->mWriteBackFile),topFrame); | 327 | &(KOPrefs::instance()->mWriteBackFile),topFrame); |
323 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 328 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
324 | ++iii; | 329 | ++iii; |
325 | wb = | 330 | wb = |
326 | addWidBool(i18n("Write back existing entries only"), | 331 | addWidBool(i18n("Write back existing entries only"), |
327 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); | 332 | &(KOPrefs::instance()->mWriteBackExistingOnly),topFrame); |
328 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); | 333 | topLayout->addMultiCellWidget(wb->checkBox(), iii,iii,0,1); |
329 | ++iii; | 334 | ++iii; |
330 | 335 | ||
331 | #endif | 336 | #endif |
332 | } | 337 | } |
333 | 338 | ||
334 | void KOPrefsDialog::setupMainTab() | 339 | void KOPrefsDialog::setupMainTab() |
335 | { | 340 | { |
336 | QFrame *topFrame = addPage(i18n("General"),0,0); | 341 | QFrame *topFrame = addPage(i18n("General"),0,0); |
337 | // DesktopIcon("identity",KIcon::SizeMedium)); | 342 | // DesktopIcon("identity",KIcon::SizeMedium)); |
338 | 343 | ||
339 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 344 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
340 | topLayout->setSpacing(spacingHint()); | 345 | topLayout->setSpacing(mSpacingHint); |
341 | topLayout->setMargin(marginHint()); | 346 | topLayout->setMargin(mMarginHint); |
342 | 347 | ||
343 | // KPrefsDialogWidBool *emailControlCenter = | 348 | // KPrefsDialogWidBool *emailControlCenter = |
344 | // addWidBool(i18n("&Use email settings from Control Center"), | 349 | // addWidBool(i18n("&Use email settings from Control Center"), |
345 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); | 350 | // &(KOPrefs::instance()->mEmailControlCenter),topFrame); |
346 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); | 351 | // topLayout->addMultiCellWidget(emailControlCenter->checkBox(),0,0,0,1); |
347 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), | 352 | // connect(emailControlCenter->checkBox(),SIGNAL(toggled(bool)), |
348 | // SLOT(toggleEmailSettings(bool))); | 353 | // SLOT(toggleEmailSettings(bool))); |
349 | 354 | ||
350 | mNameEdit = new QLineEdit(topFrame); | 355 | mNameEdit = new QLineEdit(topFrame); |
351 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); | 356 | mNameLabel = new QLabel(mNameEdit, i18n("Full &name:"), topFrame); |
352 | topLayout->addWidget(mNameLabel,0,0); | 357 | topLayout->addWidget(mNameLabel,0,0); |
353 | topLayout->addWidget(mNameEdit,0,1); | 358 | topLayout->addWidget(mNameEdit,0,1); |
354 | 359 | ||
355 | mEmailEdit = new QLineEdit(topFrame); | 360 | mEmailEdit = new QLineEdit(topFrame); |
356 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); | 361 | mEmailLabel = new QLabel(mEmailEdit, i18n("E&mail address:"),topFrame); |
357 | topLayout->addWidget(mEmailLabel,1,0); | 362 | topLayout->addWidget(mEmailLabel,1,0); |
358 | topLayout->addWidget(mEmailEdit,1,1); | 363 | topLayout->addWidget(mEmailEdit,1,1); |
359 | KPrefsDialogWidBool *wb; | 364 | KPrefsDialogWidBool *wb; |
360 | 365 | ||
361 | 366 | ||
362 | 367 | ||
363 | KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), | 368 | KPrefsDialogWidBool *widbool = addWidBool(i18n("Full menu bar(nr)"), |
364 | &(KOPrefs::instance()->mShowFullMenu),topFrame); | 369 | &(KOPrefs::instance()->mShowFullMenu),topFrame); |
365 | topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); | 370 | topLayout->addMultiCellWidget( widbool->checkBox(), 2,2,0,1); |
366 | 371 | ||
367 | 372 | ||
368 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), | 373 | widbool = addWidBool(i18n("Mini icons in toolbar(nr)"), |
369 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); | 374 | &(KOPrefs::instance()->mToolBarMiniIcons),topFrame); |
370 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); | 375 | topLayout->addMultiCellWidget( widbool->checkBox(), 3,3,0,1); |
371 | 376 | ||
372 | 377 | ||
373 | KPrefsDialogWidBool *verticalScreen = | 378 | KPrefsDialogWidBool *verticalScreen = |
374 | addWidBool(i18n("Show vertical screen (Needs restart)"), | 379 | addWidBool(i18n("Show vertical screen (Needs restart)"), |
375 | &(KOPrefs::instance()->mVerticalScreen),topFrame); | 380 | &(KOPrefs::instance()->mVerticalScreen),topFrame); |
376 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); | 381 | //topLayout->addWidget(verticalScreen->checkBox(),ii++,0); |
377 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); | 382 | topLayout->addMultiCellWidget(verticalScreen->checkBox(),4,4,0,1); |
378 | 383 | ||
379 | 384 | ||
380 | QHBox *dummy = new QHBox(topFrame); | 385 | QHBox *dummy = new QHBox(topFrame); |
381 | new QLabel(i18n("Days in Next-X-Days:"),dummy); | 386 | new QLabel(i18n("Days in Next-X-Days:"),dummy); |
382 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); | 387 | mNextXDaysSpin = new QSpinBox(2,14,1,dummy); |
383 | 388 | ||
384 | topLayout->addMultiCellWidget(dummy,5,5,0,1); | 389 | topLayout->addMultiCellWidget(dummy,5,5,0,1); |
385 | 390 | ||
386 | 391 | ||
387 | 392 | ||
388 | // KPrefsDialogWidBool *bcc = | 393 | // KPrefsDialogWidBool *bcc = |
389 | // addWidBool(i18n("Send copy to owner when mailing events"), | 394 | // addWidBool(i18n("Send copy to owner when mailing events"), |
390 | // &(KOPrefs::instance()->mBcc),topFrame); | 395 | // &(KOPrefs::instance()->mBcc),topFrame); |
391 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); | 396 | // topLayout->addMultiCellWidget(bcc->checkBox(),4,4,0,1); |
392 | 397 | ||
393 | 398 | ||
394 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); | 399 | // QGroupBox *autoSaveGroup = new QGroupBox(1,Horizontal,i18n("Auto-Save"), topFrame); |
395 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); | 400 | //topLayout->addMultiCellWidget(autoSaveGroup,6,6,0,1); |
396 | 401 | ||
397 | // addWidBool(i18n("Enable automatic saving of calendar"), | 402 | // addWidBool(i18n("Enable automatic saving of calendar"), |
398 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); | 403 | // &(KOPrefs::instance()->mAutoSave),autoSaveGroup); |
399 | 404 | ||
400 | QHBox *intervalBox = new QHBox(topFrame); | 405 | QHBox *intervalBox = new QHBox(topFrame); |
401 | // intervalBox->setSpacing(spacingHint()); | 406 | // intervalBox->setSpacing(mSpacingHint); |
402 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); | 407 | topLayout->addMultiCellWidget(intervalBox,6,6,0,1); |
403 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); | 408 | QLabel *autoSaveIntervalLabel = new QLabel(i18n("Auto save delay in minutes:"),intervalBox); |
404 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); | 409 | mAutoSaveIntervalSpin = new QSpinBox(0,500,1,intervalBox); |
405 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); | 410 | autoSaveIntervalLabel->setBuddy(mAutoSaveIntervalSpin); |
406 | /* | 411 | /* |
407 | QHBox * agendasize = new QHBox ( topFrame ); | 412 | QHBox * agendasize = new QHBox ( topFrame ); |
408 | 413 | ||
409 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); | 414 | new QLabel (i18n("AllDayAgenda Height:"), agendasize ); |
410 | 415 | ||
411 | 416 | ||
412 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); | 417 | mHourSizeSlider = new QSlider(24,47,1,24,Horizontal,agendasize); |
413 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); | 418 | topLayout->addMultiCellWidget(agendasize,7,7,0,1); |
414 | */ | 419 | */ |
415 | 420 | ||
416 | 421 | ||
417 | KPrefsDialogWidBool *ask = | 422 | KPrefsDialogWidBool *ask = |
418 | addWidBool(i18n("Ask for quit when closing KO/Pi"), | 423 | addWidBool(i18n("Ask for quit when closing KO/Pi"), |
419 | &(KOPrefs::instance()->mAskForQuit),topFrame); | 424 | &(KOPrefs::instance()->mAskForQuit),topFrame); |
420 | topLayout->addMultiCellWidget(ask->checkBox(),7,7,0,1); | 425 | topLayout->addMultiCellWidget(ask->checkBox(),7,7,0,1); |
421 | 426 | ||
422 | 427 | ||
423 | /* | 428 | /* |
424 | KPrefsDialogWidBool *confirmCheck = | 429 | KPrefsDialogWidBool *confirmCheck = |
425 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), | 430 | addWidBool(i18n("Confirm &deletes"),&(KOPrefs::instance()->mConfirm), |
426 | topFrame); | 431 | topFrame); |
427 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); | 432 | topLayout->addMultiCellWidget(confirmCheck->checkBox(),7,7,0,1); |
428 | 433 | ||
429 | 434 | ||
430 | mEnableGroupScheduling = | 435 | mEnableGroupScheduling = |
431 | addWidBool(i18n("Enable group scheduling"), | 436 | addWidBool(i18n("Enable group scheduling"), |
432 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); | 437 | &(KOPrefs::instance()->mEnableGroupScheduling),topFrame); |
433 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); | 438 | topLayout->addWidget(mEnableGroupScheduling->checkBox(),8,0); |
434 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), | 439 | connect(mEnableGroupScheduling->checkBox(),SIGNAL(clicked()), |
435 | SLOT(warningGroupScheduling())); | 440 | SLOT(warningGroupScheduling())); |
436 | 441 | ||
437 | mEnableProjectView = | 442 | mEnableProjectView = |
438 | addWidBool(i18n("Enable project view"), | 443 | addWidBool(i18n("Enable project view"), |
439 | &(KOPrefs::instance()->mEnableProjectView),topFrame); | 444 | &(KOPrefs::instance()->mEnableProjectView),topFrame); |
440 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); | 445 | topLayout->addWidget(mEnableProjectView->checkBox(),9,0); |
441 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), | 446 | connect(mEnableProjectView->checkBox(),SIGNAL(clicked()), |
442 | SLOT(warningProjectView())); | 447 | SLOT(warningProjectView())); |
443 | 448 | ||
444 | // Can't be disabled anymore | 449 | // Can't be disabled anymore |
445 | mEnableGroupScheduling->checkBox()->hide(); | 450 | mEnableGroupScheduling->checkBox()->hide(); |
446 | 451 | ||
447 | // Disable setting, because this feature now becomes stable | 452 | // Disable setting, because this feature now becomes stable |
448 | mEnableProjectView->checkBox()->hide(); | 453 | mEnableProjectView->checkBox()->hide(); |
449 | 454 | ||
450 | KPrefsDialogWidRadios *defaultFormatGroup = | 455 | KPrefsDialogWidRadios *defaultFormatGroup = |
451 | addWidRadios(i18n("Default Calendar Format"), | 456 | addWidRadios(i18n("Default Calendar Format"), |
452 | &(KOPrefs::instance()->mDefaultFormat),topFrame); | 457 | &(KOPrefs::instance()->mDefaultFormat),topFrame); |
453 | defaultFormatGroup->addRadio(i18n("vCalendar")); | 458 | defaultFormatGroup->addRadio(i18n("vCalendar")); |
454 | defaultFormatGroup->addRadio(i18n("iCalendar")); | 459 | defaultFormatGroup->addRadio(i18n("iCalendar")); |
455 | 460 | ||
456 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); | 461 | topLayout->addMultiCellWidget(defaultFormatGroup->groupBox(),10,10,0,1); |
457 | 462 | ||
458 | // Default format unconditionally is iCalendar | 463 | // Default format unconditionally is iCalendar |
459 | defaultFormatGroup->groupBox()->hide(); | 464 | defaultFormatGroup->groupBox()->hide(); |
460 | 465 | ||
461 | KPrefsDialogWidRadios *mailClientGroup = | 466 | KPrefsDialogWidRadios *mailClientGroup = |
462 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), | 467 | addWidRadios(i18n("Mail Client"),&(KOPrefs::instance()->mMailClient), |
463 | topFrame); | 468 | topFrame); |
464 | mailClientGroup->addRadio(i18n("KMail")); | 469 | mailClientGroup->addRadio(i18n("KMail")); |
465 | mailClientGroup->addRadio(i18n("Sendmail")); | 470 | mailClientGroup->addRadio(i18n("Sendmail")); |
466 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); | 471 | topLayout->addMultiCellWidget(mailClientGroup->groupBox(),11,11,0,1); |
467 | 472 | ||
468 | KPrefsDialogWidBool *htmlsave = | 473 | KPrefsDialogWidBool *htmlsave = |
469 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), | 474 | addWidBool(i18n("Export to HTML with every save"),&(KOPrefs::instance()->mHtmlWithSave), |
470 | topFrame); | 475 | topFrame); |
471 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); | 476 | topLayout->addMultiCellWidget(htmlsave->checkBox(),12,12,0,1); |
472 | 477 | ||
473 | KPrefsDialogWidRadios *destinationGroup = | 478 | KPrefsDialogWidRadios *destinationGroup = |
474 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), | 479 | addWidRadios(i18n("New Events/Todos should"),&(KOPrefs::instance()->mDestination), |
475 | topFrame); | 480 | topFrame); |
476 | destinationGroup->addRadio(i18n("be added to the standard resource")); | 481 | destinationGroup->addRadio(i18n("be added to the standard resource")); |
477 | destinationGroup->addRadio(i18n("be asked which resource to use")); | 482 | destinationGroup->addRadio(i18n("be asked which resource to use")); |
478 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); | 483 | topLayout->addMultiCellWidget(destinationGroup->groupBox(),13,13,0,1); |
479 | 484 | ||
480 | topLayout->setRowStretch(14,1); | 485 | topLayout->setRowStretch(14,1); |
481 | */ | 486 | */ |
482 | } | 487 | } |
483 | 488 | ||
484 | 489 | ||
485 | void KOPrefsDialog::setupTimeTab() | 490 | void KOPrefsDialog::setupTimeTab() |
486 | { | 491 | { |
487 | QFrame *topFrame = addPage(i18n("Time"),0,0); | 492 | QFrame *topFrame = addPage(i18n("Time"),0,0); |
488 | // DesktopIcon("clock",KIcon::SizeMedium)); | 493 | // DesktopIcon("clock",KIcon::SizeMedium)); |
489 | 494 | ||
490 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); | 495 | QGridLayout *topLayout = new QGridLayout(topFrame,4,2); |
491 | topLayout->setSpacing(spacingHint()); | 496 | topLayout->setSpacing(mSpacingHint); |
492 | topLayout->setMargin(marginHint()); | 497 | topLayout->setMargin(mMarginHint); |
493 | 498 | ||
494 | QHBox *dummy = new QHBox(topFrame); | 499 | QHBox *dummy = new QHBox(topFrame); |
495 | KPrefsDialogWidTime *dayBegins = | 500 | KPrefsDialogWidTime *dayBegins = |
496 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 501 | addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
497 | dummy); | 502 | dummy); |
498 | //topLayout->addWidget(dayBegins->label(),2,0); | 503 | //topLayout->addWidget(dayBegins->label(),2,0); |
499 | 504 | ||
500 | //topLayout->addWidget(dayBegins->spinBox(),2,1); | 505 | //topLayout->addWidget(dayBegins->spinBox(),2,1); |
501 | topLayout->addMultiCellWidget(dummy,0,0,0,1); | 506 | topLayout->addMultiCellWidget(dummy,0,0,0,1); |
502 | 507 | ||
503 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), | 508 | topLayout->addWidget(new QLabel(i18n("Default appointment time:"), |
504 | topFrame),1,0); | 509 | topFrame),1,0); |
505 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); | 510 | mStartTimeSpin = new QSpinBox(0,23,1,topFrame); |
506 | mStartTimeSpin->setSuffix(":00"); | 511 | mStartTimeSpin->setSuffix(":00"); |
507 | topLayout->addWidget(mStartTimeSpin,1,1); | 512 | topLayout->addWidget(mStartTimeSpin,1,1); |
508 | 513 | ||
509 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), | 514 | topLayout->addWidget(new QLabel(i18n("Def. duration of new app.:"), |
510 | topFrame),2,0); | 515 | topFrame),2,0); |
511 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); | 516 | mDefaultDurationSpin = new QSpinBox(0,23,1,topFrame); |
512 | mDefaultDurationSpin->setSuffix(":00"); | 517 | mDefaultDurationSpin->setSuffix(":00"); |
513 | topLayout->addWidget(mDefaultDurationSpin,2,1); | 518 | topLayout->addWidget(mDefaultDurationSpin,2,1); |
514 | 519 | ||
515 | QStringList alarmList; | 520 | QStringList alarmList; |
516 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") | 521 | alarmList << i18n("1 minute") << i18n("5 minutes") << i18n("10 minutes") |
517 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; | 522 | << i18n("15 minutes") << i18n("30 minutes")<< i18n("1 hour")<< i18n("3 hours") << i18n("24 hours") ; |
518 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), | 523 | topLayout->addWidget(new QLabel(i18n("Default alarm time:"),topFrame), |
519 | 3,0); | 524 | 3,0); |
520 | mAlarmTimeCombo = new QComboBox(topFrame); | 525 | mAlarmTimeCombo = new QComboBox(topFrame); |
521 | mAlarmTimeCombo->insertStringList(alarmList); | 526 | mAlarmTimeCombo->insertStringList(alarmList); |
522 | topLayout->addWidget(mAlarmTimeCombo,3,1); | 527 | topLayout->addWidget(mAlarmTimeCombo,3,1); |
523 | 528 | ||
524 | 529 | ||
525 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, | 530 | QGroupBox *workingHoursGroup = new QGroupBox(1,Horizontal, |
526 | i18n("Working Hours"), | 531 | i18n("Working Hours"), |
527 | topFrame); | 532 | topFrame); |
528 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); | 533 | topLayout->addMultiCellWidget(workingHoursGroup,4,4,0,1); |
529 | workingHoursGroup->layout()->setSpacing( 0 ); | 534 | workingHoursGroup->layout()->setSpacing( 0 ); |
530 | workingHoursGroup->layout()->setMargin( 4 ); | 535 | workingHoursGroup->layout()->setMargin( 4 ); |
531 | QHBox *workStartBox = new QHBox(workingHoursGroup); | 536 | QHBox *workStartBox = new QHBox(workingHoursGroup); |
532 | // workStartBox->setMargin( 0 ); | 537 | // workStartBox->setMargin( 0 ); |
533 | addWidTime(i18n("Daily starting hour:"), | 538 | addWidTime(i18n("Daily starting hour:"), |
534 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); | 539 | &(KOPrefs::instance()->mWorkingHoursStart),workStartBox); |
535 | 540 | ||
536 | QHBox *workEndBox = new QHBox(workingHoursGroup); | 541 | QHBox *workEndBox = new QHBox(workingHoursGroup); |
537 | //workEndBox->setMargin( 0 ); | 542 | //workEndBox->setMargin( 0 ); |
538 | addWidTime(i18n("Daily ending hour:"), | 543 | addWidTime(i18n("Daily ending hour:"), |
539 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); | 544 | &(KOPrefs::instance()->mWorkingHoursEnd),workEndBox); |
540 | QVBox *excludeBox = new QVBox(workingHoursGroup); | 545 | QVBox *excludeBox = new QVBox(workingHoursGroup); |
541 | //excludeBox->setMargin( 0 ); | 546 | //excludeBox->setMargin( 0 ); |
542 | addWidBool(i18n("Exclude holidays"), | 547 | addWidBool(i18n("Exclude holidays"), |
543 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); | 548 | &(KOPrefs::instance()->mExcludeHolidays),excludeBox); |
544 | 549 | ||
545 | addWidBool(i18n("Exclude Saturdays"), | 550 | addWidBool(i18n("Exclude Saturdays"), |
546 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); | 551 | &(KOPrefs::instance()->mExcludeSaturdays),excludeBox); |
547 | 552 | ||
548 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), | 553 | // KPrefsDialogWidBool *marcusBainsShowSeconds = addWidBool(i18n("Show seconds on Marcus Bains line"), |
549 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), | 554 | // &(KOPrefs::instance()->mMarcusBainsShowSeconds), |
550 | // topFrame); | 555 | // topFrame); |
551 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); | 556 | // topLayout->addWidget(marcusBainsShowSeconds->checkBox(),5,0); |
552 | 557 | ||
553 | // topLayout->setRowStretch(6,1); | 558 | // topLayout->setRowStretch(6,1); |
554 | } | 559 | } |
555 | 560 | ||
556 | 561 | ||
557 | void KOPrefsDialog::setupViewsTab() | 562 | void KOPrefsDialog::setupViewsTab() |
558 | { | 563 | { |
559 | 564 | ||
560 | QFrame *topFrame = addPage(i18n("Views"),0,0); | 565 | QFrame *topFrame = addPage(i18n("Views"),0,0); |
561 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 566 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
562 | 567 | ||
563 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); | 568 | QGridLayout *topLayout = new QGridLayout(topFrame,6,1); |
564 | topLayout->setSpacing(spacingHint()); | 569 | topLayout->setSpacing(mSpacingHint); |
565 | topLayout->setMargin(marginHint()); | 570 | topLayout->setMargin(mMarginHint); |
566 | 571 | ||
567 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; | 572 | // QBoxLayout *dayBeginsLayout = new QHBoxLayout; |
568 | // topLayout->addLayout(dayBeginsLayout,0,0); | 573 | // topLayout->addLayout(dayBeginsLayout,0,0); |
569 | 574 | ||
570 | // KPrefsDialogWidTime *dayBegins = | 575 | // KPrefsDialogWidTime *dayBegins = |
571 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), | 576 | // addWidTime(i18n("Day begins at:"),&(KOPrefs::instance()->mDayBegins), |
572 | // topFrame); | 577 | // topFrame); |
573 | // dayBeginsLayout->addWidget(dayBegins->label()); | 578 | // dayBeginsLayout->addWidget(dayBegins->label()); |
574 | // dayBeginsLayout->addStretch(1); | 579 | // dayBeginsLayout->addStretch(1); |
575 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); | 580 | // dayBeginsLayout->addWidget(dayBegins->spinBox()); |
576 | 581 | ||
577 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; | 582 | // QBoxLayout *nextDaysLayout = new QHBoxLayout; |
578 | // topLayout->addLayout(nextDaysLayout,1,0); | 583 | // topLayout->addLayout(nextDaysLayout,1,0); |
579 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); | 584 | // nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); |
580 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); | 585 | // mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); |
581 | // nextDaysLayout->addStretch(1); | 586 | // nextDaysLayout->addStretch(1); |
582 | // nextDaysLayout->addWidget(mNextXDaysSpin); | 587 | // nextDaysLayout->addWidget(mNextXDaysSpin); |
583 | 588 | ||
584 | 589 | ||
585 | int ii = 0; | 590 | int ii = 0; |
586 | KPrefsDialogWidBool *dummy = | 591 | KPrefsDialogWidBool *dummy = |
587 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), | 592 | addWidBool(i18n("Edit item on doubleclick (if not, show)"), |
588 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); | 593 | &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); |
589 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 594 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
590 | 595 | ||
591 | 596 | ||
592 | 597 | ||
593 | 598 | ||
594 | 599 | ||
595 | 600 | ||
596 | // topLayout->addWidget(hourSizeGroup,ii++,0); | 601 | // topLayout->addWidget(hourSizeGroup,ii++,0); |
597 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); | 602 | // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); |
598 | //topLayout->setRowStretch(11,1); | 603 | //topLayout->setRowStretch(11,1); |
599 | 604 | ||
600 | 605 | ||
601 | 606 | ||
602 | 607 | ||
603 | #if 0 | 608 | #if 0 |
604 | 609 | ||
605 | topFrame = addPage(i18n("ViewChange"),0,0); | 610 | topFrame = addPage(i18n("ViewChange"),0,0); |
606 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 611 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
607 | 612 | ||
608 | topLayout = new QGridLayout(topFrame,6,1); | 613 | topLayout = new QGridLayout(topFrame,6,1); |
609 | topLayout->setSpacing(spacingHint()); | 614 | topLayout->setSpacing(mSpacingHint); |
610 | topLayout->setMargin(marginHint()); | 615 | topLayout->setMargin(mMarginHint); |
611 | ii = 0; | 616 | ii = 0; |
612 | 617 | ||
613 | #endif | 618 | #endif |
614 | 619 | ||
615 | dummy = | 620 | dummy = |
616 | addWidBool(i18n("Hold fullscreen on view change"), | 621 | addWidBool(i18n("Hold fullscreen on view change"), |
617 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); | 622 | &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); |
618 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 623 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
619 | 624 | ||
620 | dummy = | 625 | dummy = |
621 | addWidBool(i18n("Hold non-fullscreen on view change"), | 626 | addWidBool(i18n("Hold non-fullscreen on view change"), |
622 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); | 627 | &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); |
623 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 628 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
624 | 629 | ||
625 | 630 | ||
626 | 631 | ||
627 | KPrefsDialogWidBool *fullViewMonth = | 632 | KPrefsDialogWidBool *fullViewMonth = |
628 | addWidBool(i18n("Next days view uses full window"), | 633 | addWidBool(i18n("Next days view uses full window"), |
629 | &(KOPrefs::instance()->mFullViewMonth),topFrame); | 634 | &(KOPrefs::instance()->mFullViewMonth),topFrame); |
630 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); | 635 | topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); |
631 | 636 | ||
632 | 637 | ||
633 | KPrefsDialogWidBool *fullViewTodo = | 638 | KPrefsDialogWidBool *fullViewTodo = |
634 | addWidBool(i18n("Event list view uses full window"), | 639 | addWidBool(i18n("Event list view uses full window"), |
635 | &(KOPrefs::instance()->mFullViewTodo),topFrame); | 640 | &(KOPrefs::instance()->mFullViewTodo),topFrame); |
636 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); | 641 | topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); |
637 | dummy = | 642 | dummy = |
638 | addWidBool(i18n("Listview uses monthly timespan"), | 643 | addWidBool(i18n("Listview uses monthly timespan"), |
639 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); | 644 | &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); |
640 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 645 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
641 | dummy = | 646 | dummy = |
642 | addWidBool(i18n("Highlight selection in Time Edit"), | 647 | addWidBool(i18n("Highlight selection in Time Edit"), |
643 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); | 648 | &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); |
644 | topLayout->addWidget( dummy->checkBox(), ii++,0); | 649 | topLayout->addWidget( dummy->checkBox(), ii++,0); |
645 | 650 | ||
646 | KPrefsDialogWidBool *dailyRecur = | 651 | KPrefsDialogWidBool *dailyRecur = |
647 | addWidBool(i18n("Show events that recur daily in date nav."), | 652 | addWidBool(i18n("Show events that recur daily in date nav."), |
648 | &(KOPrefs::instance()->mDailyRecur),topFrame); | 653 | &(KOPrefs::instance()->mDailyRecur),topFrame); |
649 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 654 | topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
650 | 655 | ||
651 | KPrefsDialogWidBool *weeklyRecur = | 656 | KPrefsDialogWidBool *weeklyRecur = |
652 | addWidBool(i18n("Show ev. that recur weekly in date nav."), | 657 | addWidBool(i18n("Show ev. that recur weekly in date nav."), |
653 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); | 658 | &(KOPrefs::instance()->mWeeklyRecur),topFrame); |
654 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); | 659 | topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); |
655 | 660 | ||
656 | 661 | #ifdef DESKTOP_VERSION | |
657 | KPrefsDialogWidBool *enableToolTips = | 662 | KPrefsDialogWidBool *enableToolTips = |
658 | addWidBool(i18n("Enable tooltips displaying summary of ev."), | 663 | addWidBool(i18n("Enable tooltips displaying summary of ev."), |
659 | &(KOPrefs::instance()->mEnableToolTips),topFrame); | 664 | &(KOPrefs::instance()->mEnableToolTips),topFrame); |
660 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); | 665 | topLayout->addWidget(enableToolTips->checkBox(),ii++,0); |
661 | 666 | #endif | |
662 | // ********************************************************* | 667 | // ********************************************************* |
663 | 668 | ||
664 | topFrame = addPage(i18n("Agenda View"),0,0); | 669 | topFrame = addPage(i18n("Agenda View"),0,0); |
665 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 670 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
666 | 671 | ||
667 | topLayout = new QGridLayout(topFrame,5,1); | 672 | topLayout = new QGridLayout(topFrame,5,1); |
668 | topLayout->setSpacing(spacingHint()); | 673 | topLayout->setSpacing(mSpacingHint); |
669 | topLayout->setMargin(marginHint()); | 674 | topLayout->setMargin(mMarginHint); |
670 | ii = 0; | 675 | ii = 0; |
671 | 676 | ||
672 | 677 | ||
673 | dummy = | 678 | dummy = |
674 | addWidBool(i18n("Show time in agenda items"), | 679 | addWidBool(i18n("Show time in agenda items"), |
675 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); | 680 | &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); |
676 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 681 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
677 | 682 | ||
678 | dummy = | 683 | dummy = |
679 | addWidBool(i18n("Highlight current day in agenda"), | 684 | addWidBool(i18n("Highlight current day in agenda"), |
680 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); | 685 | &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); |
681 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 686 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
682 | 687 | ||
683 | dummy = | 688 | dummy = |
684 | addWidBool(i18n("Use light color for highlight current day"), | 689 | addWidBool(i18n("Use light color for highlight current day"), |
685 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); | 690 | &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); |
686 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 691 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
687 | 692 | ||
688 | 693 | ||
689 | KPrefsDialogWidBool *marcusBainsEnabled = | 694 | KPrefsDialogWidBool *marcusBainsEnabled = |
690 | addWidBool(i18n("Show current time"), | 695 | addWidBool(i18n("Show current time"), |
691 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); | 696 | &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); |
692 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); | 697 | topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); |
693 | 698 | ||
694 | 699 | ||
695 | dummy = | 700 | dummy = |
696 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), | 701 | addWidBool(i18n("Set agenda to DayBeginsAt on change"), |
697 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); | 702 | &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); |
698 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 703 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
699 | 704 | ||
700 | dummy = | 705 | dummy = |
701 | addWidBool(i18n("Set agenda to current time on change"), | 706 | addWidBool(i18n("Set agenda to current time on change"), |
702 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); | 707 | &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); |
703 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 708 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
704 | 709 | ||
705 | 710 | ||
706 | 711 | ||
707 | 712 | ||
708 | 713 | ||
709 | 714 | ||
710 | 715 | ||
711 | topFrame = addPage(i18n("Month View"),0,0); | 716 | topFrame = addPage(i18n("Month View"),0,0); |
712 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 717 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
713 | 718 | ||
714 | topLayout = new QGridLayout(topFrame,5,1); | 719 | topLayout = new QGridLayout(topFrame,5,1); |
715 | topLayout->setSpacing(spacingHint()); | 720 | topLayout->setSpacing(mSpacingHint); |
716 | topLayout->setMargin(marginHint()); | 721 | topLayout->setMargin(mMarginHint); |
722 | qDebug("%d %d ",mSpacingHint, mMarginHint ); | ||
717 | ii = 0; | 723 | ii = 0; |
718 | QLabel *lab; | 724 | QLabel *lab; |
719 | QHBox *habo = new QHBox( topFrame ); | 725 | QHBox *habo = new QHBox( topFrame ); |
720 | if ( QApplication::desktop()->width() <= 480 ) { | 726 | if ( QApplication::desktop()->width() <= 480 ) { |
721 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); | 727 | lab = new QLabel ( i18n("Show events that recur "), topFrame ); |
722 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 728 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
723 | ii++; | 729 | ii++; |
724 | } else { | 730 | } else { |
725 | new QLabel ( i18n("Show events that recur "), habo ); | 731 | new QLabel ( i18n("Show events that recur "), habo ); |
726 | } | 732 | } |
727 | dailyRecur = | 733 | dailyRecur = |
728 | addWidBool(i18n("daily"), | 734 | addWidBool(i18n("daily"), |
729 | &(KOPrefs::instance()->mMonthDailyRecur),habo); | 735 | &(KOPrefs::instance()->mMonthDailyRecur),habo); |
730 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); | 736 | // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); |
731 | 737 | ||
732 | weeklyRecur = | 738 | weeklyRecur = |
733 | addWidBool(i18n("weekly"), | 739 | addWidBool(i18n("weekly"), |
734 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); | 740 | &(KOPrefs::instance()->mMonthWeeklyRecur),habo); |
735 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 741 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
736 | ii++; | 742 | ii++; |
737 | 743 | ||
738 | 744 | ||
739 | habo = new QHBox( topFrame ); | 745 | habo = new QHBox( topFrame ); |
740 | if ( QApplication::desktop()->width() <= 480 ) { | 746 | if ( QApplication::desktop()->width() <= 480 ) { |
741 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); | 747 | lab = new QLabel (i18n("Show in every cell ") , topFrame ); |
742 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); | 748 | topLayout->addMultiCellWidget(lab,ii, ii,0,1); |
743 | ii++; | 749 | ii++; |
744 | 750 | ||
745 | } else { | 751 | } else { |
746 | new QLabel ( i18n("Show in every cell "), habo ); | 752 | new QLabel ( i18n("Show in every cell "), habo ); |
747 | } | 753 | } |
748 | weeklyRecur = | 754 | weeklyRecur = |
749 | addWidBool(i18n("short month"), | 755 | addWidBool(i18n("short month"), |
750 | &(KOPrefs::instance()->mMonthShowShort),habo); | 756 | &(KOPrefs::instance()->mMonthShowShort),habo); |
751 | weeklyRecur = | 757 | weeklyRecur = |
752 | addWidBool(i18n("icons"), | 758 | addWidBool(i18n("icons"), |
753 | &(KOPrefs::instance()->mMonthShowIcons),habo); | 759 | &(KOPrefs::instance()->mMonthShowIcons),habo); |
754 | 760 | ||
755 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); | 761 | topLayout->addMultiCellWidget(habo,ii, ii,0,1); |
756 | ii++; | 762 | ii++; |
757 | #ifdef DESKTOP_VERSION | 763 | #ifdef DESKTOP_VERSION |
758 | KPrefsDialogWidBool *enableMonthScroll = | 764 | KPrefsDialogWidBool *enableMonthScroll = |
759 | addWidBool(i18n("Enable scrollbars in month view cells"), | 765 | addWidBool(i18n("Enable scrollbars in month view cells"), |
760 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); | 766 | &(KOPrefs::instance()->mEnableMonthScroll),topFrame); |
761 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); | 767 | topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); |
762 | #endif | 768 | #endif |
763 | dummy = | 769 | dummy = |
764 | addWidBool(i18n("Week view mode uses bigger font"), | 770 | addWidBool(i18n("Week view mode uses bigger font"), |
765 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); | 771 | &(KOPrefs::instance()->mMonthViewUsesBigFont),topFrame); |
766 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 772 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
767 | dummy = | 773 | dummy = |
768 | addWidBool(i18n("Show Sat/Sun together"), | 774 | addWidBool(i18n("Show Sat/Sun together"), |
769 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); | 775 | &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); |
770 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 776 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
771 | 777 | ||
772 | KPrefsDialogWidBool *coloredCategoriesInMonthView = | 778 | KPrefsDialogWidBool *coloredCategoriesInMonthView = |
773 | addWidBool(i18n("Month view uses category colors"), | 779 | addWidBool(i18n("Month view uses category colors"), |
774 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); | 780 | &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); |
775 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 781 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
776 | 782 | ||
777 | dummy = | 783 | dummy = |
778 | addWidBool(i18n("Categorie colors are applied to text"), | 784 | addWidBool(i18n("Categorie colors are applied to text"), |
779 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); | 785 | &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); |
780 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 786 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
781 | coloredCategoriesInMonthView = | 787 | coloredCategoriesInMonthView = |
782 | addWidBool(i18n("Month view uses day colors"), | 788 | addWidBool(i18n("Month view uses day colors"), |
783 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); | 789 | &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); |
784 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); | 790 | topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); |
785 | 791 | ||
786 | KPrefsDialogWidColor *holidayColor = | 792 | KPrefsDialogWidColor *holidayColor = |
787 | addWidColor(i18n("Day color odd months"), | 793 | addWidColor(i18n("Day color odd months"), |
788 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); | 794 | &(KOPrefs::instance()->mMonthViewOddColor),topFrame); |
789 | topLayout->addWidget(holidayColor->label(),ii,0); | 795 | topLayout->addWidget(holidayColor->label(),ii,0); |
790 | topLayout->addWidget(holidayColor->button(),ii++,1); | 796 | topLayout->addWidget(holidayColor->button(),ii++,1); |
791 | 797 | ||
792 | holidayColor = | 798 | holidayColor = |
793 | addWidColor(i18n("Day color even months"), | 799 | addWidColor(i18n("Day color even months"), |
794 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); | 800 | &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); |
795 | topLayout->addWidget(holidayColor->label(),ii,0); | 801 | topLayout->addWidget(holidayColor->label(),ii,0); |
796 | topLayout->addWidget(holidayColor->button(),ii++,1); | 802 | topLayout->addWidget(holidayColor->button(),ii++,1); |
797 | 803 | ||
798 | 804 | ||
799 | holidayColor = | 805 | holidayColor = |
800 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), | 806 | addWidColor(i18n("Color for Sundays + category \"Holiday\""), |
801 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); | 807 | &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); |
802 | topLayout->addWidget(holidayColor->label(),ii,0); | 808 | topLayout->addWidget(holidayColor->label(),ii,0); |
803 | topLayout->addWidget(holidayColor->button(),ii++,1); | 809 | topLayout->addWidget(holidayColor->button(),ii++,1); |
804 | // *********************** What'sNext View | 810 | // *********************** What'sNext View |
805 | topFrame = addPage(i18n("What's Next View"),0,0); | 811 | topFrame = addPage(i18n("What's Next View"),0,0); |
806 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 812 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
807 | 813 | ||
808 | topLayout = new QGridLayout(topFrame,4,1); | 814 | topLayout = new QGridLayout(topFrame,4,1); |
809 | topLayout->setSpacing(spacingHint()); | 815 | topLayout->setSpacing(mSpacingHint); |
810 | topLayout->setMargin(marginHint()); | 816 | topLayout->setMargin(mMarginHint); |
811 | ii = 0; | 817 | ii = 0; |
812 | 818 | ||
813 | 819 | ||
814 | QHBox* hdummy = new QHBox(topFrame); | 820 | QHBox* hdummy = new QHBox(topFrame); |
815 | new QLabel(i18n("Days in What's Next:"),hdummy); | 821 | new QLabel(i18n("Days in What's Next:"),hdummy); |
816 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); | 822 | mWhatsNextSpin = new QSpinBox(1,14,1,hdummy); |
817 | 823 | ||
818 | topLayout->addWidget(hdummy,ii++,0); | 824 | topLayout->addWidget(hdummy,ii++,0); |
819 | 825 | ||
820 | QHBox *prioBox = new QHBox(topFrame); | 826 | QHBox *prioBox = new QHBox(topFrame); |
821 | // intervalBox->setSpacing(spacingHint()); | 827 | // intervalBox->setSpacing(mSpacingHint); |
822 | topLayout->addWidget(prioBox,ii++,0); | 828 | topLayout->addWidget(prioBox,ii++,0); |
823 | QString messa = i18n("Show topmost todo prios in What's Next:"); | 829 | QString messa = i18n("Show topmost todo prios in What's Next:"); |
824 | 830 | ||
825 | if ( QApplication::desktop()->width() < 300 ) | 831 | if ( QApplication::desktop()->width() < 300 ) |
826 | messa = i18n("Show topmost todo prios in What's N.:"); | 832 | messa = i18n("Show topmost todo prios in What's N.:"); |
827 | QLabel *prioLabel = new QLabel(messa, prioBox); | 833 | QLabel *prioLabel = new QLabel(messa, prioBox); |
828 | mPrioSpin = new QSpinBox(0,5,1,prioBox); | 834 | mPrioSpin = new QSpinBox(0,5,1,prioBox); |
829 | if ( QApplication::desktop()->width() < 300 ) | 835 | if ( QApplication::desktop()->width() < 300 ) |
830 | mPrioSpin->setFixedWidth( 40 ); | 836 | mPrioSpin->setFixedWidth( 40 ); |
831 | 837 | ||
832 | KPrefsDialogWidBool *passwdk = | 838 | KPrefsDialogWidBool *passwdk = |
833 | 839 | ||
834 | addWidBool(i18n("Show events, that are done in \nWhat's Next view"), | 840 | addWidBool(i18n("Show events, that are done in \nWhat's Next view"), |
835 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); | 841 | &(KOPrefs::instance()->mWNViewShowsPast),topFrame); |
836 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 842 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
837 | passwdk = | 843 | passwdk = |
838 | addWidBool(i18n("Show parent To-Do's in What's Next view"), | 844 | addWidBool(i18n("Show parent To-Do's in What's Next view"), |
839 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); | 845 | &(KOPrefs::instance()->mWNViewShowsParents),topFrame); |
840 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 846 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
841 | 847 | ||
842 | passwdk = | 848 | passwdk = |
843 | addWidBool(i18n("Show location in What's Next view"), | 849 | addWidBool(i18n("Show location in What's Next view"), |
844 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); | 850 | &(KOPrefs::instance()->mWNViewShowLocation),topFrame); |
845 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 851 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
846 | 852 | ||
847 | passwdk = | 853 | passwdk = |
848 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), | 854 | addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), |
849 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); | 855 | &(KOPrefs::instance()->mShowSyncEvents),topFrame); |
850 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 856 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
851 | passwdk = | 857 | passwdk = |
852 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), | 858 | addWidBool(i18n("Use short date in \nWhat's Next/Event view"), |
853 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); | 859 | &(KOPrefs::instance()->mShortDateInViewer),topFrame); |
854 | topLayout->addWidget(passwdk->checkBox(), ii++,0); | 860 | topLayout->addWidget(passwdk->checkBox(), ii++,0); |
855 | 861 | ||
856 | 862 | ||
857 | 863 | ||
858 | 864 | ||
859 | // *********************** Todo View | 865 | // *********************** Todo View |
860 | 866 | ||
861 | topFrame = addPage(i18n("Todo View"),0,0); | 867 | topFrame = addPage(i18n("Todo View"),0,0); |
862 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 868 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
863 | 869 | ||
864 | topLayout = new QGridLayout(topFrame,4,1); | 870 | topLayout = new QGridLayout(topFrame,4,1); |
865 | topLayout->setSpacing(spacingHint()); | 871 | topLayout->setSpacing(mSpacingHint); |
866 | topLayout->setMargin(marginHint()); | 872 | topLayout->setMargin(mMarginHint); |
867 | ii = 0; | 873 | ii = 0; |
868 | dummy = | 874 | dummy = |
869 | addWidBool(i18n("Hide not running Todos in To-do view"), | 875 | addWidBool(i18n("Hide not running Todos in To-do view"), |
870 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); | 876 | &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); |
871 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 877 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
872 | 878 | ||
873 | 879 | ||
874 | KPrefsDialogWidBool *showCompletedTodo = | 880 | KPrefsDialogWidBool *showCompletedTodo = |
875 | addWidBool(i18n("To-do view shows completed Todos"), | 881 | addWidBool(i18n("To-do view shows completed Todos"), |
876 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); | 882 | &(KOPrefs::instance()->mShowCompletedTodo),topFrame); |
877 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); | 883 | topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); |
878 | dummy = | 884 | dummy = |
879 | addWidBool(i18n("To-do view shows complete as 'xx %'"), | 885 | addWidBool(i18n("To-do view shows complete as 'xx %'"), |
880 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); | 886 | &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); |
881 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 887 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
882 | 888 | ||
883 | dummy = | 889 | dummy = |
884 | addWidBool(i18n("Small To-do view uses smaller font"), | 890 | addWidBool(i18n("Small To-do view uses smaller font"), |
885 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); | 891 | &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); |
886 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 892 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
887 | 893 | ||
888 | 894 | ||
889 | 895 | ||
890 | dummy = | 896 | dummy = |
891 | addWidBool(i18n("Todo view uses category colors"), | 897 | addWidBool(i18n("Todo view uses category colors"), |
892 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); | 898 | &(KOPrefs::instance()->mTodoViewUsesCatColors),topFrame); |
893 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 899 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
894 | 900 | ||
895 | 901 | ||
896 | QWidget* wid = new QWidget( topFrame ); | 902 | QWidget* wid = new QWidget( topFrame ); |
897 | // Todo due today color | 903 | // Todo due today color |
898 | KPrefsDialogWidColor *todoDueTodayColor = | 904 | KPrefsDialogWidColor *todoDueTodayColor = |
899 | addWidColor(i18n("Todo due today color:"), | 905 | addWidColor(i18n("Todo due today color:"), |
900 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); | 906 | &(KOPrefs::instance()->mTodoDueTodayColor),wid); |
901 | QHBoxLayout *widLayout = new QHBoxLayout(wid); | 907 | QHBoxLayout *widLayout = new QHBoxLayout(wid); |
902 | widLayout->addWidget( todoDueTodayColor->label() ); | 908 | widLayout->addWidget( todoDueTodayColor->label() ); |
903 | widLayout->addWidget( todoDueTodayColor->button() ); | 909 | widLayout->addWidget( todoDueTodayColor->button() ); |
904 | topLayout->addWidget(wid,ii++,0); | 910 | topLayout->addWidget(wid,ii++,0); |
905 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); | 911 | //topLayout->addWidget(todoDueTodayColor->button(),ii++,1); |
906 | 912 | ||
907 | // Todo overdue color | 913 | // Todo overdue color |
908 | wid = new QWidget( topFrame ); | 914 | wid = new QWidget( topFrame ); |
909 | widLayout = new QHBoxLayout(wid); | 915 | widLayout = new QHBoxLayout(wid); |
910 | KPrefsDialogWidColor *todoOverdueColor = | 916 | KPrefsDialogWidColor *todoOverdueColor = |
911 | addWidColor(i18n("Todo overdue color:"), | 917 | addWidColor(i18n("Todo overdue color:"), |
912 | &(KOPrefs::instance()->mTodoOverdueColor),wid); | 918 | &(KOPrefs::instance()->mTodoOverdueColor),wid); |
913 | widLayout->addWidget(todoOverdueColor->label()); | 919 | widLayout->addWidget(todoOverdueColor->label()); |
914 | widLayout->addWidget(todoOverdueColor->button()); | 920 | widLayout->addWidget(todoOverdueColor->button()); |
915 | topLayout->addWidget(wid,ii++,0); | 921 | topLayout->addWidget(wid,ii++,0); |
916 | 922 | ||
917 | dummy = | 923 | dummy = |
918 | addWidBool(i18n("Colors are applied to text"), | 924 | addWidBool(i18n("Colors are applied to text"), |
919 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); | 925 | &(KOPrefs::instance()->mTodoViewUsesForegroundColor),topFrame); |
920 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 926 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
921 | 927 | ||
922 | dummy = | 928 | dummy = |
923 | addWidBool(i18n("Allday Agenda view shows todos"), | 929 | addWidBool(i18n("Allday Agenda view shows todos"), |
924 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); | 930 | &(KOPrefs::instance()->mShowTodoInAgenda),topFrame); |
925 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 931 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
926 | 932 | ||
927 | 933 | ||
928 | topFrame = addPage(i18n("View Options"),0,0); | 934 | topFrame = addPage(i18n("View Options"),0,0); |
929 | 935 | ||
930 | topLayout = new QGridLayout(topFrame,4,1); | 936 | topLayout = new QGridLayout(topFrame,4,1); |
931 | topLayout->setSpacing(spacingHint()); | 937 | topLayout->setSpacing(mSpacingHint); |
932 | topLayout->setMargin(marginHint()); | 938 | topLayout->setMargin(mMarginHint); |
933 | ii = 0; | 939 | ii = 0; |
934 | lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); | 940 | lab = new QLabel( i18n("Show in todo/event viewer:"), topFrame); |
935 | topLayout->addWidget(lab ,ii++,0); | 941 | topLayout->addWidget(lab ,ii++,0); |
936 | 942 | ||
937 | dummy = addWidBool(i18n("Details"), | 943 | dummy = addWidBool(i18n("Details"), |
938 | &(KOPrefs::instance()->mEVshowDetails),topFrame); | 944 | &(KOPrefs::instance()->mEVshowDetails),topFrame); |
939 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 945 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
940 | dummy = addWidBool(i18n("Created time"), | 946 | dummy = addWidBool(i18n("Created time"), |
941 | &(KOPrefs::instance()->mEVshowCreated),topFrame); | 947 | &(KOPrefs::instance()->mEVshowCreated),topFrame); |
942 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 948 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
943 | dummy = addWidBool(i18n("Last modified time"), | 949 | dummy = addWidBool(i18n("Last modified time"), |
944 | &(KOPrefs::instance()->mEVshowChanged),topFrame); | 950 | &(KOPrefs::instance()->mEVshowChanged),topFrame); |
945 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 951 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
946 | 952 | ||
947 | 953 | ||
948 | lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); | 954 | lab = new QLabel( i18n("Show in What'sThis quick overview:"), topFrame); |
949 | topLayout->addWidget(lab ,ii++,0); | 955 | topLayout->addWidget(lab ,ii++,0); |
950 | 956 | ||
951 | dummy = addWidBool(i18n("Details"), | 957 | dummy = addWidBool(i18n("Details"), |
952 | &(KOPrefs::instance()->mWTshowDetails),topFrame); | 958 | &(KOPrefs::instance()->mWTshowDetails),topFrame); |
953 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 959 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
954 | dummy = addWidBool(i18n("Created time"), | 960 | dummy = addWidBool(i18n("Created time"), |
955 | &(KOPrefs::instance()->mWTshowCreated),topFrame); | 961 | &(KOPrefs::instance()->mWTshowCreated),topFrame); |
956 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 962 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
957 | dummy = addWidBool(i18n("Last modified time"), | 963 | dummy = addWidBool(i18n("Last modified time"), |
958 | &(KOPrefs::instance()->mWTshowChanged),topFrame); | 964 | &(KOPrefs::instance()->mWTshowChanged),topFrame); |
959 | topLayout->addWidget(dummy->checkBox(),ii++,0); | 965 | topLayout->addWidget(dummy->checkBox(),ii++,0); |
960 | 966 | ||
961 | 967 | ||
962 | topFrame = addPage(i18n("Alarm"),0,0); | 968 | topFrame = addPage(i18n("Alarm"),0,0); |
963 | // DesktopIcon("viewmag",KIcon::SizeMedium)); | 969 | // DesktopIcon("viewmag",KIcon::SizeMedium)); |
964 | 970 | ||
965 | topLayout = new QGridLayout(topFrame,2,1); | 971 | topLayout = new QGridLayout(topFrame,2,1); |
966 | topLayout->setSpacing(spacingHint()); | 972 | topLayout->setSpacing(mSpacingHint); |
967 | topLayout->setMargin(marginHint()); | 973 | topLayout->setMargin(mMarginHint); |
968 | int iii = 0; | 974 | int iii = 0; |
969 | 975 | ||
970 | dummy = | 976 | dummy = |
971 | addWidBool(i18n("Use internal alarm notification"), | 977 | addWidBool(i18n("Use internal alarm notification"), |
972 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); | 978 | &(KOPrefs::instance()->mUseInternalAlarmNotification),topFrame); |
973 | topLayout->addWidget(dummy->checkBox(),iii++,0); | 979 | topLayout->addWidget(dummy->checkBox(),iii++,0); |
974 | 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); | 980 | 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); |
975 | 981 | ||
976 | topLayout->addWidget(lab ,iii++,0); | 982 | topLayout->addWidget(lab ,iii++,0); |
977 | #ifndef DESKTOP_VERSION | 983 | #ifndef DESKTOP_VERSION |
978 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); | 984 | lab->setAlignment( AlignLeft|WordBreak|AlignTop); |
979 | #else | 985 | #else |
980 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); | 986 | lab->setAlignment( AlignLeft|BreakAnywhere|WordBreak|AlignTop); |
981 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); | 987 | lab->setSizePolicy( QSizePolicy( QSizePolicy::Ignored , QSizePolicy::Ignored,true) ); |
982 | #endif | 988 | #endif |
983 | 989 | ||
984 | QHBox* dummyBox = new QHBox(topFrame); | 990 | QHBox* dummyBox = new QHBox(topFrame); |
985 | new QLabel(i18n("Play beeps count:"),dummyBox); | 991 | new QLabel(i18n("Play beeps count:"),dummyBox); |
986 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); | 992 | mAlarmPlayBeeps = new QSpinBox(0,500,1,dummyBox); |
987 | topLayout->addWidget(dummyBox,iii++,0); | 993 | topLayout->addWidget(dummyBox,iii++,0); |
988 | 994 | ||
989 | dummyBox = new QHBox(topFrame); | 995 | dummyBox = new QHBox(topFrame); |
990 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); | 996 | new QLabel(i18n("Beeps interval in sec:"),dummyBox); |
991 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); | 997 | mAlarmBeepInterval = new QSpinBox(1,600,1,dummyBox); |
992 | topLayout->addWidget(dummyBox,iii++,0); | 998 | topLayout->addWidget(dummyBox,iii++,0); |
993 | 999 | ||
994 | dummyBox = new QHBox(topFrame); | 1000 | dummyBox = new QHBox(topFrame); |
995 | new QLabel(i18n("Default suspend time in min:"),dummyBox); | 1001 | new QLabel(i18n("Default suspend time in min:"),dummyBox); |
996 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); | 1002 | mAlarmSuspendTime = new QSpinBox(1,600,1,dummyBox); |
997 | topLayout->addWidget(dummyBox,iii++,0); | 1003 | topLayout->addWidget(dummyBox,iii++,0); |
998 | 1004 | ||
999 | dummyBox = new QHBox(topFrame); | 1005 | dummyBox = new QHBox(topFrame); |
1000 | new QLabel(i18n("Auto suspend count:"),dummyBox); | 1006 | new QLabel(i18n("Auto suspend count:"),dummyBox); |
1001 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); | 1007 | mAlarmSuspendCount = new QSpinBox(0,60,1,dummyBox); |
1002 | topLayout->addWidget(dummyBox,iii++,0); | 1008 | topLayout->addWidget(dummyBox,iii++,0); |
1003 | 1009 | ||
1004 | 1010 | ||
1005 | 1011 | ||
1006 | 1012 | ||
1007 | 1013 | ||
1008 | 1014 | ||
1009 | 1015 | ||
1010 | QHBox* hbo = new QHBox ( topFrame ); | 1016 | QHBox* hbo = new QHBox ( topFrame ); |
1011 | mDefaultAlarmFile = new QLineEdit(hbo); | 1017 | mDefaultAlarmFile = new QLineEdit(hbo); |
1012 | QPushButton * loadTemplate = new QPushButton(hbo); | 1018 | QPushButton * loadTemplate = new QPushButton(hbo); |
1013 | QPixmap icon; | 1019 | QPixmap icon; |
1014 | if ( QApplication::desktop()->width() < 321 ) | 1020 | if ( QApplication::desktop()->width() < 321 ) |
1015 | icon = SmallIcon("fileimport16"); | 1021 | icon = SmallIcon("fileimport16"); |
@@ -1144,98 +1150,98 @@ void KOPrefsDialog::setupFontsTab() | |||
1144 | topLayout->addWidget(monthViewFont->preview(),i,1); | 1150 | topLayout->addWidget(monthViewFont->preview(),i,1); |
1145 | topLayout->addWidget(monthViewFont->button(),i,2); | 1151 | topLayout->addWidget(monthViewFont->button(),i,2); |
1146 | ++i; | 1152 | ++i; |
1147 | 1153 | ||
1148 | 1154 | ||
1149 | KPrefsDialogWidFont *lVFont = | 1155 | KPrefsDialogWidFont *lVFont = |
1150 | addWidFont(i18n("Event"),i18n("List View:"), | 1156 | addWidFont(i18n("Event"),i18n("List View:"), |
1151 | &(KOPrefs::instance()->mListViewFont),topFrame); | 1157 | &(KOPrefs::instance()->mListViewFont),topFrame); |
1152 | topLayout->addWidget(lVFont->label(),i,0); | 1158 | topLayout->addWidget(lVFont->label(),i,0); |
1153 | topLayout->addWidget(lVFont->preview(),i,1); | 1159 | topLayout->addWidget(lVFont->preview(),i,1); |
1154 | topLayout->addWidget(lVFont->button(),i,2); | 1160 | topLayout->addWidget(lVFont->button(),i,2); |
1155 | ++i; | 1161 | ++i; |
1156 | 1162 | ||
1157 | 1163 | ||
1158 | tVFont = | 1164 | tVFont = |
1159 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), | 1165 | addWidFont(i18n("ToDo"),i18n("ToDoView:"), |
1160 | &(KOPrefs::instance()->mTodoViewFont),topFrame); | 1166 | &(KOPrefs::instance()->mTodoViewFont),topFrame); |
1161 | topLayout->addWidget(tVFont->label(),i,0); | 1167 | topLayout->addWidget(tVFont->label(),i,0); |
1162 | topLayout->addWidget(tVFont->preview(),i,1); | 1168 | topLayout->addWidget(tVFont->preview(),i,1); |
1163 | topLayout->addWidget(tVFont->button(),i,2); | 1169 | topLayout->addWidget(tVFont->button(),i,2); |
1164 | ++i; | 1170 | ++i; |
1165 | 1171 | ||
1166 | 1172 | ||
1167 | tVFont = | 1173 | tVFont = |
1168 | addWidFont(i18n("Today"),i18n("JournalView:"), | 1174 | addWidFont(i18n("Today"),i18n("JournalView:"), |
1169 | &(KOPrefs::instance()->mJornalViewFont),topFrame); | 1175 | &(KOPrefs::instance()->mJornalViewFont),topFrame); |
1170 | topLayout->addWidget(tVFont->label(),i,0); | 1176 | topLayout->addWidget(tVFont->label(),i,0); |
1171 | topLayout->addWidget(tVFont->preview(),i,1); | 1177 | topLayout->addWidget(tVFont->preview(),i,1); |
1172 | topLayout->addWidget(tVFont->button(),i,2); | 1178 | topLayout->addWidget(tVFont->button(),i,2); |
1173 | ++i; | 1179 | ++i; |
1174 | 1180 | ||
1175 | 1181 | ||
1176 | 1182 | ||
1177 | 1183 | ||
1178 | topLayout->setColStretch(1,1); | 1184 | topLayout->setColStretch(1,1); |
1179 | topLayout->setRowStretch(4,1); | 1185 | topLayout->setRowStretch(4,1); |
1180 | 1186 | ||
1181 | 1187 | ||
1182 | 1188 | ||
1183 | 1189 | ||
1184 | } | 1190 | } |
1185 | 1191 | ||
1186 | void KOPrefsDialog::setupColorsTab() | 1192 | void KOPrefsDialog::setupColorsTab() |
1187 | { | 1193 | { |
1188 | QFrame *topFrame = addPage(i18n("Colors"),0,0); | 1194 | QFrame *topFrame = addPage(i18n("Colors"),0,0); |
1189 | // DesktopIcon("colorize",KIcon::SizeMedium)); | 1195 | // DesktopIcon("colorize",KIcon::SizeMedium)); |
1190 | 1196 | ||
1191 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1197 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1192 | // topLayout->setSpacing(spacingHint()); | 1198 | // topLayout->setSpacing(mSpacingHint); |
1193 | // topLayout->setMargin(marginHint()); | 1199 | // topLayout->setMargin(mMarginHint); |
1194 | 1200 | ||
1195 | topLayout->setSpacing(2); | 1201 | topLayout->setSpacing(2); |
1196 | topLayout->setMargin(3); | 1202 | topLayout->setMargin(3); |
1197 | 1203 | ||
1198 | int ii = 1; | 1204 | int ii = 1; |
1199 | QGroupBox *categoryGroup ; | 1205 | QGroupBox *categoryGroup ; |
1200 | 1206 | ||
1201 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), | 1207 | categoryGroup = new QGroupBox(1,Vertical,i18n("Categories"), |
1202 | topFrame); | 1208 | topFrame); |
1203 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); | 1209 | topLayout->addMultiCellWidget(categoryGroup,0,0,0,1); |
1204 | 1210 | ||
1205 | mCategoryCombo = new QComboBox(categoryGroup); | 1211 | mCategoryCombo = new QComboBox(categoryGroup); |
1206 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); | 1212 | mCategoryCombo->insertStringList(KOPrefs::instance()->mCustomCategories); |
1207 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); | 1213 | connect(mCategoryCombo,SIGNAL(activated(int)),SLOT(updateCategoryColor())); |
1208 | 1214 | ||
1209 | mCategoryButton = new KColorButton(categoryGroup); | 1215 | mCategoryButton = new KColorButton(categoryGroup); |
1210 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); | 1216 | connect(mCategoryButton,SIGNAL(changed(const QColor &)),SLOT(setCategoryColor())); |
1211 | updateCategoryColor(); | 1217 | updateCategoryColor(); |
1212 | 1218 | ||
1213 | 1219 | ||
1214 | // Holiday Color | 1220 | // Holiday Color |
1215 | 1221 | ||
1216 | KPrefsDialogWidColor *holidayColor = | 1222 | KPrefsDialogWidColor *holidayColor = |
1217 | addWidColor(i18n("Holiday color:"), | 1223 | addWidColor(i18n("Holiday color:"), |
1218 | &(KOPrefs::instance()->mHolidayColor),topFrame); | 1224 | &(KOPrefs::instance()->mHolidayColor),topFrame); |
1219 | topLayout->addWidget(holidayColor->label(),ii,0); | 1225 | topLayout->addWidget(holidayColor->label(),ii,0); |
1220 | topLayout->addWidget(holidayColor->button(),ii++,1); | 1226 | topLayout->addWidget(holidayColor->button(),ii++,1); |
1221 | 1227 | ||
1222 | // Highlight Color | 1228 | // Highlight Color |
1223 | KPrefsDialogWidColor *highlightColor = | 1229 | KPrefsDialogWidColor *highlightColor = |
1224 | addWidColor(i18n("Highlight color:"), | 1230 | addWidColor(i18n("Highlight color:"), |
1225 | &(KOPrefs::instance()->mHighlightColor),topFrame); | 1231 | &(KOPrefs::instance()->mHighlightColor),topFrame); |
1226 | topLayout->addWidget(highlightColor->label(),ii,0); | 1232 | topLayout->addWidget(highlightColor->label(),ii,0); |
1227 | topLayout->addWidget(highlightColor->button(),ii++,1); | 1233 | topLayout->addWidget(highlightColor->button(),ii++,1); |
1228 | 1234 | ||
1229 | // Event color | 1235 | // Event color |
1230 | KPrefsDialogWidColor *eventColor = | 1236 | KPrefsDialogWidColor *eventColor = |
1231 | addWidColor(i18n("Default event color:"), | 1237 | addWidColor(i18n("Default event color:"), |
1232 | &(KOPrefs::instance()->mEventColor),topFrame); | 1238 | &(KOPrefs::instance()->mEventColor),topFrame); |
1233 | topLayout->addWidget(eventColor->label(),ii,0); | 1239 | topLayout->addWidget(eventColor->label(),ii,0); |
1234 | topLayout->addWidget(eventColor->button(),ii++,1); | 1240 | topLayout->addWidget(eventColor->button(),ii++,1); |
1235 | eventColor = | 1241 | eventColor = |
1236 | addWidColor(i18n("Default todo done color:"), | 1242 | addWidColor(i18n("Default todo done color:"), |
1237 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); | 1243 | &(KOPrefs::instance()->mTodoDoneColor),topFrame); |
1238 | topLayout->addWidget(eventColor->label(),ii,0); | 1244 | topLayout->addWidget(eventColor->label(),ii,0); |
1239 | topLayout->addWidget(eventColor->button(),ii++,1); | 1245 | topLayout->addWidget(eventColor->button(),ii++,1); |
1240 | 1246 | ||
1241 | 1247 | ||
@@ -1253,162 +1259,162 @@ void KOPrefsDialog::setupColorsTab() | |||
1253 | topLayout->addWidget(workingHoursColor->label(),ii,0); | 1259 | topLayout->addWidget(workingHoursColor->label(),ii,0); |
1254 | topLayout->addWidget(workingHoursColor->button(),ii++,1); | 1260 | topLayout->addWidget(workingHoursColor->button(),ii++,1); |
1255 | 1261 | ||
1256 | KPrefsDialogWidBool *sb = | 1262 | KPrefsDialogWidBool *sb = |
1257 | addWidBool(i18n("Use colors for application:"), | 1263 | addWidBool(i18n("Use colors for application:"), |
1258 | &(KOPrefs::instance()->mUseAppColors),topFrame); | 1264 | &(KOPrefs::instance()->mUseAppColors),topFrame); |
1259 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); | 1265 | topLayout->addMultiCellWidget(sb->checkBox(), ii, ii, 0,1 ); |
1260 | 1266 | ||
1261 | ii++; | 1267 | ii++; |
1262 | KPrefsDialogWidColor * workingHoursColor1 = | 1268 | KPrefsDialogWidColor * workingHoursColor1 = |
1263 | addWidColor(i18n("Buttons, menus, etc.:"), | 1269 | addWidColor(i18n("Buttons, menus, etc.:"), |
1264 | &(KOPrefs::instance()->mAppColor1),topFrame); | 1270 | &(KOPrefs::instance()->mAppColor1),topFrame); |
1265 | topLayout->addWidget(workingHoursColor1->label(),ii,0); | 1271 | topLayout->addWidget(workingHoursColor1->label(),ii,0); |
1266 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); | 1272 | topLayout->addWidget(workingHoursColor1->button(),ii++,1); |
1267 | 1273 | ||
1268 | KPrefsDialogWidColor * workingHoursColor2 = | 1274 | KPrefsDialogWidColor * workingHoursColor2 = |
1269 | addWidColor(i18n("Frames, labels, etc.:"), | 1275 | addWidColor(i18n("Frames, labels, etc.:"), |
1270 | &(KOPrefs::instance()->mAppColor2),topFrame); | 1276 | &(KOPrefs::instance()->mAppColor2),topFrame); |
1271 | topLayout->addWidget(workingHoursColor2->label(),ii,0); | 1277 | topLayout->addWidget(workingHoursColor2->label(),ii,0); |
1272 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); | 1278 | topLayout->addWidget(workingHoursColor2->button(),ii++,1); |
1273 | 1279 | ||
1274 | 1280 | ||
1275 | 1281 | ||
1276 | } | 1282 | } |
1277 | 1283 | ||
1278 | void KOPrefsDialog::setCategoryColor() | 1284 | void KOPrefsDialog::setCategoryColor() |
1279 | { | 1285 | { |
1280 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); | 1286 | mCategoryDict.replace(mCategoryCombo->currentText(), new QColor(mCategoryButton->color())); |
1281 | } | 1287 | } |
1282 | 1288 | ||
1283 | void KOPrefsDialog::updateCategoryColor() | 1289 | void KOPrefsDialog::updateCategoryColor() |
1284 | { | 1290 | { |
1285 | QString cat = mCategoryCombo->currentText(); | 1291 | QString cat = mCategoryCombo->currentText(); |
1286 | QColor *color = mCategoryDict.find(cat); | 1292 | QColor *color = mCategoryDict.find(cat); |
1287 | if (!color) { | 1293 | if (!color) { |
1288 | color = KOPrefs::instance()->categoryColor(cat); | 1294 | color = KOPrefs::instance()->categoryColor(cat); |
1289 | } | 1295 | } |
1290 | if (color) { | 1296 | if (color) { |
1291 | mCategoryButton->setColor(*color); | 1297 | mCategoryButton->setColor(*color); |
1292 | } | 1298 | } |
1293 | } | 1299 | } |
1294 | 1300 | ||
1295 | void KOPrefsDialog::setupPrinterTab() | 1301 | void KOPrefsDialog::setupPrinterTab() |
1296 | { | 1302 | { |
1297 | mPrinterTab = addPage(i18n("Printing"),0, | 1303 | mPrinterTab = addPage(i18n("Printing"),0, |
1298 | DesktopIcon("fileprint",KIcon::SizeMedium)); | 1304 | DesktopIcon("fileprint",KIcon::SizeMedium)); |
1299 | 1305 | ||
1300 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); | 1306 | QGridLayout *topLayout = new QGridLayout(mPrinterTab,5,2); |
1301 | topLayout->setSpacing(spacingHint()); | 1307 | topLayout->setSpacing(mSpacingHint); |
1302 | topLayout->setMargin(marginHint()); | 1308 | topLayout->setMargin(mMarginHint); |
1303 | 1309 | ||
1304 | topLayout->setRowStretch(4,1); | 1310 | topLayout->setRowStretch(4,1); |
1305 | } | 1311 | } |
1306 | 1312 | ||
1307 | void KOPrefsDialog::setupGroupSchedulingTab() | 1313 | void KOPrefsDialog::setupGroupSchedulingTab() |
1308 | { | 1314 | { |
1309 | #if 0 | 1315 | #if 0 |
1310 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, | 1316 | QFrame *topFrame = addPage(i18n("Group Scheduling"),0, |
1311 | DesktopIcon("personal",KIcon::SizeMedium)); | 1317 | DesktopIcon("personal",KIcon::SizeMedium)); |
1312 | 1318 | ||
1313 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); | 1319 | QGridLayout *topLayout = new QGridLayout(topFrame,6,2); |
1314 | topLayout->setSpacing(spacingHint()); | 1320 | topLayout->setSpacing(mSpacingHint); |
1315 | topLayout->setMargin(marginHint()); | 1321 | topLayout->setMargin(mMarginHint); |
1316 | 1322 | ||
1317 | #if 0 | 1323 | #if 0 |
1318 | KPrefsDialogWidRadios *schedulerGroup = | 1324 | KPrefsDialogWidRadios *schedulerGroup = |
1319 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), | 1325 | addWidRadios(i18n("Scheduler Mail Client"),&(KOPrefs::instance()->mIMIPScheduler), |
1320 | topFrame); | 1326 | topFrame); |
1321 | schedulerGroup->addRadio("Dummy"); // Only for debugging | 1327 | schedulerGroup->addRadio("Dummy"); // Only for debugging |
1322 | schedulerGroup->addRadio(i18n("Mail client")); | 1328 | schedulerGroup->addRadio(i18n("Mail client")); |
1323 | 1329 | ||
1324 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); | 1330 | topLayout->addMultiCellWidget(schedulerGroup->groupBox(),0,0,0,1); |
1325 | #endif | 1331 | #endif |
1326 | 1332 | ||
1327 | KPrefsDialogWidRadios *sendGroup = | 1333 | KPrefsDialogWidRadios *sendGroup = |
1328 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), | 1334 | addWidRadios(i18n("Scheduler Mails Should Be"),&(KOPrefs::instance()->mIMIPSend), |
1329 | topFrame); | 1335 | topFrame); |
1330 | sendGroup->addRadio(i18n("Send to outbox")); | 1336 | sendGroup->addRadio(i18n("Send to outbox")); |
1331 | sendGroup->addRadio(i18n("Send directly")); | 1337 | sendGroup->addRadio(i18n("Send directly")); |
1332 | 1338 | ||
1333 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); | 1339 | topLayout->addMultiCellWidget(sendGroup->groupBox(),1,1,0,1); |
1334 | 1340 | ||
1335 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); | 1341 | topLayout->addMultiCellWidget(new QLabel(i18n("Additional email addresses:"),topFrame),2,2,0,1); |
1336 | mAMails = new QListView(topFrame); | 1342 | mAMails = new QListView(topFrame); |
1337 | mAMails->addColumn(i18n("Email"),300); | 1343 | mAMails->addColumn(i18n("Email"),300); |
1338 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); | 1344 | topLayout->addMultiCellWidget(mAMails,3,3,0,1); |
1339 | 1345 | ||
1340 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); | 1346 | topLayout->addWidget(new QLabel(i18n("Additional email address:"),topFrame),4,0); |
1341 | aEmailsEdit = new QLineEdit(topFrame); | 1347 | aEmailsEdit = new QLineEdit(topFrame); |
1342 | aEmailsEdit->setEnabled(false); | 1348 | aEmailsEdit->setEnabled(false); |
1343 | topLayout->addWidget(aEmailsEdit,4,1); | 1349 | topLayout->addWidget(aEmailsEdit,4,1); |
1344 | 1350 | ||
1345 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); | 1351 | QPushButton *add = new QPushButton(i18n("New"),topFrame,"new"); |
1346 | topLayout->addWidget(add,5,0); | 1352 | topLayout->addWidget(add,5,0); |
1347 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); | 1353 | QPushButton *del = new QPushButton(i18n("Remove"),topFrame,"remove"); |
1348 | topLayout->addWidget(del,5,1); | 1354 | topLayout->addWidget(del,5,1); |
1349 | 1355 | ||
1350 | //topLayout->setRowStretch(2,1); | 1356 | //topLayout->setRowStretch(2,1); |
1351 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); | 1357 | connect(add, SIGNAL( clicked() ), this, SLOT(addItem()) ); |
1352 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); | 1358 | connect(del, SIGNAL( clicked() ), this, SLOT(removeItem()) ); |
1353 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); | 1359 | connect(aEmailsEdit,SIGNAL( textChanged(const QString&) ), this,SLOT(updateItem())); |
1354 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); | 1360 | connect(mAMails,SIGNAL(selectionChanged(QListViewItem *)),SLOT(updateInput())); |
1355 | #endif | 1361 | #endif |
1356 | } | 1362 | } |
1357 | 1363 | ||
1358 | void KOPrefsDialog::setupGroupAutomationTab() | 1364 | void KOPrefsDialog::setupGroupAutomationTab() |
1359 | { | 1365 | { |
1360 | return; | 1366 | return; |
1361 | QFrame *topFrame = addPage(i18n("Group Automation"),0, | 1367 | QFrame *topFrame = addPage(i18n("Group Automation"),0, |
1362 | DesktopIcon("personal",KIcon::SizeMedium)); | 1368 | DesktopIcon("personal",KIcon::SizeMedium)); |
1363 | 1369 | ||
1364 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); | 1370 | QGridLayout *topLayout = new QGridLayout(topFrame,5,1); |
1365 | topLayout->setSpacing(spacingHint()); | 1371 | topLayout->setSpacing(mSpacingHint); |
1366 | topLayout->setMargin(marginHint()); | 1372 | topLayout->setMargin(mMarginHint); |
1367 | 1373 | ||
1368 | KPrefsDialogWidRadios *autoRefreshGroup = | 1374 | KPrefsDialogWidRadios *autoRefreshGroup = |
1369 | addWidRadios(i18n("Auto Send Refresh"), | 1375 | addWidRadios(i18n("Auto Send Refresh"), |
1370 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); | 1376 | &(KOPrefs::instance()->mIMIPAutoRefresh),topFrame); |
1371 | autoRefreshGroup->addRadio(i18n("Never")); | 1377 | autoRefreshGroup->addRadio(i18n("Never")); |
1372 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); | 1378 | autoRefreshGroup->addRadio(i18n("If attendee is in addressbook")); |
1373 | //autoRefreshGroup->addRadio(i18n("selected emails")); | 1379 | //autoRefreshGroup->addRadio(i18n("selected emails")); |
1374 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); | 1380 | topLayout->addMultiCellWidget(autoRefreshGroup->groupBox(),0,0,0,0); |
1375 | 1381 | ||
1376 | KPrefsDialogWidRadios *autoInsertGroup = | 1382 | KPrefsDialogWidRadios *autoInsertGroup = |
1377 | addWidRadios(i18n("Auto Insert IMIP Replies"), | 1383 | addWidRadios(i18n("Auto Insert IMIP Replies"), |
1378 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); | 1384 | &(KOPrefs::instance()->mIMIPAutoInsertReply),topFrame); |
1379 | autoInsertGroup->addRadio(i18n("Never")); | 1385 | autoInsertGroup->addRadio(i18n("Never")); |
1380 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); | 1386 | autoInsertGroup->addRadio(i18n("If attendee is in addressbook")); |
1381 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1387 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1382 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); | 1388 | topLayout->addMultiCellWidget(autoInsertGroup->groupBox(),1,1,0,0); |
1383 | 1389 | ||
1384 | KPrefsDialogWidRadios *autoRequestGroup = | 1390 | KPrefsDialogWidRadios *autoRequestGroup = |
1385 | addWidRadios(i18n("Auto Insert IMIP Requests"), | 1391 | addWidRadios(i18n("Auto Insert IMIP Requests"), |
1386 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); | 1392 | &(KOPrefs::instance()->mIMIPAutoInsertRequest),topFrame); |
1387 | autoRequestGroup->addRadio(i18n("Never")); | 1393 | autoRequestGroup->addRadio(i18n("Never")); |
1388 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); | 1394 | autoRequestGroup->addRadio(i18n("If organizer is in addressbook")); |
1389 | //autoInsertGroup->addRadio(i18n("selected emails")); | 1395 | //autoInsertGroup->addRadio(i18n("selected emails")); |
1390 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); | 1396 | topLayout->addMultiCellWidget(autoRequestGroup->groupBox(),2,2,0,0); |
1391 | 1397 | ||
1392 | KPrefsDialogWidRadios *autoFreeBusyGroup = | 1398 | KPrefsDialogWidRadios *autoFreeBusyGroup = |
1393 | addWidRadios(i18n("Auto Send FreeBusy Information"), | 1399 | addWidRadios(i18n("Auto Send FreeBusy Information"), |
1394 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); | 1400 | &(KOPrefs::instance()->mIMIPAutoFreeBusy),topFrame); |
1395 | autoFreeBusyGroup->addRadio(i18n("Never")); | 1401 | autoFreeBusyGroup->addRadio(i18n("Never")); |
1396 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); | 1402 | autoFreeBusyGroup->addRadio(i18n("If requested from an email in addressbook")); |
1397 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1403 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1398 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); | 1404 | topLayout->addMultiCellWidget(autoFreeBusyGroup->groupBox(),3,3,0,0); |
1399 | 1405 | ||
1400 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = | 1406 | KPrefsDialogWidRadios *autoFreeBusyReplyGroup = |
1401 | addWidRadios(i18n("Auto Save FreeBusy Replies"), | 1407 | addWidRadios(i18n("Auto Save FreeBusy Replies"), |
1402 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); | 1408 | &(KOPrefs::instance()->mIMIPAutoFreeBusyReply),topFrame); |
1403 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); | 1409 | autoFreeBusyReplyGroup->addRadio(i18n("Never")); |
1404 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); | 1410 | autoFreeBusyReplyGroup->addRadio(i18n("If attendee is in addressbook")); |
1405 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); | 1411 | //autoFreeBusyGroup->addRadio(i18n("selected emails")); |
1406 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); | 1412 | topLayout->addMultiCellWidget(autoFreeBusyReplyGroup->groupBox(),4,4,0,0); |
1407 | } | 1413 | } |
1408 | 1414 | ||
1409 | void KOPrefsDialog::showPrinterTab() | 1415 | void KOPrefsDialog::showPrinterTab() |
1410 | { | 1416 | { |
1411 | showPage(pageIndex(mPrinterTab)); | 1417 | showPage(pageIndex(mPrinterTab)); |
1412 | } | 1418 | } |
1413 | 1419 | ||
1414 | 1420 | ||
@@ -1616,98 +1622,98 @@ void KOPrefsDialog::removeItem() | |||
1616 | // } | 1622 | // } |
1617 | } | 1623 | } |
1618 | 1624 | ||
1619 | void KOPrefsDialog::updateItem() | 1625 | void KOPrefsDialog::updateItem() |
1620 | { | 1626 | { |
1621 | // QListViewItem *item; | 1627 | // QListViewItem *item; |
1622 | // item = mAMails->selectedItem(); | 1628 | // item = mAMails->selectedItem(); |
1623 | // if (!item) return; | 1629 | // if (!item) return; |
1624 | // item->setText(0,aEmailsEdit->text()); | 1630 | // item->setText(0,aEmailsEdit->text()); |
1625 | } | 1631 | } |
1626 | 1632 | ||
1627 | void KOPrefsDialog::updateInput() | 1633 | void KOPrefsDialog::updateInput() |
1628 | { | 1634 | { |
1629 | // QListViewItem *item; | 1635 | // QListViewItem *item; |
1630 | // item = mAMails->selectedItem(); | 1636 | // item = mAMails->selectedItem(); |
1631 | // if (!item) return; | 1637 | // if (!item) return; |
1632 | // aEmailsEdit->setEnabled(true); | 1638 | // aEmailsEdit->setEnabled(true); |
1633 | // aEmailsEdit->setText(item->text(0)); | 1639 | // aEmailsEdit->setText(item->text(0)); |
1634 | } | 1640 | } |
1635 | void KOPrefsDialog::updateTimezoneOffset( int index ) | 1641 | void KOPrefsDialog::updateTimezoneOffset( int index ) |
1636 | { | 1642 | { |
1637 | /* | 1643 | /* |
1638 | qDebug("updateTimezoneOffset %d ", index); | 1644 | qDebug("updateTimezoneOffset %d ", index); |
1639 | if ( index < 24 ) { | 1645 | if ( index < 24 ) { |
1640 | mTimezoneOffsetSpin->setEnabled ( false ); | 1646 | mTimezoneOffsetSpin->setEnabled ( false ); |
1641 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); | 1647 | mTimezoneOffsetSpin->setValue( ( index-11 ) * 60 ); |
1642 | 1648 | ||
1643 | 1649 | ||
1644 | } else { | 1650 | } else { |
1645 | if ( index == 24 ) { | 1651 | if ( index == 24 ) { |
1646 | mTimezoneOffsetSpin->setEnabled ( true ); | 1652 | mTimezoneOffsetSpin->setEnabled ( true ); |
1647 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); | 1653 | mTimezoneOffsetSpin->setValue( KOPrefs::instance()->mTimeZoneOffset); |
1648 | 1654 | ||
1649 | } else { | 1655 | } else { |
1650 | mTimezoneOffsetSpin->setEnabled ( false ); | 1656 | mTimezoneOffsetSpin->setEnabled ( false ); |
1651 | mTimezoneOffsetSpin->setValue( 0 ); | 1657 | mTimezoneOffsetSpin->setValue( 0 ); |
1652 | } | 1658 | } |
1653 | } | 1659 | } |
1654 | */ | 1660 | */ |
1655 | } | 1661 | } |
1656 | 1662 | ||
1657 | void KOPrefsDialog::setupTimeZoneTab() | 1663 | void KOPrefsDialog::setupTimeZoneTab() |
1658 | { | 1664 | { |
1659 | #if 0 | 1665 | #if 0 |
1660 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); | 1666 | QFrame *topFrame = addPage(i18n("Time Zone"),0,0); |
1661 | // DesktopIcon("clock",KIcon::SizeMedium)); | 1667 | // DesktopIcon("clock",KIcon::SizeMedium)); |
1662 | 1668 | ||
1663 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); | 1669 | QGridLayout *topLayout = new QGridLayout(topFrame,5,2); |
1664 | topLayout->setSpacing(spacingHint()); | 1670 | topLayout->setSpacing(mSpacingHint); |
1665 | topLayout->setMargin(marginHint()); | 1671 | topLayout->setMargin(mMarginHint); |
1666 | 1672 | ||
1667 | QHBox *timeZoneBox = new QHBox( topFrame ); | 1673 | QHBox *timeZoneBox = new QHBox( topFrame ); |
1668 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); | 1674 | topLayout->addMultiCellWidget( timeZoneBox, 0, 0, 0, 1 ); |
1669 | 1675 | ||
1670 | new QLabel( i18n("Timezone:"), timeZoneBox ); | 1676 | new QLabel( i18n("Timezone:"), timeZoneBox ); |
1671 | mTimeZoneCombo = new QComboBox( timeZoneBox ); | 1677 | mTimeZoneCombo = new QComboBox( timeZoneBox ); |
1672 | if ( QApplication::desktop()->width() < 300 ) { | 1678 | if ( QApplication::desktop()->width() < 300 ) { |
1673 | mTimeZoneCombo->setMaximumWidth(150); | 1679 | mTimeZoneCombo->setMaximumWidth(150); |
1674 | } | 1680 | } |
1675 | 1681 | ||
1676 | QStringList list; | 1682 | QStringList list; |
1677 | list = KGlobal::locale()->timeZoneList(); | 1683 | list = KGlobal::locale()->timeZoneList(); |
1678 | mTimeZoneCombo->insertStringList(list); | 1684 | mTimeZoneCombo->insertStringList(list); |
1679 | 1685 | ||
1680 | // find the currently set time zone and select it | 1686 | // find the currently set time zone and select it |
1681 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; | 1687 | QString sCurrentlySet = KOPrefs::instance()->mTimeZoneId; |
1682 | int nCurrentlySet = 11; | 1688 | int nCurrentlySet = 11; |
1683 | for (int i = 0; i < mTimeZoneCombo->count(); i++) | 1689 | for (int i = 0; i < mTimeZoneCombo->count(); i++) |
1684 | { | 1690 | { |
1685 | if (mTimeZoneCombo->text(i) == sCurrentlySet) | 1691 | if (mTimeZoneCombo->text(i) == sCurrentlySet) |
1686 | { | 1692 | { |
1687 | nCurrentlySet = i; | 1693 | nCurrentlySet = i; |
1688 | break; | 1694 | break; |
1689 | } | 1695 | } |
1690 | } | 1696 | } |
1691 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); | 1697 | mTimeZoneCombo->setCurrentItem(nCurrentlySet); |
1692 | int iii = 1; | 1698 | int iii = 1; |
1693 | KPrefsDialogWidBool *sb = | 1699 | KPrefsDialogWidBool *sb = |
1694 | addWidBool(i18n("Timezone has daylight saving"), | 1700 | addWidBool(i18n("Timezone has daylight saving"), |
1695 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); | 1701 | &(KOPrefs::instance()->mUseDaylightsaving),topFrame); |
1696 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); | 1702 | topLayout->addMultiCellWidget(sb->checkBox(), iii,iii,0,1); |
1697 | ++iii; | 1703 | ++iii; |
1698 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); | 1704 | QLabel* lab = new QLabel( i18n("Actual start and end is the\nsunday before this date."), topFrame ); |
1699 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1705 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1700 | ++iii; | 1706 | ++iii; |
1701 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); | 1707 | lab = new QLabel( i18n("The year in the date is ignored."), topFrame ); |
1702 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); | 1708 | topLayout->addMultiCellWidget(lab, iii,iii,0,1); |
1703 | ++iii; | 1709 | ++iii; |
1704 | lab = new QLabel( i18n("Daylight start:"), topFrame ); | 1710 | lab = new QLabel( i18n("Daylight start:"), topFrame ); |
1705 | topLayout->addWidget(lab, iii,0); | 1711 | topLayout->addWidget(lab, iii,0); |
1706 | mStartDateSavingEdit = new KDateEdit(topFrame); | 1712 | mStartDateSavingEdit = new KDateEdit(topFrame); |
1707 | topLayout->addWidget(mStartDateSavingEdit, iii,1); | 1713 | topLayout->addWidget(mStartDateSavingEdit, iii,1); |
1708 | ++iii; | 1714 | ++iii; |
1709 | 1715 | ||
1710 | lab = new QLabel( i18n("Daylight end:"), topFrame ); | 1716 | lab = new QLabel( i18n("Daylight end:"), topFrame ); |
1711 | topLayout->addWidget(lab, iii,0); | 1717 | topLayout->addWidget(lab, iii,0); |
1712 | mEndDateSavingEdit = new KDateEdit(topFrame); | 1718 | mEndDateSavingEdit = new KDateEdit(topFrame); |
1713 | topLayout->addWidget(mEndDateSavingEdit, iii,1); | 1719 | topLayout->addWidget(mEndDateSavingEdit, iii,1); |