author | zautrix <zautrix> | 2005-10-27 23:22:36 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-10-27 23:22:36 (UTC) |
commit | cbda16d4966c7483d20d1b6b5a64c8af367ea732 (patch) (unidiff) | |
tree | 47099fd5b318c47eb1d8fff3d8a3eef6e34f6f23 | |
parent | d6d384e50cfd511866958e58cdd3adeb35ed1c4e (diff) | |
download | kdepimpi-cbda16d4966c7483d20d1b6b5a64c8af367ea732.zip kdepimpi-cbda16d4966c7483d20d1b6b5a64c8af367ea732.tar.gz kdepimpi-cbda16d4966c7483d20d1b6b5a64c8af367ea732.tar.bz2 |
us fix
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 5 | ||||
-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 1 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 14 | ||||
-rw-r--r-- | libkdepim/kdatepicker.cpp | 8 | ||||
-rw-r--r-- | microkde/kdatetbl.cpp | 32 |
5 files changed, 34 insertions, 26 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index edf7eb1..681e433 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,26 +1,31 @@ | |||
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.2.6 ************ | ||
4 | |||
5 | KO/Pi: | ||
6 | Made navigation in datepicker more userfriendly when using keyboard for scrolling. | ||
7 | |||
3 | ********** VERSION 2.2.5 ************ | 8 | ********** VERSION 2.2.5 ************ |
4 | 9 | ||
5 | Bugfixes in KO/Pi, KA/Pi and OM/Pi. | 10 | Bugfixes in KO/Pi, KA/Pi and OM/Pi. |
6 | Added possibility to disable auto saving in KO/Pi. | 11 | Added possibility to disable auto saving in KO/Pi. |
7 | How to disable it? Good question! Next question, please? | 12 | How to disable it? Good question! Next question, please? |
8 | Added info about count of events/todos/journals to calendar info. | 13 | Added info about count of events/todos/journals to calendar info. |
9 | 14 | ||
10 | 15 | ||
11 | ********** VERSION 2.2.4 ************ | 16 | ********** VERSION 2.2.4 ************ |
12 | 17 | ||
13 | KO/Pi alarm applet: Made font smaller and added a dealy before starting KO/Pi to avoid problems accessing data storage when an alarm did wake up the Z. | 18 | KO/Pi alarm applet: Made font smaller and added a dealy before starting KO/Pi to avoid problems accessing data storage when an alarm did wake up the Z. |
14 | Added 3 sec notification about a started timer. | 19 | Added 3 sec notification about a started timer. |
15 | 20 | ||
16 | KO/Pi: | 21 | KO/Pi: |
17 | Added export option for all data to File->Export menu. | 22 | Added export option for all data to File->Export menu. |
18 | Better management if a save error occours. | 23 | Better management if a save error occours. |
19 | Added 15 sec delay in automatic saving when Z wake up from suspend and the automatic save timer did expire - to avoid problems accessing data storage directly after wake up. | 24 | Added 15 sec delay in automatic saving when Z wake up from suspend and the automatic save timer did expire - to avoid problems accessing data storage directly after wake up. |
20 | Fix for displaying month names of an utf8 translated language (like Russian). I hope a Russian version of KO/Pi will be available soon. | 25 | Fix for displaying month names of an utf8 translated language (like Russian). I hope a Russian version of KO/Pi will be available soon. |
21 | 26 | ||
22 | Added duration info about multiday events. | 27 | Added duration info about multiday events. |
23 | Changed behaviour of "Set complete" in Todo viewer: Now Todo viewer closes not automatically. | 28 | Changed behaviour of "Set complete" in Todo viewer: Now Todo viewer closes not automatically. |
24 | 29 | ||
25 | KA/Pi: | 30 | KA/Pi: |
26 | Added for vCard import the option to import contact data in Latin1 format. | 31 | Added for vCard import the option to import contact data in Latin1 format. |
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index 288ce4b..767e243 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1557,25 +1557,24 @@ | |||
1557 | { "Conflict detection","Konflikterkennung" }, | 1557 | { "Conflict detection","Konflikterkennung" }, |
1558 | { "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, | 1558 | { "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, |
1559 | { "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, | 1559 | { "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, |
1560 | { "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, | 1560 | { "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, |
1561 | { "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, | 1561 | { "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, |
1562 | { " Yes, close "," Ja, beenden " }, | 1562 | { " Yes, close "," Ja, beenden " }, |
1563 | { "Export All Data","Exportiere alle Daten" }, | 1563 | { "Export All Data","Exportiere alle Daten" }, |
1564 | { "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, | 1564 | { "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, |
1565 | { "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, | 1565 | { "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, |
1566 | { " (Duration: %1 days)"," (Dauer: %1 Tage)" }, | 1566 | { " (Duration: %1 days)"," (Dauer: %1 Tage)" }, |
1567 | { "Autosave enabled!","Auto-Speichern angeschaltet!" }, | 1567 | { "Autosave enabled!","Auto-Speichern angeschaltet!" }, |
1568 | { "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" }, | 1568 | { "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" }, |
1569 | { "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" }, | 1569 | { "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" }, |
1570 | { "Yes, Save!","Ja, Speichern!" }, | 1570 | { "Yes, Save!","Ja, Speichern!" }, |
1571 | { "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" }, | 1571 | { "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" }, |
1572 | { "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" }, | 1572 | { "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" }, |
1573 | { "<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>","<br>Der Kalender enthält<br><b>%1 Termine<br>%2 Todos<br>%3 Journale</b>" }, | 1573 | { "<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>","<br>Der Kalender enthält<br><b>%1 Termine<br>%2 Todos<br>%3 Journale</b>" }, |
1574 | { "","" }, | 1574 | { "","" }, |
1575 | { "","" }, | 1575 | { "","" }, |
1576 | { "","" }, | 1576 | { "","" }, |
1577 | { "","" }, | 1577 | { "","" }, |
1578 | { "","" }, | 1578 | { "","" }, |
1579 | { "","" }, | 1579 | { "","" }, |
1580 | { "","" }, | 1580 | { "","" }, |
1581 | { "","" }, | ||
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 610aae6..85e9166 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -716,55 +716,63 @@ int MonthViewCell::insertEvent(Event *event) | |||
716 | prefix ="->" ;multiday = 1; | 716 | prefix ="->" ;multiday = 1; |
717 | } | 717 | } |
718 | else { | 718 | else { |
719 | int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); | 719 | int days = event->dtStart().date().daysTo ( event->dtEnd().date() ); |
720 | if ( event->recursOn( mDate.addDays( -days)) ) { | 720 | if ( event->recursOn( mDate.addDays( -days)) ) { |
721 | prefix ="<-" ;multiday = 3; | 721 | prefix ="<-" ;multiday = 3; |
722 | } | 722 | } |
723 | } | 723 | } |
724 | 724 | ||
725 | } else { | 725 | } else { |
726 | if (mDate == event->dtStart().date()) { | 726 | if (mDate == event->dtStart().date()) { |
727 | prefix ="->" ;multiday = 1; | 727 | prefix ="->" ;multiday = 1; |
728 | } else if (mDate == event->dtEnd().date()) { | 728 | } else if (mDate == event->dtEnd().date()) { |
729 | prefix ="<-" ;multiday = 3; | 729 | prefix ="<-" ;multiday = 3; |
730 | } | 730 | } |
731 | } | 731 | } |
732 | if ( !event->doesFloat() ) { | 732 | if ( !event->doesFloat() ) { |
733 | if ( mDate == event->dtStart().date () ) | 733 | if ( mDate == event->dtStart().date () ) |
734 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; | 734 | time = KGlobal::locale()->formatTime(event->dtStart().time())+" "; |
735 | else if ( mDate == event->dtEnd().date () ) | 735 | else if ( mDate == event->dtEnd().date () ) |
736 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; | 736 | time = KGlobal::locale()->formatTime(event->dtEnd().time())+" "; |
737 | 737 | ||
738 | } | 738 | } |
739 | text = time + event->summary(); | 739 | text = time + event->summary(); |
740 | |||
741 | int dur = 0; | ||
742 | if ( event->doesFloat() ) { | ||
743 | dur = event->dtStart().daysTo(event->dtEnd())+1; | ||
744 | |||
745 | } | ||
740 | if ( useToolTips ) { | 746 | if ( useToolTips ) { |
741 | mToolTipText += prefix + text; | 747 | mToolTipText += prefix + text; |
742 | if ( event->doesFloat() ) { | 748 | if ( dur ) { |
743 | mToolTipText += i18n(" (Duration: %1 days)" ).arg ( event->dtStart().daysTo(event->dtEnd())+1); | 749 | mToolTipText += i18n(" (Duration: %1 days)" ).arg ( dur ); |
744 | |||
745 | } | 750 | } |
746 | } | 751 | } |
752 | if ( dur ) { | ||
753 | text += " ("+ QString::number( dur ) + i18n(" days" ) + ")"; | ||
754 | } | ||
747 | } else { | 755 | } else { |
748 | if (event->doesFloat()) { | 756 | if (event->doesFloat()) { |
749 | text = event->summary(); | 757 | text = event->summary(); |
750 | if ( useToolTips ) | 758 | if ( useToolTips ) |
751 | mToolTipText += text; | 759 | mToolTipText += text; |
752 | } | 760 | } |
753 | else { | 761 | else { |
754 | text = KGlobal::locale()->formatTime(event->dtStart().time()); | 762 | text = KGlobal::locale()->formatTime(event->dtStart().time()); |
755 | text += " " + event->summary(); | 763 | text += " " + event->summary(); |
756 | if ( useToolTips ) | 764 | if ( useToolTips ) |
757 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); | 765 | mToolTipText += KGlobal::locale()->formatTime(event->dtStart().time()) +"-"+KGlobal::locale()->formatTime(event->dtEnd().time())+" " + event->summary(); |
758 | } | 766 | } |
759 | } | 767 | } |
760 | if ( useToolTips && ! event->location().isEmpty() ) { | 768 | if ( useToolTips && ! event->location().isEmpty() ) { |
761 | mToolTipText += " (" + event->location() +")"; | 769 | mToolTipText += " (" + event->location() +")"; |
762 | } | 770 | } |
763 | MonthViewItem *item ; | 771 | MonthViewItem *item ; |
764 | 772 | ||
765 | if ( mAvailItemList.count() ) { | 773 | if ( mAvailItemList.count() ) { |
766 | item = mAvailItemList.first(); | 774 | item = mAvailItemList.first(); |
767 | mAvailItemList.remove( item ); | 775 | mAvailItemList.remove( item ); |
768 | item->recycle( event, text ); | 776 | item->recycle( event, text ); |
769 | } else { | 777 | } else { |
770 | item = new MonthViewItem( event, text ); | 778 | item = new MonthViewItem( event, text ); |
diff --git a/libkdepim/kdatepicker.cpp b/libkdepim/kdatepicker.cpp index 25b4e81..68ef943 100644 --- a/libkdepim/kdatepicker.cpp +++ b/libkdepim/kdatepicker.cpp | |||
@@ -131,48 +131,52 @@ KDatePicker::resizeEvent(QResizeEvent*) | |||
131 | // ----- place the buttons: | 131 | // ----- place the buttons: |
132 | x=0; | 132 | x=0; |
133 | for(count=0; count<NoOfButtons; ++count) | 133 | for(count=0; count<NoOfButtons; ++count) |
134 | { | 134 | { |
135 | w=sizes[count].width(); | 135 | w=sizes[count].width(); |
136 | buttons[count]->setGeometry(x, 0, w, buttonHeight); | 136 | buttons[count]->setGeometry(x, 0, w, buttonHeight); |
137 | x+=w; | 137 | x+=w; |
138 | } | 138 | } |
139 | // ----- place the line edit for direct input: | 139 | // ----- place the line edit for direct input: |
140 | sizes[0]=lineDate->sizeHint(); | 140 | sizes[0]=lineDate->sizeHint(); |
141 | //line->setGeometry(0, height()-sizes[0].height(), width(), sizes[0].height()); | 141 | //line->setGeometry(0, height()-sizes[0].height(), width(), sizes[0].height()); |
142 | int todaywid = todayBut->sizeHint().width(); | 142 | int todaywid = todayBut->sizeHint().width(); |
143 | todayBut->setGeometry(0, height()-sizes[0].height(),todaywid, sizes[0].height()); | 143 | todayBut->setGeometry(0, height()-sizes[0].height(),todaywid, sizes[0].height()); |
144 | lineDate->setGeometry(0+todaywid, height()-sizes[0].height(), width()-todaywid, sizes[0].height()); | 144 | lineDate->setGeometry(0+todaywid, height()-sizes[0].height(), width()-todaywid, sizes[0].height()); |
145 | // ----- adjust the table: | 145 | // ----- adjust the table: |
146 | table->setGeometry(0, buttonHeight, width(), | 146 | table->setGeometry(0, buttonHeight, width(), |
147 | height()-buttonHeight-sizes[0].height()); | 147 | height()-buttonHeight-sizes[0].height()); |
148 | } | 148 | } |
149 | 149 | ||
150 | void | 150 | void |
151 | KDatePicker::dateChangedSlot(QDate date) | 151 | KDatePicker::dateChangedSlot(QDate date) |
152 | { | 152 | { |
153 | lineDate->setDate( date );//(KGlobal::locale()->formatDate(date, true)); | 153 | lineDate->setDate( date );//(KGlobal::locale()->formatDate(date, true)); |
154 | //line->setText(KGlobal::locale()->formatDate(date, true)); | 154 | //line->setText(KGlobal::locale()->formatDate(date, true)); |
155 | QString temp; | ||
156 | selectMonth->setText(KGlobal::locale()->monthName(date.month(), false)); | ||
157 | temp.setNum(date.year()); | ||
158 | selectYear->setText(temp); | ||
155 | emit(dateChanged(date)); | 159 | emit(dateChanged(date)); |
156 | } | 160 | } |
157 | 161 | ||
158 | void | 162 | void |
159 | KDatePicker::tableClickedSlot() | 163 | KDatePicker::tableClickedSlot() |
160 | { | 164 | { |
161 | 165 | ||
162 | emit(dateSelected(table->getDate())); | 166 | emit(dateSelected(table->getDate())); |
163 | emit(tableClicked()); | 167 | emit(tableClicked()); |
164 | } | 168 | } |
165 | 169 | ||
166 | const QDate& | 170 | const QDate& |
167 | KDatePicker::getDate() const | 171 | KDatePicker::getDate() const |
168 | { | 172 | { |
169 | return table->getDate(); | 173 | return table->getDate(); |
170 | } | 174 | } |
171 | 175 | ||
172 | const QDate & | 176 | const QDate & |
173 | KDatePicker::date() const | 177 | KDatePicker::date() const |
174 | { | 178 | { |
175 | return table->getDate(); | 179 | return table->getDate(); |
176 | } | 180 | } |
177 | 181 | ||
178 | void KDatePicker::goToday() | 182 | void KDatePicker::goToday() |
@@ -454,37 +458,41 @@ KDatePicker::setFontSize(int s) | |||
454 | } | 458 | } |
455 | 459 | ||
456 | void KDatePicker::virtual_hook( int id, void* data ) | 460 | void KDatePicker::virtual_hook( int id, void* data ) |
457 | { /*BASE::virtual_hook( id, data );*/ } | 461 | { /*BASE::virtual_hook( id, data );*/ } |
458 | 462 | ||
459 | void KDatePicker::keyPressEvent ( QKeyEvent * e ) | 463 | void KDatePicker::keyPressEvent ( QKeyEvent * e ) |
460 | { | 464 | { |
461 | switch ( e->key() ) { | 465 | switch ( e->key() ) { |
462 | case Qt::Key_Right: | 466 | case Qt::Key_Right: |
463 | monthForwardClicked(); | 467 | monthForwardClicked(); |
464 | break; | 468 | break; |
465 | case Qt::Key_Left: | 469 | case Qt::Key_Left: |
466 | monthBackwardClicked(); | 470 | monthBackwardClicked(); |
467 | break; | 471 | break; |
468 | 472 | ||
469 | case Qt::Key_Down: | 473 | case Qt::Key_Down: |
470 | yearForwardClicked(); | 474 | yearForwardClicked(); |
471 | 475 | ||
472 | break; | 476 | break; |
473 | 477 | ||
474 | case Qt::Key_Up: | 478 | case Qt::Key_Up: |
475 | yearBackwardClicked(); | 479 | yearBackwardClicked(); |
476 | break; | 480 | break; |
477 | 481 | ||
482 | case Qt::Key_T: | ||
483 | goToday(); | ||
484 | break; | ||
485 | |||
478 | case Qt::Key_Return: | 486 | case Qt::Key_Return: |
479 | case Qt::Key_Enter: | 487 | case Qt::Key_Enter: |
480 | case Qt::Key_Space: | 488 | case Qt::Key_Space: |
481 | tableClickedSlot(); | 489 | tableClickedSlot(); |
482 | break; | 490 | break; |
483 | case Qt::Key_Escape: | 491 | case Qt::Key_Escape: |
484 | e->ignore(); | 492 | e->ignore(); |
485 | break; | 493 | break; |
486 | default: | 494 | default: |
487 | break; | 495 | break; |
488 | } | 496 | } |
489 | 497 | ||
490 | } | 498 | } |
diff --git a/microkde/kdatetbl.cpp b/microkde/kdatetbl.cpp index 4271b55..353f78d 100644 --- a/microkde/kdatetbl.cpp +++ b/microkde/kdatetbl.cpp | |||
@@ -219,89 +219,77 @@ KDateTable::keyPressEvent( QKeyEvent *e ) | |||
219 | if ( day > 27 ) | 219 | if ( day > 27 ) |
220 | while ( !QDate::isValid( date.year(), date.month()-1, day ) ) | 220 | while ( !QDate::isValid( date.year(), date.month()-1, day ) ) |
221 | day--; | 221 | day--; |
222 | setDate(QDate(date.year(), date.month()-1, day)); | 222 | setDate(QDate(date.year(), date.month()-1, day)); |
223 | return; | 223 | return; |
224 | } | 224 | } |
225 | if ( e->key() == Qt::Key_Next ) { | 225 | if ( e->key() == Qt::Key_Next ) { |
226 | if ( date.month() == 12 ) { | 226 | if ( date.month() == 12 ) { |
227 | KNotifyClient::beep(); | 227 | KNotifyClient::beep(); |
228 | return; | 228 | return; |
229 | } | 229 | } |
230 | int day = date.day(); | 230 | int day = date.day(); |
231 | if ( day > 27 ) | 231 | if ( day > 27 ) |
232 | while ( !QDate::isValid( date.year(), date.month()+1, day ) ) | 232 | while ( !QDate::isValid( date.year(), date.month()+1, day ) ) |
233 | day--; | 233 | day--; |
234 | setDate(QDate(date.year(), date.month()+1, day)); | 234 | setDate(QDate(date.year(), date.month()+1, day)); |
235 | return; | 235 | return; |
236 | } | 236 | } |
237 | */ | 237 | */ |
238 | int dayoff = KGlobal::locale()->weekStartsMonday() ? 1 : 0; | 238 | int dayoff = KGlobal::locale()->weekStartsMonday() ? 1 : 0; |
239 | 239 | ||
240 | int temp=firstday+date.day()-dayoff; | 240 | int temp=firstday+date.day()-dayoff; |
241 | int pos = temp; | 241 | int pos = temp; |
242 | bool irgnore = true; | 242 | bool irgnore = true; |
243 | int add = 0; | ||
243 | if ( e->state() != Qt::ControlButton ) { | 244 | if ( e->state() != Qt::ControlButton ) { |
244 | if ( e->key() == Qt::Key_Up ) { | 245 | if ( e->key() == Qt::Key_Up ) { |
245 | pos -= 7; | 246 | add -= 7; |
246 | irgnore = false; | 247 | irgnore = false; |
247 | } | 248 | } |
248 | if ( e->key() == Qt::Key_Down ) { | 249 | if ( e->key() == Qt::Key_Down ) { |
249 | pos += 7; | 250 | add += 7; |
250 | irgnore = false; | 251 | irgnore = false; |
251 | } | 252 | } |
252 | if ( e->key() == Qt::Key_Left ) { | 253 | if ( e->key() == Qt::Key_Left ) { |
253 | pos--; | 254 | --add; |
254 | irgnore = false; | 255 | irgnore = false; |
255 | } | 256 | } |
256 | if ( e->key() == Qt::Key_Right ) { | 257 | if ( e->key() == Qt::Key_Right ) { |
257 | pos++; | 258 | ++add; |
258 | irgnore = false; | 259 | irgnore = false; |
259 | } | 260 | } |
260 | } | 261 | } |
261 | if ( irgnore ) | 262 | if ( irgnore ) { |
262 | e->ignore(); | 263 | e->ignore(); |
263 | |||
264 | if(pos+dayoff<=firstday) | ||
265 | { // this day is in the previous month | ||
266 | KNotifyClient::beep(); | ||
267 | return; | ||
268 | } | ||
269 | if(firstday+numdays<pos+dayoff) | ||
270 | { // this date is in the next month | ||
271 | KNotifyClient::beep(i18n( "Month not long enough" )); | ||
272 | return; | ||
273 | } | ||
274 | |||
275 | if ( pos == temp ) | ||
276 | return; | 264 | return; |
265 | } | ||
277 | 266 | ||
278 | setDate(QDate(date.year(), date.month(), pos-firstday+dayoff)); | 267 | pos += add; |
268 | setDate(date.addDays( add )); | ||
279 | updateCell(temp/7+1, temp%7); // Update the previously selected cell | 269 | updateCell(temp/7+1, temp%7); // Update the previously selected cell |
280 | updateCell(pos/7+1, pos%7); // Update the selected cell | 270 | updateCell(pos/7+1, pos%7); // Update the selected cell |
281 | assert(QDate(date.year(), date.month(), pos-firstday+dayoff).isValid()); | 271 | |
282 | |||
283 | |||
284 | } | 272 | } |
285 | 273 | ||
286 | void | 274 | void |
287 | KDateTable::viewportResizeEvent(QResizeEvent * e) | 275 | KDateTable::viewportResizeEvent(QResizeEvent * e) |
288 | { | 276 | { |
289 | QGridView::viewportResizeEvent(e); | 277 | QGridView::viewportResizeEvent(e); |
290 | 278 | ||
291 | setCellWidth(viewport()->width()/7); | 279 | setCellWidth(viewport()->width()/7); |
292 | setCellHeight(viewport()->height()/7); | 280 | setCellHeight(viewport()->height()/7); |
293 | } | 281 | } |
294 | 282 | ||
295 | void | 283 | void |
296 | KDateTable::setFontSize(int size) | 284 | KDateTable::setFontSize(int size) |
297 | { | 285 | { |
298 | int count; | 286 | int count; |
299 | QRect rect; | 287 | QRect rect; |
300 | // ----- store rectangles: | 288 | // ----- store rectangles: |
301 | fontsize=size; | 289 | fontsize=size; |
302 | QFont _font = font(); | 290 | QFont _font = font(); |
303 | _font.setPointSize(fontsize); | 291 | _font.setPointSize(fontsize); |
304 | setFont( _font ); | 292 | setFont( _font ); |
305 | _font.setBold( true ); | 293 | _font.setBold( true ); |
306 | QFontMetrics metrics(_font); | 294 | QFontMetrics metrics(_font); |
307 | 295 | ||