Diffstat (limited to 'korganizer/kodialogmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kodialogmanager.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp index 5455098..ea30fac 100644 --- a/korganizer/kodialogmanager.cpp +++ b/korganizer/kodialogmanager.cpp | |||
@@ -205,152 +205,148 @@ void KODialogManager::showSearchDialog() | |||
205 | list = config->readListEntry("SearchLayout"); | 205 | list = config->readListEntry("SearchLayout"); |
206 | int x,y,w,h; | 206 | int x,y,w,h; |
207 | if ( ! list.isEmpty() ) { | 207 | if ( ! list.isEmpty() ) { |
208 | x = list[0].toInt(); | 208 | x = list[0].toInt(); |
209 | y = list[1].toInt(); | 209 | y = list[1].toInt(); |
210 | w = list[2].toInt(); | 210 | w = list[2].toInt(); |
211 | h = list[3].toInt(); | 211 | h = list[3].toInt(); |
212 | KApplication::testCoords( &x,&y,&w,&h ); | 212 | KApplication::testCoords( &x,&y,&w,&h ); |
213 | mSearchDialog->setGeometry(x,y,w,h); | 213 | mSearchDialog->setGeometry(x,y,w,h); |
214 | 214 | ||
215 | } | 215 | } |
216 | 216 | ||
217 | #endif | 217 | #endif |
218 | } | 218 | } |
219 | // make sure the widget is on top again | 219 | // make sure the widget is on top again |
220 | #ifdef DESKTOP_VERSION | 220 | #ifdef DESKTOP_VERSION |
221 | mSearchDialog->show(); | 221 | mSearchDialog->show(); |
222 | #else | 222 | #else |
223 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); | 223 | mSearchDialog->setMaximumSize( QApplication::desktop()->size()); |
224 | mSearchDialog->showMaximized(); | 224 | mSearchDialog->showMaximized(); |
225 | #endif | 225 | #endif |
226 | mSearchDialog->raiseAndSelect(); | 226 | mSearchDialog->raiseAndSelect(); |
227 | } | 227 | } |
228 | 228 | ||
229 | SearchDialog * KODialogManager::getSearchDialog() | 229 | SearchDialog * KODialogManager::getSearchDialog() |
230 | { | 230 | { |
231 | return mSearchDialog; | 231 | return mSearchDialog; |
232 | } | 232 | } |
233 | void KODialogManager::showArchiveDialog() | 233 | void KODialogManager::showArchiveDialog() |
234 | { | 234 | { |
235 | #ifndef KORG_NOARCHIVE | 235 | #ifndef KORG_NOARCHIVE |
236 | if (!mArchiveDialog) { | 236 | if (!mArchiveDialog) { |
237 | mArchiveDialog = new ArchiveDialog(mMainView->calendar(),mMainView); | 237 | mArchiveDialog = new ArchiveDialog(mMainView->calendar(),mMainView); |
238 | connect(mArchiveDialog,SIGNAL(eventsDeleted()), | 238 | connect(mArchiveDialog,SIGNAL(eventsDeleted()), |
239 | mMainView,SLOT(updateView())); | 239 | mMainView,SLOT(updateView())); |
240 | } | 240 | } |
241 | mArchiveDialog->show(); | 241 | mArchiveDialog->show(); |
242 | mArchiveDialog->raise(); | 242 | mArchiveDialog->raise(); |
243 | 243 | ||
244 | // Workaround. | 244 | // Workaround. |
245 | QApplication::restoreOverrideCursor(); | 245 | QApplication::restoreOverrideCursor(); |
246 | #endif | 246 | #endif |
247 | } | 247 | } |
248 | 248 | ||
249 | void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) | 249 | void KODialogManager::showFilterEditDialog(QPtrList<CalFilter> *filters) |
250 | { | 250 | { |
251 | if (!mFilterEditDialog) { | 251 | if (!mFilterEditDialog) { |
252 | mFilterEditDialog = new FilterEditDialog(filters,mMainView); | 252 | mFilterEditDialog = new FilterEditDialog(filters,mMainView); |
253 | connect(mFilterEditDialog,SIGNAL(filterChanged()), | 253 | connect(mFilterEditDialog,SIGNAL(filterChanged()), |
254 | mMainView,SLOT(filterEdited())); | 254 | mMainView,SLOT(filterEdited())); |
255 | 255 | ||
256 | } | 256 | } |
257 | 257 | ||
258 | #ifndef DESKTOP_VERSION | 258 | #ifndef DESKTOP_VERSION |
259 | mFilterEditDialog->showMaximized(); | 259 | mFilterEditDialog->showMaximized(); |
260 | #else | 260 | #else |
261 | mFilterEditDialog->show(); | 261 | mFilterEditDialog->show(); |
262 | #endif | 262 | #endif |
263 | mFilterEditDialog->raise(); | 263 | mFilterEditDialog->raise(); |
264 | } | 264 | } |
265 | 265 | ||
266 | void KODialogManager::showPluginDialog() | 266 | void KODialogManager::showPluginDialog() |
267 | { | 267 | { |
268 | #ifndef KORG_NOPLUGINS | 268 | #ifndef KORG_NOPLUGINS |
269 | if (!mPluginDialog) { | 269 | if (!mPluginDialog) { |
270 | mPluginDialog = new PluginDialog(mMainView); | 270 | mPluginDialog = new PluginDialog(mMainView); |
271 | connect(mPluginDialog,SIGNAL(configChanged()), | 271 | connect(mPluginDialog,SIGNAL(configChanged()), |
272 | mMainView,SLOT(updateConfig())); | 272 | mMainView,SLOT(updateConfig())); |
273 | } | 273 | } |
274 | mPluginDialog->show(); | 274 | mPluginDialog->show(); |
275 | mPluginDialog->raise(); | 275 | mPluginDialog->raise(); |
276 | #endif | 276 | #endif |
277 | } | 277 | } |
278 | 278 | ||
279 | KOEventEditor *KODialogManager::getEventEditor() | 279 | KOEventEditor *KODialogManager::getEventEditor() |
280 | { | 280 | { |
281 | KOEventEditor *eventEditor = new KOEventEditor( mMainView->calendar(), | 281 | KOEventEditor *eventEditor = new KOEventEditor( mMainView->calendar(), |
282 | mMainView ); | 282 | mMainView ); |
283 | 283 | ||
284 | connect(eventEditor,SIGNAL(eventAdded(Event *)), | 284 | connect(eventEditor,SIGNAL(eventAdded(Event *)), |
285 | mMainView,SLOT(eventAdded(Event *))); | 285 | mMainView,SLOT(eventAdded(Event *))); |
286 | connect(eventEditor,SIGNAL(eventChanged(Event *)), | 286 | connect(eventEditor,SIGNAL(eventChanged(Event *)), |
287 | mMainView,SLOT(eventChanged(Event *))); | 287 | mMainView,SLOT(eventChanged(Event *))); |
288 | connect(eventEditor,SIGNAL(eventDeleted()), | 288 | connect(eventEditor,SIGNAL(eventDeleted()), |
289 | mMainView,SLOT(eventDeleted())); | 289 | mMainView,SLOT(eventDeleted())); |
290 | connect(eventEditor,SIGNAL(deleteAttendee(Incidence *)), | 290 | connect(eventEditor,SIGNAL(deleteAttendee(Incidence *)), |
291 | mMainView,SLOT(schedule_cancel(Incidence *))); | 291 | mMainView,SLOT(schedule_cancel(Incidence *))); |
292 | connect( eventEditor, SIGNAL(jumpToTime( const QDate &)), | 292 | connect( eventEditor, SIGNAL(jumpToTime( const QDate &)), |
293 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 293 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
294 | connect( eventEditor, SIGNAL( showAgendaView( bool)), | 294 | connect( eventEditor, SIGNAL( showAgendaView( bool)), |
295 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); | 295 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); |
296 | 296 | ||
297 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), | 297 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), |
298 | // eventEditor,SLOT(updateCategoryConfig())); | 298 | // eventEditor,SLOT(updateCategoryConfig())); |
299 | // connect(eventEditor,SIGNAL(editCategories()), | 299 | // connect(eventEditor,SIGNAL(editCategories()), |
300 | // mCategoryEditDialog,SLOT(show())); | 300 | // mCategoryEditDialog,SLOT(show())); |
301 | connect(eventEditor,SIGNAL(dialogClose(Incidence*)), | ||
302 | mMainView,SLOT(dialogClosing(Incidence*))); | ||
303 | 301 | ||
304 | //connect(mMainView,SIGNAL(closingDown()),eventEditor,SLOT(reject())); | 302 | //connect(mMainView,SIGNAL(closingDown()),eventEditor,SLOT(reject())); |
305 | 303 | ||
306 | #ifndef DESKTOP_VERSION | 304 | #ifndef DESKTOP_VERSION |
307 | eventEditor->resize( QApplication::desktop()->width() -20, 100 ); | 305 | eventEditor->resize( QApplication::desktop()->width() -20, 100 ); |
308 | #endif | 306 | #endif |
309 | return eventEditor; | 307 | return eventEditor; |
310 | } | 308 | } |
311 | 309 | ||
312 | KOTodoEditor *KODialogManager::getTodoEditor() | 310 | KOTodoEditor *KODialogManager::getTodoEditor() |
313 | { | 311 | { |
314 | KOTodoEditor *todoEditor = new KOTodoEditor( mMainView->calendar(), | 312 | KOTodoEditor *todoEditor = new KOTodoEditor( mMainView->calendar(), |
315 | mMainView ); | 313 | mMainView ); |
316 | 314 | ||
317 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), | 315 | // connect(mCategoryEditDialog,SIGNAL(categoryConfigChanged()), |
318 | // todoEditor,SLOT(updateCategoryConfig())); | 316 | // todoEditor,SLOT(updateCategoryConfig())); |
319 | // connect(todoEditor,SIGNAL(editCategories()),mCategoryEditDialog,SLOT(show())); | 317 | // connect(todoEditor,SIGNAL(editCategories()),mCategoryEditDialog,SLOT(show())); |
320 | 318 | ||
321 | connect(todoEditor,SIGNAL(todoAdded(Todo *)), | 319 | connect(todoEditor,SIGNAL(todoAdded(Todo *)), |
322 | mMainView,SLOT(todoAdded(Todo *))); | 320 | mMainView,SLOT(todoAdded(Todo *))); |
323 | connect(todoEditor,SIGNAL(todoChanged(Todo *)), | 321 | connect(todoEditor,SIGNAL(todoChanged(Todo *)), |
324 | mMainView,SLOT(todoChanged(Todo *))); | 322 | mMainView,SLOT(todoChanged(Todo *))); |
325 | connect(todoEditor,SIGNAL(todoDeleted()), | 323 | connect(todoEditor,SIGNAL(todoDeleted()), |
326 | mMainView,SLOT(todoDeleted())); | 324 | mMainView,SLOT(todoDeleted())); |
327 | connect(todoEditor,SIGNAL(dialogClose(Incidence*)), | ||
328 | mMainView,SLOT(dialogClosing(Incidence*))); | ||
329 | connect( todoEditor, SIGNAL(jumpToTime( const QDate &)), | 325 | connect( todoEditor, SIGNAL(jumpToTime( const QDate &)), |
330 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 326 | mMainView->dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
331 | connect( todoEditor, SIGNAL( showAgendaView( bool)), | 327 | connect( todoEditor, SIGNAL( showAgendaView( bool)), |
332 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); | 328 | mMainView->viewManager(), SLOT( showAgendaView( bool) ) ); |
333 | // connect(todoEditor,SIGNAL(deleteAttendee(Incidence *)), | 329 | // connect(todoEditor,SIGNAL(deleteAttendee(Incidence *)), |
334 | // mMainView,SLOT(schedule_cancel(Incidence *))); | 330 | // mMainView,SLOT(schedule_cancel(Incidence *))); |
335 | //connect(mMainView,SIGNAL(closingDown()),todoEditor,SLOT(reject())); | 331 | //connect(mMainView,SIGNAL(closingDown()),todoEditor,SLOT(reject())); |
336 | #ifndef DESKTOP_VERSION | 332 | #ifndef DESKTOP_VERSION |
337 | todoEditor->resize( QApplication::desktop()->width() -20, 100 ); | 333 | todoEditor->resize( QApplication::desktop()->width() -20, 100 ); |
338 | #endif | 334 | #endif |
339 | return todoEditor; | 335 | return todoEditor; |
340 | } | 336 | } |
341 | 337 | ||
342 | void KODialogManager::updateSearchDialog() | 338 | void KODialogManager::updateSearchDialog() |
343 | { | 339 | { |
344 | if (mSearchDialog) mSearchDialog->updateView(); | 340 | if (mSearchDialog) mSearchDialog->updateView(); |
345 | } | 341 | } |
346 | 342 | ||
347 | void KODialogManager::setDocumentId( const QString &id ) | 343 | void KODialogManager::setDocumentId( const QString &id ) |
348 | { | 344 | { |
349 | if (mOutgoingDialog) mOutgoingDialog->setDocumentId( id ); | 345 | if (mOutgoingDialog) mOutgoingDialog->setDocumentId( id ); |
350 | } | 346 | } |
351 | 347 | ||
352 | void KODialogManager::writeSettings( KConfig *config ) | 348 | void KODialogManager::writeSettings( KConfig *config ) |
353 | { | 349 | { |
354 | if (mSearchDialog) | 350 | if (mSearchDialog) |
355 | mSearchDialog->listview()->writeSettings(config,"SearchListView Layout"); | 351 | mSearchDialog->listview()->writeSettings(config,"SearchListView Layout"); |
356 | } | 352 | } |