author | zautrix <zautrix> | 2005-03-28 13:31:19 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-28 13:31:19 (UTC) |
commit | e4e6bda3a6b0a82e3f64db0fa5f7d60cab9f0e48 (patch) (side-by-side diff) | |
tree | e1b5b2d51b8026b08f6eb3680304fa8d86d1873a /korganizer/koviewmanager.cpp | |
parent | 314908d5d9139af7711c6e425260363bb014afce (diff) | |
download | kdepimpi-e4e6bda3a6b0a82e3f64db0fa5f7d60cab9f0e48.zip kdepimpi-e4e6bda3a6b0a82e3f64db0fa5f7d60cab9f0e48.tar.gz kdepimpi-e4e6bda3a6b0a82e3f64db0fa5f7d60cab9f0e48.tar.bz2 |
fixes
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koviewmanager.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index e80b3fc..8752636 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -257,256 +257,263 @@ void KOViewManager::showNextView() if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;} if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} } void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) { //mFlagShowNextxDays = false; //if(view == mCurrentView) return; if ( view == 0 ) { view = mCurrentView; if ( view == 0 ) return; } bool callupdate = !(view == mCurrentView); bool full = fullScreen; if(view == mCurrentView && view != mWhatsNextView ) { if ( mCurrentAgendaView < 0 ) return; if ( view != mMonthView ) full = mMainView->leftFrame()->isVisible(); } else { if ( view == mMonthView && mMonthView) ;//mMonthView->skipResize = true ; mCurrentView = view; // bool full = fullScreen; bool isFull = !mMainView->leftFrame()->isVisible(); if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) full = true; if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) full = false; } if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); //raiseCurrentView( full ); mMainView->processIncidenceSelection( 0 ); //mMainView->updateView(); raiseCurrentView( full, callupdate ); mMainView->adaptNavigationUnits(); } void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) { mCurrentAgendaView = 0; if ( fullScreen ) { mMainView->leftFrame()->hide(); } else { mMainView->leftFrame()->show(); } //if ( mCurrentView == mMonthView ) qApp->processEvents(); emit signalFullScreen( !fullScreen ); if ( callUpdateView ) mMainView->updateView(); if ( globalFlagBlockAgenda == 5 ) { globalFlagBlockAgenda = 4; globalFlagBlockAgendaItemPaint = 1; } mMainView->viewStack()->raiseWidget(mCurrentView); if ( globalFlagBlockAgenda == 4 ) { if ( mCurrentView == mAgendaView ) { //globalFlagBlockAgenda =1 ; if ( KOPrefs::instance()->mSetTimeToDayStartAt ) mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); else if ( KOPrefs::instance()->mCenterOnCurrentTime ) mAgendaView->setStartHour( QTime::currentTime ().hour() ); qApp->processEvents(); //qDebug("qApp->processEvents() "); globalFlagBlockAgenda = 0; mAgendaView->repaintAgenda(); } globalFlagBlockAgenda = 0; } emit signalAgendaView( mCurrentView == mAgendaView ); //qDebug("raiseCurrentView ende "); } void KOViewManager::updateView() { // qDebug("KOViewManager::updateView() "); // if we are updating mTodoView, we get endless recursion if ( mTodoView == mCurrentView ) return; if ( mCurrentView ) mCurrentView->updateView(); } void KOViewManager::updateView(const QDate &start, const QDate &end) { // kdDebug() << "KOViewManager::updateView()" << endl; if (mCurrentView) mCurrentView->showDates(start, end); if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); } void KOViewManager::updateWNview() { if ( mCurrentView == mWhatsNextView && mWhatsNextView ) mWhatsNextView->updateView(); } void KOViewManager::showWhatsNextView() { if (!mWhatsNextView) { mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), "KOViewManager::WhatsNextView"); mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); addView(mWhatsNextView); connect(this, SIGNAL( printWNV() ), mWhatsNextView, SLOT( printMe() ) ); } globalFlagBlockAgenda = 1; showView(mWhatsNextView, true ); //mWhatsNextView->updateView(); } +void KOViewManager::slotprintWNV() +{ + if (!mWhatsNextView) + showWhatsNextView(); + emit printWNV(); + +} void KOViewManager::showListView() { if (!mListView) { mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); addView(mListView); connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), mMainView, SLOT(showIncidence(Incidence *))); connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), mMainView, SLOT(editIncidence(Incidence *))); connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), mMainView, SLOT(deleteIncidence(Incidence *))); connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); connect( mListView, SIGNAL( signalNewEvent() ), mMainView, SLOT( newEvent() ) ); connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), mMainView, SLOT ( moveIncidence( Incidence * ) ) ); connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), mMainView, SLOT ( beamIncidence( Incidence * ) ) ); } // bool temp = mFlagShowNextxDays; //globalFlagBlockPainting = true; globalFlagBlockAgenda = 1; if ( KOPrefs::instance()->mListViewMonthTimespan ) { mMainView->setBlockShowDates( true ); mMainView->dateNavigator()->selectMonth(); mMainView->setBlockShowDates( false ); } showView(mListView, KOPrefs::instance()->mFullViewTodo); //mFlagShowNextxDays = temp; } void KOViewManager::showAgendaView( bool fullScreen ) { mMainView->dialogManager()->hideSearchDialog(); // qDebug("KOViewManager::showAgendaView "); bool full; full = fullScreen; if (!mAgendaView) { full = false; mAgendaView = new KOAgendaView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::AgendaView"); addView(mAgendaView); #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( mAgendaView, QPEApplication::RightOnHold ); #endif connect( mAgendaView, SIGNAL( incidenceChanged(Incidence *, int )), mMainView, SLOT( changeIncidenceDisplay( Incidence *, int ) )); // SIGNALS/SLOTS FOR DAY/WEEK VIEW connect(mAgendaView,SIGNAL(showDateView( int, QDate )),SLOT(showDateView( int, QDate ))); connect(mAgendaView,SIGNAL(newTodoSignal(QDateTime,bool)), mMainView, SLOT(newTodoDateTime(QDateTime,bool))); connect(mAgendaView,SIGNAL(newEventSignal(QDateTime)), mMainView, SLOT(newEvent(QDateTime))); connect(mAgendaView,SIGNAL(newEventSignal(QDateTime,QDateTime)), mMainView, SLOT(newEvent(QDateTime,QDateTime))); connect(mAgendaView,SIGNAL(newEventSignal(QDate)), mMainView, SLOT(newEvent(QDate))); connect(mAgendaView, SIGNAL(editIncidenceSignal(Incidence *)), mMainView, SLOT(editIncidence(Incidence *))); connect(mAgendaView, SIGNAL(showIncidenceSignal(Incidence *)), mMainView, SLOT(showIncidence(Incidence *))); connect(mAgendaView, SIGNAL(deleteIncidenceSignal(Incidence *)), mMainView, SLOT(deleteIncidence(Incidence *))); connect( mAgendaView, SIGNAL( incidenceSelected( Incidence * ) ), mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); connect(mAgendaView, SIGNAL( toggleExpand() ), mMainView, SLOT( toggleExpand() ) ); connect( mAgendaView, SIGNAL( cloneIncidenceSignal(Incidence *) ), mMainView, SLOT(cloneIncidence(Incidence *) ) ) ; connect( mAgendaView, SIGNAL( cancelIncidenceSignal(Incidence *) ), mMainView, SLOT(cancelIncidence(Incidence *) ) ) ; connect(mMainView, SIGNAL(configChanged()), mAgendaView, SLOT(updateConfig())); connect( mMainView, SIGNAL( todoModified( Todo *, int )), mAgendaView, SLOT( updateTodo( Todo *, int ) ) ); connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), mMainView, SIGNAL( todoModified( Todo *, int ))); connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), mMainView, SLOT ( moveIncidence( Incidence * ) ) ); connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), mMainView, SLOT ( beamIncidence( Incidence * ) ) ); connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); mAgendaView->readSettings(); mAgendaView->updateConfig(); } showView( mAgendaView, full); } void KOViewManager::showDayView() { mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); mFlagShowNextxDays = false; globalFlagBlockLabel = 1; globalFlagBlockAgenda = 1; if ( mCurrentAgendaView != 1 ) mCurrentAgendaView = -1; showAgendaView(); qApp->processEvents(); globalFlagBlockAgenda = 2; globalFlagBlockLabel = 0; mMainView->dateNavigator()->selectDates( 1 ); mCurrentAgendaView = 1 ; } void KOViewManager::showWorkWeekView() { mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count(); mFlagShowNextxDays = false; globalFlagBlockAgenda = 1; globalFlagBlockLabel = 1; if ( mCurrentAgendaView != 5 ) |