author | zautrix <zautrix> | 2005-03-29 10:41:27 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-29 10:41:27 (UTC) |
commit | 4af444fb7071d37c966f002f4971d209971679c9 (patch) (unidiff) | |
tree | f451274ed211bc85503a83acecd377368734c828 /korganizer | |
parent | a5d52c19d2cd9b008e5cf41d5c7d2c193df7ee46 (diff) | |
download | kdepimpi-4af444fb7071d37c966f002f4971d209971679c9.zip kdepimpi-4af444fb7071d37c966f002f4971d209971679c9.tar.gz kdepimpi-4af444fb7071d37c966f002f4971d209971679c9.tar.bz2 |
toolbar setup options added
-rw-r--r-- | korganizer/koprefs.cpp | 10 | ||||
-rw-r--r-- | korganizer/koprefs.h | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 30 |
3 files changed, 44 insertions, 0 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 1e68a44..97ab4e8 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -31,128 +31,138 @@ | |||
31 | #include <qstring.h> | 31 | #include <qstring.h> |
32 | #include <qregexp.h> | 32 | #include <qregexp.h> |
33 | #include <qfont.h> | 33 | #include <qfont.h> |
34 | #include <qcolor.h> | 34 | #include <qcolor.h> |
35 | #include <qstringlist.h> | 35 | #include <qstringlist.h> |
36 | #include <stdlib.h> | 36 | #include <stdlib.h> |
37 | 37 | ||
38 | #include <kglobal.h> | 38 | #include <kglobal.h> |
39 | #include <kglobalsettings.h> | 39 | #include <kglobalsettings.h> |
40 | #include <kconfig.h> | 40 | #include <kconfig.h> |
41 | #include <klocale.h> | 41 | #include <klocale.h> |
42 | #include <kdebug.h> | 42 | #include <kdebug.h> |
43 | #include <kemailsettings.h> | 43 | #include <kemailsettings.h> |
44 | #include <kstaticdeleter.h> | 44 | #include <kstaticdeleter.h> |
45 | #include <libkdepim/kpimglobalprefs.h> | 45 | #include <libkdepim/kpimglobalprefs.h> |
46 | 46 | ||
47 | #include "koprefs.h" | 47 | #include "koprefs.h" |
48 | #include "mainwindow.h" | 48 | #include "mainwindow.h" |
49 | 49 | ||
50 | KOPrefs *KOPrefs::mInstance = 0; | 50 | KOPrefs *KOPrefs::mInstance = 0; |
51 | static KStaticDeleter<KOPrefs> insd; | 51 | static KStaticDeleter<KOPrefs> insd; |
52 | 52 | ||
53 | KOPrefs::KOPrefs() : | 53 | KOPrefs::KOPrefs() : |
54 | KPimPrefs("korganizerrc") | 54 | KPimPrefs("korganizerrc") |
55 | { | 55 | { |
56 | mCategoryColors.setAutoDelete(true); | 56 | mCategoryColors.setAutoDelete(true); |
57 | fillMailDefaults(); | 57 | fillMailDefaults(); |
58 | mDefaultCategoryColor = QColor(175,210,255);//196,196,196); | 58 | mDefaultCategoryColor = QColor(175,210,255);//196,196,196); |
59 | QColor defaultHolidayColor = QColor(255,0,0); | 59 | QColor defaultHolidayColor = QColor(255,0,0); |
60 | QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); | 60 | QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); |
61 | QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); | 61 | QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); |
62 | QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); | 62 | QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); |
63 | QColor defaultTodoDueTodayColor = QColor(255,220,100); | 63 | QColor defaultTodoDueTodayColor = QColor(255,220,100); |
64 | QColor defaultTodoOverdueColor = QColor(255,153,125); | 64 | QColor defaultTodoOverdueColor = QColor(255,153,125); |
65 | 65 | ||
66 | 66 | ||
67 | KPrefs::setCurrentGroup("General"); | 67 | KPrefs::setCurrentGroup("General"); |
68 | 68 | ||
69 | 69 | ||
70 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 70 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
71 | 71 | ||
72 | addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); | 72 | addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); |
73 | addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); | 73 | addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); |
74 | addItemBool("ShowIconSearch",&mShowIconSearch,true); | 74 | addItemBool("ShowIconSearch",&mShowIconSearch,true); |
75 | addItemBool("ShowIconList",&mShowIconList,true); | 75 | addItemBool("ShowIconList",&mShowIconList,true); |
76 | addItemBool("ShowIconDay1",&mShowIconDay1,true); | 76 | addItemBool("ShowIconDay1",&mShowIconDay1,true); |
77 | addItemBool("ShowIconDay5",&mShowIconDay5,true); | 77 | addItemBool("ShowIconDay5",&mShowIconDay5,true); |
78 | addItemBool("ShowIconDay6",&mShowIconDay6,true); | 78 | addItemBool("ShowIconDay6",&mShowIconDay6,true); |
79 | addItemBool("ShowIconDay7",&mShowIconDay7,true); | 79 | addItemBool("ShowIconDay7",&mShowIconDay7,true); |
80 | addItemBool("ShowIconMonth",&mShowIconMonth,true); | 80 | addItemBool("ShowIconMonth",&mShowIconMonth,true); |
81 | addItemBool("ShowIconTodoview",&mShowIconTodoview,true); | 81 | addItemBool("ShowIconTodoview",&mShowIconTodoview,true); |
82 | addItemBool("ShowIconBackFast",&mShowIconBackFast,true); | 82 | addItemBool("ShowIconBackFast",&mShowIconBackFast,true); |
83 | addItemBool("ShowIconBack",&mShowIconBack,true); | 83 | addItemBool("ShowIconBack",&mShowIconBack,true); |
84 | addItemBool("ShowIconToday",&mShowIconToday,true); | 84 | addItemBool("ShowIconToday",&mShowIconToday,true); |
85 | addItemBool("ShowIconForward",&mShowIconForward,true); | 85 | addItemBool("ShowIconForward",&mShowIconForward,true); |
86 | addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); | 86 | addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); |
87 | addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); | 87 | addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); |
88 | addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); | 88 | addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); |
89 | addItemBool("ShowIconNextDays",&mShowIconNextDays,true); | 89 | addItemBool("ShowIconNextDays",&mShowIconNextDays,true); |
90 | addItemBool("ShowIconNext",&mShowIconNext,true); | 90 | addItemBool("ShowIconNext",&mShowIconNext,true); |
91 | addItemBool("ShowIconJournal",&mShowIconJournal,true); | 91 | addItemBool("ShowIconJournal",&mShowIconJournal,true); |
92 | addItemBool("ShowIconStretch",&mShowIconStretch,true); | 92 | addItemBool("ShowIconStretch",&mShowIconStretch,true); |
93 | addItemBool("ShowIconFilter",&mShowIconFilter,false); | 93 | addItemBool("ShowIconFilter",&mShowIconFilter,false); |
94 | addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); | 94 | addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); |
95 | |||
96 | bool addIcons = false; | ||
97 | #ifdef DESKTOP_VERSION | ||
98 | addIcons = true; | ||
99 | #endif | ||
100 | addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); | ||
101 | addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); | ||
102 | addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); | ||
103 | addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); | ||
104 | |||
95 | addItemInt("LastLoadedLanguage",&mOldLanguage,0); | 105 | addItemInt("LastLoadedLanguage",&mOldLanguage,0); |
96 | 106 | ||
97 | addItemBool("AskForQuit",&mAskForQuit,false); | 107 | addItemBool("AskForQuit",&mAskForQuit,false); |
98 | 108 | ||
99 | #ifndef DESKTOP_VERSION | 109 | #ifndef DESKTOP_VERSION |
100 | addItemBool("ShowFullMenu",&mShowFullMenu,false); | 110 | addItemBool("ShowFullMenu",&mShowFullMenu,false); |
101 | #else | 111 | #else |
102 | addItemBool("ShowFullMenu",&mShowFullMenu,true); | 112 | addItemBool("ShowFullMenu",&mShowFullMenu,true); |
103 | #endif | 113 | #endif |
104 | addItemBool("ToolBarHor",&mToolBarHor, true ); | 114 | addItemBool("ToolBarHor",&mToolBarHor, true ); |
105 | addItemBool("ToolBarUp",&mToolBarUp, false ); | 115 | addItemBool("ToolBarUp",&mToolBarUp, false ); |
106 | addItemBool("ToolBarHorV",&mToolBarHorV, true ); | 116 | addItemBool("ToolBarHorV",&mToolBarHorV, true ); |
107 | addItemBool("ToolBarUpV",&mToolBarUpV, false ); | 117 | addItemBool("ToolBarUpV",&mToolBarUpV, false ); |
108 | addItemBool("ToolBarHorN",&mToolBarHorN, true ); | 118 | addItemBool("ToolBarHorN",&mToolBarHorN, true ); |
109 | addItemBool("ToolBarUpN",&mToolBarUpN, false ); | 119 | addItemBool("ToolBarUpN",&mToolBarUpN, false ); |
110 | addItemBool("ToolBarHorF",&mToolBarHorF, true ); | 120 | addItemBool("ToolBarHorF",&mToolBarHorF, true ); |
111 | addItemBool("ToolBarUpF",&mToolBarUpF, false ); | 121 | addItemBool("ToolBarUpF",&mToolBarUpF, false ); |
112 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); | 122 | addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); |
113 | addItemInt("Whats Next Days",&mWhatsNextDays,3); | 123 | addItemInt("Whats Next Days",&mWhatsNextDays,3); |
114 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); | 124 | addItemInt("Whats Next Prios",&mWhatsNextPrios,1); |
115 | 125 | ||
116 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); | 126 | addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); |
117 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); | 127 | addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); |
118 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); | 128 | addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); |
119 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); | 129 | addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); |
120 | addItemInt("AllDay Size",&mAllDaySize,28); | 130 | addItemInt("AllDay Size",&mAllDaySize,28); |
121 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; | 131 | QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; |
122 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); | 132 | addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); |
123 | 133 | ||
124 | addItemStringList("LocationDefaults",&mLocationDefaults ); | 134 | addItemStringList("LocationDefaults",&mLocationDefaults ); |
125 | addItemStringList("EventSummary User",&mEventSummaryUser); | 135 | addItemStringList("EventSummary User",&mEventSummaryUser); |
126 | addItemStringList("TodoSummary User",&mTodoSummaryUser); | 136 | addItemStringList("TodoSummary User",&mTodoSummaryUser); |
127 | 137 | ||
128 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); | 138 | addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); |
129 | addItemBool("Enable Project View",&mEnableProjectView,false); | 139 | addItemBool("Enable Project View",&mEnableProjectView,false); |
130 | addItemBool("Auto Save",&mAutoSave,false); | 140 | addItemBool("Auto Save",&mAutoSave,false); |
131 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); | 141 | addItemInt("Auto Save Interval",&mAutoSaveInterval,3); |
132 | addItemBool("Confirm Deletes",&mConfirm,true); | 142 | addItemBool("Confirm Deletes",&mConfirm,true); |
133 | addItemString("Archive File",&mArchiveFile); | 143 | addItemString("Archive File",&mArchiveFile); |
134 | addItemString("Html Export File",&mHtmlExportFile, | 144 | addItemString("Html Export File",&mHtmlExportFile, |
135 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); | 145 | QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); |
136 | addItemBool("Html With Save",&mHtmlWithSave,false); | 146 | addItemBool("Html With Save",&mHtmlWithSave,false); |
137 | 147 | ||
138 | KPrefs::setCurrentGroup("Personal Settings"); | 148 | KPrefs::setCurrentGroup("Personal Settings"); |
139 | 149 | ||
140 | addItemInt("Mail Client",&mMailClient,MailClientKMail); | 150 | addItemInt("Mail Client",&mMailClient,MailClientKMail); |
141 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); | 151 | addItemBool("Use Control Center Email",&mEmailControlCenter,false); |
142 | addItemBool("Bcc",&mBcc,false); | 152 | addItemBool("Bcc",&mBcc,false); |
143 | 153 | ||
144 | KPrefs::setCurrentGroup("Time & Date"); | 154 | KPrefs::setCurrentGroup("Time & Date"); |
145 | 155 | ||
146 | 156 | ||
147 | addItemInt("Default Start Time",&mStartTime,10); | 157 | addItemInt("Default Start Time",&mStartTime,10); |
148 | addItemInt("Default Duration",&mDefaultDuration,2); | 158 | addItemInt("Default Duration",&mDefaultDuration,2); |
149 | addItemInt("Default Alarm Time",&mAlarmTime,3); | 159 | addItemInt("Default Alarm Time",&mAlarmTime,3); |
150 | KPrefs::setCurrentGroup("AlarmSettings"); | 160 | KPrefs::setCurrentGroup("AlarmSettings"); |
151 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); | 161 | addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); |
152 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); | 162 | addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); |
153 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); | 163 | addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); |
154 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); | 164 | addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); |
155 | 165 | ||
156 | 166 | ||
157 | KPrefs::setCurrentGroup("Calendar"); | 167 | KPrefs::setCurrentGroup("Calendar"); |
158 | 168 | ||
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index fbce6ea..3a07348 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -126,128 +126,132 @@ class KOPrefs : public KPimPrefs | |||
126 | QColor mHighlightColor; | 126 | QColor mHighlightColor; |
127 | QColor mEventColor; | 127 | QColor mEventColor; |
128 | QColor mTodoDoneColor; | 128 | QColor mTodoDoneColor; |
129 | QColor mAgendaBgColor; | 129 | QColor mAgendaBgColor; |
130 | QColor mWorkingHoursColor; | 130 | QColor mWorkingHoursColor; |
131 | QColor mTodoDueTodayColor; | 131 | QColor mTodoDueTodayColor; |
132 | QColor mTodoOverdueColor; | 132 | QColor mTodoOverdueColor; |
133 | QColor mMonthViewEvenColor; | 133 | QColor mMonthViewEvenColor; |
134 | QColor mMonthViewOddColor; | 134 | QColor mMonthViewOddColor; |
135 | QColor mMonthViewHolidayColor; | 135 | QColor mMonthViewHolidayColor; |
136 | bool mMonthViewUsesDayColors; | 136 | bool mMonthViewUsesDayColors; |
137 | bool mMonthViewSatSunTog; | 137 | bool mMonthViewSatSunTog; |
138 | bool mMonthViewWeek; | 138 | bool mMonthViewWeek; |
139 | QColor mAppColor1; | 139 | QColor mAppColor1; |
140 | QColor mAppColor2; | 140 | QColor mAppColor2; |
141 | bool mUseAppColors; | 141 | bool mUseAppColors; |
142 | 142 | ||
143 | int mDayBegins; | 143 | int mDayBegins; |
144 | int mHourSize; | 144 | int mHourSize; |
145 | int mAllDaySize; | 145 | int mAllDaySize; |
146 | bool mShowFullMenu; | 146 | bool mShowFullMenu; |
147 | bool mDailyRecur; | 147 | bool mDailyRecur; |
148 | bool mWeeklyRecur; | 148 | bool mWeeklyRecur; |
149 | bool mMonthDailyRecur; | 149 | bool mMonthDailyRecur; |
150 | bool mMonthWeeklyRecur; | 150 | bool mMonthWeeklyRecur; |
151 | bool mMonthShowIcons; | 151 | bool mMonthShowIcons; |
152 | bool mMonthShowShort; | 152 | bool mMonthShowShort; |
153 | bool mEnableToolTips; | 153 | bool mEnableToolTips; |
154 | bool mEnableMonthScroll; | 154 | bool mEnableMonthScroll; |
155 | bool mFullViewMonth; | 155 | bool mFullViewMonth; |
156 | bool mMonthViewUsesCategoryColor; | 156 | bool mMonthViewUsesCategoryColor; |
157 | bool mFullViewTodo; | 157 | bool mFullViewTodo; |
158 | bool mShowCompletedTodo; | 158 | bool mShowCompletedTodo; |
159 | bool mMarcusBainsEnabled; | 159 | bool mMarcusBainsEnabled; |
160 | int mNextXDays; | 160 | int mNextXDays; |
161 | int mWhatsNextDays; | 161 | int mWhatsNextDays; |
162 | int mWhatsNextPrios; | 162 | int mWhatsNextPrios; |
163 | bool mEnableQuickTodo; | 163 | bool mEnableQuickTodo; |
164 | 164 | ||
165 | bool mCompactDialogs; | 165 | bool mCompactDialogs; |
166 | bool mVerticalScreen; | 166 | bool mVerticalScreen; |
167 | 167 | ||
168 | bool mShowIconNewTodo; | 168 | bool mShowIconNewTodo; |
169 | bool mShowIconNewEvent; | 169 | bool mShowIconNewEvent; |
170 | bool mShowIconSearch; | 170 | bool mShowIconSearch; |
171 | bool mShowIconList; | 171 | bool mShowIconList; |
172 | bool mShowIconDay1; | 172 | bool mShowIconDay1; |
173 | bool mShowIconDay5; | 173 | bool mShowIconDay5; |
174 | bool mShowIconDay6; | 174 | bool mShowIconDay6; |
175 | bool mShowIconDay7; | 175 | bool mShowIconDay7; |
176 | bool mShowIconMonth; | 176 | bool mShowIconMonth; |
177 | bool mShowIconTodoview; | 177 | bool mShowIconTodoview; |
178 | bool mShowIconBackFast; | 178 | bool mShowIconBackFast; |
179 | bool mShowIconBack; | 179 | bool mShowIconBack; |
180 | bool mShowIconToday; | 180 | bool mShowIconToday; |
181 | bool mShowIconForward; | 181 | bool mShowIconForward; |
182 | bool mShowIconForwardFast; | 182 | bool mShowIconForwardFast; |
183 | bool mShowIconWhatsThis; | 183 | bool mShowIconWhatsThis; |
184 | bool mShowIconWeekNum; | 184 | bool mShowIconWeekNum; |
185 | bool mShowIconNextDays; | 185 | bool mShowIconNextDays; |
186 | bool mShowIconNext; | 186 | bool mShowIconNext; |
187 | bool mShowIconJournal; | 187 | bool mShowIconJournal; |
188 | bool mShowIconFilter; | 188 | bool mShowIconFilter; |
189 | bool mShowIconOnetoolbar; | 189 | bool mShowIconOnetoolbar; |
190 | bool mShowIconNavigator; | ||
191 | bool mShowIconAllday; | ||
192 | bool mShowIconFilterview; | ||
193 | bool mShowIconToggleFull; | ||
190 | 194 | ||
191 | bool mShowIconStretch; | 195 | bool mShowIconStretch; |
192 | 196 | ||
193 | bool mToolBarHor; | 197 | bool mToolBarHor; |
194 | bool mToolBarUp; | 198 | bool mToolBarUp; |
195 | bool mToolBarHorV; | 199 | bool mToolBarHorV; |
196 | bool mToolBarUpV; | 200 | bool mToolBarUpV; |
197 | bool mToolBarHorN; | 201 | bool mToolBarHorN; |
198 | bool mToolBarUpN; | 202 | bool mToolBarUpN; |
199 | bool mToolBarHorF; | 203 | bool mToolBarHorF; |
200 | bool mToolBarUpF; | 204 | bool mToolBarUpF; |
201 | bool mToolBarMiniIcons; | 205 | bool mToolBarMiniIcons; |
202 | 206 | ||
203 | bool mAskForQuit; | 207 | bool mAskForQuit; |
204 | bool mUsePassWd; | 208 | bool mUsePassWd; |
205 | bool mShowSyncEvents; | 209 | bool mShowSyncEvents; |
206 | bool mShowTodoInAgenda; | 210 | bool mShowTodoInAgenda; |
207 | bool mShowTimeInAgenda; | 211 | bool mShowTimeInAgenda; |
208 | bool mHideNonStartedTodos; | 212 | bool mHideNonStartedTodos; |
209 | 213 | ||
210 | int mLastSyncTime; | 214 | int mLastSyncTime; |
211 | void setCategoryColor(QString cat,const QColor & color); | 215 | void setCategoryColor(QString cat,const QColor & color); |
212 | QColor *categoryColor(QString cat); | 216 | QColor *categoryColor(QString cat); |
213 | 217 | ||
214 | QString mArchiveFile; | 218 | QString mArchiveFile; |
215 | QString mHtmlExportFile; | 219 | QString mHtmlExportFile; |
216 | bool mHtmlWithSave; | 220 | bool mHtmlWithSave; |
217 | 221 | ||
218 | QStringList mSelectedPlugins; | 222 | QStringList mSelectedPlugins; |
219 | 223 | ||
220 | QString mLastImportFile; | 224 | QString mLastImportFile; |
221 | QString mLastVcalFile; | 225 | QString mLastVcalFile; |
222 | QString mLastSaveFile; | 226 | QString mLastSaveFile; |
223 | QString mLastLoadFile; | 227 | QString mLastLoadFile; |
224 | 228 | ||
225 | 229 | ||
226 | QString mDefaultAlarmFile; | 230 | QString mDefaultAlarmFile; |
227 | int mIMIPScheduler; | 231 | int mIMIPScheduler; |
228 | int mIMIPSend; | 232 | int mIMIPSend; |
229 | QStringList mAdditionalMails; | 233 | QStringList mAdditionalMails; |
230 | int mIMIPAutoRefresh; | 234 | int mIMIPAutoRefresh; |
231 | int mIMIPAutoInsertReply; | 235 | int mIMIPAutoInsertReply; |
232 | int mIMIPAutoInsertRequest; | 236 | int mIMIPAutoInsertRequest; |
233 | int mIMIPAutoFreeBusy; | 237 | int mIMIPAutoFreeBusy; |
234 | int mIMIPAutoFreeBusyReply; | 238 | int mIMIPAutoFreeBusyReply; |
235 | 239 | ||
236 | QStringList mTodoTemplates; | 240 | QStringList mTodoTemplates; |
237 | QStringList mEventTemplates; | 241 | QStringList mEventTemplates; |
238 | 242 | ||
239 | int mDestination; | 243 | int mDestination; |
240 | 244 | ||
241 | 245 | ||
242 | bool mEditOnDoubleClick; | 246 | bool mEditOnDoubleClick; |
243 | bool mViewChangeHoldFullscreen; | 247 | bool mViewChangeHoldFullscreen; |
244 | bool mViewChangeHoldNonFullscreen; | 248 | bool mViewChangeHoldNonFullscreen; |
245 | bool mCenterOnCurrentTime; | 249 | bool mCenterOnCurrentTime; |
246 | bool mSetTimeToDayStartAt; | 250 | bool mSetTimeToDayStartAt; |
247 | bool mHighlightCurrentDay; | 251 | bool mHighlightCurrentDay; |
248 | bool mUseHighlightLightColor; | 252 | bool mUseHighlightLightColor; |
249 | bool mListViewMonthTimespan; | 253 | bool mListViewMonthTimespan; |
250 | bool mWNViewShowsParents; | 254 | bool mWNViewShowsParents; |
251 | bool mWNViewShowsPast; | 255 | bool mWNViewShowsPast; |
252 | bool mWNViewShowLocation; | 256 | bool mWNViewShowLocation; |
253 | bool mTodoViewShowsPercentage; | 257 | bool mTodoViewShowsPercentage; |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 8e52968..8a4c7eb 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -664,164 +664,184 @@ void MainWindow::initActions() | |||
664 | //qDebug("dec-- "); | 664 | //qDebug("dec-- "); |
665 | } | 665 | } |
666 | 666 | ||
667 | connect( mWeekAction, SIGNAL( activated() ), | 667 | connect( mWeekAction, SIGNAL( activated() ), |
668 | this, SLOT( weekAction() ) ); | 668 | this, SLOT( weekAction() ) ); |
669 | 669 | ||
670 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); | 670 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); |
671 | 671 | ||
672 | //#endif | 672 | //#endif |
673 | // ****************** | 673 | // ****************** |
674 | QAction *action; | 674 | QAction *action; |
675 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 675 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
676 | configureToolBarMenu->setCheckable( true ); | 676 | configureToolBarMenu->setCheckable( true ); |
677 | 677 | ||
678 | 678 | ||
679 | configureAgendaMenu->setCheckable( true ); | 679 | configureAgendaMenu->setCheckable( true ); |
680 | int iii ; | 680 | int iii ; |
681 | for ( iii = 1;iii<= 10 ;++iii ){ | 681 | for ( iii = 1;iii<= 10 ;++iii ){ |
682 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); | 682 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); |
683 | } | 683 | } |
684 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 684 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
685 | 685 | ||
686 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), | 686 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), |
687 | this, SLOT( showConfigureAgenda( ) ) ); | 687 | this, SLOT( showConfigureAgenda( ) ) ); |
688 | 688 | ||
689 | icon = loadPixmap( pathString + "configure" ); | 689 | icon = loadPixmap( pathString + "configure" ); |
690 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); | 690 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); |
691 | action->addTo( actionMenu ); | 691 | action->addTo( actionMenu ); |
692 | connect( action, SIGNAL( activated() ), | 692 | connect( action, SIGNAL( activated() ), |
693 | mView, SLOT( edit_options() ) ); | 693 | mView, SLOT( edit_options() ) ); |
694 | actionMenu->insertSeparator(); | 694 | actionMenu->insertSeparator(); |
695 | 695 | ||
696 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); | 696 | action = new QAction( i18n("Undo Delete"), i18n("Undo Delete..."), 0, this ); |
697 | action->addTo( actionMenu ); | 697 | action->addTo( actionMenu ); |
698 | connect( action, SIGNAL( activated() ), | 698 | connect( action, SIGNAL( activated() ), |
699 | mView, SLOT( undo_delete() ) ); | 699 | mView, SLOT( undo_delete() ) ); |
700 | actionMenu->insertSeparator(); | 700 | actionMenu->insertSeparator(); |
701 | 701 | ||
702 | icon = loadPixmap( pathString + "newevent" ); | 702 | icon = loadPixmap( pathString + "newevent" ); |
703 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 703 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
704 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); | 704 | configureToolBarMenu->insertItem(i18n("Only one toolbar"), 6 ); |
705 | configureToolBarMenu->insertSeparator(); | 705 | configureToolBarMenu->insertSeparator(); |
706 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); | 706 | configureToolBarMenu->insertItem(i18n("Filtermenu"), 7 ); |
707 | configureToolBarMenu->insertSeparator(); | 707 | configureToolBarMenu->insertSeparator(); |
708 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); | 708 | configureToolBarMenu->insertItem(i18n("Week Number"), 400); |
709 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 709 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
710 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); | 710 | QAction* ne_action = new QAction( i18n("New Event..."), icon, i18n("New Event..."), 0, this ); |
711 | ne_action->addTo( actionMenu ); | 711 | ne_action->addTo( actionMenu ); |
712 | connect( ne_action, SIGNAL( activated() ), | 712 | connect( ne_action, SIGNAL( activated() ), |
713 | mView, SLOT( newEvent() ) ); | 713 | mView, SLOT( newEvent() ) ); |
714 | icon = loadPixmap( pathString + "newtodo" ); | 714 | icon = loadPixmap( pathString + "newtodo" ); |
715 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 715 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
716 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 716 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
717 | nt_action->addTo( actionMenu ); | 717 | nt_action->addTo( actionMenu ); |
718 | connect( nt_action, SIGNAL( activated() ), | 718 | connect( nt_action, SIGNAL( activated() ), |
719 | mView, SLOT( newTodo() ) ); | 719 | mView, SLOT( newTodo() ) ); |
720 | 720 | ||
721 | icon = loadPixmap( pathString + "today" ); | 721 | icon = loadPixmap( pathString + "today" ); |
722 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 722 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
723 | today_action->addTo( viewMenu ); | 723 | today_action->addTo( viewMenu ); |
724 | connect( today_action, SIGNAL( activated() ), | 724 | connect( today_action, SIGNAL( activated() ), |
725 | mView, SLOT( goToday() ) ); | 725 | mView, SLOT( goToday() ) ); |
726 | viewMenu->insertSeparator(); | 726 | viewMenu->insertSeparator(); |
727 | 727 | ||
728 | // *********************** | ||
729 | if ( KOPrefs::instance()->mVerticalScreen ) { | ||
730 | icon = SmallIcon( "1updownarrow" ); | ||
731 | } else { | ||
732 | icon = SmallIcon("1leftrightarrow" ); | ||
733 | } | ||
734 | configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); | ||
735 | QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); | ||
736 | FSaction->addTo( viewMenu ); | ||
737 | connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); | ||
738 | |||
728 | icon = loadPixmap( pathString + "navi" ); | 739 | icon = loadPixmap( pathString + "navi" ); |
740 | configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); | ||
729 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 741 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
730 | action->addTo( viewMenu ); | 742 | action->addTo( viewMenu ); |
731 | connect( action, SIGNAL( activated() ), | 743 | connect( action, SIGNAL( activated() ), |
732 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 744 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
733 | mToggleNav = action ; | 745 | mToggleNav = action ; |
734 | icon = loadPixmap( pathString + "filter" ); | 746 | icon = loadPixmap( pathString + "filter" ); |
747 | configureToolBarMenu->insertItem(icon, i18n("Toggle FilterView"), 26 ); | ||
735 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); | 748 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); |
736 | action->addTo( viewMenu ); | 749 | action->addTo( viewMenu ); |
737 | connect( action, SIGNAL( activated() ), | 750 | connect( action, SIGNAL( activated() ), |
738 | mView, SLOT( toggleFilter() ) ); | 751 | mView, SLOT( toggleFilter() ) ); |
739 | mToggleFilter = action; | 752 | mToggleFilter = action; |
740 | icon = loadPixmap( pathString + "allday" ); | 753 | icon = loadPixmap( pathString + "allday" ); |
754 | configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); | ||
741 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); | 755 | action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); |
742 | action->addTo( viewMenu ); | 756 | action->addTo( viewMenu ); |
743 | connect( action, SIGNAL( activated() ), | 757 | connect( action, SIGNAL( activated() ), |
744 | mView, SLOT( toggleAllDaySize() ) ); | 758 | mView, SLOT( toggleAllDaySize() ) ); |
745 | mToggleAllday = action; | 759 | mToggleAllday = action; |
746 | 760 | ||
747 | 761 | ||
748 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 762 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
749 | mToggleNav, SLOT( setEnabled ( bool ) ) ); | 763 | mToggleNav, SLOT( setEnabled ( bool ) ) ); |
750 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), | 764 | connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), |
751 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); | 765 | mToggleFilter, SLOT( setEnabled ( bool ) ) ); |
752 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), | 766 | connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), |
753 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); | 767 | mToggleAllday, SLOT( setEnabled ( bool ) ) ); |
754 | 768 | ||
755 | viewMenu->insertSeparator(); | 769 | viewMenu->insertSeparator(); |
756 | icon = loadPixmap( pathString + "picker" ); | 770 | icon = loadPixmap( pathString + "picker" ); |
757 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); | 771 | action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); |
758 | action->addTo( viewMenu ); | 772 | action->addTo( viewMenu ); |
759 | connect( action, SIGNAL( activated() ), | 773 | connect( action, SIGNAL( activated() ), |
760 | mView, SLOT( showDatePicker() ) ); | 774 | mView, SLOT( showDatePicker() ) ); |
761 | action->addTo( iconToolBar ); | 775 | action->addTo( iconToolBar ); |
762 | viewMenu->insertSeparator(); | 776 | viewMenu->insertSeparator(); |
763 | 777 | ||
778 | if ( p-> mShowIconToggleFull ) | ||
779 | FSaction->addTo( iconToolBar ); | ||
780 | if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); | ||
781 | if ( p->mShowIconFilterview ) mToggleFilter->addTo( iconToolBar ); | ||
782 | if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); | ||
783 | |||
764 | 784 | ||
765 | icon = loadPixmap( pathString + "whatsnext" ); | 785 | icon = loadPixmap( pathString + "whatsnext" ); |
766 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); | 786 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); |
767 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 787 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
768 | whatsnext_action->addTo( viewMenu ); | 788 | whatsnext_action->addTo( viewMenu ); |
769 | connect( whatsnext_action, SIGNAL( activated() ), | 789 | connect( whatsnext_action, SIGNAL( activated() ), |
770 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 790 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
771 | 791 | ||
772 | icon = loadPixmap( pathString + "xdays" ); | 792 | icon = loadPixmap( pathString + "xdays" ); |
773 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); | 793 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); |
774 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 794 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
775 | xdays_action->addTo( viewMenu ); | 795 | xdays_action->addTo( viewMenu ); |
776 | connect( xdays_action, SIGNAL( activated() ), | 796 | connect( xdays_action, SIGNAL( activated() ), |
777 | mView->viewManager(), SLOT( showNextXView() ) ); | 797 | mView->viewManager(), SLOT( showNextXView() ) ); |
778 | 798 | ||
779 | 799 | ||
780 | icon = loadPixmap( pathString + "journal" ); | 800 | icon = loadPixmap( pathString + "journal" ); |
781 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 801 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
782 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 802 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
783 | viewjournal_action->addTo( viewMenu ); | 803 | viewjournal_action->addTo( viewMenu ); |
784 | connect( viewjournal_action, SIGNAL( activated() ), | 804 | connect( viewjournal_action, SIGNAL( activated() ), |
785 | mView->viewManager(), SLOT( showJournalView() ) ); | 805 | mView->viewManager(), SLOT( showJournalView() ) ); |
786 | 806 | ||
787 | 807 | ||
788 | icon = loadPixmap( pathString + "day" ); | 808 | icon = loadPixmap( pathString + "day" ); |
789 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 809 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
790 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 810 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
791 | day1_action->addTo( viewMenu ); | 811 | day1_action->addTo( viewMenu ); |
792 | // action->addTo( toolBar ); | 812 | // action->addTo( toolBar ); |
793 | connect( day1_action, SIGNAL( activated() ), | 813 | connect( day1_action, SIGNAL( activated() ), |
794 | mView->viewManager(), SLOT( showDayView() ) ); | 814 | mView->viewManager(), SLOT( showDayView() ) ); |
795 | 815 | ||
796 | icon = loadPixmap( pathString + "workweek" ); | 816 | icon = loadPixmap( pathString + "workweek" ); |
797 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 817 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
798 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 818 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
799 | day5_action->addTo( viewMenu ); | 819 | day5_action->addTo( viewMenu ); |
800 | connect( day5_action, SIGNAL( activated() ), | 820 | connect( day5_action, SIGNAL( activated() ), |
801 | mView->viewManager(), SLOT( showWorkWeekView() ) ); | 821 | mView->viewManager(), SLOT( showWorkWeekView() ) ); |
802 | 822 | ||
803 | icon = loadPixmap( pathString + "week" ); | 823 | icon = loadPixmap( pathString + "week" ); |
804 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 824 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
805 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 825 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
806 | day7_action->addTo( viewMenu ); | 826 | day7_action->addTo( viewMenu ); |
807 | connect( day7_action, SIGNAL( activated() ), | 827 | connect( day7_action, SIGNAL( activated() ), |
808 | mView->viewManager(), SLOT( showWeekView() ) ); | 828 | mView->viewManager(), SLOT( showWeekView() ) ); |
809 | 829 | ||
810 | icon = loadPixmap( pathString + "workweek2" ); | 830 | icon = loadPixmap( pathString + "workweek2" ); |
811 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); | 831 | configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 ); |
812 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); | 832 | QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this ); |
813 | day6_action->addTo( viewMenu ); | 833 | day6_action->addTo( viewMenu ); |
814 | connect( day6_action, SIGNAL( activated() ), | 834 | connect( day6_action, SIGNAL( activated() ), |
815 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); | 835 | mView->viewManager(), SLOT( showMonthViewWeek() ) ); |
816 | 836 | ||
817 | icon = loadPixmap( pathString + "month" ); | 837 | icon = loadPixmap( pathString + "month" ); |
818 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 838 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
819 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 839 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
820 | month_action->addTo( viewMenu ); | 840 | month_action->addTo( viewMenu ); |
821 | connect( month_action, SIGNAL( activated() ), | 841 | connect( month_action, SIGNAL( activated() ), |
822 | mView->viewManager(), SLOT( showMonthView() ) ); | 842 | mView->viewManager(), SLOT( showMonthView() ) ); |
823 | 843 | ||
824 | icon = loadPixmap( pathString + "list" ); | 844 | icon = loadPixmap( pathString + "list" ); |
825 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 845 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); |
826 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 846 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); |
827 | showlist_action->addTo( viewMenu ); | 847 | showlist_action->addTo( viewMenu ); |
@@ -1091,128 +1111,134 @@ void MainWindow::initActions() | |||
1091 | search_action->addTo( iconToolBar ); | 1111 | search_action->addTo( iconToolBar ); |
1092 | if (p-> mShowIconWhatsThis) | 1112 | if (p-> mShowIconWhatsThis) |
1093 | QWhatsThis::whatsThisButton ( iconToolBar ); | 1113 | QWhatsThis::whatsThisButton ( iconToolBar ); |
1094 | if (p-> mShowIconNext) | 1114 | if (p-> mShowIconNext) |
1095 | whatsnext_action->addTo( viewToolBar ); | 1115 | whatsnext_action->addTo( viewToolBar ); |
1096 | if (p-> mShowIconNextDays) | 1116 | if (p-> mShowIconNextDays) |
1097 | xdays_action->addTo( viewToolBar ); | 1117 | xdays_action->addTo( viewToolBar ); |
1098 | if (p-> mShowIconJournal) | 1118 | if (p-> mShowIconJournal) |
1099 | viewjournal_action->addTo( viewToolBar ); | 1119 | viewjournal_action->addTo( viewToolBar ); |
1100 | if (p-> mShowIconDay1) | 1120 | if (p-> mShowIconDay1) |
1101 | day1_action->addTo( viewToolBar ); | 1121 | day1_action->addTo( viewToolBar ); |
1102 | if (p-> mShowIconDay5) | 1122 | if (p-> mShowIconDay5) |
1103 | day5_action->addTo( viewToolBar ); | 1123 | day5_action->addTo( viewToolBar ); |
1104 | if (p-> mShowIconDay7) | 1124 | if (p-> mShowIconDay7) |
1105 | day7_action->addTo( viewToolBar ); | 1125 | day7_action->addTo( viewToolBar ); |
1106 | if (p-> mShowIconDay6) | 1126 | if (p-> mShowIconDay6) |
1107 | day6_action->addTo( viewToolBar ); | 1127 | day6_action->addTo( viewToolBar ); |
1108 | if (p-> mShowIconMonth) | 1128 | if (p-> mShowIconMonth) |
1109 | month_action->addTo( viewToolBar ); | 1129 | month_action->addTo( viewToolBar ); |
1110 | if (p-> mShowIconList) | 1130 | if (p-> mShowIconList) |
1111 | showlist_action->addTo( viewToolBar ); | 1131 | showlist_action->addTo( viewToolBar ); |
1112 | if (p-> mShowIconTodoview) | 1132 | if (p-> mShowIconTodoview) |
1113 | todoview_action->addTo( viewToolBar ); | 1133 | todoview_action->addTo( viewToolBar ); |
1114 | 1134 | ||
1115 | icon = loadPixmap( pathString + "2leftarrowB" ); | 1135 | icon = loadPixmap( pathString + "2leftarrowB" ); |
1116 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); | 1136 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); |
1117 | if (p-> mShowIconBackFast) { | 1137 | if (p-> mShowIconBackFast) { |
1118 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 1138 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
1119 | connect( action, SIGNAL( activated() ), | 1139 | connect( action, SIGNAL( activated() ), |
1120 | mView, SLOT( goPreviousMonth() ) ); | 1140 | mView, SLOT( goPreviousMonth() ) ); |
1121 | action->addTo( navigatorToolBar ); | 1141 | action->addTo( navigatorToolBar ); |
1122 | } | 1142 | } |
1123 | icon = loadPixmap( pathString + "1leftarrowB" ); | 1143 | icon = loadPixmap( pathString + "1leftarrowB" ); |
1124 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); | 1144 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); |
1125 | if (p-> mShowIconBack) { | 1145 | if (p-> mShowIconBack) { |
1126 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 1146 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
1127 | connect( action, SIGNAL( activated() ), | 1147 | connect( action, SIGNAL( activated() ), |
1128 | mView, SLOT( goPrevious() ) ); | 1148 | mView, SLOT( goPrevious() ) ); |
1129 | action->addTo( navigatorToolBar ); | 1149 | action->addTo( navigatorToolBar ); |
1130 | } | 1150 | } |
1131 | icon = loadPixmap( pathString + "today" ); | 1151 | icon = loadPixmap( pathString + "today" ); |
1132 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 1152 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
1133 | if (p-> mShowIconToday) | 1153 | if (p-> mShowIconToday) |
1134 | today_action->addTo( navigatorToolBar ); | 1154 | today_action->addTo( navigatorToolBar ); |
1135 | icon = loadPixmap( pathString + "1rightarrowB" ); | 1155 | icon = loadPixmap( pathString + "1rightarrowB" ); |
1136 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 1156 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
1137 | if (p-> mShowIconForward) { | 1157 | if (p-> mShowIconForward) { |
1138 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 1158 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
1139 | connect( action, SIGNAL( activated() ), | 1159 | connect( action, SIGNAL( activated() ), |
1140 | mView, SLOT( goNext() ) ); | 1160 | mView, SLOT( goNext() ) ); |
1141 | action->addTo( navigatorToolBar ); | 1161 | action->addTo( navigatorToolBar ); |
1142 | } | 1162 | } |
1143 | icon = loadPixmap( pathString + "2rightarrowB" ); | 1163 | icon = loadPixmap( pathString + "2rightarrowB" ); |
1144 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 1164 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
1145 | if (p-> mShowIconForwardFast) { | 1165 | if (p-> mShowIconForwardFast) { |
1146 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); | 1166 | action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); |
1147 | connect( action, SIGNAL( activated() ), | 1167 | connect( action, SIGNAL( activated() ), |
1148 | mView, SLOT( goNextMonth() ) ); | 1168 | mView, SLOT( goNextMonth() ) ); |
1149 | action->addTo( navigatorToolBar ); | 1169 | action->addTo( navigatorToolBar ); |
1150 | } | 1170 | } |
1151 | 1171 | ||
1152 | 1172 | ||
1153 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); | 1173 | configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); |
1154 | 1174 | ||
1175 | |||
1176 | if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); | ||
1177 | if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); | ||
1178 | if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); | ||
1179 | if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); | ||
1180 | |||
1155 | if (p-> mShowIconNewEvent) | 1181 | if (p-> mShowIconNewEvent) |
1156 | configureToolBarMenu->setItemChecked( 10, true ); | 1182 | configureToolBarMenu->setItemChecked( 10, true ); |
1157 | if (p->mShowIconNewTodo ) | 1183 | if (p->mShowIconNewTodo ) |
1158 | configureToolBarMenu->setItemChecked( 20, true ); | 1184 | configureToolBarMenu->setItemChecked( 20, true ); |
1159 | if (p-> mShowIconSearch) | 1185 | if (p-> mShowIconSearch) |
1160 | configureToolBarMenu->setItemChecked( 120, true ); | 1186 | configureToolBarMenu->setItemChecked( 120, true ); |
1161 | if (p-> mShowIconList) | 1187 | if (p-> mShowIconList) |
1162 | configureToolBarMenu->setItemChecked( 30, true ); | 1188 | configureToolBarMenu->setItemChecked( 30, true ); |
1163 | if (p-> mShowIconDay1) | 1189 | if (p-> mShowIconDay1) |
1164 | configureToolBarMenu->setItemChecked( 40, true ); | 1190 | configureToolBarMenu->setItemChecked( 40, true ); |
1165 | if (p-> mShowIconDay5) | 1191 | if (p-> mShowIconDay5) |
1166 | configureToolBarMenu->setItemChecked( 50, true ); | 1192 | configureToolBarMenu->setItemChecked( 50, true ); |
1167 | if (p-> mShowIconDay6) | 1193 | if (p-> mShowIconDay6) |
1168 | configureToolBarMenu->setItemChecked( 75, true ); | 1194 | configureToolBarMenu->setItemChecked( 75, true ); |
1169 | if (p-> mShowIconDay7) | 1195 | if (p-> mShowIconDay7) |
1170 | configureToolBarMenu->setItemChecked( 60, true ); | 1196 | configureToolBarMenu->setItemChecked( 60, true ); |
1171 | if (p-> mShowIconMonth) | 1197 | if (p-> mShowIconMonth) |
1172 | configureToolBarMenu->setItemChecked( 70, true ); | 1198 | configureToolBarMenu->setItemChecked( 70, true ); |
1173 | if (p-> mShowIconTodoview) | 1199 | if (p-> mShowIconTodoview) |
1174 | configureToolBarMenu->setItemChecked( 80, true ); | 1200 | configureToolBarMenu->setItemChecked( 80, true ); |
1175 | if (p-> mShowIconBackFast) | 1201 | if (p-> mShowIconBackFast) |
1176 | configureToolBarMenu->setItemChecked( 200, true ); | 1202 | configureToolBarMenu->setItemChecked( 200, true ); |
1177 | if (p-> mShowIconBack) | 1203 | if (p-> mShowIconBack) |
1178 | configureToolBarMenu->setItemChecked( 210, true ); | 1204 | configureToolBarMenu->setItemChecked( 210, true ); |
1179 | if (p-> mShowIconToday) | 1205 | if (p-> mShowIconToday) |
1180 | configureToolBarMenu->setItemChecked( 130, true ); | 1206 | configureToolBarMenu->setItemChecked( 130, true ); |
1181 | if (p-> mShowIconForward) | 1207 | if (p-> mShowIconForward) |
1182 | configureToolBarMenu->setItemChecked( 220, true ); | 1208 | configureToolBarMenu->setItemChecked( 220, true ); |
1183 | if (p-> mShowIconForwardFast) | 1209 | if (p-> mShowIconForwardFast) |
1184 | configureToolBarMenu->setItemChecked( 230, true ); | 1210 | configureToolBarMenu->setItemChecked( 230, true ); |
1185 | if (p-> mShowIconNextDays) | 1211 | if (p-> mShowIconNextDays) |
1186 | configureToolBarMenu->setItemChecked( 100, true ); | 1212 | configureToolBarMenu->setItemChecked( 100, true ); |
1187 | if (p-> mShowIconNext) | 1213 | if (p-> mShowIconNext) |
1188 | configureToolBarMenu->setItemChecked( 110, true ); | 1214 | configureToolBarMenu->setItemChecked( 110, true ); |
1189 | if (p-> mShowIconJournal) | 1215 | if (p-> mShowIconJournal) |
1190 | configureToolBarMenu->setItemChecked( 90, true ); | 1216 | configureToolBarMenu->setItemChecked( 90, true ); |
1191 | if (p-> mShowIconWhatsThis) | 1217 | if (p-> mShowIconWhatsThis) |
1192 | configureToolBarMenu->setItemChecked( 300, true ); | 1218 | configureToolBarMenu->setItemChecked( 300, true ); |
1193 | if (p-> mShowIconWeekNum) | 1219 | if (p-> mShowIconWeekNum) |
1194 | configureToolBarMenu->setItemChecked( 400, true ); | 1220 | configureToolBarMenu->setItemChecked( 400, true ); |
1195 | if (!p-> mShowIconStretch) { | 1221 | if (!p-> mShowIconStretch) { |
1196 | QLabel* dummy = new QLabel( iconToolBar ); | 1222 | QLabel* dummy = new QLabel( iconToolBar ); |
1197 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1223 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1198 | dummy->setMinimumWidth( 0 ); | 1224 | dummy->setMinimumWidth( 0 ); |
1199 | iconToolBar->setStretchableWidget ( dummy ) ; | 1225 | iconToolBar->setStretchableWidget ( dummy ) ; |
1200 | } | 1226 | } |
1201 | else { | 1227 | else { |
1202 | iconToolBar->setHorizontalStretchable (true ); | 1228 | iconToolBar->setHorizontalStretchable (true ); |
1203 | viewToolBar->setHorizontalStretchable (true ); | 1229 | viewToolBar->setHorizontalStretchable (true ); |
1204 | navigatorToolBar->setHorizontalStretchable (true ); | 1230 | navigatorToolBar->setHorizontalStretchable (true ); |
1205 | iconToolBar->setVerticalStretchable (true ); | 1231 | iconToolBar->setVerticalStretchable (true ); |
1206 | viewToolBar->setVerticalStretchable (true ); | 1232 | viewToolBar->setVerticalStretchable (true ); |
1207 | navigatorToolBar->setVerticalStretchable (true ); | 1233 | navigatorToolBar->setVerticalStretchable (true ); |
1208 | configureToolBarMenu->setItemChecked( 5, true ); | 1234 | configureToolBarMenu->setItemChecked( 5, true ); |
1209 | } | 1235 | } |
1210 | if (p-> mShowIconFilter) | 1236 | if (p-> mShowIconFilter) |
1211 | configureToolBarMenu->setItemChecked( 7, true ); | 1237 | configureToolBarMenu->setItemChecked( 7, true ); |
1212 | if (p-> mShowIconOnetoolbar) | 1238 | if (p-> mShowIconOnetoolbar) |
1213 | configureToolBarMenu->setItemChecked( 6, true ); | 1239 | configureToolBarMenu->setItemChecked( 6, true ); |
1214 | 1240 | ||
1215 | 1241 | ||
1216 | if ( filterMenubar ) | 1242 | if ( filterMenubar ) |
1217 | connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); | 1243 | connect( mView->filterView(), SIGNAL( filterChanged() ), SLOT( updateFilterToolbar() ) ); |
1218 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1244 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
@@ -1957,128 +1983,132 @@ void MainWindow::fillFilterMenuPopup() | |||
1957 | filterPopupMenu->clear(); | 1983 | filterPopupMenu->clear(); |
1958 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); | 1984 | filterPopupMenu->insertItem(i18n ( "No Filter" ), 0 ); |
1959 | 1985 | ||
1960 | filterPopupMenu->insertSeparator(); | 1986 | filterPopupMenu->insertSeparator(); |
1961 | QPtrList<CalFilter> fili = mView->filters(); | 1987 | QPtrList<CalFilter> fili = mView->filters(); |
1962 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 1988 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
1963 | CalFilter *filter = fili.first(); | 1989 | CalFilter *filter = fili.first(); |
1964 | int iii = 1; | 1990 | int iii = 1; |
1965 | bool checkitem = mView->filterView()->filtersEnabled(); | 1991 | bool checkitem = mView->filterView()->filtersEnabled(); |
1966 | while(filter) { | 1992 | while(filter) { |
1967 | filterPopupMenu->insertItem( filter->name(), iii ); | 1993 | filterPopupMenu->insertItem( filter->name(), iii ); |
1968 | if ( filter == curfilter) | 1994 | if ( filter == curfilter) |
1969 | filterPopupMenu->setItemChecked( iii, checkitem ); | 1995 | filterPopupMenu->setItemChecked( iii, checkitem ); |
1970 | filter = fili.next(); | 1996 | filter = fili.next(); |
1971 | ++iii; | 1997 | ++iii; |
1972 | } | 1998 | } |
1973 | if ( !checkitem ) | 1999 | if ( !checkitem ) |
1974 | filterPopupMenu->setItemChecked( 0, true ); | 2000 | filterPopupMenu->setItemChecked( 0, true ); |
1975 | } | 2001 | } |
1976 | void MainWindow::selectFilter( int fil ) | 2002 | void MainWindow::selectFilter( int fil ) |
1977 | { | 2003 | { |
1978 | 2004 | ||
1979 | if ( fil == 0 ) { | 2005 | if ( fil == 0 ) { |
1980 | mView->editFilters( ); | 2006 | mView->editFilters( ); |
1981 | } else if ( fil == 1 ){ | 2007 | } else if ( fil == 1 ){ |
1982 | if ( mView->filterView()->filtersEnabled() ) | 2008 | if ( mView->filterView()->filtersEnabled() ) |
1983 | mView->toggleFilerEnabled( ); | 2009 | mView->toggleFilerEnabled( ); |
1984 | } else { | 2010 | } else { |
1985 | if ( !mView->filterView()->filtersEnabled() ) { | 2011 | if ( !mView->filterView()->filtersEnabled() ) { |
1986 | mView->filterView()->blockSignals( true ); | 2012 | mView->filterView()->blockSignals( true ); |
1987 | mView->toggleFilerEnabled( ); | 2013 | mView->toggleFilerEnabled( ); |
1988 | mView->filterView()->blockSignals( false ); | 2014 | mView->filterView()->blockSignals( false ); |
1989 | } | 2015 | } |
1990 | mView->selectFilter( fil-2 ); | 2016 | mView->selectFilter( fil-2 ); |
1991 | } | 2017 | } |
1992 | } | 2018 | } |
1993 | void MainWindow::updateFilterToolbar() | 2019 | void MainWindow::updateFilterToolbar() |
1994 | { | 2020 | { |
1995 | if ( filterMenubar ) { | 2021 | if ( filterMenubar ) { |
1996 | if ( !mView->filterView()->filtersEnabled() ) { | 2022 | if ( !mView->filterView()->filtersEnabled() ) { |
1997 | filterMenubar->changeItem( 0, i18n("No Filter") ); | 2023 | filterMenubar->changeItem( 0, i18n("No Filter") ); |
1998 | } else { | 2024 | } else { |
1999 | CalFilter *curfilter = mView->filterView()->selectedFilter(); | 2025 | CalFilter *curfilter = mView->filterView()->selectedFilter(); |
2000 | if ( curfilter ) { | 2026 | if ( curfilter ) { |
2001 | filterMenubar->changeItem( 0, curfilter->name() ); | 2027 | filterMenubar->changeItem( 0, curfilter->name() ); |
2002 | } | 2028 | } |
2003 | } | 2029 | } |
2004 | } | 2030 | } |
2005 | } | 2031 | } |
2006 | void MainWindow::selectFilterPopup( int fil ) | 2032 | void MainWindow::selectFilterPopup( int fil ) |
2007 | { | 2033 | { |
2008 | selectFilter( fil + 1 ); | 2034 | selectFilter( fil + 1 ); |
2009 | 2035 | ||
2010 | } | 2036 | } |
2011 | void MainWindow::configureToolBar( int item ) | 2037 | void MainWindow::configureToolBar( int item ) |
2012 | { | 2038 | { |
2013 | 2039 | ||
2014 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); | 2040 | configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); |
2015 | KOPrefs *p = KOPrefs::instance(); | 2041 | KOPrefs *p = KOPrefs::instance(); |
2016 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); | 2042 | p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); |
2017 | p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); | 2043 | p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); |
2018 | p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); | 2044 | p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); |
2019 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); | 2045 | p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); |
2020 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); | 2046 | p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); |
2047 | p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); | ||
2048 | p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); | ||
2049 | p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); | ||
2050 | p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); | ||
2021 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); | 2051 | p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); |
2022 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); | 2052 | p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); |
2023 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); | 2053 | p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); |
2024 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); | 2054 | p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); |
2025 | p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); | 2055 | p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); |
2026 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); | 2056 | p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); |
2027 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); | 2057 | p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); |
2028 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); | 2058 | p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); |
2029 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); | 2059 | p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); |
2030 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); | 2060 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); |
2031 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); | 2061 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); |
2032 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); | 2062 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); |
2033 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); | 2063 | p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); |
2034 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); | 2064 | p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); |
2035 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); | 2065 | p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); |
2036 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); | 2066 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |
2037 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); | 2067 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); |
2038 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); | 2068 | p-> mShowIconWeekNum= configureToolBarMenu->isItemChecked( 400 ); |
2039 | // initActions(); | 2069 | // initActions(); |
2040 | } | 2070 | } |
2041 | void MainWindow::setCaption ( const QString & c ) | 2071 | void MainWindow::setCaption ( const QString & c ) |
2042 | { | 2072 | { |
2043 | QString cap = c; | 2073 | QString cap = c; |
2044 | cap.replace( QRegExp("\n"), " " ); | 2074 | cap.replace( QRegExp("\n"), " " ); |
2045 | cap = cap.stripWhiteSpace(); | 2075 | cap = cap.stripWhiteSpace(); |
2046 | if ( cap.isEmpty() ) | 2076 | if ( cap.isEmpty() ) |
2047 | cap = "KO/Pi"; | 2077 | cap = "KO/Pi"; |
2048 | QWidget::setCaption( cap ); | 2078 | QWidget::setCaption( cap ); |
2049 | } | 2079 | } |
2050 | void MainWindow::setCaptionToDates() | 2080 | void MainWindow::setCaptionToDates() |
2051 | { | 2081 | { |
2052 | QString selDates; | 2082 | QString selDates; |
2053 | QDate date = mView->startDate(); | 2083 | QDate date = mView->startDate(); |
2054 | if ( ! date.isValid() ) { | 2084 | if ( ! date.isValid() ) { |
2055 | setCaption(""); | 2085 | setCaption(""); |
2056 | return; | 2086 | return; |
2057 | } | 2087 | } |
2058 | selDates = KGlobal::locale()->formatDate( date, true); | 2088 | selDates = KGlobal::locale()->formatDate( date, true); |
2059 | if (mView->startDate() < mView->endDate() ) | 2089 | if (mView->startDate() < mView->endDate() ) |
2060 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); | 2090 | selDates += " - " + KGlobal::locale()->formatDate(mView->endDate(), true); |
2061 | else { | 2091 | else { |
2062 | QString addString; | 2092 | QString addString; |
2063 | if ( date == QDateTime::currentDateTime().date() ) | 2093 | if ( date == QDateTime::currentDateTime().date() ) |
2064 | addString = i18n("Today"); | 2094 | addString = i18n("Today"); |
2065 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) | 2095 | else if ( date == QDateTime::currentDateTime().date().addDays(1) ) |
2066 | addString = i18n("Tomorrow"); | 2096 | addString = i18n("Tomorrow"); |
2067 | if ( !addString.isEmpty() ) | 2097 | if ( !addString.isEmpty() ) |
2068 | selDates = addString+", "+selDates ; | 2098 | selDates = addString+", "+selDates ; |
2069 | } | 2099 | } |
2070 | setCaption( i18n("Dates: ") + selDates ); | 2100 | setCaption( i18n("Dates: ") + selDates ); |
2071 | 2101 | ||
2072 | } | 2102 | } |
2073 | void MainWindow::showConfigureAgenda( ) | 2103 | void MainWindow::showConfigureAgenda( ) |
2074 | { | 2104 | { |
2075 | int iii; | 2105 | int iii; |
2076 | for ( iii = 1;iii<= 10 ;++iii ){ | 2106 | for ( iii = 1;iii<= 10 ;++iii ){ |
2077 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); | 2107 | configureAgendaMenu->setItemChecked( (iii+1)*2, false ); |
2078 | } | 2108 | } |
2079 | configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); | 2109 | configureAgendaMenu->setItemChecked( (KOPrefs::instance()->mHourSize/2)*2, true ); |
2080 | } | 2110 | } |
2081 | void MainWindow::configureAgenda( int item ) | 2111 | void MainWindow::configureAgenda( int item ) |
2082 | { | 2112 | { |
2083 | if ( KOPrefs::instance()->mHourSize == item ) | 2113 | if ( KOPrefs::instance()->mHourSize == item ) |
2084 | return; | 2114 | return; |