author | zautrix <zautrix> | 2005-03-26 21:33:09 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-26 21:33:09 (UTC) |
commit | 7177e62052b732f901eca6627825d0b38d8438be (patch) (side-by-side diff) | |
tree | 9c6531a24e57221db445841610eaed7350ddc21f /korganizer | |
parent | a24f954912ee2dbb76dcbde1abc9f20b06abbf93 (diff) | |
download | kdepimpi-7177e62052b732f901eca6627825d0b38d8438be.zip kdepimpi-7177e62052b732f901eca6627825d0b38d8438be.tar.gz kdepimpi-7177e62052b732f901eca6627825d0b38d8438be.tar.bz2 |
next view
-rw-r--r-- | korganizer/koagendaview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 65 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 1 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 5 |
4 files changed, 72 insertions, 1 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index a32333c..fa6b951 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -757,16 +757,18 @@ void KOAgendaView::createDayLabels() else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) ) addString = i18n("Yesterday"); else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) ) addString = i18n("Day before yesterday"); else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) addString = i18n("Day after tomorrow"); if ( !addString.isEmpty() ) { str = addString+", " + str; + } else { + str = KGlobal::locale()->formatDate( date, KOPrefs::instance()->mShortDateInViewer); } } dayLabel->setText(str); //dayLabel->setAlignment(QLabel::AlignHCenter); if (date == QDate::currentDate()) { QFont bFont = dlf; bFont.setBold( true ); dayLabel->setFont(bFont); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 31ee5e2..b5de4a1 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -193,17 +193,82 @@ void KOViewManager::writeSettings(KConfig *config) } if (mListView) { mListView->writeSettings(config); } if (mTodoView) { mTodoView->saveLayout(config,"Todo View"); } } +void KOViewManager::showNextView() +{ + if (mCurrentView == mWhatsNextView) goto NEXT_X; + + if (mCurrentView == mAgendaView && mFlagShowNextxDays) goto LIST; + + if (mCurrentView == mListView ) goto DAY_1; + + if (mCurrentView == mAgendaView && mCurrentAgendaView == 1 ) goto DAY_5; + + if (mCurrentView == mAgendaView && mCurrentAgendaView == 5 ) goto DAY_7; + + if (mCurrentView == mAgendaView ) goto DAY_6; + + if (mCurrentView == mMonthView && KOPrefs::instance()->mMonthViewWeek) goto MONTH; + + if (mCurrentView == mMonthView ) goto TODO; + + if (mCurrentView == mTodoView ) goto JOURNAL; + + NEXT: + if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;} + NEXT_X: + if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;} + LIST: + if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;} + DAY_1: + if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;} + DAY_5: + if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;} + DAY_7: + if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;} + DAY_6: + if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} + MONTH: + if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} + TODO: + if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} + JOURNAL: + if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;} + + + + if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;} + if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;} + + if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;} + + if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;} + + if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;} + + if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;} + + if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} + + if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} + + if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} + + if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;} + + + +} void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) { //mFlagShowNextxDays = false; //if(view == mCurrentView) return; if ( view == 0 ) { view = mCurrentView; if ( view == 0 ) diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 6290227..d829f14 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h @@ -77,16 +77,17 @@ class KOViewManager : public QObject KOAgendaView *agendaView() const { return mAgendaView; } signals: void printWNV(); void signalFullScreen( bool ); void signalAgendaView( bool ); public slots: + void showNextView(); void showMonth( const QDate & ); void showDateView( int, QDate ); void updateView(); void showWhatsNextView(); void showListView(); void showAgendaView( bool fullScreen = false ); void showDayView(); void showWorkWeekView(); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 7d5cf72..b947cac 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -479,19 +479,22 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) else if ( msg == "-showJournal" ) { mView->dateNavigator()->selectDates( 1 ); mView->dateNavigator()->selectToday(); mView->viewManager()->showJournalView(); } else if ( msg == "-showKO" ) { mView->viewManager()->showNextXView(); } - else if ( msg == "-showWNext" || msg == "nextView()" ) { + else if ( msg == "-showWNext" ) { mView->viewManager()->showWhatsNextView(); } + else if ( msg == "nextView()" ) { + mView->viewManager()->showNextView(); + } else if ( msg == "-showNextXView" ) { mView->viewManager()->showNextXView(); } } showMaximized(); |