author | zautrix <zautrix> | 2005-03-26 13:36:19 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-26 13:36:19 (UTC) |
commit | 98444f8937b151a3deb71b7ae0da495872c52855 (patch) (unidiff) | |
tree | 26856e27b5d9aca9d428142cbbd15fef030957a7 /korganizer/koviewmanager.cpp | |
parent | 93d1be2c6eead07300e7f90f3b417fcef0f109d3 (diff) | |
download | kdepimpi-98444f8937b151a3deb71b7ae0da495872c52855.zip kdepimpi-98444f8937b151a3deb71b7ae0da495872c52855.tar.gz kdepimpi-98444f8937b151a3deb71b7ae0da495872c52855.tar.bz2 |
icons added
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koviewmanager.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 5a2dce3..31ee5e2 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -303,195 +303,193 @@ void KOViewManager::showWhatsNextView() | |||
303 | { | 303 | { |
304 | if (!mWhatsNextView) { | 304 | if (!mWhatsNextView) { |
305 | mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), | 305 | mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), |
306 | "KOViewManager::WhatsNextView"); | 306 | "KOViewManager::WhatsNextView"); |
307 | mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); | 307 | mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); |
308 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); | 308 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); |
309 | addView(mWhatsNextView); | 309 | addView(mWhatsNextView); |
310 | connect(this, SIGNAL( printWNV() ), | 310 | connect(this, SIGNAL( printWNV() ), |
311 | mWhatsNextView, SLOT( printMe() ) ); | 311 | mWhatsNextView, SLOT( printMe() ) ); |
312 | } | 312 | } |
313 | globalFlagBlockAgenda = 1; | 313 | globalFlagBlockAgenda = 1; |
314 | showView(mWhatsNextView, true ); | 314 | showView(mWhatsNextView, true ); |
315 | //mWhatsNextView->updateView(); | 315 | //mWhatsNextView->updateView(); |
316 | 316 | ||
317 | } | 317 | } |
318 | 318 | ||
319 | void KOViewManager::showListView() | 319 | void KOViewManager::showListView() |
320 | { | 320 | { |
321 | if (!mListView) { | 321 | if (!mListView) { |
322 | mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); | 322 | mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); |
323 | addView(mListView); | 323 | addView(mListView); |
324 | 324 | ||
325 | connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), | 325 | connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), |
326 | mMainView, SLOT(showIncidence(Incidence *))); | 326 | mMainView, SLOT(showIncidence(Incidence *))); |
327 | connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), | 327 | connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), |
328 | mMainView, SLOT(editIncidence(Incidence *))); | 328 | mMainView, SLOT(editIncidence(Incidence *))); |
329 | connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 329 | connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
330 | mMainView, SLOT(deleteIncidence(Incidence *))); | 330 | mMainView, SLOT(deleteIncidence(Incidence *))); |
331 | connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), | 331 | connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), |
332 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 332 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
333 | connect( mListView, SIGNAL( signalNewEvent() ), | 333 | connect( mListView, SIGNAL( signalNewEvent() ), |
334 | mMainView, SLOT( newEvent() ) ); | 334 | mMainView, SLOT( newEvent() ) ); |
335 | connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); | 335 | connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); |
336 | connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), | 336 | connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), |
337 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 337 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
338 | connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), | 338 | connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), |
339 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 339 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
340 | connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 340 | connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
341 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 341 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
342 | connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 342 | connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
343 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 343 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
344 | } | 344 | } |
345 | // bool temp = mFlagShowNextxDays; | 345 | // bool temp = mFlagShowNextxDays; |
346 | //globalFlagBlockPainting = true; | 346 | //globalFlagBlockPainting = true; |
347 | globalFlagBlockAgenda = 1; | 347 | globalFlagBlockAgenda = 1; |
348 | if ( KOPrefs::instance()->mListViewMonthTimespan ) { | 348 | if ( KOPrefs::instance()->mListViewMonthTimespan ) { |
349 | mMainView->setBlockShowDates( true ); | 349 | mMainView->setBlockShowDates( true ); |
350 | mMainView->dateNavigator()->selectMonth(); | 350 | mMainView->dateNavigator()->selectMonth(); |
351 | mMainView->setBlockShowDates( false ); | 351 | mMainView->setBlockShowDates( false ); |
352 | } | 352 | } |
353 | showView(mListView, KOPrefs::instance()->mFullViewTodo); | 353 | showView(mListView, KOPrefs::instance()->mFullViewTodo); |
354 | //mFlagShowNextxDays = temp; | 354 | //mFlagShowNextxDays = temp; |
355 | } | 355 | } |
356 | 356 | ||
357 | void KOViewManager::showAgendaView( bool fullScreen ) | 357 | void KOViewManager::showAgendaView( bool fullScreen ) |
358 | { | 358 | { |
359 | 359 | ||
360 | mMainView->dialogManager()->hideSearchDialog(); | 360 | mMainView->dialogManager()->hideSearchDialog(); |
361 | // qDebug("KOViewManager::showAgendaView "); | 361 | // qDebug("KOViewManager::showAgendaView "); |
362 | bool full; | 362 | bool full; |
363 | full = fullScreen; | 363 | full = fullScreen; |
364 | if (!mAgendaView) { | 364 | if (!mAgendaView) { |
365 | full = false; | 365 | full = false; |
366 | mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); | 366 | mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); |
367 | addView(mAgendaView); | 367 | addView(mAgendaView); |
368 | #ifndef DESKTOP_VERSION | 368 | #ifndef DESKTOP_VERSION |
369 | QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); | 369 | QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); |
370 | #endif | 370 | #endif |
371 | connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), | 371 | connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), |
372 | mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); | 372 | mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); |
373 | 373 | ||
374 | // SIGNALS/SLOTS FOR DAY/WEEK VIEW | 374 | // SIGNALS/SLOTS FOR DAY/WEEK VIEW |
375 | 375 | ||
376 | connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); | 376 | connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); |
377 | 377 | ||
378 | connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), | 378 | connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), |
379 | mMainView, SLOT(newTodoDateTime(QDateTime,bool))); | 379 | mMainView, SLOT(newTodoDateTime(QDateTime,bool))); |
380 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), | 380 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), |
381 | mMainView, SLOT(newEvent(QDateTime))); | 381 | mMainView, SLOT(newEvent(QDateTime))); |
382 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), | 382 | connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), |
383 | mMainView, SLOT(newEvent(QDateTime,QDateTime))); | 383 | mMainView, SLOT(newEvent(QDateTime,QDateTime))); |
384 | connect(mAgendaView,SIGNAL(newEventSignal(QDate)), | 384 | connect(mAgendaView,SIGNAL(newEventSignal(QDate)), |
385 | mMainView, SLOT(newEvent(QDate))); | 385 | mMainView, SLOT(newEvent(QDate))); |
386 | 386 | ||
387 | connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), | 387 | connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), |
388 | mMainView, SLOT(editIncidence(Incidence *))); | 388 | mMainView, SLOT(editIncidence(Incidence *))); |
389 | connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), | 389 | connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), |
390 | mMainView, SLOT(showIncidence(Incidence *))); | 390 | mMainView, SLOT(showIncidence(Incidence *))); |
391 | connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 391 | connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
392 | mMainView, SLOT(deleteIncidence(Incidence *))); | 392 | mMainView, SLOT(deleteIncidence(Incidence *))); |
393 | 393 | ||
394 | connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), | 394 | connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), |
395 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 395 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
396 | 396 | ||
397 | connect(mAgendaView, SIGNAL( toggleExpand() ), | 397 | connect(mAgendaView, SIGNAL( toggleExpand() ), |
398 | mMainView, SLOT( toggleExpand() ) ); | 398 | mMainView, SLOT( toggleExpand() ) ); |
399 | 399 | ||
400 | connect(mMainView, SIGNAL( calendarViewExpanded( bool ) ), | ||
401 | mAgendaView, SLOT( setExpandedButton( bool ) ) ); | ||
402 | connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), | 400 | connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), |
403 | mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; | 401 | mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; |
404 | connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), | 402 | connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), |
405 | mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; | 403 | mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; |
406 | connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); | 404 | connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); |
407 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, | 405 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, |
408 | SLOT( updateTodo( Todo *, int ) ) ); | 406 | SLOT( updateTodo( Todo *, int ) ) ); |
409 | connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), | 407 | connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), |
410 | mMainView, SIGNAL( todoModified( Todo *, int ))); | 408 | mMainView, SIGNAL( todoModified( Todo *, int ))); |
411 | connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 409 | connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
412 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 410 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
413 | connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 411 | connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
414 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 412 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
415 | connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), | 413 | connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), |
416 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); | 414 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); |
417 | mAgendaView->readSettings(); | 415 | mAgendaView->readSettings(); |
418 | mAgendaView->updateConfig(); | 416 | mAgendaView->updateConfig(); |
419 | } | 417 | } |
420 | 418 | ||
421 | showView( mAgendaView, full); | 419 | showView( mAgendaView, full); |
422 | 420 | ||
423 | } | 421 | } |
424 | 422 | ||
425 | void KOViewManager::showDayView() | 423 | void KOViewManager::showDayView() |
426 | { | 424 | { |
427 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); | 425 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); |
428 | mFlagShowNextxDays = false; | 426 | mFlagShowNextxDays = false; |
429 | globalFlagBlockLabel = 1; | 427 | globalFlagBlockLabel = 1; |
430 | globalFlagBlockAgenda = 1; | 428 | globalFlagBlockAgenda = 1; |
431 | if ( mCurrentAgendaView != 1 ) | 429 | if ( mCurrentAgendaView != 1 ) |
432 | mCurrentAgendaView = -1; | 430 | mCurrentAgendaView = -1; |
433 | showAgendaView(); | 431 | showAgendaView(); |
434 | qApp->processEvents(); | 432 | qApp->processEvents(); |
435 | globalFlagBlockAgenda = 2; | 433 | globalFlagBlockAgenda = 2; |
436 | globalFlagBlockLabel = 0; | 434 | globalFlagBlockLabel = 0; |
437 | mMainView->dateNavigator()->selectDates( 1 ); | 435 | mMainView->dateNavigator()->selectDates( 1 ); |
438 | mCurrentAgendaView = 1 ; | 436 | mCurrentAgendaView = 1 ; |
439 | 437 | ||
440 | } | 438 | } |
441 | 439 | ||
442 | void KOViewManager::showWorkWeekView() | 440 | void KOViewManager::showWorkWeekView() |
443 | { | 441 | { |
444 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); | 442 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); |
445 | mFlagShowNextxDays = false; | 443 | mFlagShowNextxDays = false; |
446 | globalFlagBlockAgenda = 1; | 444 | globalFlagBlockAgenda = 1; |
447 | globalFlagBlockLabel = 1; | 445 | globalFlagBlockLabel = 1; |
448 | if ( mCurrentAgendaView != 5 ) | 446 | if ( mCurrentAgendaView != 5 ) |
449 | mCurrentAgendaView = -1; | 447 | mCurrentAgendaView = -1; |
450 | showAgendaView(); | 448 | showAgendaView(); |
451 | qApp->processEvents(); | 449 | qApp->processEvents(); |
452 | globalFlagBlockAgenda = 2; | 450 | globalFlagBlockAgenda = 2; |
453 | globalFlagBlockLabel = 0; | 451 | globalFlagBlockLabel = 0; |
454 | mMainView->dateNavigator()->selectWorkWeek(); | 452 | mMainView->dateNavigator()->selectWorkWeek(); |
455 | mCurrentAgendaView = 5 ; | 453 | mCurrentAgendaView = 5 ; |
456 | 454 | ||
457 | } | 455 | } |
458 | 456 | ||
459 | void KOViewManager::showWeekView() | 457 | void KOViewManager::showWeekView() |
460 | { | 458 | { |
461 | /* | 459 | /* |
462 | globalFlagBlockAgenda = 2; | 460 | globalFlagBlockAgenda = 2; |
463 | qDebug("4globalFlagBlockAgenda = 2; "); | 461 | qDebug("4globalFlagBlockAgenda = 2; "); |
464 | //globalFlagBlockPainting = true; | 462 | //globalFlagBlockPainting = true; |
465 | mMainView->dateNavigator()->selectWeek(); | 463 | mMainView->dateNavigator()->selectWeek(); |
466 | showAgendaView(); | 464 | showAgendaView(); |
467 | */ | 465 | */ |
468 | 466 | ||
469 | 467 | ||
470 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); | 468 | mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); |
471 | mFlagShowNextxDays = false; | 469 | mFlagShowNextxDays = false; |
472 | globalFlagBlockAgenda = 1; | 470 | globalFlagBlockAgenda = 1; |
473 | globalFlagBlockLabel = 1; | 471 | globalFlagBlockLabel = 1; |
474 | if ( mCurrentAgendaView != 7 ) | 472 | if ( mCurrentAgendaView != 7 ) |
475 | mCurrentAgendaView = -1; | 473 | mCurrentAgendaView = -1; |
476 | showAgendaView(); | 474 | showAgendaView(); |
477 | qApp->processEvents(); | 475 | qApp->processEvents(); |
478 | globalFlagBlockAgenda = 2; | 476 | globalFlagBlockAgenda = 2; |
479 | globalFlagBlockLabel = 0; | 477 | globalFlagBlockLabel = 0; |
480 | mMainView->dateNavigator()->selectWeek(); | 478 | mMainView->dateNavigator()->selectWeek(); |
481 | mCurrentAgendaView = 7 ; | 479 | mCurrentAgendaView = 7 ; |
482 | } | 480 | } |
483 | 481 | ||
484 | void KOViewManager::showNextXView() | 482 | void KOViewManager::showNextXView() |
485 | { | 483 | { |
486 | 484 | ||
487 | globalFlagBlockAgenda = 1; | 485 | globalFlagBlockAgenda = 1; |
488 | if ( mCurrentAgendaView != 3 ) | 486 | if ( mCurrentAgendaView != 3 ) |
489 | mCurrentAgendaView = -1; | 487 | mCurrentAgendaView = -1; |
490 | showAgendaView(KOPrefs::instance()->mFullViewMonth); | 488 | showAgendaView(KOPrefs::instance()->mFullViewMonth); |
491 | globalFlagBlockAgenda = 2; | 489 | globalFlagBlockAgenda = 2; |
492 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), | 490 | mMainView->dateNavigator()->selectDates( QDate::currentDate(), |
493 | KOPrefs::instance()->mNextXDays ); | 491 | KOPrefs::instance()->mNextXDays ); |
494 | mFlagShowNextxDays = true; | 492 | mFlagShowNextxDays = true; |
495 | mCurrentAgendaView = 3 ; | 493 | mCurrentAgendaView = 3 ; |
496 | } | 494 | } |
497 | bool KOViewManager::showsNextDays() | 495 | bool KOViewManager::showsNextDays() |