author | zautrix <zautrix> | 2005-03-26 21:33:09 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-26 21:33:09 (UTC) |
commit | 7177e62052b732f901eca6627825d0b38d8438be (patch) (unidiff) | |
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 | |||
@@ -761,8 +761,10 @@ void KOAgendaView::createDayLabels() | |||
761 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) | 761 | else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) ) |
762 | addString = i18n("Day after tomorrow"); | 762 | addString = i18n("Day after tomorrow"); |
763 | if ( !addString.isEmpty() ) { | 763 | if ( !addString.isEmpty() ) { |
764 | str = addString+", " + str; | 764 | str = addString+", " + str; |
765 | } else { | ||
766 | str = KGlobal::locale()->formatDate( date, KOPrefs::instance()->mShortDateInViewer); | ||
765 | } | 767 | } |
766 | } | 768 | } |
767 | dayLabel->setText(str); | 769 | dayLabel->setText(str); |
768 | //dayLabel->setAlignment(QLabel::AlignHCenter); | 770 | //dayLabel->setAlignment(QLabel::AlignHCenter); |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 31ee5e2..b5de4a1 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -197,9 +197,74 @@ void KOViewManager::writeSettings(KConfig *config) | |||
197 | if (mTodoView) { | 197 | if (mTodoView) { |
198 | mTodoView->saveLayout(config,"Todo View"); | 198 | mTodoView->saveLayout(config,"Todo View"); |
199 | } | 199 | } |
200 | } | 200 | } |
201 | void KOViewManager::showNextView() | ||
202 | { | ||
203 | if (mCurrentView == mWhatsNextView) goto NEXT_X; | ||
204 | |||
205 | if (mCurrentView == mAgendaView && mFlagShowNextxDays) goto LIST; | ||
206 | |||
207 | if (mCurrentView == mListView ) goto DAY_1; | ||
208 | |||
209 | if (mCurrentView == mAgendaView && mCurrentAgendaView == 1 ) goto DAY_5; | ||
210 | |||
211 | if (mCurrentView == mAgendaView && mCurrentAgendaView == 5 ) goto DAY_7; | ||
212 | |||
213 | if (mCurrentView == mAgendaView ) goto DAY_6; | ||
214 | |||
215 | if (mCurrentView == mMonthView && KOPrefs::instance()->mMonthViewWeek) goto MONTH; | ||
216 | |||
217 | if (mCurrentView == mMonthView ) goto TODO; | ||
218 | |||
219 | if (mCurrentView == mTodoView ) goto JOURNAL; | ||
220 | |||
221 | NEXT: | ||
222 | if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;} | ||
223 | NEXT_X: | ||
224 | if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;} | ||
225 | LIST: | ||
226 | if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;} | ||
227 | DAY_1: | ||
228 | if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;} | ||
229 | DAY_5: | ||
230 | if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;} | ||
231 | DAY_7: | ||
232 | if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;} | ||
233 | DAY_6: | ||
234 | if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} | ||
235 | MONTH: | ||
236 | if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} | ||
237 | TODO: | ||
238 | if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} | ||
239 | JOURNAL: | ||
240 | if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;} | ||
241 | |||
242 | |||
243 | |||
244 | if ( KOPrefs::instance()->mShowIconNext ) { showWhatsNextView();return ;} | ||
245 | |||
246 | if ( KOPrefs::instance()->mShowIconNextDays ) { showNextXView() ;return ;} | ||
247 | |||
248 | if ( KOPrefs::instance()->mShowIconList ) { showListView() ;return ;} | ||
249 | |||
250 | if ( KOPrefs::instance()->mShowIconDay1 ) { showDayView() ;return ;} | ||
201 | 251 | ||
252 | if ( KOPrefs::instance()->mShowIconDay5 ) { showWorkWeekView() ;return ;} | ||
253 | |||
254 | if ( KOPrefs::instance()->mShowIconDay7 ) { showWeekView();return ;} | ||
255 | |||
256 | if ( KOPrefs::instance()->mShowIconDay6 ) { showMonthViewWeek();return ;} | ||
257 | |||
258 | if ( KOPrefs::instance()->mShowIconMonth ) { showMonthView();return ;} | ||
259 | |||
260 | if ( KOPrefs::instance()->mShowIconTodoview ) { showTodoView() ;return ;} | ||
261 | |||
262 | if ( KOPrefs::instance()->mShowIconJournal ) { showJournalView() ;return ;} | ||
263 | |||
264 | |||
265 | |||
266 | } | ||
202 | void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | 267 | void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) |
203 | { | 268 | { |
204 | 269 | ||
205 | //mFlagShowNextxDays = false; | 270 | //mFlagShowNextxDays = false; |
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 6290227..d829f14 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -81,8 +81,9 @@ class KOViewManager : public QObject | |||
81 | void printWNV(); | 81 | void printWNV(); |
82 | void signalFullScreen( bool ); | 82 | void signalFullScreen( bool ); |
83 | void signalAgendaView( bool ); | 83 | void signalAgendaView( bool ); |
84 | public slots: | 84 | public slots: |
85 | void showNextView(); | ||
85 | void showMonth( const QDate & ); | 86 | void showMonth( const QDate & ); |
86 | void showDateView( int, QDate ); | 87 | void showDateView( int, QDate ); |
87 | void updateView(); | 88 | void updateView(); |
88 | void showWhatsNextView(); | 89 | void showWhatsNextView(); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 7d5cf72..b947cac 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -483,11 +483,14 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
483 | } | 483 | } |
484 | else if ( msg == "-showKO" ) { | 484 | else if ( msg == "-showKO" ) { |
485 | mView->viewManager()->showNextXView(); | 485 | mView->viewManager()->showNextXView(); |
486 | } | 486 | } |
487 | else if ( msg == "-showWNext" || msg == "nextView()" ) { | 487 | else if ( msg == "-showWNext" ) { |
488 | mView->viewManager()->showWhatsNextView(); | 488 | mView->viewManager()->showWhatsNextView(); |
489 | } | 489 | } |
490 | else if ( msg == "nextView()" ) { | ||
491 | mView->viewManager()->showNextView(); | ||
492 | } | ||
490 | else if ( msg == "-showNextXView" ) { | 493 | else if ( msg == "-showNextXView" ) { |
491 | mView->viewManager()->showNextXView(); | 494 | mView->viewManager()->showNextXView(); |
492 | } | 495 | } |
493 | 496 | ||