author | zautrix <zautrix> | 2005-02-16 22:08:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-16 22:08:18 (UTC) |
commit | 451b4de59893b5c0801a7bbb2f8cbe8e0266b324 (patch) (unidiff) | |
tree | ce3f535541583d37cfe951ddd8d7474770d9c374 | |
parent | b2cf8e9a08082539e0a5578a98766e5990783f9a (diff) | |
download | kdepimpi-451b4de59893b5c0801a7bbb2f8cbe8e0266b324.zip kdepimpi-451b4de59893b5c0801a7bbb2f8cbe8e0266b324.tar.gz kdepimpi-451b4de59893b5c0801a7bbb2f8cbe8e0266b324.tar.bz2 |
month view fixes
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 2 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 4 | ||||
-rw-r--r-- | korganizer/datenavigator.cpp | 15 | ||||
-rw-r--r-- | korganizer/datenavigator.h | 3 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 8 | ||||
-rw-r--r-- | korganizer/komonthview.h | 3 | ||||
-rw-r--r-- | korganizer/koprefs.cpp | 1 | ||||
-rw-r--r-- | korganizer/koprefs.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 62 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 2 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 12 | ||||
-rw-r--r-- | korganizer/navigatorbar.cpp | 26 | ||||
-rw-r--r-- | korganizer/navigatorbar.h | 4 |
13 files changed, 124 insertions, 19 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,14 +1,16 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.0.8 ************ | 3 | ********** VERSION 2.0.8 ************ |
4 | 4 | ||
5 | Fixed a problem in dependency info in the ipk files for the Zaurus. | 5 | Fixed a problem in dependency info in the ipk files for the Zaurus. |
6 | 6 | ||
7 | Added 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 | ||
10 | Added global application font settings | 12 | Added 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 | ||
13 | Fixed a problem in OM/Pi when trying to login to some IMAP servers | 15 | Fixed 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 ) |
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 | |||
@@ -1266,18 +1266,18 @@ | |||
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 | { "","" }, |
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp index 8b7c993..b0eac51 100644 --- a/korganizer/datenavigator.cpp +++ b/korganizer/datenavigator.cpp | |||
@@ -78,16 +78,22 @@ void DateNavigator::selectMonthByDate( const QDate & firstSelected ) | |||
78 | 78 | ||
79 | } | 79 | } |
80 | void DateNavigator::selectMonth() | 80 | void DateNavigator::selectMonth() |
81 | { | 81 | { |
82 | 82 | ||
83 | QDate date =mSelectedDates.first(); | 83 | QDate date =mSelectedDates.first(); |
84 | selectMonthByDate( date ); | 84 | selectMonthByDate( date ); |
85 | } | 85 | } |
86 | void DateNavigator::selectMonthFromMonthview() | ||
87 | { | ||
88 | |||
89 | QDate date =mSelectedDates.first().addDays( 7 ); | ||
90 | selectMonthByDate( date ); | ||
91 | } | ||
86 | 92 | ||
87 | DateList DateNavigator::selectedDates() | 93 | DateList DateNavigator::selectedDates() |
88 | { | 94 | { |
89 | return mSelectedDates; | 95 | return mSelectedDates; |
90 | } | 96 | } |
91 | 97 | ||
92 | int DateNavigator::datesCount() const | 98 | int DateNavigator::datesCount() const |
93 | { | 99 | { |
@@ -253,16 +259,25 @@ void DateNavigator::selectNextMonth() | |||
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 | } |
267 | void DateNavigator::selectPreviousWeek() | ||
268 | { | ||
269 | selectDates( mSelectedDates.first().addDays( -7 ), datesCount() ); | ||
270 | } | ||
271 | |||
272 | void DateNavigator::selectNextWeek() | ||
273 | { | ||
274 | selectDates( mSelectedDates.first().addDays( 7 ), datesCount() ); | ||
275 | } | ||
261 | 276 | ||
262 | void DateNavigator::selectNextYear() | 277 | void 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 ); |
diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h index 4265e84..9742d41 100644 --- a/korganizer/datenavigator.h +++ b/korganizer/datenavigator.h | |||
@@ -62,19 +62,22 @@ class DateNavigator : public QObject | |||
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: |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index d0380e3..f9bc1ca 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -944,29 +944,31 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
944 | 944 | ||
945 | KOMonthView::~KOMonthView() | 945 | KOMonthView::~KOMonthView() |
946 | { | 946 | { |
947 | delete mContextMenu; | 947 | delete mContextMenu; |
948 | } | 948 | } |
949 | 949 | ||
950 | void KOMonthView::selectInternalWeekNum ( int n ) | 950 | void KOMonthView::selectInternalWeekNum ( int n ) |
951 | { | 951 | { |
952 | switchView(); | 952 | switchView(); |
953 | emit selectWeekNum ( n ); | 953 | if ( !KOPrefs::instance()->mMonthViewWeek ) |
954 | emit selectMonth (); | ||
955 | else | ||
956 | emit selectWeekNum ( n ); | ||
954 | } | 957 | } |
955 | 958 | ||
956 | int KOMonthView::currentWeek() | 959 | int 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 | } |
962 | void KOMonthView::switchView() | 965 | void 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 | } |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 03f9dc6..2f6f5dc 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -238,25 +238,26 @@ class KOMonthView: public KOEventView | |||
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; |
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 7efb6a6..5efc247 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp | |||
@@ -70,16 +70,17 @@ KOPrefs::KOPrefs() : | |||
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); |
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index fa69d52..e300067 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h | |||
@@ -166,16 +166,17 @@ class KOPrefs : public KPimPrefs | |||
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; |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index f8f6c1d..e22f096 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -83,17 +83,22 @@ KOrg::BaseView *KOViewManager::currentView() | |||
83 | return mCurrentView; | 83 | return mCurrentView; |
84 | } | 84 | } |
85 | 85 | ||
86 | void KOViewManager::readSettings(KConfig *config) | 86 | void 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; |
@@ -202,17 +207,18 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | |||
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; |
210 | full = mMainView->leftFrame()->isVisible(); | 215 | if ( view != mMonthView ) |
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; |
@@ -481,19 +487,19 @@ void KOViewManager::showNextXView() | |||
481 | KOPrefs::instance()->mNextXDays ); | 487 | KOPrefs::instance()->mNextXDays ); |
482 | mFlagShowNextxDays = true; | 488 | mFlagShowNextxDays = true; |
483 | mCurrentAgendaView = 3 ; | 489 | mCurrentAgendaView = 3 ; |
484 | } | 490 | } |
485 | bool KOViewManager::showsNextDays() | 491 | bool KOViewManager::showsNextDays() |
486 | { | 492 | { |
487 | return mFlagShowNextxDays; | 493 | return mFlagShowNextxDays; |
488 | } | 494 | } |
489 | void KOViewManager::showMonthView() | 495 | void 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 | ||
@@ -512,50 +518,84 @@ void KOViewManager::showMonthView() | |||
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 | } | ||
557 | void 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 | } | ||
544 | 573 | ||
574 | void KOViewManager::showMonthView() | ||
575 | { | ||
576 | |||
577 | createMonthView(); | ||
545 | globalFlagBlockAgenda = 1; | 578 | globalFlagBlockAgenda = 1; |
546 | //mFlagShowNextxDays = false; | 579 | //mFlagShowNextxDays = false; |
547 | // if(mMonthView == mCurrentView) return; | 580 | bool full = true; |
548 | if ( KOPrefs::instance()->mMonthViewWeek ) | 581 | if ( mCurrentView == mMonthView) |
549 | mMainView->dateNavigator()->selectWeek(); | 582 | full = mMainView->leftFrame()->isVisible(); |
550 | else | 583 | // if(mMonthView == mCurrentView) return; |
551 | mMainView->dateNavigator()->selectMonth(); | 584 | if ( KOPrefs::instance()->mMonthViewWeek ) { |
585 | mMonthView->switchView(); | ||
586 | if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) | ||
587 | full = false; | ||
588 | else | ||
589 | full = true; | ||
590 | } | ||
591 | mMainView->dateNavigator()->selectMonth(); | ||
552 | 592 | ||
553 | showView(mMonthView, true ); | 593 | showView(mMonthView, full ); |
554 | 594 | ||
555 | } | 595 | } |
556 | 596 | ||
557 | void KOViewManager::showTodoView() | 597 | void 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(), |
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 66ab138..8f0bf82 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -87,21 +87,23 @@ class KOViewManager : public QObject | |||
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; |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index ab0e4d6..16031b8 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -708,16 +708,23 @@ void MainWindow::initActions() | |||
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" ); |
@@ -990,16 +997,18 @@ void MainWindow::initActions() | |||
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 ); |
@@ -1046,16 +1055,18 @@ void MainWindow::initActions() | |||
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 ); |
@@ -1794,16 +1805,17 @@ void MainWindow::configureToolBar( int 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 ); |
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index b591232..934e153 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp | |||
@@ -84,32 +84,46 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
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); |
@@ -123,41 +137,49 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
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 ); |
133 | mNextMonth->setFixedHeight( size ); | 147 | mPrevWeek->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 | ||
162 | NavigatorBar::~NavigatorBar() | 184 | NavigatorBar::~NavigatorBar() |
163 | { | 185 | { |
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h index 93240a6..803c817 100644 --- a/korganizer/navigatorbar.h +++ b/korganizer/navigatorbar.h | |||
@@ -41,25 +41,29 @@ class NavigatorBar: public QWidget | |||
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 |