author | zautrix <zautrix> | 2005-02-02 11:55:36 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-02 11:55:36 (UTC) |
commit | e770226d68f5fdb8484003bbb9898848cec901a8 (patch) (unidiff) | |
tree | ecf8f795d6f8673405c22010c82fb167a41a7aa3 | |
parent | 2a184b0d9095c6175e7bdf2f5d5561470b8d6307 (diff) | |
download | kdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.zip kdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.tar.gz kdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.tar.bz2 |
jepp
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 7 | ||||
-rw-r--r-- | bin/kdepim/korganizer/featuresKOPI.txt | 29 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 33 | ||||
-rw-r--r-- | korganizer/komonthview.h | 6 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 4 |
5 files changed, 46 insertions, 33 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 4f8fcc7..ac70a55 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,29 +1,30 @@ | |||
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.2 ************ | 3 | ********** VERSION 2.0.2 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fixed the layout problem of the day label buttons | 6 | Fixed the layout problem of the day label buttons |
7 | of the agenda view introduced in version 2.0.1. | 7 | of the agenda view introduced in version 2.0.1. |
8 | 8 | ||
9 | Added WhatsThis support for the todo view and the list view. | 9 | Added WhatsThis support for the todo view and the list view. |
10 | 10 | ||
11 | Added a quite useful and quite hidden feature (to KO/Pi). | 11 | Added a quite useful feature to the montview. |
12 | Who does find it first? | 12 | Just click on the week numbers on the left. |
13 | Hint: You have to click somewhere in the views ... | 13 | And on top of the week numbers there is now a "week view quick selector". |
14 | (Click on the black triangle). | ||
14 | 15 | ||
15 | 16 | ||
16 | ********** VERSION 2.0.1 ************ | 17 | ********** VERSION 2.0.1 ************ |
17 | 18 | ||
18 | Oooops ... I forgot to test on the Zaurus 5500 ... | 19 | Oooops ... I forgot to test on the Zaurus 5500 ... |
19 | 20 | ||
20 | Fixed many problems of new (english) strings (and german translations) | 21 | Fixed many problems of new (english) strings (and german translations) |
21 | introduced in the latest versions, where the text was not fitting on the | 22 | introduced in the latest versions, where the text was not fitting on the |
22 | 240x320 display of the Zaurus 5500. | 23 | 240x320 display of the Zaurus 5500. |
23 | 24 | ||
24 | KO/Pi: | 25 | KO/Pi: |
25 | Added a popup menu ( press pen and hold to get popup ) to the agenda view | 26 | Added a popup menu ( press pen and hold to get popup ) to the agenda view |
26 | with many useful items (add event/todo, show next week, two weeks, month, journal). | 27 | with many useful items (add event/todo, show next week, two weeks, month, journal). |
27 | 28 | ||
28 | Added items to the todolist popup menu for: | 29 | Added items to the todolist popup menu for: |
29 | Display all opened, all closed or all todos flat. | 30 | Display all opened, all closed or all todos flat. |
diff --git a/bin/kdepim/korganizer/featuresKOPI.txt b/bin/kdepim/korganizer/featuresKOPI.txt index 052680e..c056dca 100644 --- a/bin/kdepim/korganizer/featuresKOPI.txt +++ b/bin/kdepim/korganizer/featuresKOPI.txt | |||
@@ -127,118 +127,113 @@ To use the What'sThis Help, you have to enable the What'sThis icon in the toolba | |||
127 | (Choose menu: ME-Toolbar or Action-Configure Toolbar ). | 127 | (Choose menu: ME-Toolbar or Action-Configure Toolbar ). |
128 | (You have to restart to reload the changed toolbar config). | 128 | (You have to restart to reload the changed toolbar config). |
129 | Now click on the QWhat'sThis Icon | 129 | Now click on the QWhat'sThis Icon |
130 | in the top right corner of KO/Pi. | 130 | in the top right corner of KO/Pi. |
131 | Then click now after that on an item in the Agenda View or in the month view | 131 | Then click now after that on an item in the Agenda View or in the month view |
132 | you will get a detailed display of the items content. | 132 | you will get a detailed display of the items content. |
133 | 133 | ||
134 | 134 | ||
135 | 135 | ||
136 | ****************************************************** | 136 | ****************************************************** |
137 | B) Useful features, that are not straighforward to see | 137 | B) Useful features, that are not straighforward to see |
138 | ****************************************************** | 138 | ****************************************************** |
139 | 139 | ||
140 | 1) Right mouse click on Zaurus | 140 | 1) Right mouse click on Zaurus |
141 | 2) Moving of items in the agenda view | 141 | 2) Moving of items in the agenda view |
142 | 3) Creating exceptions for recurring events | 142 | 3) Creating exceptions for recurring events |
143 | 4) Accessing the week in agenda view from the Month view | 143 | 4) Navigation in month view |
144 | 5) Navigation in month view | 144 | 5) Navigation in agenda view |
145 | 6) Navigation in agenda view | 145 | 6) Monthview as week view |
146 | 7) Monthview as week view | 146 | 7) Switching display mode in date edit |
147 | 8) Switching display mode in date edit | ||
148 | 147 | ||
149 | 1) | 148 | 1) |
150 | Right mouse click on Zaurus: | 149 | Right mouse click on Zaurus: |
151 | In KO/Pi on the desktop a right mouse click will popup an menu on some items. | 150 | In KO/Pi on the desktop a right mouse click will popup an menu on some items. |
152 | On the Zaurus there can only the stylus be used. | 151 | On the Zaurus there can only the stylus be used. |
153 | To simulte a right mouse click with the stylus press is and hold it down | 152 | To simulte a right mouse click with the stylus press is and hold it down |
154 | for 1-2 seconds. If you release it then, a menu pops up, if there is | 153 | for 1-2 seconds. If you release it then, a menu pops up, if there is |
155 | a menu available for this particular item. | 154 | a menu available for this particular item. |
156 | On some places the menu pops up without releasing the stylus. | 155 | On some places the menu pops up without releasing the stylus. |
157 | That bevaviour is not a bug, it is caused by the the behaviour of the | 156 | That bevaviour is not a bug, it is caused by the the behaviour of the |
158 | single left click on the item. | 157 | single left click on the item. |
159 | 158 | ||
160 | 2) | 159 | 2) |
161 | Moving of items in the agenda view: | 160 | Moving of items in the agenda view: |
162 | In the agenda view you can move an item by clicking on it and holding | 161 | In the agenda view you can move an item by clicking on it and holding |
163 | the mouse down. | 162 | the mouse down. |
164 | You have to move the mouse some distance before the items actually | 163 | You have to move the mouse some distance before the items actually |
165 | starts to move. That is not abug, that is a feature to prevent | 164 | starts to move. That is not abug, that is a feature to prevent |
166 | you to make unwanted moves of the item when you click on it(and moving the | 165 | you to make unwanted moves of the item when you click on it(and moving the |
167 | mouse only a small distance with this click) | 166 | mouse only a small distance with this click) |
168 | 167 | ||
169 | 3) | 168 | 3) |
170 | Creating exceptions for recurring events: | 169 | Creating exceptions for recurring events: |
171 | To create an exception for a recurring event, | 170 | To create an exception for a recurring event, |
172 | move this event in the agenda view. | 171 | move this event in the agenda view. |
173 | This recurrence is automatically added to the list | 172 | This recurrence is automatically added to the list |
174 | of recurrence exceptions and a non-recurring clone is created. | 173 | of recurrence exceptions and a non-recurring clone is created. |
175 | To cancel a single recurrence, create an exception by moving it | 174 | To cancel a single recurrence, create an exception by moving it |
176 | and then move it back and cancel it. | 175 | and then move it back and cancel it. |
177 | 176 | ||
178 | 4) | 177 | 4) |
179 | Accessing the week in agenda view from the month view: | ||
180 | In the month view there are on the left week numbers displayed. | ||
181 | Click on a week number to see this week in the agenda view. | ||
182 | |||
183 | 5) | ||
184 | Navigation in month view: | 178 | Navigation in month view: |
185 | If you select the month view with the icon in the toolbar, | 179 | If you select the month view with the icon in the toolbar, |
186 | the selected data range in the date navigator | 180 | the selected data range in the date navigator |
187 | is set automatically to the complete month. | 181 | is set automatically to the complete month. |
188 | (Click on month view and then the space bar to see the | 182 | (Click on month view and then the space bar to see the |
189 | selected data range in the date navigator). | 183 | selected data range in the date navigator). |
190 | If you select in the data navigator | 184 | If you select in the data navigator |
191 | (automatically by clicking on the month view or manually) | 185 | (automatically by clicking on the month view or manually) |
192 | a date range from the first of the month to the | 186 | a date range from the first of the month to the |
193 | 28.-31. of the month (the 28.-31. is valid for every month!) | 187 | 28.-31. of the month (the 28.-31. is valid for every month!) |
194 | then the (month-)navigation keys will select automatically the | 188 | then the (month-)navigation keys will select automatically the |
195 | complete next month as date range. | 189 | complete next month as date range. |
196 | 190 | ||
197 | 6) | 191 | 5) |
198 | Navigation in agenda view: | 192 | Navigation in agenda view: |
199 | If you select (as an example) 4 days in the date navigator | 193 | If you select (as an example) 4 days in the date navigator |
200 | the (week-) navigation key will select the same 4 days in the next week. | 194 | the (week-) navigation key will select the same 4 days in the next week. |
201 | If you want to get the next 4 days after the selected 4 days selected, | 195 | If you want to get the next 4 days after the selected 4 days selected, |
202 | you have to switch the navigation mode to "next days mode" | 196 | you have to switch the navigation mode to "next days mode" |
203 | by clicking on the next days icons. | 197 | by clicking on the next days icons. |
204 | Now the next days from today are selected, but after selecting | 198 | Now the next days from today are selected, but after selecting |
205 | 4 days in the day navigator the (week-) navigation key | 199 | 4 days in the day navigator the (week-) navigation key |
206 | will select the next 4 days. | 200 | will select the next 4 days. |
207 | The "next days mode" is turned off by clicking on the | 201 | The "next days mode" is turned off by clicking on the |
208 | week view, work week view or day view button. | 202 | week view, work week view or day view button. |
209 | The agenda view has "time labels" on the left, which displays the hours from 0-24. | 203 | The agenda view has "time labels" on the left, which displays the hours from 0-24. |
210 | If you press the mouse on the timelabels and move it up/down you can | 204 | If you press the mouse on the timelabels and move it up/down you can |
211 | increase/decrease the agenda size quickly. | 205 | increase/decrease the agenda size quickly. |
212 | In the agenda view you can click on the day labels (e.g. Mon 14) | 206 | In the agenda view you can click on the day labels (e.g. Mon 14) |
213 | to see the selected date in single day mode. | 207 | to see the selected date in single day mode. |
214 | If you click in single day mode the day label you will switch back to | 208 | If you click in single day mode the day label you will switch back to |
215 | the previously selected date range. | 209 | the previously selected date range. |
216 | Right of the day labels is a ">" button. | 210 | Right of the day labels is a ">" button. |
217 | If you click this button, you will go one day ahead. | 211 | If you click this button, you will go one day ahead. |
218 | Left of the day labels is the month name displayed. | 212 | Left of the day labels is the month name displayed. |
219 | If you click this button, the month view is shown. | 213 | If you click this button, the month view is shown. |
220 | 214 | ||
221 | 7) | 215 | 6) |
222 | Monthview as week view: | 216 | Monthview as week view: |
223 | On the left side of the monthview are the week number labels displayed. | 217 | On the left side of the monthview are the week number labels displayed. |
224 | On top of these labels is a "W" displayed. | 218 | If you click on these labels, the month view will show this week zoomed. |
225 | If you click on this button the month view mode will switch to week view mode. | 219 | To go back to monthly view click the left label again. |
226 | To switch back, please click the button, which now displays a "M". | 220 | You can quickly select a week number by clicking the black triangle |
221 | on top of the week number labels. | ||
227 | 222 | ||
228 | 8) | 223 | 7) |
229 | Switching display mode in date edit: | 224 | Switching display mode in date edit: |
230 | On several places is a date edit used. | 225 | On several places is a date edit used. |
231 | You can scroll the dates by selecting the part of the date (month, day, year) | 226 | You can scroll the dates by selecting the part of the date (month, day, year) |
232 | in the lineedit and pressing the key up/key down key. | 227 | in the lineedit and pressing the key up/key down key. |
233 | The display mode of a date edit is initially short date mode. | 228 | The display mode of a date edit is initially short date mode. |
234 | (I.e. weekday names are not displayed) | 229 | (I.e. weekday names are not displayed) |
235 | If you doubleclick in the lineedit the mode switches to long date mode. | 230 | If you doubleclick in the lineedit the mode switches to long date mode. |
236 | Now the weekday names are displayed for better overview. | 231 | Now the weekday names are displayed for better overview. |
237 | To switch back simply doubleclick again in the line edit. | 232 | To switch back simply doubleclick again in the line edit. |
238 | 233 | ||
239 | 234 | ||
240 | 235 | ||
241 | 236 | ||
242 | 237 | ||
243 | 238 | ||
244 | 239 | ||
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 00b1e92..f2cfb75 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -785,77 +785,92 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
785 | int i; | 785 | int i; |
786 | 786 | ||
787 | for( i = 0; i < mDaysPerWeek; i++ ) { | 787 | for( i = 0; i < mDaysPerWeek; i++ ) { |
788 | QLabel *label = new QLabel( this ); | 788 | QLabel *label = new QLabel( this ); |
789 | label->setFont(bfont); | 789 | label->setFont(bfont); |
790 | label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 790 | label->setFrameStyle(QFrame::Panel|QFrame::Raised); |
791 | label->setLineWidth(1); | 791 | label->setLineWidth(1); |
792 | label->setAlignment(AlignCenter); | 792 | label->setAlignment(AlignCenter); |
793 | mDayLabels.insert( i, label ); | 793 | mDayLabels.insert( i, label ); |
794 | } | 794 | } |
795 | 795 | ||
796 | bfont.setBold( false ); | 796 | bfont.setBold( false ); |
797 | mWeekLabels.resize( mNumWeeks+1 ); | 797 | mWeekLabels.resize( mNumWeeks+1 ); |
798 | for( i = 0; i < mNumWeeks+1; i++ ) { | 798 | for( i = 0; i < mNumWeeks+1; i++ ) { |
799 | KOWeekButton *label = new KOWeekButton( this ); | 799 | KOWeekButton *label = new KOWeekButton( this ); |
800 | label->setFont(bfont); | 800 | label->setFont(bfont); |
801 | connect( label, SIGNAL( selectWeekNum ( int )),this, SIGNAL( selectWeekNum ( int )) ); | 801 | connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); |
802 | label->setFlat(true); | 802 | label->setFlat(true); |
803 | QWhatsThis::add(label,i18n("Click on the week number to\nshow week in agenda view")); | 803 | QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); |
804 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 804 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); |
805 | //label->setLineWidth(1); | 805 | //label->setLineWidth(1); |
806 | //label->setAlignment(AlignCenter); | 806 | //label->setAlignment(AlignCenter); |
807 | mWeekLabels.insert( i, label ); | 807 | mWeekLabels.insert( i, label ); |
808 | } | 808 | } |
809 | mWeekLabels[mNumWeeks]->setText( i18n("W")); | 809 | mWeekLabels[mNumWeeks]->setText( i18n("")); |
810 | QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nswitch to week mode view")); | 810 | QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); |
811 | int row, col; | 811 | int row, col; |
812 | QPopupMenu * wpo = new QPopupMenu (this); | ||
813 | wpo->insertItem( i18n("W#"), 0 ); | ||
814 | for ( i = 1; i < 54; i++ ) | ||
815 | wpo->insertItem( i18n("%1").arg(i), i ); | ||
816 | mWeekLabels[mNumWeeks]->setPopup( wpo ); | ||
812 | mCells.resize( mNumCells ); | 817 | mCells.resize( mNumCells ); |
813 | for( row = 0; row < mNumWeeks; ++row ) { | 818 | for( row = 0; row < mNumWeeks; ++row ) { |
814 | for( col = 0; col < mDaysPerWeek; ++col ) { | 819 | for( col = 0; col < mDaysPerWeek; ++col ) { |
815 | MonthViewCell *cell = new MonthViewCell( this ); | 820 | MonthViewCell *cell = new MonthViewCell( this ); |
816 | mCells.insert( row * mDaysPerWeek + col, cell ); | 821 | mCells.insert( row * mDaysPerWeek + col, cell ); |
817 | 822 | ||
818 | connect( cell, SIGNAL( defaultAction( Incidence * ) ), | 823 | connect( cell, SIGNAL( defaultAction( Incidence * ) ), |
819 | SLOT( defaultAction( Incidence * ) ) ); | 824 | SLOT( defaultAction( Incidence * ) ) ); |
820 | connect( cell, SIGNAL( newEventSignal( QDateTime ) ), | 825 | connect( cell, SIGNAL( newEventSignal( QDateTime ) ), |
821 | SIGNAL( newEventSignal( QDateTime ) ) ); | 826 | SIGNAL( newEventSignal( QDateTime ) ) ); |
822 | connect( cell, SIGNAL( showDaySignal( QDate ) ), | 827 | connect( cell, SIGNAL( showDaySignal( QDate ) ), |
823 | SIGNAL( showDaySignal( QDate ) ) ); | 828 | SIGNAL( showDaySignal( QDate ) ) ); |
824 | } | 829 | } |
825 | } | 830 | } |
826 | 831 | ||
827 | connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), | 832 | //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); |
828 | SLOT( switchView() ) ); | 833 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); |
829 | mContextMenu = eventPopup(); | 834 | mContextMenu = eventPopup(); |
830 | // updateConfig(); //useless here | 835 | // updateConfig(); //useless here |
831 | 836 | ||
832 | emit incidenceSelected( 0 ); | 837 | emit incidenceSelected( 0 ); |
833 | } | 838 | } |
834 | 839 | ||
835 | KOMonthView::~KOMonthView() | 840 | KOMonthView::~KOMonthView() |
836 | { | 841 | { |
837 | delete mContextMenu; | 842 | delete mContextMenu; |
838 | } | 843 | } |
844 | void KOMonthView::selectDateWeekNum ( int ) | ||
845 | { | ||
846 | |||
847 | } | ||
848 | void KOMonthView::selectInternalWeekNum ( int n ) | ||
849 | { | ||
850 | emit selectWeekNum ( n ); | ||
851 | switchView(); | ||
852 | } | ||
853 | |||
839 | void KOMonthView::switchView() | 854 | void KOMonthView::switchView() |
840 | { | 855 | { |
841 | if ( selectedCell( ) ) | 856 | if ( selectedCell( ) ) |
842 | selectedCell()->deselect(); | 857 | selectedCell()->deselect(); |
843 | mShowWeekView = !mShowWeekView; | 858 | mShowWeekView = !mShowWeekView; |
844 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; | 859 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; |
845 | emit showNavigator( !mShowWeekView ); | 860 | //emit showNavigator( !mShowWeekView ); |
846 | computeLayout(); | 861 | computeLayout(); |
847 | updateConfig(); | 862 | updateConfig(); |
848 | } | 863 | } |
849 | 864 | ||
850 | int KOMonthView::maxDatesHint() | 865 | int KOMonthView::maxDatesHint() |
851 | { | 866 | { |
852 | return mNumCells; | 867 | return mNumCells; |
853 | } | 868 | } |
854 | 869 | ||
855 | int KOMonthView::currentDateCount() | 870 | int KOMonthView::currentDateCount() |
856 | { | 871 | { |
857 | return mNumCells; | 872 | return mNumCells; |
858 | } | 873 | } |
859 | 874 | ||
860 | QPtrList<Incidence> KOMonthView::selectedIncidences() | 875 | QPtrList<Incidence> KOMonthView::selectedIncidences() |
861 | { | 876 | { |
@@ -1209,33 +1224,33 @@ void KOMonthView::computeLayoutWeek() | |||
1209 | y += h+dayLabelHei ; | 1224 | y += h+dayLabelHei ; |
1210 | } | 1225 | } |
1211 | } | 1226 | } |
1212 | y= dayLabelHei; | 1227 | y= dayLabelHei; |
1213 | h = cellHei ; | 1228 | h = cellHei ; |
1214 | mWeekLabels[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei); | 1229 | mWeekLabels[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei); |
1215 | for ( i = 1; i < 6; i++) { | 1230 | for ( i = 1; i < 6; i++) { |
1216 | mWeekLabels[i]->hide(); | 1231 | mWeekLabels[i]->hide(); |
1217 | } | 1232 | } |
1218 | mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); | 1233 | mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); |
1219 | // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); | 1234 | // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); |
1220 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); | 1235 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); |
1221 | mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; | 1236 | mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; |
1222 | updateDayLabels(); | 1237 | updateDayLabels(); |
1223 | bool forceUpdate = !updatePossible; | 1238 | bool forceUpdate = !updatePossible; |
1224 | updatePossible = true; | 1239 | updatePossible = true; |
1225 | mWeekLabels[mNumWeeks]->setText( i18n("M")); | 1240 | //mWeekLabels[mNumWeeks]->setText( i18n("M")); |
1226 | if ( forceUpdate ) | 1241 | if ( forceUpdate ) |
1227 | updateView(); | 1242 | updateView(); |
1228 | } | 1243 | } |
1229 | void KOMonthView::computeLayout() | 1244 | void KOMonthView::computeLayout() |
1230 | { | 1245 | { |
1231 | // select the appropriate heading string size. E.g. "Wednesday" or "Wed". | 1246 | // select the appropriate heading string size. E.g. "Wednesday" or "Wed". |
1232 | // note this only changes the text if the requested size crosses the | 1247 | // note this only changes the text if the requested size crosses the |
1233 | // threshold between big enough to support the full name and not big | 1248 | // threshold between big enough to support the full name and not big |
1234 | // enough. | 1249 | // enough. |
1235 | if ( mShowWeekView ){ | 1250 | if ( mShowWeekView ){ |
1236 | computeLayoutWeek(); | 1251 | computeLayoutWeek(); |
1237 | return; | 1252 | return; |
1238 | } | 1253 | } |
1239 | int daysToShow = 7; | 1254 | int daysToShow = 7; |
1240 | bool combinedSatSun = false; | 1255 | bool combinedSatSun = false; |
1241 | if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { | 1256 | if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { |
@@ -1318,33 +1333,33 @@ void KOMonthView::computeLayout() | |||
1318 | y= dayLabelHei; | 1333 | y= dayLabelHei; |
1319 | h = cellHei ; | 1334 | h = cellHei ; |
1320 | for ( i = 0; i < 6; i++) { | 1335 | for ( i = 0; i < 6; i++) { |
1321 | mWeekLabels[i]->show(); | 1336 | mWeekLabels[i]->show(); |
1322 | if ( i == (6-rowModulo)) | 1337 | if ( i == (6-rowModulo)) |
1323 | ++h; | 1338 | ++h; |
1324 | mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h); | 1339 | mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h); |
1325 | y += h; | 1340 | y += h; |
1326 | } | 1341 | } |
1327 | mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); | 1342 | mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); |
1328 | // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); | 1343 | // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); |
1329 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); | 1344 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); |
1330 | mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; | 1345 | mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; |
1331 | updateDayLabels(); | 1346 | updateDayLabels(); |
1332 | bool forceUpdate = !updatePossible; | 1347 | bool forceUpdate = !updatePossible; |
1333 | updatePossible = true; | 1348 | updatePossible = true; |
1334 | mWeekLabels[mNumWeeks]->setText( i18n("W")); | 1349 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); |
1335 | if ( forceUpdate ) | 1350 | if ( forceUpdate ) |
1336 | updateView(); | 1351 | updateView(); |
1337 | } | 1352 | } |
1338 | 1353 | ||
1339 | void KOMonthView::showContextMenu( Incidence *incidence ) | 1354 | void KOMonthView::showContextMenu( Incidence *incidence ) |
1340 | { | 1355 | { |
1341 | mContextMenu->showIncidencePopup(incidence); | 1356 | mContextMenu->showIncidencePopup(incidence); |
1342 | /* | 1357 | /* |
1343 | if( incidence && incidence->type() == "Event" ) { | 1358 | if( incidence && incidence->type() == "Event" ) { |
1344 | Event *event = static_cast<Event *>(incidence); | 1359 | Event *event = static_cast<Event *>(incidence); |
1345 | mContextMenu->showEventPopup(event); | 1360 | mContextMenu->showEventPopup(event); |
1346 | } else { | 1361 | } else { |
1347 | kdDebug() << "MonthView::showContextMenu(): cast failed." << endl; | 1362 | kdDebug() << "MonthView::showContextMenu(): cast failed." << endl; |
1348 | } | 1363 | } |
1349 | */ | 1364 | */ |
1350 | } | 1365 | } |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 0bc3743..1ed200b 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -227,40 +227,42 @@ class KOMonthView: public KOEventView | |||
227 | MonthViewCell * selectedCell(); | 227 | MonthViewCell * selectedCell(); |
228 | public slots: | 228 | public slots: |
229 | virtual void updateView(); | 229 | virtual void updateView(); |
230 | virtual void updateConfig(); | 230 | virtual void updateConfig(); |
231 | virtual void showDates(const QDate &start, const QDate &end); | 231 | virtual void showDates(const QDate &start, const QDate &end); |
232 | virtual void showEvents(QPtrList<Event> eventList); | 232 | virtual void showEvents(QPtrList<Event> eventList); |
233 | 233 | ||
234 | void changeEventDisplay(Event *, int); | 234 | void changeEventDisplay(Event *, int); |
235 | 235 | ||
236 | void clearSelection(); | 236 | void clearSelection(); |
237 | 237 | ||
238 | void showContextMenu( Incidence * ); | 238 | void showContextMenu( Incidence * ); |
239 | 239 | ||
240 | void setSelectedCell( MonthViewCell * ); | 240 | void setSelectedCell( MonthViewCell * ); |
241 | 241 | ||
242 | protected slots: | 242 | protected slots: |
243 | void selectDateWeekNum ( int ); | ||
244 | void selectInternalWeekNum ( int ); | ||
243 | void switchView(); | 245 | void switchView(); |
244 | void processSelectionChange(); | 246 | void processSelectionChange(); |
245 | signals: | 247 | signals: |
246 | void nextMonth(); | 248 | void nextMonth(); |
247 | void prevMonth(); | 249 | void prevMonth(); |
248 | void showNavigator( bool ); | 250 | void showNavigator( bool ); |
249 | void selectWeekNum ( int ); | 251 | void selectWeekNum ( int ); |
250 | void showDaySignal( QDate ); | 252 | void showDaySignal( QDate ); |
251 | protected: | 253 | protected: |
252 | void resizeEvent(QResizeEvent *); | 254 | void resizeEvent(QResizeEvent *); |
253 | void viewChanged(); | 255 | void viewChanged(); |
254 | void updateDayLabels(); | 256 | void updateDayLabels(); |
255 | 257 | ||
256 | private: | 258 | private: |
257 | bool mShowWeekView; | 259 | bool mShowWeekView; |
258 | bool updatePossible; | 260 | bool updatePossible; |
259 | int mDaysPerWeek; | 261 | int mDaysPerWeek; |
260 | int mNumWeeks; | 262 | int mNumWeeks; |
261 | int mNumCells; | 263 | int mNumCells; |
262 | bool mWeekStartsMonday; | 264 | bool mWeekStartsMonday; |
263 | bool mShowSatSunComp; | 265 | bool mShowSatSunComp; |
264 | void computeLayout(); | 266 | void computeLayout(); |
265 | void computeLayoutWeek(); | 267 | void computeLayoutWeek(); |
266 | 268 | ||
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 8aa0697..ca3de59 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -209,33 +209,33 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | |||
209 | full = false; | 209 | full = false; |
210 | } | 210 | } |
211 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); | 211 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); |
212 | //raiseCurrentView( full ); | 212 | //raiseCurrentView( full ); |
213 | mMainView->processIncidenceSelection( 0 ); | 213 | mMainView->processIncidenceSelection( 0 ); |
214 | //mMainView->updateView(); | 214 | //mMainView->updateView(); |
215 | raiseCurrentView( full, true ); | 215 | raiseCurrentView( full, true ); |
216 | mMainView->adaptNavigationUnits(); | 216 | mMainView->adaptNavigationUnits(); |
217 | } | 217 | } |
218 | 218 | ||
219 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) | 219 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) |
220 | { | 220 | { |
221 | mCurrentAgendaView = 0; | 221 | mCurrentAgendaView = 0; |
222 | int wid = mMainView->width() ; | 222 | int wid = mMainView->width() ; |
223 | int hei = mMainView->height(); | 223 | int hei = mMainView->height(); |
224 | if ( mCurrentView == mMonthView ) { | 224 | if ( mCurrentView == mMonthView ) { |
225 | if ( !KOPrefs::instance()->mMonthViewWeek ) { | 225 | if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { |
226 | mMainView->navigatorBar()->show(); | 226 | mMainView->navigatorBar()->show(); |
227 | hei -= mMainView->navigatorBar()->sizeHint().height(); | 227 | hei -= mMainView->navigatorBar()->sizeHint().height(); |
228 | } | 228 | } |
229 | //mMainView->navigatorBar()->hide(); | 229 | //mMainView->navigatorBar()->hide(); |
230 | } else { | 230 | } else { |
231 | mMainView->navigatorBar()->hide(); | 231 | mMainView->navigatorBar()->hide(); |
232 | } | 232 | } |
233 | if ( fullScreen ) { | 233 | if ( fullScreen ) { |
234 | mMainView->leftFrame()->hide(); | 234 | mMainView->leftFrame()->hide(); |
235 | } else { | 235 | } else { |
236 | mMainView->leftFrame()->show(); | 236 | mMainView->leftFrame()->show(); |
237 | if ( KOPrefs::instance()->mVerticalScreen ) | 237 | if ( KOPrefs::instance()->mVerticalScreen ) |
238 | hei -= mMainView->leftFrame()->height(); | 238 | hei -= mMainView->leftFrame()->height(); |
239 | else | 239 | else |
240 | wid -= mMainView->leftFrame()->width(); | 240 | wid -= mMainView->leftFrame()->width(); |
241 | } | 241 | } |
@@ -505,33 +505,33 @@ void KOViewManager::showMonthView() | |||
505 | mMainView, SLOT(editIncidence(Incidence *))); | 505 | mMainView, SLOT(editIncidence(Incidence *))); |
506 | connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 506 | connect(mMonthView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
507 | mMainView, SLOT(deleteIncidence(Incidence *))); | 507 | mMainView, SLOT(deleteIncidence(Incidence *))); |
508 | 508 | ||
509 | connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), | 509 | connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), |
510 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 510 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
511 | connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), | 511 | connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), |
512 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 512 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
513 | connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), | 513 | connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), |
514 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 514 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
515 | 515 | ||
516 | connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 516 | connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
517 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 517 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
518 | connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 518 | connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
519 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 519 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
520 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), | 520 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), |
521 | mMainView, SLOT ( selectWeekNum( int ) ) ); | 521 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); |
522 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), | 522 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), |
523 | mMainView, SLOT ( showDay( QDate ) ) ); | 523 | mMainView, SLOT ( showDay( QDate ) ) ); |
524 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); | 524 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); |
525 | connect( mMonthView, SIGNAL(nextMonth() ), | 525 | connect( mMonthView, SIGNAL(nextMonth() ), |
526 | mMainView->navigatorBar(), SIGNAL(goNextMonth() ) ); | 526 | mMainView->navigatorBar(), SIGNAL(goNextMonth() ) ); |
527 | connect( mMonthView, SIGNAL(prevMonth() ), | 527 | connect( mMonthView, SIGNAL(prevMonth() ), |
528 | mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) ); | 528 | mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) ); |
529 | connect( mMonthView, SIGNAL( showNavigator(bool) ), | 529 | connect( mMonthView, SIGNAL( showNavigator(bool) ), |
530 | mMainView, SLOT ( showNavigatorBar(bool) ) ); | 530 | mMainView, SLOT ( showNavigatorBar(bool) ) ); |
531 | } | 531 | } |
532 | 532 | ||
533 | globalFlagBlockAgenda = 1; | 533 | globalFlagBlockAgenda = 1; |
534 | //mFlagShowNextxDays = false; | 534 | //mFlagShowNextxDays = false; |
535 | // if(mMonthView == mCurrentView) return; | 535 | // if(mMonthView == mCurrentView) return; |
536 | if ( KOPrefs::instance()->mMonthViewWeek ) | 536 | if ( KOPrefs::instance()->mMonthViewWeek ) |
537 | mMainView->dateNavigator()->selectWeek(); | 537 | mMainView->dateNavigator()->selectWeek(); |