summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Unidiff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 4057ae0..07c4295 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -1,122 +1,124 @@
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 As a special exception, permission is given to link this program 21 As a special exception, permission is given to link this program
22 with any edition of Qt, and distribute the resulting executable, 22 with any edition of Qt, and distribute the resulting executable,
23 without including the source code for Qt in the source distribution. 23 without including the source code for Qt in the source distribution.
24*/ 24*/
25 25
26#include <qwidgetstack.h> 26#include <q3widgetstack.h>
27//Added by qt3to4:
28#include <Q3PtrList>
27 29
28#include <kconfig.h> 30#include <kconfig.h>
29#include <kglobal.h> 31#include <kglobal.h>
30#ifndef DESKTOP_VERSION 32#ifndef DESKTOP_VERSION
31#include <qpe/qpeapplication.h> 33#include <qpe/qpeapplication.h>
32#else 34#else
33#include <qapplication.h> 35#include <qapplication.h>
34#endif 36#endif
35#include <qdatetime.h> 37#include <qdatetime.h>
36#include "calendarview.h" 38#include "calendarview.h"
37#include "datenavigator.h" 39#include "datenavigator.h"
38#include "kotodoview.h" 40#include "kotodoview.h"
39#include "koagendaview.h" 41#include "koagendaview.h"
40#include "kodialogmanager.h" 42#include "kodialogmanager.h"
41#include "komonthview.h" 43#include "komonthview.h"
42#include "kolistview.h" 44#include "kolistview.h"
43#include "kowhatsnextview.h" 45#include "kowhatsnextview.h"
44#include "kojournalview.h" 46#include "kojournalview.h"
45#include "kotimespanview.h" 47#include "kotimespanview.h"
46#include "koprefs.h" 48#include "koprefs.h"
47#include "navigatorbar.h" 49#include "navigatorbar.h"
48#include "kdatenavigator.h" 50#include "kdatenavigator.h"
49 51
50#include "koviewmanager.h" 52#include "koviewmanager.h"
51//extern bool externFlagMonthviewBlockPainting; 53//extern bool externFlagMonthviewBlockPainting;
52 54
53//bool globalFlagBlockPainting = false; 55//bool globalFlagBlockPainting = false;
54int globalFlagBlockAgenda = 0; 56int globalFlagBlockAgenda = 0;
55int globalFlagBlockLabel = 0; 57int globalFlagBlockLabel = 0;
56int globalFlagBlockAgendaItemPaint = 1; 58int globalFlagBlockAgendaItemPaint = 1;
57int globalFlagBlockAgendaItemUpdate = 1; 59int globalFlagBlockAgendaItemUpdate = 1;
58 60
59 61
60KOViewManager::KOViewManager( CalendarView *mainView ) : 62KOViewManager::KOViewManager( CalendarView *mainView ) :
61 QObject(), mMainView( mainView ) 63 QObject(), mMainView( mainView )
62{ 64{
63 65
64 lastMode = 0; 66 lastMode = 0;
65 lastCount = 0; 67 lastCount = 0;
66 lastNDMode = false; 68 lastNDMode = false;
67 selecteddatescount = 0; 69 selecteddatescount = 0;
68 selecteddate = QDate ( 2000, 1, 1 ); 70 selecteddate = QDate ( 2000, 1, 1 );
69 baseCycleDate = QDate ( 2000, 1, 1 ); 71 baseCycleDate = QDate ( 2000, 1, 1 );
70 mCurrentView = 0; 72 mCurrentView = 0;
71 flagResetViewChangeDate = 0; 73 flagResetViewChangeDate = 0;
72 mWhatsNextView = 0; 74 mWhatsNextView = 0;
73 mTodoView = 0; 75 mTodoView = 0;
74 mAgendaView = 0; 76 mAgendaView = 0;
75 mMonthView = 0; 77 mMonthView = 0;
76 mListView = 0; 78 mListView = 0;
77 mJournalView = 0; 79 mJournalView = 0;
78 mTimeSpanView = 0; 80 mTimeSpanView = 0;
79 mCurrentAgendaView = 0 ; 81 mCurrentAgendaView = 0 ;
80 mFlagShowNextxDays = false; 82 mFlagShowNextxDays = false;
81} 83}
82 84
83KOViewManager::~KOViewManager() 85KOViewManager::~KOViewManager()
84{ 86{
85} 87}
86 88
87 89
88KOrg::BaseView *KOViewManager::currentView() 90KOrg::BaseView *KOViewManager::currentView()
89{ 91{
90 return mCurrentView; 92 return mCurrentView;
91} 93}
92 94
93void KOViewManager::readSettings(KConfig *config) 95void KOViewManager::readSettings(KConfig *config)
94{ 96{
95 config->setGroup("General"); 97 config->setGroup("General");
96 QString view = config->readEntry("Current View"); 98 QString view = config->readEntry("Current View");
97 if (view == "WhatsNext") showWhatsNextView(); 99 if (view == "WhatsNext") showWhatsNextView();
98 else if (view == "Month") { 100 else if (view == "Month") {
99 if ( !KOPrefs::instance()->mMonthViewWeek ) 101 if ( !KOPrefs::instance()->mMonthViewWeek )
100 showMonthView(); 102 showMonthView();
101 else 103 else
102 showMonthViewWeek(); 104 showMonthViewWeek();
103 } 105 }
104 else if (view == "List") showListView(); 106 else if (view == "List") showListView();
105 else if (view == "Journal") showJournalView(); 107 else if (view == "Journal") showJournalView();
106 else if (view == "TimeSpan") showTimeSpanView(); 108 else if (view == "TimeSpan") showTimeSpanView();
107 else if (view == "Todo") showTodoView(); 109 else if (view == "Todo") showTodoView();
108 else { 110 else {
109 config->setGroup( "Views" ); 111 config->setGroup( "Views" );
110 int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); 112 int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
111 mCurrentAgendaView = dateCount; 113 mCurrentAgendaView = dateCount;
112 showAgendaView(); 114 showAgendaView();
113 mCurrentAgendaView = dateCount; 115 mCurrentAgendaView = dateCount;
114#ifdef DESKTOP_VERSION 116#ifdef DESKTOP_VERSION
115 QTimer::singleShot( 1000, mAgendaView, SLOT ( setInitStartHour() ) ); 117 QTimer::singleShot( 1000, mAgendaView, SLOT ( setInitStartHour() ) );
116#endif 118#endif
117 } 119 }
118} 120}
119 121
120 122
121void KOViewManager::showDateView( int view, QDate date) 123void KOViewManager::showDateView( int view, QDate date)
122{ 124{
@@ -364,194 +366,194 @@ void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView )
364 } 366 }
365 emit signalAgendaView( mCurrentView == mAgendaView ); 367 emit signalAgendaView( mCurrentView == mAgendaView );
366 //qDebug("raiseCurrentView ende "); 368 //qDebug("raiseCurrentView ende ");
367 369
368} 370}
369 371
370void KOViewManager::clearAllViews() 372void KOViewManager::clearAllViews()
371{ 373{
372 374
373 if ( mTodoView ) mTodoView->clearList(); 375 if ( mTodoView ) mTodoView->clearList();
374 if ( mListView ) mListView->clearList(); 376 if ( mListView ) mListView->clearList();
375 377
376 if ( mAgendaView ) mAgendaView->clearList(); 378 if ( mAgendaView ) mAgendaView->clearList();
377 if ( mMonthView ) mMonthView->clearList(); 379 if ( mMonthView ) mMonthView->clearList();
378 if ( mWhatsNextView ) mWhatsNextView->clearList(); 380 if ( mWhatsNextView ) mWhatsNextView->clearList();
379 if ( mJournalView ) mJournalView->clearList(); 381 if ( mJournalView ) mJournalView->clearList();
380 382
381} 383}
382void KOViewManager::updateView() 384void KOViewManager::updateView()
383{ 385{
384 // qDebug("KOViewManager::updateView() "); 386 // qDebug("KOViewManager::updateView() ");
385 // if we are updating mTodoView, we get endless recursion 387 // if we are updating mTodoView, we get endless recursion
386 if ( mTodoView == mCurrentView ) 388 if ( mTodoView == mCurrentView )
387 return; 389 return;
388 if ( mCurrentView ) mCurrentView->updateView(); 390 if ( mCurrentView ) mCurrentView->updateView();
389 391
390} 392}
391 393
392void KOViewManager::updateView(const QDate &start, const QDate &end) 394void KOViewManager::updateView(const QDate &start, const QDate &end)
393{ 395{
394 // kdDebug() << "KOViewManager::updateView()" << endl; 396 // kdDebug() << "KOViewManager::updateView()" << endl;
395 397
396 if (mCurrentView) mCurrentView->showDates(start, end); 398 if (mCurrentView) mCurrentView->showDates(start, end);
397 399
398 if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); 400 if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView();
399} 401}
400 402
401 403
402void KOViewManager::updateWNview() 404void KOViewManager::updateWNview()
403{ 405{
404 if ( mCurrentView == mWhatsNextView && mWhatsNextView ) 406 if ( mCurrentView == mWhatsNextView && mWhatsNextView )
405 mWhatsNextView->updateView(); 407 mWhatsNextView->updateView();
406 if ( mCurrentView == mMonthView && mMonthView ) 408 if ( mCurrentView == mMonthView && mMonthView )
407 mMonthView->updateView(); 409 mMonthView->updateView();
408 410
409} 411}
410void KOViewManager::showWhatsNextView() 412void KOViewManager::showWhatsNextView()
411{ 413{
412 if (!mWhatsNextView) { 414 if (!mWhatsNextView) {
413 mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), 415 mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(),
414 "KOViewManager::WhatsNextView"); 416 "KOViewManager::WhatsNextView");
415 mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); 417 mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog());
416 connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); 418 connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig()));
417 addView(mWhatsNextView); 419 addView(mWhatsNextView);
418 connect(this, SIGNAL( printWNV() ), 420 connect(this, SIGNAL( printWNV() ),
419 mWhatsNextView, SLOT( printMe() ) ); 421 mWhatsNextView, SLOT( printMe() ) );
420 } 422 }
421 globalFlagBlockAgenda = 1; 423 globalFlagBlockAgenda = 1;
422 KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; 424 KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW;
423 showView(mWhatsNextView, true ); 425 showView(mWhatsNextView, true );
424 //mWhatsNextView->updateView(); 426 //mWhatsNextView->updateView();
425 KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW; 427 KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW;
426} 428}
427 429
428void KOViewManager::slotprintWNV() 430void KOViewManager::slotprintWNV()
429{ 431{
430 if (!mWhatsNextView) 432 if (!mWhatsNextView)
431 showWhatsNextView(); 433 showWhatsNextView();
432 emit printWNV(); 434 emit printWNV();
433 435
434} 436}
435void KOViewManager::showListView() 437void KOViewManager::showListView()
436{ 438{
437 if (!mListView) { 439 if (!mListView) {
438 mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); 440 mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView");
439 addView(mListView); 441 addView(mListView);
440 442
441 connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), 443 connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)),
442 mMainView, SLOT(showIncidence(Incidence *))); 444 mMainView, SLOT(showIncidence(Incidence *)));
443 connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), 445 connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)),
444 mMainView, SLOT(editIncidence(Incidence *))); 446 mMainView, SLOT(editIncidence(Incidence *)));
445 connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), 447 connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)),
446 mMainView, SLOT(deleteIncidence(Incidence *))); 448 mMainView, SLOT(deleteIncidence(Incidence *)));
447 connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), 449 connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ),
448 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 450 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
449 connect( mListView, SIGNAL( signalNewEvent() ), 451 connect( mListView, SIGNAL( signalNewEvent() ),
450 mMainView, SLOT( newEvent() ) ); 452 mMainView, SLOT( newEvent() ) );
451 connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); 453 connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig()));
452 connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), 454 connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ),
453 mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); 455 mMainView, SLOT ( cloneIncidence( Incidence * ) ) );
454 connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), 456 connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ),
455 mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); 457 mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
456 connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 458 connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
457 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 459 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
458 connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 460 connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
459 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 461 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
460 connect( mListView, SIGNAL( beamIncidenceList( QPtrList<Incidence> ) ), 462 connect( mListView, SIGNAL( beamIncidenceList( Q3PtrList<Incidence> ) ),
461 mMainView, SLOT ( beamIncidenceList( QPtrList<Incidence> ) ) ); 463 mMainView, SLOT ( beamIncidenceList( Q3PtrList<Incidence> ) ) );
462 } 464 }
463 // bool temp = mFlagShowNextxDays; 465 // bool temp = mFlagShowNextxDays;
464 //globalFlagBlockPainting = true; 466 //globalFlagBlockPainting = true;
465 globalFlagBlockAgenda = 1; 467 globalFlagBlockAgenda = 1;
466 if ( KOPrefs::instance()->mListViewMonthTimespan ) { 468 if ( KOPrefs::instance()->mListViewMonthTimespan ) {
467 mMainView->setBlockShowDates( true ); 469 mMainView->setBlockShowDates( true );
468 mMainView->dateNavigator()->selectMonth(); 470 mMainView->dateNavigator()->selectMonth();
469 mMainView->setBlockShowDates( false ); 471 mMainView->setBlockShowDates( false );
470 } 472 }
471 KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; 473 KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW;
472 showView(mListView, KOPrefs::instance()->mFullViewTodo); 474 showView(mListView, KOPrefs::instance()->mFullViewTodo);
473 //mFlagShowNextxDays = temp; 475 //mFlagShowNextxDays = temp;
474 KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; 476 KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW;
475 mMainView->setScrollBarStep( 7 ); 477 mMainView->setScrollBarStep( 7 );
476} 478}
477 479
478void KOViewManager::showAgendaView( bool fullScreen ) 480void KOViewManager::showAgendaView( bool fullScreen )
479{ 481{
480 482
481 mMainView->dialogManager()->hideSearchDialog(); 483 mMainView->dialogManager()->hideSearchDialog();
482 // qDebug("KOViewManager::showAgendaView "); 484 // qDebug("KOViewManager::showAgendaView ");
483 bool full; 485 bool full;
484 full = fullScreen; 486 full = fullScreen;
485 if (!mAgendaView) { 487 if (!mAgendaView) {
486 full = false; 488 full = false;
487 mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); 489 mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView");
488 addView(mAgendaView); 490 addView(mAgendaView);
489#ifndef DESKTOP_VERSION 491#ifndef DESKTOP_VERSION
490 QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); 492 QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold );
491#endif 493#endif
492 connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), 494 connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )),
493 mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); 495 mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) ));
494 496
495 // SIGNALS/SLOTS FOR DAY/WEEK VIEW 497 // SIGNALS/SLOTS FOR DAY/WEEK VIEW
496 498
497 connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); 499 connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate )));
498 500
499 connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), 501 connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)),
500 mMainView, SLOT(newTodoDateTime(QDateTime,bool))); 502 mMainView, SLOT(newTodoDateTime(QDateTime,bool)));
501 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), 503 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)),
502 mMainView, SLOT(newEvent(QDateTime))); 504 mMainView, SLOT(newEvent(QDateTime)));
503 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), 505 connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)),
504 mMainView, SLOT(newEvent(QDateTime,QDateTime))); 506 mMainView, SLOT(newEvent(QDateTime,QDateTime)));
505 connect(mAgendaView,SIGNAL(newEventSignal(QDate)), 507 connect(mAgendaView,SIGNAL(newEventSignal(QDate)),
506 mMainView, SLOT(newEvent(QDate))); 508 mMainView, SLOT(newEvent(QDate)));
507 509
508 connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), 510 connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)),
509 mMainView, SLOT(editIncidence(Incidence *))); 511 mMainView, SLOT(editIncidence(Incidence *)));
510 connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), 512 connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)),
511 mMainView, SLOT(showIncidence(Incidence *))); 513 mMainView, SLOT(showIncidence(Incidence *)));
512 connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), 514 connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)),
513 mMainView, SLOT(deleteIncidence(Incidence *))); 515 mMainView, SLOT(deleteIncidence(Incidence *)));
514 516
515 connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), 517 connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ),
516 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 518 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
517 519
518 connect(mAgendaView, SIGNAL( toggleExpand() ), 520 connect(mAgendaView, SIGNAL( toggleExpand() ),
519 mMainView, SLOT( toggleExpand() ) ); 521 mMainView, SLOT( toggleExpand() ) );
520 522
521 connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), 523 connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ),
522 mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; 524 mMainView, SLOT(cloneIncidence(Incidence *) ) ) ;
523 connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), 525 connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ),
524 mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; 526 mMainView, SLOT(cancelIncidence(Incidence *) ) ) ;
525 connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); 527 connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig()));
526 connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, 528 connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView,
527 SLOT( updateTodo( Todo *, int ) ) ); 529 SLOT( updateTodo( Todo *, int ) ) );
528 connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), 530 connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )),
529 mMainView, SIGNAL( todoModified( Todo *, int ))); 531 mMainView, SIGNAL( todoModified( Todo *, int )));
530 connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 532 connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
531 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 533 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
532 connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 534 connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
533 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 535 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
534 connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), 536 connect( mAgendaView, SIGNAL( selectWeekNum( int ) ),
535 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); 537 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) );
536 mAgendaView->readSettings(); 538 mAgendaView->readSettings();
537 mAgendaView->updateConfig(); 539 mAgendaView->updateConfig();
538 } 540 }
539 541
540 KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; 542 KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW;
541 showView( mAgendaView, full); 543 showView( mAgendaView, full);
542 KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; 544 KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW;
543 mMainView->setScrollBarStep( 1 ); 545 mMainView->setScrollBarStep( 1 );
544} 546}
545 547
546void KOViewManager::showDayView() 548void KOViewManager::showDayView()
547{ 549{
548 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); 550 mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count();
549 mFlagShowNextxDays = false; 551 mFlagShowNextxDays = false;
550 globalFlagBlockLabel = 1; 552 globalFlagBlockLabel = 1;
551 globalFlagBlockAgenda = 1; 553 globalFlagBlockAgenda = 1;
552 if ( mCurrentAgendaView != 1 ) 554 if ( mCurrentAgendaView != 1 )
553 mCurrentAgendaView = -1; 555 mCurrentAgendaView = -1;
554 showAgendaView(); 556 showAgendaView();
555 qApp->processEvents(); 557 qApp->processEvents();
556 globalFlagBlockAgenda = 2; 558 globalFlagBlockAgenda = 2;
557 globalFlagBlockLabel = 0; 559 globalFlagBlockLabel = 0;