summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/datenavigator.cpp15
-rw-r--r--korganizer/datenavigator.h3
-rw-r--r--korganizer/komonthview.cpp4
-rw-r--r--korganizer/komonthview.h3
-rw-r--r--korganizer/koprefs.cpp1
-rw-r--r--korganizer/koprefs.h1
-rw-r--r--korganizer/koviewmanager.cpp50
-rw-r--r--korganizer/koviewmanager.h2
-rw-r--r--korganizer/mainwindow.cpp12
-rw-r--r--korganizer/navigatorbar.cpp22
-rw-r--r--korganizer/navigatorbar.h4
11 files changed, 110 insertions, 7 deletions
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp
index 8b7c993..b0eac51 100644
--- a/korganizer/datenavigator.cpp
+++ b/korganizer/datenavigator.cpp
@@ -85,2 +85,8 @@ void DateNavigator::selectMonth()
85} 85}
86void DateNavigator::selectMonthFromMonthview()
87{
88
89 QDate date =mSelectedDates.first().addDays( 7 );
90 selectMonthByDate( date );
91}
86 92
@@ -260,2 +266,11 @@ void DateNavigator::selectNextMonth()
260} 266}
267void DateNavigator::selectPreviousWeek()
268{
269 selectDates( mSelectedDates.first().addDays( -7 ), datesCount() );
270}
271
272void DateNavigator::selectNextWeek()
273{
274 selectDates( mSelectedDates.first().addDays( 7 ), datesCount() );
275}
261 276
diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h
index 4265e84..9742d41 100644
--- a/korganizer/datenavigator.h
+++ b/korganizer/datenavigator.h
@@ -69,2 +69,4 @@ class DateNavigator : public QObject
69 void selectNextMonth(); 69 void selectNextMonth();
70 void selectPreviousWeek();
71 void selectNextWeek();
70 void selectNextYear(); 72 void selectNextYear();
@@ -72,2 +74,3 @@ class DateNavigator : public QObject
72 void selectMonth(); 74 void selectMonth();
75 void selectMonthFromMonthview();
73 void selectMonthByDate( const QDate & ); 76 void selectMonthByDate( const QDate & );
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index d0380e3..f9bc1ca 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -952,2 +952,5 @@ void KOMonthView::selectInternalWeekNum ( int n )
952 switchView(); 952 switchView();
953 if ( !KOPrefs::instance()->mMonthViewWeek )
954 emit selectMonth ();
955 else
953 emit selectWeekNum ( n ); 956 emit selectWeekNum ( n );
@@ -963,3 +966,2 @@ void KOMonthView::switchView()
963{ 966{
964
965 if ( selectedCell( ) ) 967 if ( selectedCell( ) )
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 03f9dc6..2f6f5dc 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -245,2 +245,3 @@ class KOMonthView: public KOEventView
245 void setSelectedCell( MonthViewCell * ); 245 void setSelectedCell( MonthViewCell * );
246 void switchView();
246 247
@@ -248,3 +249,2 @@ class KOMonthView: public KOEventView
248 void selectInternalWeekNum ( int ); 249 void selectInternalWeekNum ( int );
249 void switchView();
250 void processSelectionChange(); 250 void processSelectionChange();
@@ -254,2 +254,3 @@ class KOMonthView: public KOEventView
254 void selectWeekNum ( int ); 254 void selectWeekNum ( int );
255 void selectMonth ();
255 void showDaySignal( QDate ); 256 void showDaySignal( QDate );
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 7efb6a6..5efc247 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -77,2 +77,3 @@ KOPrefs::KOPrefs() :
77 addItemBool("ShowIconDay5",&mShowIconDay5,true); 77 addItemBool("ShowIconDay5",&mShowIconDay5,true);
78 addItemBool("ShowIconDay6",&mShowIconDay6,true);
78 addItemBool("ShowIconDay7",&mShowIconDay7,true); 79 addItemBool("ShowIconDay7",&mShowIconDay7,true);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index fa69d52..e300067 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -173,2 +173,3 @@ class KOPrefs : public KPimPrefs
173 bool mShowIconDay5; 173 bool mShowIconDay5;
174 bool mShowIconDay6;
174 bool mShowIconDay7; 175 bool mShowIconDay7;
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index f8f6c1d..e22f096 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -90,3 +90,8 @@ void KOViewManager::readSettings(KConfig *config)
90 if (view == "WhatsNext") showWhatsNextView(); 90 if (view == "WhatsNext") showWhatsNextView();
91 else if (view == "Month") showMonthView(); 91 else if (view == "Month") {
92 if ( KOPrefs::instance()->mMonthViewWeek )
93 showMonthView();
94 else
95 showMonthViewWeek();
96 }
92 else if (view == "List") showListView(); 97 else if (view == "List") showListView();
@@ -209,2 +214,3 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
209 return; 214 return;
215 if ( view != mMonthView )
210 full = mMainView->leftFrame()->isVisible(); 216 full = mMainView->leftFrame()->isVisible();
@@ -488,3 +494,3 @@ bool KOViewManager::showsNextDays()
488} 494}
489void KOViewManager::showMonthView() 495void KOViewManager::createMonthView()
490 { 496 {
@@ -519,2 +525,4 @@ void KOViewManager::showMonthView()
519 mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) ); 525 mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) );
526 connect( mMonthView, SIGNAL( selectMonth() ),
527 mMainView->dateNavigator(), SLOT ( selectMonthFromMonthview() ) );
520 connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), 528 connect( mMonthView, SIGNAL( showDaySignal( QDate ) ),
@@ -534,2 +542,6 @@ void KOViewManager::showMonthView()
534 mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); 542 mMainView->dateNavigator(), SLOT( selectNextMonth() ) );
543 connect( mMonthView->navigatorBar(), SIGNAL( goPrevWeek() ),
544 mMainView->dateNavigator(), SLOT( selectPreviousWeek() ) );
545 connect( mMonthView->navigatorBar(), SIGNAL( goNextWeek() ),
546 mMainView->dateNavigator(), SLOT( selectNextWeek() ) );
535 547
@@ -543,12 +555,40 @@ void KOViewManager::showMonthView()
543 } 555 }
556}
557void KOViewManager::showMonthViewWeek()
558{
559 createMonthView();
560 bool full = true;
561 if ( mCurrentView == mMonthView)
562 full = mMainView->leftFrame()->isVisible();
563 if ( !KOPrefs::instance()->mMonthViewWeek ) {
564 mMonthView->switchView();
565 if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() )
566 full = false;
567 else
568 full = true;
569 }
570 mMainView->dateNavigator()->selectWeek();
571 showView(mMonthView, full );
572}
573
574void KOViewManager::showMonthView()
575 {
544 576
577 createMonthView();
545 globalFlagBlockAgenda = 1; 578 globalFlagBlockAgenda = 1;
546 //mFlagShowNextxDays = false; 579 //mFlagShowNextxDays = false;
580 bool full = true;
581 if ( mCurrentView == mMonthView)
582 full = mMainView->leftFrame()->isVisible();
547 // if(mMonthView == mCurrentView) return; 583 // if(mMonthView == mCurrentView) return;
548 if ( KOPrefs::instance()->mMonthViewWeek ) 584 if ( KOPrefs::instance()->mMonthViewWeek ) {
549 mMainView->dateNavigator()->selectWeek(); 585 mMonthView->switchView();
586 if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() )
587 full = false;
550 else 588 else
589 full = true;
590 }
551 mMainView->dateNavigator()->selectMonth(); 591 mMainView->dateNavigator()->selectMonth();
552 592
553 showView(mMonthView, true ); 593 showView(mMonthView, full );
554 594
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 66ab138..8f0bf82 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -94,2 +94,3 @@ class KOViewManager : public QObject
94 void showMonthView(); 94 void showMonthView();
95 void showMonthViewWeek();
95 void showTodoView(); 96 void showTodoView();
@@ -99,2 +100,3 @@ class KOViewManager : public QObject
99 private: 100 private:
101 void createMonthView();
100 CalendarView *mMainView; 102 CalendarView *mMainView;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index ab0e4d6..16031b8 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -715,2 +715,9 @@ void MainWindow::initActions()
715 715
716 icon = loadPixmap( pathString + "workweek2" );
717 configureToolBarMenu->insertItem(icon, i18n("List week view"), 75 );
718 QAction* day6_action = new QAction( i18n("List week"), icon, i18n("List week"), 0, this );
719 day6_action->addTo( viewMenu );
720 connect( day6_action, SIGNAL( activated() ),
721 mView->viewManager(), SLOT( showMonthViewWeek() ) );
722
716 icon = loadPixmap( pathString + "todo" ); 723 icon = loadPixmap( pathString + "todo" );
@@ -997,2 +1004,4 @@ void MainWindow::initActions()
997 month_action->addTo( iconToolBar ); 1004 month_action->addTo( iconToolBar );
1005 if (p-> mShowIconDay6)
1006 day6_action->addTo( iconToolBar );
998 if (p-> mShowIconTodoview) 1007 if (p-> mShowIconTodoview)
@@ -1053,2 +1062,4 @@ void MainWindow::initActions()
1053 configureToolBarMenu->setItemChecked( 50, true ); 1062 configureToolBarMenu->setItemChecked( 50, true );
1063 if (p-> mShowIconDay6)
1064 configureToolBarMenu->setItemChecked( 75, true );
1054 if (p-> mShowIconDay7) 1065 if (p-> mShowIconDay7)
@@ -1801,2 +1812,3 @@ void MainWindow::configureToolBar( int item )
1801 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); 1812 p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 );
1813 p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 );
1802 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); 1814 p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 );
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index b591232..934e153 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -91,2 +91,11 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
91 91
92 mPrevWeek = new QPushButton( mCtrlFrame );
93 mPrevWeek->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") );
94 QToolTip::add( mPrevWeek, i18n("Previous Week") );
95
96 // Create forward navigation buttons
97 mNextWeek = new QPushButton( mCtrlFrame );
98 mNextWeek->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") );
99 QToolTip::add( mNextWeek, i18n("Next Week") );
100
92 mNextYear = new QPushButton( mCtrlFrame ); 101 mNextYear = new QPushButton( mCtrlFrame );
@@ -103,2 +112,3 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
103 mNextMonth->setFlat( true); 112 mNextMonth->setFlat( true);
113 mNextWeek->setFlat( true);
104 mNextYear->setFlat( true); 114 mNextYear->setFlat( true);
@@ -107,2 +117,6 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
107 mPrevMonth->setFlat( true); 117 mPrevMonth->setFlat( true);
118 mPrevWeek->setFlat( true);
119 } else {
120 mPrevWeek->hide();
121 mNextWeek->hide();
108 } 122 }
@@ -132,3 +146,5 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
132 mPrevMonth->setFixedHeight( size ); 146 mPrevMonth->setFixedHeight( size );
147 mPrevWeek->setFixedHeight( size );
133 mNextMonth->setFixedHeight( size ); 148 mNextMonth->setFixedHeight( size );
149 mNextWeek->setFixedHeight( size );
134 mNextYear->setFixedHeight ( size ); 150 mNextYear->setFixedHeight ( size );
@@ -138,2 +154,3 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
138 ctrlLayout->addWidget( mPrevMonth, 3 ); 154 ctrlLayout->addWidget( mPrevMonth, 3 );
155 ctrlLayout->addWidget( mPrevWeek, 3 );
139 //ctrlLayout->addStretch( 1 ); 156 //ctrlLayout->addStretch( 1 );
@@ -144,2 +161,3 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
144 // ctrlLayout->addStretch( 1 ); 161 // ctrlLayout->addStretch( 1 );
162 ctrlLayout->addWidget( mNextWeek, 3 );
145 ctrlLayout->addWidget( mNextMonth, 3 ); 163 ctrlLayout->addWidget( mNextMonth, 3 );
@@ -150,2 +168,4 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
150 connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) ); 168 connect( mNextMonth, SIGNAL( clicked() ), SIGNAL( goNextMonth() ) );
169 connect( mPrevWeek, SIGNAL( clicked() ), SIGNAL( goPrevWeek() ) );
170 connect( mNextWeek, SIGNAL( clicked() ), SIGNAL( goNextWeek() ) );
151 connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) ); 171 connect( mNextYear, SIGNAL( clicked() ), SIGNAL( goNextYear() ) );
@@ -155,2 +175,4 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
155 mNextMonth->setFocusPolicy(NoFocus); 175 mNextMonth->setFocusPolicy(NoFocus);
176 mPrevWeek->setFocusPolicy(NoFocus);
177 mNextWeek->setFocusPolicy(NoFocus);
156 mNextYear->setFocusPolicy(NoFocus); 178 mNextYear->setFocusPolicy(NoFocus);
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index 93240a6..803c817 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -48,2 +48,4 @@ class NavigatorBar: public QWidget
48 void goPrevMonth(); 48 void goPrevMonth();
49 void goNextWeek();
50 void goPrevWeek();
49 void goNextYear(); 51 void goNextYear();
@@ -58,2 +60,4 @@ class NavigatorBar: public QWidget
58 QPushButton *mNextMonth; 60 QPushButton *mNextMonth;
61 QPushButton *mPrevWeek;
62 QPushButton *mNextWeek;
59 QPushButton *mNextYear; 63 QPushButton *mNextYear;