summaryrefslogtreecommitdiffabout
path: root/korganizer/koviewmanager.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koviewmanager.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 3aa9b6c..2e5a943 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -308,24 +308,25 @@ void KOViewManager::showView(KOrg::BaseView *view, bool 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();
+ mMainView->updateUnmanagedViews();
}
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 );
@@ -388,24 +389,25 @@ void KOViewManager::updateWNview()
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;
+ KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW;
showView(mWhatsNextView, true );
//mWhatsNextView->updateView();
KOPrefs::instance()->mCurrentDisplayedView = VIEW_WN_VIEW;
}
void KOViewManager::slotprintWNV()
{
if (!mWhatsNextView)
showWhatsNextView();
emit printWNV();
}
@@ -434,24 +436,25 @@ void KOViewManager::showListView()
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 );
}
+ KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW;
showView(mListView, KOPrefs::instance()->mFullViewTodo);
//mFlagShowNextxDays = temp;
KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW;
}
void KOViewManager::showAgendaView( bool fullScreen )
{
mMainView->dialogManager()->hideSearchDialog();
// qDebug("KOViewManager::showAgendaView ");
bool full;
full = fullScreen;
@@ -501,24 +504,25 @@ void KOViewManager::showAgendaView( bool fullScreen )
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();
}
+ KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW;
showView( mAgendaView, full);
KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW;
}
void KOViewManager::showDayView()
{
mCurrentAgendaView = mMainView->dateNavigator()->selectedDates().count();
mFlagShowNextxDays = false;
globalFlagBlockLabel = 1;
globalFlagBlockAgenda = 1;
if ( mCurrentAgendaView != 1 )
mCurrentAgendaView = -1;
@@ -559,24 +563,25 @@ void KOViewManager::showWeekView()
mCurrentAgendaView = -1;
showAgendaView();
qApp->processEvents();
globalFlagBlockAgenda = 2;
globalFlagBlockLabel = 0;
mMainView->dateNavigator()->selectWeek();
mCurrentAgendaView = 7 ;
}
void KOViewManager::showNextXView()
{
+ KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW;
globalFlagBlockAgenda = 1;
if ( mCurrentAgendaView != 3 )
mCurrentAgendaView = -1;
showAgendaView(KOPrefs::instance()->mFullViewMonth);
globalFlagBlockAgenda = 2;
mMainView->dateNavigator()->selectDates( QDate::currentDate(),
KOPrefs::instance()->mNextXDays );
mFlagShowNextxDays = true;
mCurrentAgendaView = 3 ;
KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW;
}
bool KOViewManager::showsNextDays()
@@ -646,24 +651,25 @@ if (!mMonthView) {
connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) );
connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ),
mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) );
}
}
void KOViewManager::showMonthViewWeek()
{
createMonthView();
+ KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ;
globalFlagBlockAgenda = 1;
bool full = true;
if ( mCurrentView == mMonthView)
full = mMainView->leftFrame()->isVisible();
if ( !KOPrefs::instance()->mMonthViewWeek ) {
mMonthView->switchView();
if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() )
full = false;
else
full = true;
}
mMainView->dateNavigator()->selectWeek();
@@ -674,24 +680,25 @@ void KOViewManager::showMonthViewWeek()
void KOViewManager::showMonth( const QDate & date )
{
mMainView->dateNavigator()->blockSignals( true );
mMainView->dateNavigator()->selectDate( date );
mMainView->dateNavigator()->blockSignals( false );
showMonthView();
}
void KOViewManager::showMonthView()
{
createMonthView();
+ KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ;
globalFlagBlockAgenda = 1;
//mFlagShowNextxDays = false;
bool full = true;
if ( mCurrentView == mMonthView)
full = mMainView->leftFrame()->isVisible();
// if(mMonthView == mCurrentView) return;
if ( KOPrefs::instance()->mMonthViewWeek ) {
mMonthView->switchView();
if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() )
full = false;
else
full = true;
@@ -745,42 +752,44 @@ void KOViewManager::showTodoView()
mMainView, SLOT ( todo_unsub( Todo * ) ) );
connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
mMainView, SLOT ( todo_resub( Todo *, Todo *) ) );
connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ),
mMainView, SLOT ( moveIncidence( Incidence * ) ) );
connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ),
mMainView, SLOT ( beamIncidence( Incidence * ) ) );
KConfig *config = KOGlobals::config();
mTodoView->restoreLayout(config,"Todo View");
mTodoView->setNavigator( mMainView->dateNavigator() );
}
+ KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ;
globalFlagBlockAgenda = 1;
showView( mTodoView, true );
KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ;
}
void KOViewManager::showJournalView()
{
//mFlagShowNextxDays = false;
if (!mJournalView) {
mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(),
"KOViewManager::JournalView");
connect( mMainView, SIGNAL( configChanged() ), mJournalView,
SLOT( updateConfig() ) );
connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) );
addView(mJournalView);
}
+ KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ;
showView(mJournalView);
mMainView->dateNavigator()->selectDates( 1 );
KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ;
}
void KOViewManager::showTimeSpanView()
{
//mFlagShowNextxDays = false;
if (!mTimeSpanView) {
mTimeSpanView = new KOTimeSpanView(mMainView->calendar(),mMainView->viewStack(),
"KOViewManager::TimeSpanView");
addView(mTimeSpanView);