summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt2
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-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
13 files changed, 114 insertions, 9 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index a3ea5ee..3d8edfc 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,18 +1,20 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.0.8 ************ 3********** VERSION 2.0.8 ************
4 4
5Fixed a problem in dependency info in the ipk files for the Zaurus. 5Fixed a problem in dependency info in the ipk files for the Zaurus.
6 6
7Added icon for the stealth new week view and made navigation more user friendly in monthview by adding a prev/next week button to the navigator bar.
8
7 9
8********** VERSION 2.0.7 ************ 10********** VERSION 2.0.7 ************
9 11
10Added global application font settings 12Added global application font settings
11(for all KDE-Pim/Pi apps) to the general settings. 13(for all KDE-Pim/Pi apps) to the general settings.
12 14
13Fixed a problem in OM/Pi when trying to login to some IMAP servers 15Fixed a problem in OM/Pi when trying to login to some IMAP servers
14(like the IMAP server of Apple: mail.mac.com ) 16(like the IMAP server of Apple: mail.mac.com )
15 17
16Added recurring todos to KO/Pi. 18Added recurring todos to KO/Pi.
17 19
18 20
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 2d4cb74..5f1bee4 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1262,23 +1262,23 @@
1262{ "Waiting for synced file...","Warte auf gesyncte Daten..." }, 1262{ "Waiting for synced file...","Warte auf gesyncte Daten..." },
1263{ "Receiving synced file...","Gesyncte Daten erhalten..." }, 1263{ "Receiving synced file...","Gesyncte Daten erhalten..." },
1264{ "Received %1 bytes","%1 Bytes erhalten" }, 1264{ "Received %1 bytes","%1 Bytes erhalten" },
1265{ "Writing file to disk...","Speichere Datei..." }, 1265{ "Writing file to disk...","Speichere Datei..." },
1266{ "Pi-Sync successful!","Pi-Sync erfolgreich!" }, 1266{ "Pi-Sync successful!","Pi-Sync erfolgreich!" },
1267{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" }, 1267{ "Clock skew of\nsyncing devices\nis %1 seconds!","Uhrzeitunterschied der\nsyncenden Geräte\nist %1 Sekunden!" },
1268{ "Synchronize!","Synchronisiere!" }, 1268{ "Synchronize!","Synchronisiere!" },
1269{ "High clock skew!","Großer Uhrzeitunterschied!" }, 1269{ "High clock skew!","Großer Uhrzeitunterschied!" },
1270{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" }, 1270{ "ADJUST\nYOUR\nCLOCKS!","JUSTIERE\nDIE\nUHREN!" },
1271{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" }, 1271{ "The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!","Die Uhren der syncenden Geräte\nhaben einen Unterschied von\nmehr als 5 Minuten. Bitte die\nUhrzeiten anpassen. Sie können\nfalsche Sync-Resultate erhalten!\nBitte das Syncen bestätigen!" },
1272{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." }, 1272{ "This is a %1 recurring todo.","Das ist eine %1 wiederholende Aufgabe." },
1273{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" }, 1273{ "<p><b>Start on:</b> %1</p>","<p><b>Start am:</b> %1</p>" },
1274{ "","" }, 1274{ "List week view","Listenwochenansicht" },
1275{ "","" }, 1275{ "List week","Listenwochenansicht" },
1276{ "","" }, 1276{ "","" },
1277{ "","" }, 1277{ "","" },
1278{ "","" }, 1278{ "","" },
1279{ "","" }, 1279{ "","" },
1280{ "","" }, 1280{ "","" },
1281{ "","" }, 1281{ "","" },
1282{ "","" }, 1282{ "","" },
1283{ "","" }, 1283{ "","" },
1284{ "","" }, \ No newline at end of file 1284{ "","" }, \ No newline at end of file
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp
index 8b7c993..b0eac51 100644
--- a/korganizer/datenavigator.cpp
+++ b/korganizer/datenavigator.cpp
@@ -74,24 +74,30 @@ void DateNavigator::selectMonthByDate( const QDate & firstSelected )
74 74
75 int monthDay = firstSelected.day(); 75 int monthDay = firstSelected.day();
76 QDate date = firstSelected.addDays( 1-monthDay ); 76 QDate date = firstSelected.addDays( 1-monthDay );
77 selectDates( date , date.daysInMonth ()); 77 selectDates( date , date.daysInMonth ());
78 78
79} 79}
80void DateNavigator::selectMonth() 80void DateNavigator::selectMonth()
81{ 81{
82 82
83 QDate date =mSelectedDates.first(); 83 QDate date =mSelectedDates.first();
84 selectMonthByDate( date ); 84 selectMonthByDate( date );
85} 85}
86void DateNavigator::selectMonthFromMonthview()
87{
88
89 QDate date =mSelectedDates.first().addDays( 7 );
90 selectMonthByDate( date );
91}
86 92
87DateList DateNavigator::selectedDates() 93DateList DateNavigator::selectedDates()
88{ 94{
89 return mSelectedDates; 95 return mSelectedDates;
90} 96}
91 97
92int DateNavigator::datesCount() const 98int DateNavigator::datesCount() const
93{ 99{
94 return mSelectedDates.count(); 100 return mSelectedDates.count();
95} 101}
96 102
97void DateNavigator::selectDates( const DateList& dateList ) 103void DateNavigator::selectDates( const DateList& dateList )
@@ -249,24 +255,33 @@ void DateNavigator::selectNextMonth()
249{ 255{
250 QDate firstSelected = mSelectedDates.first(); 256 QDate firstSelected = mSelectedDates.first();
251 int weekDay = firstSelected.dayOfWeek(); 257 int weekDay = firstSelected.dayOfWeek();
252 258
253 firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 ); 259 firstSelected = KOGlobals::self()->calendarSystem()->addMonths( firstSelected, 1 );
254 260
255 if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 ) 261 if ( mSelectedDates.first().day() == 1 && mSelectedDates.count() > 27 )
256 selectMonthByDate( firstSelected ); 262 selectMonthByDate( firstSelected );
257 else 263 else
258 selectWeekByDay( weekDay, firstSelected ); 264 selectWeekByDay( weekDay, firstSelected );
259 265
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
262void DateNavigator::selectNextYear() 277void DateNavigator::selectNextYear()
263{ 278{
264 QDate firstSelected = mSelectedDates.first(); 279 QDate firstSelected = mSelectedDates.first();
265 int weekDay = firstSelected.dayOfWeek(); 280 int weekDay = firstSelected.dayOfWeek();
266 firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, 1 ); 281 firstSelected = KOGlobals::self()->calendarSystem()->addYears( firstSelected, 1 );
267 282
268 selectWeekByDay( weekDay, firstSelected ); 283 selectWeekByDay( weekDay, firstSelected );
269} 284}
270 285
271void DateNavigator::selectPrevious() 286void DateNavigator::selectPrevious()
272{ 287{
diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h
index 4265e84..9742d41 100644
--- a/korganizer/datenavigator.h
+++ b/korganizer/datenavigator.h
@@ -58,27 +58,30 @@ class DateNavigator : public QObject
58 58
59 void selectWorkWeek(); 59 void selectWorkWeek();
60 void selectWorkWeek( const QDate & ); 60 void selectWorkWeek( const QDate & );
61 61
62 void selectWeekByDay( int weekDay, const QDate & ); 62 void selectWeekByDay( int weekDay, const QDate & );
63 63
64 void selectToday(); 64 void selectToday();
65 void selectTodayMonth(); 65 void selectTodayMonth();
66 66
67 void selectPreviousYear(); 67 void selectPreviousYear();
68 void selectPreviousMonth(); 68 void selectPreviousMonth();
69 void selectNextMonth(); 69 void selectNextMonth();
70 void selectPreviousWeek();
71 void selectNextWeek();
70 void selectNextYear(); 72 void selectNextYear();
71 73
72 void selectMonth(); 74 void selectMonth();
75 void selectMonthFromMonthview();
73 void selectMonthByDate( const QDate & ); 76 void selectMonthByDate( const QDate & );
74 77
75 void selectPrevious(); 78 void selectPrevious();
76 void selectNext(); 79 void selectNext();
77 void slotMonthSelect( int ); 80 void slotMonthSelect( int );
78 void slotDaySelect( QDate d ); 81 void slotDaySelect( QDate d );
79 82
80 signals: 83 signals:
81 void datesSelected( const KCal::DateList & ); 84 void datesSelected( const KCal::DateList & );
82 85
83 protected: 86 protected:
84 void emitSelected(); 87 void emitSelected();
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index d0380e3..f9bc1ca 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -941,36 +941,38 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
941 else 941 else
942 mWidStack->raiseWidget( mMonthView ); 942 mWidStack->raiseWidget( mMonthView );
943} 943}
944 944
945KOMonthView::~KOMonthView() 945KOMonthView::~KOMonthView()
946{ 946{
947 delete mContextMenu; 947 delete mContextMenu;
948} 948}
949 949
950void KOMonthView::selectInternalWeekNum ( int n ) 950void KOMonthView::selectInternalWeekNum ( int n )
951{ 951{
952 switchView(); 952 switchView();
953 if ( !KOPrefs::instance()->mMonthViewWeek )
954 emit selectMonth ();
955 else
953 emit selectWeekNum ( n ); 956 emit selectWeekNum ( n );
954} 957}
955 958
956int KOMonthView::currentWeek() 959int KOMonthView::currentWeek()
957{ 960{
958 if ( mShowWeekView ) 961 if ( mShowWeekView )
959 return mWeekLabelsW[0]->getWeekNum(); 962 return mWeekLabelsW[0]->getWeekNum();
960 return mWeekLabels[0]->getWeekNum(); 963 return mWeekLabels[0]->getWeekNum();
961} 964}
962void KOMonthView::switchView() 965void KOMonthView::switchView()
963{ 966{
964
965 if ( selectedCell( ) ) 967 if ( selectedCell( ) )
966 selectedCell()->deselect(); 968 selectedCell()->deselect();
967 mShowWeekView = !mShowWeekView; 969 mShowWeekView = !mShowWeekView;
968 KOPrefs::instance()->mMonthViewWeek = mShowWeekView; 970 KOPrefs::instance()->mMonthViewWeek = mShowWeekView;
969 if ( clPending ) { 971 if ( clPending ) {
970 computeLayout(); 972 computeLayout();
971 updateConfig(); 973 updateConfig();
972 } 974 }
973 if ( mShowWeekView ) 975 if ( mShowWeekView )
974 mWidStack->raiseWidget( mWeekView ); 976 mWidStack->raiseWidget( mWeekView );
975 else 977 else
976 mWidStack->raiseWidget( mMonthView ); 978 mWidStack->raiseWidget( mMonthView );
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 03f9dc6..2f6f5dc 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -234,33 +234,34 @@ class KOMonthView: public KOEventView
234 virtual void updateView(); 234 virtual void updateView();
235 virtual void updateConfig(); 235 virtual void updateConfig();
236 virtual void showDates(const QDate &start, const QDate &end); 236 virtual void showDates(const QDate &start, const QDate &end);
237 virtual void showEvents(QPtrList<Event> eventList); 237 virtual void showEvents(QPtrList<Event> eventList);
238 238
239 void changeEventDisplay(Event *, int); 239 void changeEventDisplay(Event *, int);
240 240
241 void clearSelection(); 241 void clearSelection();
242 242
243 void showContextMenu( Incidence * ); 243 void showContextMenu( Incidence * );
244 244
245 void setSelectedCell( MonthViewCell * ); 245 void setSelectedCell( MonthViewCell * );
246 void switchView();
246 247
247 protected slots: 248 protected slots:
248 void selectInternalWeekNum ( int ); 249 void selectInternalWeekNum ( int );
249 void switchView();
250 void processSelectionChange(); 250 void processSelectionChange();
251 signals: 251 signals:
252 void nextMonth(); 252 void nextMonth();
253 void prevMonth(); 253 void prevMonth();
254 void selectWeekNum ( int ); 254 void selectWeekNum ( int );
255 void selectMonth ();
255 void showDaySignal( QDate ); 256 void showDaySignal( QDate );
256 protected: 257 protected:
257 void resizeEvent(QResizeEvent *); 258 void resizeEvent(QResizeEvent *);
258 void viewChanged(); 259 void viewChanged();
259 void updateDayLabels(); 260 void updateDayLabels();
260 261
261 private: 262 private:
262 NavigatorBar* mNavigatorBar; 263 NavigatorBar* mNavigatorBar;
263 int currentWeek(); 264 int currentWeek();
264 bool clPending; 265 bool clPending;
265 QWidgetStack * mWidStack; 266 QWidgetStack * mWidStack;
266 QWidget* mMonthView; 267 QWidget* mMonthView;
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 7efb6a6..5efc247 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -66,24 +66,25 @@ KOPrefs::KOPrefs() :
66 66
67 KPrefs::setCurrentGroup("General"); 67 KPrefs::setCurrentGroup("General");
68 68
69 69
70 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 70 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
71 71
72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); 72 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true);
73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); 73 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true);
74 addItemBool("ShowIconSearch",&mShowIconSearch,true); 74 addItemBool("ShowIconSearch",&mShowIconSearch,true);
75 addItemBool("ShowIconList",&mShowIconList,true); 75 addItemBool("ShowIconList",&mShowIconList,true);
76 addItemBool("ShowIconDay1",&mShowIconDay1,true); 76 addItemBool("ShowIconDay1",&mShowIconDay1,true);
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);
79 addItemBool("ShowIconMonth",&mShowIconMonth,true); 80 addItemBool("ShowIconMonth",&mShowIconMonth,true);
80 addItemBool("ShowIconTodoview",&mShowIconTodoview,true); 81 addItemBool("ShowIconTodoview",&mShowIconTodoview,true);
81 addItemBool("ShowIconBackFast",&mShowIconBackFast,true); 82 addItemBool("ShowIconBackFast",&mShowIconBackFast,true);
82 addItemBool("ShowIconBack",&mShowIconBack,true); 83 addItemBool("ShowIconBack",&mShowIconBack,true);
83 addItemBool("ShowIconToday",&mShowIconToday,true); 84 addItemBool("ShowIconToday",&mShowIconToday,true);
84 addItemBool("ShowIconForward",&mShowIconForward,true); 85 addItemBool("ShowIconForward",&mShowIconForward,true);
85 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); 86 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true);
86 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); 87 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true);
87 addItemBool("ShowIconNextDays",&mShowIconNextDays,true); 88 addItemBool("ShowIconNextDays",&mShowIconNextDays,true);
88 addItemBool("ShowIconNext",&mShowIconNext,true); 89 addItemBool("ShowIconNext",&mShowIconNext,true);
89 addItemBool("ShowIconJournal",&mShowIconJournal,true); 90 addItemBool("ShowIconJournal",&mShowIconJournal,true);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index fa69d52..e300067 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -162,24 +162,25 @@ class KOPrefs : public KPimPrefs
162 int mWhatsNextPrios; 162 int mWhatsNextPrios;
163 bool mEnableQuickTodo; 163 bool mEnableQuickTodo;
164 164
165 bool mCompactDialogs; 165 bool mCompactDialogs;
166 bool mVerticalScreen; 166 bool mVerticalScreen;
167 167
168 bool mShowIconNewTodo; 168 bool mShowIconNewTodo;
169 bool mShowIconNewEvent; 169 bool mShowIconNewEvent;
170 bool mShowIconSearch; 170 bool mShowIconSearch;
171 bool mShowIconList; 171 bool mShowIconList;
172 bool mShowIconDay1; 172 bool mShowIconDay1;
173 bool mShowIconDay5; 173 bool mShowIconDay5;
174 bool mShowIconDay6;
174 bool mShowIconDay7; 175 bool mShowIconDay7;
175 bool mShowIconMonth; 176 bool mShowIconMonth;
176 bool mShowIconTodoview; 177 bool mShowIconTodoview;
177 bool mShowIconBackFast; 178 bool mShowIconBackFast;
178 bool mShowIconBack; 179 bool mShowIconBack;
179 bool mShowIconToday; 180 bool mShowIconToday;
180 bool mShowIconForward; 181 bool mShowIconForward;
181 bool mShowIconForwardFast; 182 bool mShowIconForwardFast;
182 bool mShowIconWhatsThis; 183 bool mShowIconWhatsThis;
183 bool mShowIconNextDays; 184 bool mShowIconNextDays;
184 bool mShowIconNext; 185 bool mShowIconNext;
185 bool mShowIconJournal; 186 bool mShowIconJournal;
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index f8f6c1d..e22f096 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -79,25 +79,30 @@ KOViewManager::~KOViewManager()
79 79
80 80
81KOrg::BaseView *KOViewManager::currentView() 81KOrg::BaseView *KOViewManager::currentView()
82{ 82{
83 return mCurrentView; 83 return mCurrentView;
84} 84}
85 85
86void KOViewManager::readSettings(KConfig *config) 86void KOViewManager::readSettings(KConfig *config)
87{ 87{
88 config->setGroup("General"); 88 config->setGroup("General");
89 QString view = config->readEntry("Current View"); 89 QString view = config->readEntry("Current View");
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();
93 else if (view == "Journal") showJournalView(); 98 else if (view == "Journal") showJournalView();
94 else if (view == "TimeSpan") showTimeSpanView(); 99 else if (view == "TimeSpan") showTimeSpanView();
95 else if (view == "Todo") showTodoView(); 100 else if (view == "Todo") showTodoView();
96 else { 101 else {
97 config->setGroup( "Views" ); 102 config->setGroup( "Views" );
98 int dateCount = config->readNumEntry( "ShownDatesCount", 7 ); 103 int dateCount = config->readNumEntry( "ShownDatesCount", 7 );
99 mCurrentAgendaView = dateCount; 104 mCurrentAgendaView = dateCount;
100 showAgendaView(); 105 showAgendaView();
101 mCurrentAgendaView = dateCount; 106 mCurrentAgendaView = dateCount;
102#ifdef DESKTOP_VERSION 107#ifdef DESKTOP_VERSION
103 QTimer::singleShot( 1000, mAgendaView, SLOT ( setInitStartHour() ) ); 108 QTimer::singleShot( 1000, mAgendaView, SLOT ( setInitStartHour() ) );
@@ -198,24 +203,25 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
198 203
199 //mFlagShowNextxDays = false; 204 //mFlagShowNextxDays = false;
200 //if(view == mCurrentView) return; 205 //if(view == mCurrentView) return;
201 if ( view == 0 ) { 206 if ( view == 0 ) {
202 view = mCurrentView; 207 view = mCurrentView;
203 if ( view == 0 ) 208 if ( view == 0 )
204 return; 209 return;
205 } 210 }
206 bool full = fullScreen; 211 bool full = fullScreen;
207 if(view == mCurrentView && view != mWhatsNextView ) { 212 if(view == mCurrentView && view != mWhatsNextView ) {
208 if ( mCurrentAgendaView < 0 ) 213 if ( mCurrentAgendaView < 0 )
209 return; 214 return;
215 if ( view != mMonthView )
210 full = mMainView->leftFrame()->isVisible(); 216 full = mMainView->leftFrame()->isVisible();
211 } else { 217 } else {
212 if ( view == mMonthView && mMonthView) 218 if ( view == mMonthView && mMonthView)
213 ;//mMonthView->skipResize = true ; 219 ;//mMonthView->skipResize = true ;
214 mCurrentView = view; 220 mCurrentView = view;
215 // bool full = fullScreen; 221 // bool full = fullScreen;
216 bool isFull = !mMainView->leftFrame()->isVisible(); 222 bool isFull = !mMainView->leftFrame()->isVisible();
217 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) 223 if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen )
218 full = true; 224 full = true;
219 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) 225 if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen )
220 full = false; 226 full = false;
221 } 227 }
@@ -477,25 +483,25 @@ void KOViewManager::showNextXView()
477 mCurrentAgendaView = -1; 483 mCurrentAgendaView = -1;
478 showAgendaView(KOPrefs::instance()->mFullViewMonth); 484 showAgendaView(KOPrefs::instance()->mFullViewMonth);
479 globalFlagBlockAgenda = 2; 485 globalFlagBlockAgenda = 2;
480 mMainView->dateNavigator()->selectDates( QDate::currentDate(), 486 mMainView->dateNavigator()->selectDates( QDate::currentDate(),
481 KOPrefs::instance()->mNextXDays ); 487 KOPrefs::instance()->mNextXDays );
482 mFlagShowNextxDays = true; 488 mFlagShowNextxDays = true;
483 mCurrentAgendaView = 3 ; 489 mCurrentAgendaView = 3 ;
484} 490}
485bool KOViewManager::showsNextDays() 491bool KOViewManager::showsNextDays()
486{ 492{
487 return mFlagShowNextxDays; 493 return mFlagShowNextxDays;
488} 494}
489void KOViewManager::showMonthView() 495void KOViewManager::createMonthView()
490 { 496 {
491 if (!mMonthView) { 497 if (!mMonthView) {
492 mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView"); 498 mMonthView = new KOMonthView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::MonthView");
493 499
494 addView(mMonthView); 500 addView(mMonthView);
495 // mMonthView->show(); 501 // mMonthView->show();
496 // SIGNALS/SLOTS FOR MONTH VIEW 502 // SIGNALS/SLOTS FOR MONTH VIEW
497 connect(mMonthView, SIGNAL(newEventSignal(QDateTime)), 503 connect(mMonthView, SIGNAL(newEventSignal(QDateTime)),
498 mMainView, SLOT(newEvent(QDateTime))); 504 mMainView, SLOT(newEvent(QDateTime)));
499 505
500 connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)), 506 connect(mMonthView, SIGNAL(showIncidenceSignal(Incidence *)),
501 mMainView, SLOT(showIncidence(Incidence *))); 507 mMainView, SLOT(showIncidence(Incidence *)));
@@ -508,58 +514,92 @@ void KOViewManager::showMonthView()
508 mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); 514 mMainView, SLOT( processMainViewSelection( Incidence * ) ) );
509 connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), 515 connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ),
510 mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); 516 mMainView, SLOT ( cloneIncidence( Incidence * ) ) );
511 connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), 517 connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ),
512 mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); 518 mMainView, SLOT ( cancelIncidence( Incidence * ) ) );
513 519
514 connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 520 connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
515 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 521 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
516 connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 522 connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
517 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 523 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
518 connect( mMonthView, SIGNAL( selectWeekNum( int ) ), 524 connect( mMonthView, SIGNAL( selectWeekNum( int ) ),
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 ) ),
521 mMainView, SLOT ( showDay( QDate ) ) ); 529 mMainView, SLOT ( showDay( QDate ) ) );
522 connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); 530 connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig()));
523 connect( mMonthView, SIGNAL(nextMonth() ), 531 connect( mMonthView, SIGNAL(nextMonth() ),
524 mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); 532 mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) );
525 connect( mMonthView, SIGNAL(prevMonth() ), 533 connect( mMonthView, SIGNAL(prevMonth() ),
526 mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); 534 mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) );
527 connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), 535 connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ),
528 mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); 536 mMainView->dateNavigator(), SLOT( selectPreviousYear() ) );
529 connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), 537 connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ),
530 mMainView->dateNavigator(), SLOT( selectNextYear() ) ); 538 mMainView->dateNavigator(), SLOT( selectNextYear() ) );
531 connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), 539 connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ),
532 mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); 540 mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) );
533 connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), 541 connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ),
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
536 connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 548 connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
537 mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); 549 mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) );
538 550
539 551
540 connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), 552 connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ),
541 mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); 553 mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) );
542 554
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
555} 595}
556 596
557void KOViewManager::showTodoView() 597void KOViewManager::showTodoView()
558{ 598{
559 //mFlagShowNextxDays = false; 599 //mFlagShowNextxDays = false;
560 if ( !mTodoView ) { 600 if ( !mTodoView ) {
561 mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), 601 mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(),
562 "KOViewManager::TodoView" ); 602 "KOViewManager::TodoView" );
563 603
564 addView( mTodoView ); 604 addView( mTodoView );
565 // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); 605 // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold );
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 66ab138..8f0bf82 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -83,29 +83,31 @@ class KOViewManager : public QObject
83 void signalAgendaView( bool ); 83 void signalAgendaView( bool );
84 public slots: 84 public slots:
85 void showDateView( int, QDate ); 85 void showDateView( int, QDate );
86 void updateView(); 86 void updateView();
87 void showWhatsNextView(); 87 void showWhatsNextView();
88 void showListView(); 88 void showListView();
89 void showAgendaView( bool fullScreen = false ); 89 void showAgendaView( bool fullScreen = false );
90 void showDayView(); 90 void showDayView();
91 void showWorkWeekView(); 91 void showWorkWeekView();
92 void showWeekView(); 92 void showWeekView();
93 void showNextXView(); 93 void showNextXView();
94 void showMonthView(); 94 void showMonthView();
95 void showMonthViewWeek();
95 void showTodoView(); 96 void showTodoView();
96 void showJournalView(); 97 void showJournalView();
97 void showTimeSpanView(); 98 void showTimeSpanView();
98 99
99 private: 100 private:
101 void createMonthView();
100 CalendarView *mMainView; 102 CalendarView *mMainView;
101 103
102 int mCurrentAgendaView; 104 int mCurrentAgendaView;
103 KOAgendaView *mAgendaView; 105 KOAgendaView *mAgendaView;
104 KOListView *mListView; 106 KOListView *mListView;
105 KOMonthView *mMonthView; 107 KOMonthView *mMonthView;
106 KOTodoView *mTodoView; 108 KOTodoView *mTodoView;
107 KOWhatsNextView *mWhatsNextView; 109 KOWhatsNextView *mWhatsNextView;
108 KOJournalView *mJournalView; 110 KOJournalView *mJournalView;
109 KOTimeSpanView *mTimeSpanView; 111 KOTimeSpanView *mTimeSpanView;
110 112
111 KOrg::BaseView *mCurrentView; // currently active event view 113 KOrg::BaseView *mCurrentView; // currently active event view
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index ab0e4d6..16031b8 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -704,24 +704,31 @@ void MainWindow::initActions()
704 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); 704 QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
705 day7_action->addTo( viewMenu ); 705 day7_action->addTo( viewMenu );
706 connect( day7_action, SIGNAL( activated() ), 706 connect( day7_action, SIGNAL( activated() ),
707 mView->viewManager(), SLOT( showWeekView() ) ); 707 mView->viewManager(), SLOT( showWeekView() ) );
708 708
709 icon = loadPixmap( pathString + "month" ); 709 icon = loadPixmap( pathString + "month" );
710 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); 710 configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
711 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); 711 QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
712 month_action->addTo( viewMenu ); 712 month_action->addTo( viewMenu );
713 connect( month_action, SIGNAL( activated() ), 713 connect( month_action, SIGNAL( activated() ),
714 mView->viewManager(), SLOT( showMonthView() ) ); 714 mView->viewManager(), SLOT( showMonthView() ) );
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" );
717 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); 724 configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
718 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); 725 QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
719 todoview_action->addTo( viewMenu ); 726 todoview_action->addTo( viewMenu );
720 connect( todoview_action, SIGNAL( activated() ), 727 connect( todoview_action, SIGNAL( activated() ),
721 mView->viewManager(), SLOT( showTodoView() ) ); 728 mView->viewManager(), SLOT( showTodoView() ) );
722 729
723 icon = loadPixmap( pathString + "journal" ); 730 icon = loadPixmap( pathString + "journal" );
724 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); 731 configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
725 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); 732 QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
726 viewjournal_action->addTo( viewMenu ); 733 viewjournal_action->addTo( viewMenu );
727 connect( viewjournal_action, SIGNAL( activated() ), 734 connect( viewjournal_action, SIGNAL( activated() ),
@@ -986,24 +993,26 @@ void MainWindow::initActions()
986 if (p-> mShowIconNextDays) 993 if (p-> mShowIconNextDays)
987 xdays_action->addTo( iconToolBar ); 994 xdays_action->addTo( iconToolBar );
988 if (p-> mShowIconList) 995 if (p-> mShowIconList)
989 showlist_action->addTo( iconToolBar ); 996 showlist_action->addTo( iconToolBar );
990 if (p-> mShowIconDay1) 997 if (p-> mShowIconDay1)
991 day1_action->addTo( iconToolBar ); 998 day1_action->addTo( iconToolBar );
992 if (p-> mShowIconDay5) 999 if (p-> mShowIconDay5)
993 day5_action->addTo( iconToolBar ); 1000 day5_action->addTo( iconToolBar );
994 if (p-> mShowIconDay7) 1001 if (p-> mShowIconDay7)
995 day7_action->addTo( iconToolBar ); 1002 day7_action->addTo( iconToolBar );
996 if (p-> mShowIconMonth) 1003 if (p-> mShowIconMonth)
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)
999 todoview_action->addTo( iconToolBar ); 1008 todoview_action->addTo( iconToolBar );
1000 if (p-> mShowIconJournal) 1009 if (p-> mShowIconJournal)
1001 viewjournal_action->addTo( iconToolBar ); 1010 viewjournal_action->addTo( iconToolBar );
1002 icon = loadPixmap( pathString + "2leftarrowB" ); 1011 icon = loadPixmap( pathString + "2leftarrowB" );
1003 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); 1012 configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14);
1004 if (p-> mShowIconBackFast) { 1013 if (p-> mShowIconBackFast) {
1005 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); 1014 action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this );
1006 connect( action, SIGNAL( activated() ), 1015 connect( action, SIGNAL( activated() ),
1007 mView, SLOT( goPreviousMonth() ) ); 1016 mView, SLOT( goPreviousMonth() ) );
1008 action->addTo( iconToolBar ); 1017 action->addTo( iconToolBar );
1009 } 1018 }
@@ -1042,24 +1051,26 @@ void MainWindow::initActions()
1042 if (p-> mShowIconNewEvent) 1051 if (p-> mShowIconNewEvent)
1043 configureToolBarMenu->setItemChecked( 10, true ); 1052 configureToolBarMenu->setItemChecked( 10, true );
1044 if (p->mShowIconNewTodo ) 1053 if (p->mShowIconNewTodo )
1045 configureToolBarMenu->setItemChecked( 20, true ); 1054 configureToolBarMenu->setItemChecked( 20, true );
1046 if (p-> mShowIconSearch) 1055 if (p-> mShowIconSearch)
1047 configureToolBarMenu->setItemChecked( 120, true ); 1056 configureToolBarMenu->setItemChecked( 120, true );
1048 if (p-> mShowIconList) 1057 if (p-> mShowIconList)
1049 configureToolBarMenu->setItemChecked( 30, true ); 1058 configureToolBarMenu->setItemChecked( 30, true );
1050 if (p-> mShowIconDay1) 1059 if (p-> mShowIconDay1)
1051 configureToolBarMenu->setItemChecked( 40, true ); 1060 configureToolBarMenu->setItemChecked( 40, true );
1052 if (p-> mShowIconDay5) 1061 if (p-> mShowIconDay5)
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)
1055 configureToolBarMenu->setItemChecked( 60, true ); 1066 configureToolBarMenu->setItemChecked( 60, true );
1056 if (p-> mShowIconMonth) 1067 if (p-> mShowIconMonth)
1057 configureToolBarMenu->setItemChecked( 70, true ); 1068 configureToolBarMenu->setItemChecked( 70, true );
1058 if (p-> mShowIconTodoview) 1069 if (p-> mShowIconTodoview)
1059 configureToolBarMenu->setItemChecked( 80, true ); 1070 configureToolBarMenu->setItemChecked( 80, true );
1060 if (p-> mShowIconBackFast) 1071 if (p-> mShowIconBackFast)
1061 configureToolBarMenu->setItemChecked( 200, true ); 1072 configureToolBarMenu->setItemChecked( 200, true );
1062 if (p-> mShowIconBack) 1073 if (p-> mShowIconBack)
1063 configureToolBarMenu->setItemChecked( 210, true ); 1074 configureToolBarMenu->setItemChecked( 210, true );
1064 if (p-> mShowIconToday) 1075 if (p-> mShowIconToday)
1065 configureToolBarMenu->setItemChecked( 130, true ); 1076 configureToolBarMenu->setItemChecked( 130, true );
@@ -1790,24 +1801,25 @@ void MainWindow::selectFilter( int fil )
1790void MainWindow::configureToolBar( int item ) 1801void MainWindow::configureToolBar( int item )
1791{ 1802{
1792 1803
1793 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); 1804 configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) );
1794 KOPrefs *p = KOPrefs::instance(); 1805 KOPrefs *p = KOPrefs::instance();
1795 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); 1806 p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 );
1796 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); 1807 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 );
1797 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); 1808 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 );
1798 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); 1809 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 );
1799 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); 1810 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
1800 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); 1811 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );
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 );
1803 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); 1815 p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 );
1804 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); 1816 p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 );
1805 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); 1817 p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 );
1806 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); 1818 p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
1807 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); 1819 p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
1808 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); 1820 p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
1809 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); 1821 p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 );
1810 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); 1822 p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 );
1811 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); 1823 p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 );
1812 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); 1824 p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
1813 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); 1825 p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index b591232..934e153 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -80,40 +80,54 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
80 mPrevYear->setPixmap( SmallIcon( isDesktop ? "2leftarrowB" : "2leftarrow" ) ); 80 mPrevYear->setPixmap( SmallIcon( isDesktop ? "2leftarrowB" : "2leftarrow" ) );
81 QToolTip::add( mPrevYear, i18n("Previous Year") ); 81 QToolTip::add( mPrevYear, i18n("Previous Year") );
82 82
83 mPrevMonth = new QPushButton( mCtrlFrame ); 83 mPrevMonth = new QPushButton( mCtrlFrame );
84 mPrevMonth->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") ); 84 mPrevMonth->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") );
85 QToolTip::add( mPrevMonth, i18n("Previous Month") ); 85 QToolTip::add( mPrevMonth, i18n("Previous Month") );
86 86
87 // Create forward navigation buttons 87 // Create forward navigation buttons
88 mNextMonth = new QPushButton( mCtrlFrame ); 88 mNextMonth = new QPushButton( mCtrlFrame );
89 mNextMonth->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") ); 89 mNextMonth->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") );
90 QToolTip::add( mNextMonth, i18n("Next Month") ); 90 QToolTip::add( mNextMonth, i18n("Next Month") );
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 );
93 mNextYear->setPixmap( SmallIcon( isDesktop ? "2rightarrowB": "2rightarrow") ); 102 mNextYear->setPixmap( SmallIcon( isDesktop ? "2rightarrowB": "2rightarrow") );
94 QToolTip::add( mNextYear, i18n("Next Year") ); 103 QToolTip::add( mNextYear, i18n("Next Year") );
95 mSelectMonth = new QPushButton( mCtrlFrame ); 104 mSelectMonth = new QPushButton( mCtrlFrame );
96 // Create month name label 105 // Create month name label
97 //selectMonth->setFont( tfont ); 106 //selectMonth->setFont( tfont );
98 // selectMonth->setAlignment( AlignCenter ); 107 // selectMonth->setAlignment( AlignCenter );
99 //mDateLabel = new QLabel( selectMonth ); 108 //mDateLabel = new QLabel( selectMonth );
100 //mDateLabel->setFont( tfont ); 109 //mDateLabel->setFont( tfont );
101 //mDateLabel->setAlignment( AlignCenter ); 110 //mDateLabel->setAlignment( AlignCenter );
102 if ( QString ( name ) == QString("useBigPixmaps") ) { 111 if ( QString ( name ) == QString("useBigPixmaps") ) {
103 mNextMonth->setFlat( true); 112 mNextMonth->setFlat( true);
113 mNextWeek->setFlat( true);
104 mNextYear->setFlat( true); 114 mNextYear->setFlat( true);
105 mSelectMonth->setFlat( true); 115 mSelectMonth->setFlat( true);
106 mPrevYear->setFlat( true); 116 mPrevYear->setFlat( true);
107 mPrevMonth->setFlat( true); 117 mPrevMonth->setFlat( true);
118 mPrevWeek->setFlat( true);
119 } else {
120 mPrevWeek->hide();
121 mNextWeek->hide();
108 } 122 }
109 mSelectMonth->setFont( tfont ); 123 mSelectMonth->setFont( tfont );
110 // Set minimum width to width of widest month name label 124 // Set minimum width to width of widest month name label
111 int i; 125 int i;
112 int maxwidth = 0; 126 int maxwidth = 0;
113 QFontMetrics fm ( mSelectMonth->font() ); 127 QFontMetrics fm ( mSelectMonth->font() );
114 int width = fm.width("September '00" ); 128 int width = fm.width("September '00" );
115// for( i = 1; i <= KOGlobals::self()->calendarSystem()->monthsInYear(date); 129// for( i = 1; i <= KOGlobals::self()->calendarSystem()->monthsInYear(date);
116// ++i ) { 130// ++i ) {
117// //int width = fm.width( KOGlobals::self()->calendarSystem()->monthName(i, 131// //int width = fm.width( KOGlobals::self()->calendarSystem()->monthName(i,
118// // KOGlobals::self()->calendarSystem()->year(date) ) + " 2000" ); 132// // KOGlobals::self()->calendarSystem()->year(date) ) + " 2000" );
119// int width = fm.width("September 2000" ); 133// int width = fm.width("September 2000" );
@@ -121,47 +135,55 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam
121// } 135// }
122 maxwidth = width+2; 136 maxwidth = width+2;
123 int size = fm.height()+2; 137 int size = fm.height()+2;
124 if ( QApplication::desktop()->width() >= 480 ) { 138 if ( QApplication::desktop()->width() >= 480 ) {
125 size += 6; 139 size += 6;
126 maxwidth+= 6; 140 maxwidth+= 6;
127 } 141 }
128 142
129 mSelectMonth->setFixedWidth( maxwidth ); 143 mSelectMonth->setFixedWidth( maxwidth );
130 mSelectMonth->setFixedHeight( size ); 144 mSelectMonth->setFixedHeight( size );
131 mPrevYear->setFixedHeight( size ); 145 mPrevYear->setFixedHeight( size );
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 );
135 // set up control frame layout 151 // set up control frame layout
136 QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 ); 152 QBoxLayout *ctrlLayout = new QHBoxLayout( mCtrlFrame, 1 );
137 ctrlLayout->addWidget( mPrevYear, 3 ); 153 ctrlLayout->addWidget( mPrevYear, 3 );
138 ctrlLayout->addWidget( mPrevMonth, 3 ); 154 ctrlLayout->addWidget( mPrevMonth, 3 );
155 ctrlLayout->addWidget( mPrevWeek, 3 );
139 //ctrlLayout->addStretch( 1 ); 156 //ctrlLayout->addStretch( 1 );
140 // ctrlLayout->addSpacing( 1 ); 157 // ctrlLayout->addSpacing( 1 );
141 // ctrlLayout->addWidget( mDateLabel ); 158 // ctrlLayout->addWidget( mDateLabel );
142 ctrlLayout->addWidget( mSelectMonth ); 159 ctrlLayout->addWidget( mSelectMonth );
143 // ctrlLayout->addSpacing( 1 ); 160 // ctrlLayout->addSpacing( 1 );
144 // ctrlLayout->addStretch( 1 ); 161 // ctrlLayout->addStretch( 1 );
162 ctrlLayout->addWidget( mNextWeek, 3 );
145 ctrlLayout->addWidget( mNextMonth, 3 ); 163 ctrlLayout->addWidget( mNextMonth, 3 );
146 ctrlLayout->addWidget( mNextYear, 3 ); 164 ctrlLayout->addWidget( mNextYear, 3 );
147 165
148 connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) ); 166 connect( mPrevYear, SIGNAL( clicked() ), SIGNAL( goPrevYear() ) );
149 connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) ); 167 connect( mPrevMonth, SIGNAL( clicked() ), SIGNAL( goPrevMonth() ) );
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() ) );
152 connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) ); 172 connect( mSelectMonth, SIGNAL( clicked() ),SLOT( selectMonth() ) );
153 mPrevYear->setFocusPolicy(NoFocus); 173 mPrevYear->setFocusPolicy(NoFocus);
154 mPrevMonth->setFocusPolicy(NoFocus); 174 mPrevMonth->setFocusPolicy(NoFocus);
155 mNextMonth->setFocusPolicy(NoFocus); 175 mNextMonth->setFocusPolicy(NoFocus);
176 mPrevWeek->setFocusPolicy(NoFocus);
177 mNextWeek->setFocusPolicy(NoFocus);
156 mNextYear->setFocusPolicy(NoFocus); 178 mNextYear->setFocusPolicy(NoFocus);
157 mSelectMonth->setFocusPolicy(NoFocus); 179 mSelectMonth->setFocusPolicy(NoFocus);
158 setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); 180 setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) );
159 181
160} 182}
161 183
162NavigatorBar::~NavigatorBar() 184NavigatorBar::~NavigatorBar()
163{ 185{
164} 186}
165 187
166void NavigatorBar::selectMonth() 188void NavigatorBar::selectMonth()
167{ 189{
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index 93240a6..803c817 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -37,29 +37,33 @@ class NavigatorBar: public QWidget
37 Q_OBJECT 37 Q_OBJECT
38 public: 38 public:
39 NavigatorBar( const QDate & date, QWidget *parent = 0, const char *name = 0 ); 39 NavigatorBar( const QDate & date, QWidget *parent = 0, const char *name = 0 );
40 ~NavigatorBar(); 40 ~NavigatorBar();
41 41
42 public slots: 42 public slots:
43 void selectDates( const KCal::DateList & ); 43 void selectDates( const KCal::DateList & );
44 void selectMonth(); 44 void selectMonth();
45 45
46 signals: 46 signals:
47 void goNextMonth(); 47 void goNextMonth();
48 void goPrevMonth(); 48 void goPrevMonth();
49 void goNextWeek();
50 void goPrevWeek();
49 void goNextYear(); 51 void goNextYear();
50 void goPrevYear(); 52 void goPrevYear();
51 void monthSelected( int ); 53 void monthSelected( int );
52 54
53 private: 55 private:
54 QFrame *mCtrlFrame; 56 QFrame *mCtrlFrame;
55 57
56 QPushButton *mPrevYear; 58 QPushButton *mPrevYear;
57 QPushButton *mPrevMonth; 59 QPushButton *mPrevMonth;
58 QPushButton *mNextMonth; 60 QPushButton *mNextMonth;
61 QPushButton *mPrevWeek;
62 QPushButton *mNextWeek;
59 QPushButton *mNextYear; 63 QPushButton *mNextYear;
60 QPushButton *mSelectMonth; 64 QPushButton *mSelectMonth;
61 65
62 //QLabel *mDateLabel; 66 //QLabel *mDateLabel;
63}; 67};
64 68
65#endif 69#endif