Diffstat (limited to 'korganizer/kodialogmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kodialogmanager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index ea30fac..deb1e46 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp | |||
@@ -1,345 +1,347 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | 3 | ||
4 | Copyright (c) 2001 | 4 | Copyright (c) 2001 |
5 | Cornelius Schumacher <schumacher@kde.org> | 5 | Cornelius Schumacher <schumacher@kde.org> |
6 | 6 | ||
7 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by |
9 | the Free Software Foundation; either version 2 of the License, or | 9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. | 10 | (at your option) any later version. |
11 | 11 | ||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the |
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
16 | 16 | ||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software | 18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 19 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <libkdepim/categoryeditdialog.h> | 22 | #include <libkdepim/categoryeditdialog.h> |
23 | 23 | ||
24 | #include "calendarview.h" | 24 | #include "calendarview.h" |
25 | #include "incomingdialog.h" | 25 | #include "incomingdialog.h" |
26 | #include "outgoingdialog.h" | 26 | #include "outgoingdialog.h" |
27 | #include "koprefsdialog.h" | 27 | #include "koprefsdialog.h" |
28 | #include "koeventeditor.h" | 28 | #include "koeventeditor.h" |
29 | #include "koprefs.h" | 29 | #include "koprefs.h" |
30 | #include "datenavigator.h" | 30 | #include "datenavigator.h" |
31 | #include "kotodoeditor.h" | 31 | #include "kotodoeditor.h" |
32 | #include "searchdialog.h" | 32 | #include "searchdialog.h" |
33 | #include "filtereditdialog.h" | 33 | #include "filtereditdialog.h" |
34 | #ifndef KORG_NOPLUGINS | 34 | #ifndef KORG_NOPLUGINS |
35 | #include "plugindialog.h" | 35 | #include "plugindialog.h" |
36 | #endif | 36 | #endif |
37 | #ifndef KORG_NOARCHIVE | 37 | #ifndef KORG_NOARCHIVE |
38 | #include "archivedialog.h" | 38 | #include "archivedialog.h" |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | #include "kconfig.h" | 41 | #include "kconfig.h" |
42 | #include "kodialogmanager.h" | 42 | #include "kodialogmanager.h" |
43 | #include <kapplication.h> | 43 | #include <kapplication.h> |
44 | //Added by qt3to4: | ||
45 | #include <Q3PtrList> | ||
44 | 46 | ||
45 | KODialogManager::KODialogManager( CalendarView *mainView ) : | 47 | KODialogManager::KODialogManager( CalendarView *mainView ) : |
46 | QObject(), mMainView( mainView ) | 48 | QObject(), mMainView( mainView ) |
47 | { | 49 | { |
48 | mOutgoingDialog = 0; | 50 | mOutgoingDialog = 0; |
49 | mIncomingDialog = 0; | 51 | mIncomingDialog = 0; |
50 | mOptionsDialog = 0; | 52 | mOptionsDialog = 0; |
51 | mSearchDialog = 0; | 53 | mSearchDialog = 0; |
52 | mArchiveDialog = 0; | 54 | mArchiveDialog = 0; |
53 | mFilterEditDialog = 0; | 55 | mFilterEditDialog = 0; |
54 | mPluginDialog = 0; | 56 | mPluginDialog = 0; |
55 | 57 | ||
56 | // mCategoryEditDialog = new KPIM::CategoryEditDialog(KOPrefs::instance(),mMainView); | 58 | // mCategoryEditDialog = new KPIM::CategoryEditDialog(KOPrefs::instance(),mMainView); |
57 | //KOGlobals::fitDialogToScreen( mCategoryEditDialog ); | 59 | //KOGlobals::fitDialogToScreen( mCategoryEditDialog ); |
58 | } | 60 | } |
59 | 61 | ||
60 | KODialogManager::~KODialogManager() | 62 | KODialogManager::~KODialogManager() |
61 | { | 63 | { |
62 | delete mOutgoingDialog; | 64 | delete mOutgoingDialog; |
63 | delete mIncomingDialog; | 65 | delete mIncomingDialog; |
64 | delete mOptionsDialog; | 66 | delete mOptionsDialog; |
65 | delete mSearchDialog; | 67 | delete mSearchDialog; |
66 | #ifndef KORG_NOARCHIVE | 68 | #ifndef KORG_NOARCHIVE |
67 | delete mArchiveDialog; | 69 | delete mArchiveDialog; |
68 | #endif | 70 | #endif |
69 | delete mFilterEditDialog; | 71 | delete mFilterEditDialog; |
70 | #ifndef KORG_NOPLUGINS | 72 | #ifndef KORG_NOPLUGINS |
71 | delete mPluginDialog; | 73 | delete mPluginDialog; |
72 | #endif | 74 | #endif |
73 | } | 75 | } |
74 | 76 | ||
75 | OutgoingDialog *KODialogManager::outgoingDialog() | 77 | OutgoingDialog *KODialogManager::outgoingDialog() |
76 | { | 78 | { |
77 | createOutgoingDialog(); | 79 | createOutgoingDialog(); |
78 | return mOutgoingDialog; | 80 | return mOutgoingDialog; |
79 | } | 81 | } |
80 | 82 | ||
81 | void KODialogManager::createOutgoingDialog() | 83 | void KODialogManager::createOutgoingDialog() |
82 | { | 84 | { |
83 | if (!mOutgoingDialog) { | 85 | if (!mOutgoingDialog) { |
84 | mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView); | 86 | mOutgoingDialog = new OutgoingDialog(mMainView->calendar(),mMainView); |
85 | if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog); | 87 | if (mIncomingDialog) mIncomingDialog->setOutgoingDialog(mOutgoingDialog); |
86 | connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)), | 88 | connect(mOutgoingDialog,SIGNAL(numMessagesChanged(int)), |
87 | mMainView,SIGNAL(numOutgoingChanged(int))); | 89 | mMainView,SIGNAL(numOutgoingChanged(int))); |
88 | } | 90 | } |
89 | } | 91 | } |
90 | 92 | ||
91 | void KODialogManager::showGlobalOptionsDialog( bool showSync ) | 93 | void KODialogManager::showGlobalOptionsDialog( bool showSync ) |
92 | { | 94 | { |
93 | KPimPrefsGlobalDialog gc ( mMainView ); | 95 | KPimPrefsGlobalDialog gc ( mMainView ); |
94 | if ( showSync ) | 96 | if ( showSync ) |
95 | gc.showTZconfig(); | 97 | gc.showTZconfig(); |
96 | gc.exec(); | 98 | gc.exec(); |
97 | } | 99 | } |
98 | void KODialogManager::showOptionsDialog( bool showSync ) | 100 | void KODialogManager::showOptionsDialog( bool showSync ) |
99 | { | 101 | { |
100 | 102 | ||
101 | if (!mOptionsDialog) { | 103 | if (!mOptionsDialog) { |
102 | mOptionsDialog = new KOPrefsDialog(mMainView); | 104 | mOptionsDialog = new KOPrefsDialog(mMainView); |
103 | connect(mOptionsDialog,SIGNAL(configChanged()), | 105 | connect(mOptionsDialog,SIGNAL(configChanged()), |
104 | mMainView,SLOT(updateConfig())); | 106 | mMainView,SLOT(updateConfig())); |
105 | } | 107 | } |
106 | mOptionsDialog->readConfig(); | 108 | mOptionsDialog->readConfig(); |
107 | #ifndef DESKTOP_VERSION | 109 | #ifndef DESKTOP_VERSION |
108 | mOptionsDialog->hideButtons(); | 110 | mOptionsDialog->hideButtons(); |
109 | mOptionsDialog->showMaximized(); | 111 | mOptionsDialog->showMaximized(); |
110 | #else | 112 | #else |
111 | mOptionsDialog->show(); | 113 | mOptionsDialog->show(); |
112 | #endif | 114 | #endif |
113 | 115 | ||
114 | mOptionsDialog->exec(); | 116 | mOptionsDialog->exec(); |
115 | delete mOptionsDialog; | 117 | delete mOptionsDialog; |
116 | mOptionsDialog = 0; | 118 | mOptionsDialog = 0; |
117 | } | 119 | } |
118 | void KODialogManager::showSyncOptions() | 120 | void KODialogManager::showSyncOptions() |
119 | { | 121 | { |
120 | showGlobalOptionsDialog( true ); | 122 | showGlobalOptionsDialog( true ); |
121 | 123 | ||
122 | } | 124 | } |
123 | void KODialogManager::showOutgoingDialog() | 125 | void KODialogManager::showOutgoingDialog() |
124 | { | 126 | { |
125 | createOutgoingDialog(); | 127 | createOutgoingDialog(); |
126 | mOutgoingDialog->show(); | 128 | mOutgoingDialog->show(); |
127 | mOutgoingDialog->raise(); | 129 | mOutgoingDialog->raise(); |
128 | } | 130 | } |
129 | 131 | ||
130 | IncomingDialog *KODialogManager::incomingDialog() | 132 | IncomingDialog *KODialogManager::incomingDialog() |
131 | { | 133 | { |
132 | createOutgoingDialog(); | 134 | createOutgoingDialog(); |
133 | if (!mIncomingDialog) { | 135 | if (!mIncomingDialog) { |
134 | mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); | 136 | mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); |
135 | connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), | 137 | connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), |
136 | mMainView,SIGNAL(numIncomingChanged(int))); | 138 | mMainView,SIGNAL(numIncomingChanged(int))); |
137 | connect(mIncomingDialog,SIGNAL(calendarUpdated()), | 139 | connect(mIncomingDialog,SIGNAL(calendarUpdated()), |
138 | mMainView,SLOT(updateView())); | 140 | mMainView,SLOT(updateView())); |
139 | } | 141 | } |
140 | return mIncomingDialog; | 142 | return mIncomingDialog; |
141 | } | 143 | } |
142 | 144 | ||
143 | void KODialogManager::createIncomingDialog() | 145 | void KODialogManager::createIncomingDialog() |
144 | { | 146 | { |
145 | createOutgoingDialog(); | 147 | createOutgoingDialog(); |
146 | if (!mIncomingDialog) { | 148 | if (!mIncomingDialog) { |
147 | mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); | 149 | mIncomingDialog = new IncomingDialog(mMainView->calendar(),mOutgoingDialog,mMainView); |
148 | connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), | 150 | connect(mIncomingDialog,SIGNAL(numMessagesChanged(int)), |
149 | mMainView,SIGNAL(numIncomingChanged(int))); | 151 | mMainView,SIGNAL(numIncomingChanged(int))); |
150 | connect(mIncomingDialog,SIGNAL(calendarUpdated()), | 152 | connect(mIncomingDialog,SIGNAL(calendarUpdated()), |
151 | mMainView,SLOT(updateView())); | 153 | mMainView,SLOT(updateView())); |
152 | } | 154 | } |
153 | } | 155 | } |
154 | 156 | ||
155 | void KODialogManager::showIncomingDialog() | 157 | void KODialogManager::showIncomingDialog() |
156 | { | 158 | { |
157 | createIncomingDialog(); | 159 | createIncomingDialog(); |
158 | mIncomingDialog->show(); | 160 | mIncomingDialog->show(); |
159 | mIncomingDialog->raise(); | 161 | mIncomingDialog->raise(); |
160 | } | 162 | } |
161 | /* | 163 | /* |
162 | void KODialogManager::showCategoryEditDialog() | 164 | void KODialogManager::showCategoryEditDialog() |
163 | { | 165 | { |
164 | mCategoryEditDialog->show(); | 166 | mCategoryEditDialog->show(); |
165 | } | 167 | } |
166 | */ | 168 | */ |
167 | void KODialogManager::hideSearchDialog() | 169 | void KODialogManager::hideSearchDialog() |
168 | { | 170 | { |
169 | if (mSearchDialog) | 171 | if (mSearchDialog) |
170 | mSearchDialog->hide(); | 172 | mSearchDialog->hide(); |
171 | } | 173 | } |
172 | 174 | ||
173 | void KODialogManager::showSearchDialog() | 175 | void KODialogManager::showSearchDialog() |
174 | { | 176 | { |
175 | if (!mSearchDialog) { | 177 | if (!mSearchDialog) { |
176 | mSearchDialog = new SearchDialog(mMainView->calendar(),mMainView); | 178 | mSearchDialog = new SearchDialog(mMainView->calendar(),mMainView); |
177 | KOListView * lview = mSearchDialog->listview(); | 179 | KOListView * lview = mSearchDialog->listview(); |
178 | 180 | ||
179 | connect(lview, SIGNAL(showIncidenceSignal(Incidence *)), | 181 | connect(lview, SIGNAL(showIncidenceSignal(Incidence *)), |
180 | mMainView, SLOT(showIncidence(Incidence *))); | 182 | mMainView, SLOT(showIncidence(Incidence *))); |
181 | connect(lview, SIGNAL(editIncidenceSignal(Incidence *)), | 183 | connect(lview, SIGNAL(editIncidenceSignal(Incidence *)), |
182 | mMainView, SLOT(editIncidence(Incidence *))); | 184 | mMainView, SLOT(editIncidence(Incidence *))); |
183 | connect(lview, SIGNAL(deleteIncidenceSignal(Incidence *)), | 185 | connect(lview, SIGNAL(deleteIncidenceSignal(Incidence *)), |
184 | mMainView, SLOT(deleteIncidence(Incidence *))); | 186 | mMainView, SLOT(deleteIncidence(Incidence *))); |
185 | connect(lview, SIGNAL(cloneIncidenceSignal(Incidence *)), | 187 | connect(lview, SIGNAL(cloneIncidenceSignal(Incidence *)), |
186 | mMainView, SLOT(cloneIncidence(Incidence *))); | 188 | mMainView, SLOT(cloneIncidence(Incidence *))); |
187 | connect(lview, SIGNAL(beamIncidenceSignal(Incidence *)), | 189 | connect(lview, SIGNAL(beamIncidenceSignal(Incidence *)), |
188 | mMainView, SLOT(beamIncidence(Incidence *))); | 190 | mMainView, SLOT(beamIncidence(Incidence *))); |
189 | connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)), | 191 | connect(lview, SIGNAL(moveIncidenceSignal(Incidence *)), |
190 | mMainView, SLOT(moveIncidence(Incidence *))); | 192 | mMainView, SLOT(moveIncidence(Incidence *))); |
191 | connect(lview, SIGNAL(beamIncidenceList(QPtrList<Incidence> )), | 193 | connect(lview, SIGNAL(beamIncidenceList(Q3PtrList<Incidence> )), |
192 | mMainView, SLOT(beamIncidenceList(QPtrList<Incidence> ))); | 194 | mMainView, SLOT(beamIncidenceList(Q3PtrList<Incidence> ))); |
193 | 195 | ||
194 | connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig())); | 196 | connect(mMainView, SIGNAL(configChanged()), mSearchDialog, SLOT(updateConfig())); |
195 | connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList())); | 197 | connect(mMainView, SIGNAL(updateSearchDialog()), mSearchDialog, SLOT(updateList())); |
196 | // connect( lview, SIGNAL( incidenceSelected( Incidence * ) ), | 198 | // connect( lview, SIGNAL( incidenceSelected( Incidence * ) ), |
197 | // mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 199 | // mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
198 | #ifndef DESKTOP_VERSION | 200 | #ifndef DESKTOP_VERSION |
199 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); | 201 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); |
200 | mSearchDialog->showMaximized(); | 202 | mSearchDialog->showMaximized(); |
201 | #else | 203 | #else |
202 | KConfig *config = KOGlobals::config(); | 204 | KConfig *config = KOGlobals::config(); |
203 | config->setGroup("WidgetLayout"); | 205 | config->setGroup("WidgetLayout"); |
204 | QStringList list; | 206 | QStringList list; |
205 | list = config->readListEntry("SearchLayout"); | 207 | list = config->readListEntry("SearchLayout"); |
206 | int x,y,w,h; | 208 | int x,y,w,h; |
207 | if ( ! list.isEmpty() ) { | 209 | if ( ! list.isEmpty() ) { |
208 | x = list[0].toInt(); | 210 | x = list[0].toInt(); |
209 | y = list[1].toInt(); | 211 | y = list[1].toInt(); |
210 | w = list[2].toInt(); | 212 | w = list[2].toInt(); |
211 | h = list[3].toInt(); | 213 | h = list[3].toInt(); |
212 | KApplication::testCoords( &x,&y,&w,&h ); | 214 | KApplication::testCoords( &x,&y,&w,&h ); |
213 | mSearchDialog->setGeometry(x,y,w,h); | 215 | mSearchDialog->setGeometry(x,y,w,h); |
214 | 216 | ||
215 | } | 217 | } |
216 | 218 | ||
217 | #endif | 219 | #endif |
218 | } | 220 | } |
219 | // make sure the widget is on top again | 221 | // make sure the widget is on top again |
220 | #ifdef DESKTOP_VERSION | 222 | #ifdef DESKTOP_VERSION |
221 | mSearchDialog->show(); | 223 | mSearchDialog->show(); |
222 | #else | 224 | #else |
223 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); | 225 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); |
224 | mSearchDialog->showMaximized(); | 226 | mSearchDialog->showMaximized(); |
225 | #endif | 227 | #endif |
226 | mSearchDialog->raiseAndSelect(); | 228 | mSearchDialog->raiseAndSelect(); |
227 | } | 229 | } |
228 | 230 | ||
229 | SearchDialog * KODialogManager::getSearchDialog() | 231 | SearchDialog * KODialogManager::getSearchDialog() |
230 | { | 232 | { |
231 | return mSearchDialog; | 233 | return mSearchDialog; |
232 | } | 234 | } |
233 | void KODialogManager::showArchiveDialog() | 235 | void KODialogManager::showArchiveDialog() |
234 | { | 236 | { |
235 | #ifndef KORG_NOARCHIVE | 237 | #ifndef KORG_NOARCHIVE |
236 | if (!mArchiveDialog) { | 238 | if (!mArchiveDialog) { |
237 | mArchiveDialog = new ArchiveDialog(mMainView->calendar(),mMainView); | 239 | mArchiveDialog = new ArchiveDialog(mMainView->calendar(),mMainView); |
238 | connect(mArchiveDialog,SIGNAL(eventsDeleted()), | 240 | connect(mArchiveDialog,SIGNAL(eventsDeleted()), |
239 | mMainView,SLOT(updateView())); | 241 | mMainView,SLOT(updateView())); |
240 | } | 242 | } |
241 | mArchiveDialog->show(); | 243 | mArchiveDialog->show(); |
242 | mArchiveDialog->raise(); | 244 | mArchiveDialog->raise(); |
243 | 245 | ||
244 | // Workaround. | 246 | // Workaround. |
245 | QApplication::restoreOverrideCursor(); | 247 | QApplication::restoreOverrideCursor(); |
246 | #endif | 248 | #endif |
247 | } | 249 | } |
248 | 250 | ||
249 | void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) | 251 | void KODialogManager::showFilterEditDialog(Q3PtrList<CalFilter> *filters) |
250 | { | 252 | { |
251 | if (!mFilterEditDialog) { | 253 | if (!mFilterEditDialog) { |
252 | mFilterEditDialog = new FilterEditDialog(filters,mMainView); | 254 | mFilterEditDialog = new FilterEditDialog(filters,mMainView); |
253 | connect(mFilterEditDialog,SIGNAL(filterChanged()), | 255 | connect(mFilterEditDialog,SIGNAL(filterChanged()), |
254 | mMainView,SLOT(filterEdited())); | 256 | mMainView,SLOT(filterEdited())); |
255 | 257 | ||
256 | } | 258 | } |
257 | 259 | ||
258 | #ifndef DESKTOP_VERSION | 260 | #ifndef DESKTOP_VERSION |
259 | mFilterEditDialog->showMaximized(); | 261 | mFilterEditDialog->showMaximized(); |
260 | #else | 262 | #else |
261 | mFilterEditDialog->show(); | 263 | mFilterEditDialog->show(); |
262 | #endif | 264 | #endif |
263 | mFilterEditDialog->raise(); | 265 | mFilterEditDialog->raise(); |
264 | } | 266 | } |
265 | 267 | ||
266 | void KODialogManager::showPluginDialog() | 268 | void KODialogManager::showPluginDialog() |
267 | { | 269 | { |
268 | #ifndef KORG_NOPLUGINS | 270 | #ifndef KORG_NOPLUGINS |
269 | if (!mPluginDialog) { | 271 | if (!mPluginDialog) { |
270 | mPluginDialog = new PluginDialog(mMainView); | 272 | mPluginDialog = new PluginDialog(mMainView); |
271 | connect(mPluginDialog,SIGNAL(configChanged()), | 273 | connect(mPluginDialog,SIGNAL(configChanged()), |
272 | mMainView,SLOT(updateConfig())); | 274 | mMainView,SLOT(updateConfig())); |
273 | } | 275 | } |
274 | mPluginDialog->show(); | 276 | mPluginDialog->show(); |
275 | mPluginDialog->raise(); | 277 | mPluginDialog->raise(); |
276 | #endif | 278 | #endif |
277 | } | 279 | } |
278 | 280 | ||
279 | KOEventEditor *KODialogManager::getEventEditor() | 281 | KOEventEditor *KODialogManager::getEventEditor() |
280 | { | 282 | { |
281 | KOEventEditor *eventEditor = new KOEventEditor( mMainView->calendar(), | 283 | KOEventEditor *eventEditor = new KOEventEditor( mMainView->calendar(), |
282 | mMainView ); | 284 | mMainView ); |
283 | 285 | ||
284 | connect(eventEditor,SIGNAL(eventAdded(Event *)), | 286 | connect(eventEditor,SIGNAL(eventAdded(Event *)), |
285 | mMainView,SLOT(eventAdded(Event *))); | 287 | mMainView,SLOT(eventAdded(Event *))); |
286 | connect(eventEditor,SIGNAL(eventChanged(Event *)), | 288 | connect(eventEditor,SIGNAL(eventChanged(Event *)), |
287 | mMainView,SLOT(eventChanged(Event *))); | 289 | mMainView,SLOT(eventChanged(Event *))); |
288 | connect(eventEditor,SIGNAL(eventDeleted()), | 290 | connect(eventEditor,SIGNAL(eventDeleted()), |
289 | mMainView,SLOT(eventDeleted())); | 291 | mMainView,SLOT(eventDeleted())); |
290 | connect(eventEditor,SIGNAL(deleteAttendee(Incidence *)), | 292 | connect(eventEditor,SIGNAL(deleteAttendee(Incidence *)), |
291 | mMainView,SLOT(schedule_cancel(Incidence *))); | 293 | mMainView,SLOT(schedule_cancel(Incidence *))); |
292 | connect( eventEditor, SIGNAL(jumpToTime( const QDate &)), | 294 | connect( eventEditor, SIGNAL(jumpToTime( const QDate &)), |
293 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 295 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
294 | connect( eventEditor, SIGNAL( showAgendaView( bool)), | 296 | connect( eventEditor, SIGNAL( showAgendaView( bool)), |
295 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); | 297 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); |
296 | 298 | ||
297 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), | 299 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), |
298 | // eventEditor,SLOT(updateCategoryConfig())); | 300 | // eventEditor,SLOT(updateCategoryConfig())); |
299 | // connect(eventEditor,SIGNAL(editCategories()), | 301 | // connect(eventEditor,SIGNAL(editCategories()), |
300 | // mCategoryEditDialog,SLOT(show())); | 302 | // mCategoryEditDialog,SLOT(show())); |
301 | 303 | ||
302 | //connect(mMainView,SIGNAL(closingDown()),eventEditor,SLOT(reject())); | 304 | //connect(mMainView,SIGNAL(closingDown()),eventEditor,SLOT(reject())); |
303 | 305 | ||
304 | #ifndef DESKTOP_VERSION | 306 | #ifndef DESKTOP_VERSION |
305 | eventEditor->resize( QApplication::desktop()->width() -20, 100 ); | 307 | eventEditor->resize( QApplication::desktop()->width() -20, 100 ); |
306 | #endif | 308 | #endif |
307 | return eventEditor; | 309 | return eventEditor; |
308 | } | 310 | } |
309 | 311 | ||
310 | KOTodoEditor *KODialogManager::getTodoEditor() | 312 | KOTodoEditor *KODialogManager::getTodoEditor() |
311 | { | 313 | { |
312 | KOTodoEditor *todoEditor = new KOTodoEditor( mMainView->calendar(), | 314 | KOTodoEditor *todoEditor = new KOTodoEditor( mMainView->calendar(), |
313 | mMainView ); | 315 | mMainView ); |
314 | 316 | ||
315 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), | 317 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), |
316 | // todoEditor,SLOT(updateCategoryConfig())); | 318 | // todoEditor,SLOT(updateCategoryConfig())); |
317 | // connect(todoEditor,SIGNAL(editCategories()),mCategoryEditDialog,SLOT(show())); | 319 | // connect(todoEditor,SIGNAL(editCategories()),mCategoryEditDialog,SLOT(show())); |
318 | 320 | ||
319 | connect(todoEditor,SIGNAL(todoAdded(Todo *)), | 321 | connect(todoEditor,SIGNAL(todoAdded(Todo *)), |
320 | mMainView,SLOT(todoAdded(Todo *))); | 322 | mMainView,SLOT(todoAdded(Todo *))); |
321 | connect(todoEditor,SIGNAL(todoChanged(Todo *)), | 323 | connect(todoEditor,SIGNAL(todoChanged(Todo *)), |
322 | mMainView,SLOT(todoChanged(Todo *))); | 324 | mMainView,SLOT(todoChanged(Todo *))); |
323 | connect(todoEditor,SIGNAL(todoDeleted()), | 325 | connect(todoEditor,SIGNAL(todoDeleted()), |
324 | mMainView,SLOT(todoDeleted())); | 326 | mMainView,SLOT(todoDeleted())); |
325 | connect( todoEditor, SIGNAL(jumpToTime( const QDate &)), | 327 | connect( todoEditor, SIGNAL(jumpToTime( const QDate &)), |
326 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 328 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
327 | connect( todoEditor, SIGNAL( showAgendaView( bool)), | 329 | connect( todoEditor, SIGNAL( showAgendaView( bool)), |
328 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); | 330 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); |
329 | // connect(todoEditor,SIGNAL(deleteAttendee(Incidence *)), | 331 | // connect(todoEditor,SIGNAL(deleteAttendee(Incidence *)), |
330 | // mMainView,SLOT(schedule_cancel(Incidence *))); | 332 | // mMainView,SLOT(schedule_cancel(Incidence *))); |
331 | //connect(mMainView,SIGNAL(closingDown()),todoEditor,SLOT(reject())); | 333 | //connect(mMainView,SIGNAL(closingDown()),todoEditor,SLOT(reject())); |
332 | #ifndef DESKTOP_VERSION | 334 | #ifndef DESKTOP_VERSION |
333 | todoEditor->resize( QApplication::desktop()->width() -20, 100 ); | 335 | todoEditor->resize( QApplication::desktop()->width() -20, 100 ); |
334 | #endif | 336 | #endif |
335 | return todoEditor; | 337 | return todoEditor; |
336 | } | 338 | } |
337 | 339 | ||
338 | void KODialogManager::updateSearchDialog() | 340 | void KODialogManager::updateSearchDialog() |
339 | { | 341 | { |
340 | if (mSearchDialog) mSearchDialog->updateView(); | 342 | if (mSearchDialog) mSearchDialog->updateView(); |
341 | } | 343 | } |
342 | 344 | ||
343 | void KODialogManager::setDocumentId( const QString &id ) | 345 | void KODialogManager::setDocumentId( const QString &id ) |
344 | { | 346 | { |
345 | if (mOutgoingDialog) mOutgoingDialog->setDocumentId( id ); | 347 | if (mOutgoingDialog) mOutgoingDialog->setDocumentId( id ); |