summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt7
-rw-r--r--korganizer/koagendaview.cpp18
2 files changed, 21 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index adbfd67..5bfe1c8 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,208 +1,209 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 1.9.20 ************ 3********** VERSION 1.9.20 ************
4 4
5KO/Pi: 5KO/Pi:
6Added for the "dislplay one day" agenda mode
7info in the caption and in the day lables:
8Now it is displayed, if the selected day is from "day before yesterday"
9to "day after tomorrow".
6Made it possible to delete a Todo, which has sub-todos. 10Made it possible to delete a Todo, which has sub-todos.
7Fixed two small problems in the todo view. 11Fixed two small problems in the todo view.
8Added missing German translation for filter edit and print dialog. 12Added missing German translation for filter edit and print dialog.
9Made search dialog closeable by cancel key. 13Made search dialog closeable by cancel key.
10 14
11Made it possible to select in the date picker the (ligt grey ) 15Made it possible to select in the date picker the (ligt grey )
12dates of the prev./next month with the mouse. 16dates of the prev./next month with the mouse.
13 17
14Added for the "dislplay one day" agenda mode info in the caption:
15Now it is displayed, if the selected day is from "day before yesterday"
16to "day after tomorrow".
17 18
18 19
19 20
20********** VERSION 1.9.19 ************ 21********** VERSION 1.9.19 ************
21 22
22Added a lot of missing translations to KA/Pi, 23Added a lot of missing translations to KA/Pi,
23Added some missing translations to KO/Pi and OM/Pi. 24Added some missing translations to KO/Pi and OM/Pi.
24 25
25Fixed some minor problems in KA/Pi + KO/Pi. 26Fixed some minor problems in KA/Pi + KO/Pi.
26 27
27Fixed a crash when closing PwM/Pi. 28Fixed a crash when closing PwM/Pi.
28Added German translation for PwM/Pi. 29Added German translation for PwM/Pi.
29 30
30Made view change and Month View update faster in KO/Pi. 31Made view change and Month View update faster in KO/Pi.
31 32
32 33
33********** VERSION 1.9.18 ************ 34********** VERSION 1.9.18 ************
34 35
35FYI: The VERSION 1.9.17 was a testing release only. 36FYI: The VERSION 1.9.17 was a testing release only.
36Please read the changelog of VERSION 1.9.17 as well. 37Please read the changelog of VERSION 1.9.17 as well.
37 38
38Cleaned up the syncing config dialog. 39Cleaned up the syncing config dialog.
39Added sync config options for date range for events. 40Added sync config options for date range for events.
40Added sync config options for filters on incoming data. 41Added sync config options for filters on incoming data.
41Added sync config options for filters on outgoing data. 42Added sync config options for filters on outgoing data.
42Please read the updated SyncHowTo about the new filter settings. 43Please read the updated SyncHowTo about the new filter settings.
43These filter settings make it now possible to sync with shared 44These filter settings make it now possible to sync with shared
44calendars without writing back private or confidential data 45calendars without writing back private or confidential data
45(via the outgoing filters). 46(via the outgoing filters).
46To sync only with particular parts of a shared calendar, 47To sync only with particular parts of a shared calendar,
47the incoming filter settings can be used. 48the incoming filter settings can be used.
48An example can be found in the SyncHowTo. 49An example can be found in the SyncHowTo.
49Same for shared addressbooks. 50Same for shared addressbooks.
50 51
51Added a setting for the global kdepim data storage. 52Added a setting for the global kdepim data storage.
52Usually the data is stored in (yourhomedir/kdepim). 53Usually the data is stored in (yourhomedir/kdepim).
53Now you can set in the Global config dialog TAB, subTAB "Data storage path" 54Now you can set in the Global config dialog TAB, subTAB "Data storage path"
54a directory where all the kdepim data is stored. 55a directory where all the kdepim data is stored.
55That makes it easy to save all kdepim data on a SD card on the Z, for example. 56That makes it easy to save all kdepim data on a SD card on the Z, for example.
56 57
57KO/Pi: 58KO/Pi:
58The timeedit input has a pulldown list for times. 59The timeedit input has a pulldown list for times.
59If opened, this pulldown list should now has the right time highlighted. 60If opened, this pulldown list should now has the right time highlighted.
60Added the possibility to exclude events/todos/journals in a filter. 61Added the possibility to exclude events/todos/journals in a filter.
61You should exclude journals, if you do not want them to sync with a public calendar. 62You should exclude journals, if you do not want them to sync with a public calendar.
62 63
63KA/Pi: 64KA/Pi:
64Added the possibility to in/exclude public/private/confidential contacts to a filter. 65Added the possibility to in/exclude public/private/confidential contacts to a filter.
65If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ... 66If you have already defined filterrules in KA/Pi you have to adjust them all by setting the "include public/private/confidential" property manually. Sorry for that ...
66Added printing of card view and details view on desktop. 67Added printing of card view and details view on desktop.
67Printing of list view is not working... 68Printing of list view is not working...
68Added button for removing pictures in contact editor. 69Added button for removing pictures in contact editor.
69Parsing data fix of KA/Pi version 1.9.17. 70Parsing data fix of KA/Pi version 1.9.17.
70Fixed the "parse name automatically" problem of KA/Pi version 1.9.17. 71Fixed the "parse name automatically" problem of KA/Pi version 1.9.17.
71Fixed some syncing merging problems. 72Fixed some syncing merging problems.
72 73
73 74
74********** VERSION 1.9.17 ************ 75********** VERSION 1.9.17 ************
75 76
76KO/Pi: 77KO/Pi:
77Fixed that tooltips were not updated after moving an item in agenda view. 78Fixed that tooltips were not updated after moving an item in agenda view.
78Fixed a bug in sorting start date for recurring events in list view. 79Fixed a bug in sorting start date for recurring events in list view.
79Changed the left button in todo viewer from "Agenda" to "Set completed". 80Changed the left button in todo viewer from "Agenda" to "Set completed".
80This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View. 81This makes it possible to change a todo in the What's Next View quickly to the completed state without leaving the What's Next View.
81Added more info in the todo viewer: Startdate, parent/sub todos. 82Added more info in the todo viewer: Startdate, parent/sub todos.
82 83
83 84
84KA/Pi: 85KA/Pi:
85All fields search does now actually search all the (possible) fields, 86All fields search does now actually search all the (possible) fields,
86not only those listed in the contact list. 87not only those listed in the contact list.
87Made is possible to inline a picture in a vcard on the Z. 88Made is possible to inline a picture in a vcard on the Z.
88This was only possible on the desktop, now is it possible on the Z as well. 89This was only possible on the desktop, now is it possible on the Z as well.
89Fixed of missing save settings after filter configuration. 90Fixed of missing save settings after filter configuration.
90Made saving of addressbook much faster. 91Made saving of addressbook much faster.
91Fixed extension widget layout problem. 92Fixed extension widget layout problem.
92Fixed saving of default formatted name settings. 93Fixed saving of default formatted name settings.
93Fixed formatted name handling in edit dialog. 94Fixed formatted name handling in edit dialog.
94Added an option for changing formatted names of many contacts 95Added an option for changing formatted names of many contacts
95(menu: File - Change - Set formatted name). 96(menu: File - Change - Set formatted name).
96 97
97QWhatsThis was not working on the Z ( only black rectangle was shown). 98QWhatsThis was not working on the Z ( only black rectangle was shown).
98This is Fixed. 99This is Fixed.
99 100
100KDE-Sync: 101KDE-Sync:
101Now readonly KDE resources are synced as well. 102Now readonly KDE resources are synced as well.
102(They are not changed in KDE itself, of course). 103(They are not changed in KDE itself, of course).
103 104
104 105
105 106
106********** VERSION 1.9.16 ************ 107********** VERSION 1.9.16 ************
107 108
108KO/Pi: 109KO/Pi:
109Fixed search dialog size on Z 6000 (480x640 display). 110Fixed search dialog size on Z 6000 (480x640 display).
110Added setting to hide/show time in agenda items. 111Added setting to hide/show time in agenda items.
111Added setting to hide not running todos in todo view. 112Added setting to hide not running todos in todo view.
112Added columns for start date/time in todo view. 113Added columns for start date/time in todo view.
113Replaced the solid half-hour lines in agenda view by dot lines. 114Replaced the solid half-hour lines in agenda view by dot lines.
114Added possibility of printing the What's Next View on the desktop 115Added possibility of printing the What's Next View on the desktop
115(i.e. Windows and Linux). 116(i.e. Windows and Linux).
116Fixed a crash in KO/Pi when starting KO/Pi with What's Next view. 117Fixed a crash in KO/Pi when starting KO/Pi with What's Next view.
117Added tooltips in month view.(Tooltips only available on desktop) 118Added tooltips in month view.(Tooltips only available on desktop)
118 119
119Fixed a strange problem in KO/Pi alarm applet. 120Fixed a strange problem in KO/Pi alarm applet.
120Did not find the actual problem, 121Did not find the actual problem,
121such that now Qtopia reboots again if deinstalling the alarm applet. 122such that now Qtopia reboots again if deinstalling the alarm applet.
122But the alarm applet should work again. 123But the alarm applet should work again.
123 124
124KA/Pi: 125KA/Pi:
125Fixed the problem, that internal pictures were not saved. 126Fixed the problem, that internal pictures were not saved.
126 127
127Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes. 128Fixed a problem in the pi-sync mode by increasing the timeout for data transfer from 20 seconds to 5 minutes.
128 129
129Fixed some minor problems. (Like word wrap in help text windows). 130Fixed some minor problems. (Like word wrap in help text windows).
130 131
131Fixed a compiling problem in microkde/kresources. 132Fixed a compiling problem in microkde/kresources.
132 133
133KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM. 134KO/Pi is using zdbat (renamed to db2file) for syncing with Sharp DTM.
134This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9) 135This version now includes zdbat 1.0.0 (old version was zdbat 0.2.9)
135such that now syncing KO/Pi with Sharp DTM should work on the 136such that now syncing KO/Pi with Sharp DTM should work on the
136Zaurus C 3000 model. 137Zaurus C 3000 model.
137 138
138********** VERSION 1.9.15 ************ 139********** VERSION 1.9.15 ************
139 140
140Usebilty enhancements in KO/Pi: 141Usebilty enhancements in KO/Pi:
141When clicking on the date in a month view cell, the day view is shown. 142When clicking on the date in a month view cell, the day view is shown.
142Old behaviour was, that the "new event" dialog popped up. 143Old behaviour was, that the "new event" dialog popped up.
143 144
144Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). 145Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
145That means, you can restore the latest 146That means, you can restore the latest
146event/todo/journal you have deleted. 147event/todo/journal you have deleted.
147A journal is deleted, if you clear all the text of the journal. 148A journal is deleted, if you clear all the text of the journal.
148 149
149Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. 150Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
150 151
151KA/Pi starting in 480x640 resolution: 152KA/Pi starting in 480x640 resolution:
152Hide the filter action in toolbar 153Hide the filter action in toolbar
153and added icons for undo/delete/redo in toolbar. 154and added icons for undo/delete/redo in toolbar.
154 155
155Change in OM/Pi ViewMail dialog: 156Change in OM/Pi ViewMail dialog:
156When clicking on the "delete" icon the mail is deleted after confirmation as usual. 157When clicking on the "delete" icon the mail is deleted after confirmation as usual.
157But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). 158But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
158 159
159Fixed a crash when deleting mail-accounts in OM/Pi. 160Fixed a crash when deleting mail-accounts in OM/Pi.
160 161
161 162
162********** VERSION 1.9.14 ************ 163********** VERSION 1.9.14 ************
163 164
164Fixed some problems with the dialog sizes when switching 165Fixed some problems with the dialog sizes when switching
165portrait/landscape mode on 640x480 PDA display. 166portrait/landscape mode on 640x480 PDA display.
166 167
167Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. 168Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
168 169
169Fixed an ugly bug in KOpieMail: 170Fixed an ugly bug in KOpieMail:
170KOpieMail was not able to write files (mails) to MSDOS file system, 171KOpieMail was not able to write files (mails) to MSDOS file system,
171like on an usual preformatted SD card. That should work now. 172like on an usual preformatted SD card. That should work now.
172To save your mail data on the Sd card do the following: 173To save your mail data on the Sd card do the following:
173Create a dir on the SD card: 174Create a dir on the SD card:
174mkdir /mnt/card/localmail 175mkdir /mnt/card/localmail
175Go to your home dir: 176Go to your home dir:
176cd 177cd
177Go to kopiemail data storage dir: 178Go to kopiemail data storage dir:
178cd kdepim/apps/kopiemail 179cd kdepim/apps/kopiemail
179Create a symlink to the SD card: 180Create a symlink to the SD card:
180ls -s /mnt/card/localmail 181ls -s /mnt/card/localmail
181Now KOpieMail will store all mails on the SD card. 182Now KOpieMail will store all mails on the SD card.
182 183
183KO/Pi Monthview: 184KO/Pi Monthview:
184Now "Go to Today" selects the current month from day 1-end, 185Now "Go to Today" selects the current month from day 1-end,
185not the current date + some days. 186not the current date + some days.
186I.e. "Go to Today" shows now always 187I.e. "Go to Today" shows now always
187the current month with first day of month in the first row. 188the current month with first day of month in the first row.
188 189
189Added missing German translation. 190Added missing German translation.
190 191
191Fixed icons of executeable on Wintendo. 192Fixed icons of executeable on Wintendo.
192 193
193Added a "Show next Mail" button to the OM/Pi 194Added a "Show next Mail" button to the OM/Pi
194mail viewer such that the mail below the current mail 195mail viewer such that the mail below the current mail
195in the mail list view of the current folder 196in the mail list view of the current folder
196can be read with a single click. 197can be read with a single click.
197 198
198 199
199********** VERSION 1.9.13 ************ 200********** VERSION 1.9.13 ************
200 201
201Fixed nasty PwM/Pi file reading bug, when 202Fixed nasty PwM/Pi file reading bug, when
202the used hash algo of file is different then the global 203the used hash algo of file is different then the global
203hash algo. 204hash algo.
204 205
205Added KA/Pi support for opie mailit mailapplication. 206Added KA/Pi support for opie mailit mailapplication.
206 207
207Fixed some bugs in OM/Pi. 208Fixed some bugs in OM/Pi.
208Now character conversion tables are available for the Zaurus 209Now character conversion tables are available for the Zaurus
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index c5acafd..6428757 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -449,429 +449,445 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
449 // Create/Show/Edit/Delete Event 449 // Create/Show/Edit/Delete Event
450 connect(mAgenda,SIGNAL(newEventSignal(int,int)), 450 connect(mAgenda,SIGNAL(newEventSignal(int,int)),
451 SLOT(newEvent(int,int))); 451 SLOT(newEvent(int,int)));
452 connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)), 452 connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)),
453 SLOT(newEvent(int,int,int,int))); 453 SLOT(newEvent(int,int,int,int)));
454 connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)), 454 connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)),
455 SLOT(newEventAllDay(int,int))); 455 SLOT(newEventAllDay(int,int)));
456 connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)), 456 connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)),
457 SLOT(newEventAllDay(int,int))); 457 SLOT(newEventAllDay(int,int)));
458 connect(mAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), 458 connect(mAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)),
459 SLOT(newTimeSpanSelected(int,int,int,int))); 459 SLOT(newTimeSpanSelected(int,int,int,int)));
460 connect(mAllDayAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)), 460 connect(mAllDayAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)),
461 SLOT(newTimeSpanSelectedAllDay(int,int,int,int))); 461 SLOT(newTimeSpanSelectedAllDay(int,int,int,int)));
462 connect(mAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView())); 462 connect(mAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView()));
463 connect(mAllDayAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView())); 463 connect(mAllDayAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView()));
464 464
465 connect(mAgenda,SIGNAL(editIncidenceSignal(Incidence *)), 465 connect(mAgenda,SIGNAL(editIncidenceSignal(Incidence *)),
466 SIGNAL(editIncidenceSignal(Incidence *))); 466 SIGNAL(editIncidenceSignal(Incidence *)));
467 connect(mAllDayAgenda,SIGNAL(editIncidenceSignal(Incidence *)), 467 connect(mAllDayAgenda,SIGNAL(editIncidenceSignal(Incidence *)),
468 SIGNAL(editIncidenceSignal(Incidence *))); 468 SIGNAL(editIncidenceSignal(Incidence *)));
469 connect(mAgenda,SIGNAL(showIncidenceSignal(Incidence *)), 469 connect(mAgenda,SIGNAL(showIncidenceSignal(Incidence *)),
470 SIGNAL(showIncidenceSignal(Incidence *))); 470 SIGNAL(showIncidenceSignal(Incidence *)));
471 connect(mAllDayAgenda,SIGNAL(showIncidenceSignal(Incidence *)), 471 connect(mAllDayAgenda,SIGNAL(showIncidenceSignal(Incidence *)),
472 SIGNAL(showIncidenceSignal(Incidence *))); 472 SIGNAL(showIncidenceSignal(Incidence *)));
473 connect(mAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)), 473 connect(mAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)),
474 SIGNAL(deleteIncidenceSignal(Incidence *))); 474 SIGNAL(deleteIncidenceSignal(Incidence *)));
475 connect(mAllDayAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)), 475 connect(mAllDayAgenda,SIGNAL(deleteIncidenceSignal(Incidence *)),
476 SIGNAL(deleteIncidenceSignal(Incidence *))); 476 SIGNAL(deleteIncidenceSignal(Incidence *)));
477 477
478 connect(mAgenda,SIGNAL(itemModified(KOAgendaItem *, int )), 478 connect(mAgenda,SIGNAL(itemModified(KOAgendaItem *, int )),
479 SLOT(updateEventDates(KOAgendaItem *, int ))); 479 SLOT(updateEventDates(KOAgendaItem *, int )));
480 connect(mAllDayAgenda,SIGNAL(itemModified(KOAgendaItem *, int )), 480 connect(mAllDayAgenda,SIGNAL(itemModified(KOAgendaItem *, int )),
481 SLOT(updateEventDates(KOAgendaItem *, int))); 481 SLOT(updateEventDates(KOAgendaItem *, int)));
482 482
483 // event indicator update 483 // event indicator update
484 connect(mAgenda,SIGNAL(lowerYChanged(int)), 484 connect(mAgenda,SIGNAL(lowerYChanged(int)),
485 SLOT(updateEventIndicatorTop(int))); 485 SLOT(updateEventIndicatorTop(int)));
486 connect(mAgenda,SIGNAL(upperYChanged(int)), 486 connect(mAgenda,SIGNAL(upperYChanged(int)),
487 SLOT(updateEventIndicatorBottom(int))); 487 SLOT(updateEventIndicatorBottom(int)));
488 // drag signals 488 // drag signals
489 /* 489 /*
490 connect(mAgenda,SIGNAL(startDragSignal(Event *)), 490 connect(mAgenda,SIGNAL(startDragSignal(Event *)),
491 SLOT(startDrag(Event *))); 491 SLOT(startDrag(Event *)));
492 connect(mAllDayAgenda,SIGNAL(startDragSignal(Event *)), 492 connect(mAllDayAgenda,SIGNAL(startDragSignal(Event *)),
493 SLOT(startDrag(Event *))); 493 SLOT(startDrag(Event *)));
494 */ 494 */
495 // synchronize selections 495 // synchronize selections
496 connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ), 496 connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ),
497 mAllDayAgenda, SLOT( deselectItem() ) ); 497 mAllDayAgenda, SLOT( deselectItem() ) );
498 connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ), 498 connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ),
499 mAgenda, SLOT( deselectItem() ) ); 499 mAgenda, SLOT( deselectItem() ) );
500 connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ), 500 connect( mAgenda, SIGNAL( incidenceSelected( Incidence * ) ),
501 SIGNAL( incidenceSelected( Incidence * ) ) ); 501 SIGNAL( incidenceSelected( Incidence * ) ) );
502 connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ), 502 connect( mAllDayAgenda, SIGNAL( incidenceSelected( Incidence * ) ),
503 SIGNAL( incidenceSelected( Incidence * ) ) ); 503 SIGNAL( incidenceSelected( Incidence * ) ) );
504 connect( mAgenda, SIGNAL( resizedSignal() ), 504 connect( mAgenda, SIGNAL( resizedSignal() ),
505 SLOT( updateConfig( ) ) ); 505 SLOT( updateConfig( ) ) );
506 connect( mAgenda, SIGNAL( addToCalSignal(Incidence *, Incidence *) ), 506 connect( mAgenda, SIGNAL( addToCalSignal(Incidence *, Incidence *) ),
507 SLOT( addToCalSlot(Incidence *, Incidence * ) ) ); 507 SLOT( addToCalSlot(Incidence *, Incidence * ) ) );
508 connect( mAllDayAgenda, SIGNAL( addToCalSignal(Incidence * ,Incidence *) ), 508 connect( mAllDayAgenda, SIGNAL( addToCalSignal(Incidence * ,Incidence *) ),
509 SLOT( addToCalSlot(Incidence * , Incidence *) ) ); 509 SLOT( addToCalSlot(Incidence * , Incidence *) ) );
510 // connect( mAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) ); 510 // connect( mAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) );
511 //connect( mAllDayAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) ); 511 //connect( mAllDayAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) );
512 512
513 513
514} 514}
515 515
516void KOAgendaView::toggleAllDay() 516void KOAgendaView::toggleAllDay()
517{ 517{
518 if ( mSplitterAgenda->firstHandle() ) 518 if ( mSplitterAgenda->firstHandle() )
519 mSplitterAgenda->firstHandle()->toggle(); 519 mSplitterAgenda->firstHandle()->toggle();
520} 520}
521void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld ) 521void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld )
522{ 522{
523 calendar()->addIncidence( inc ); 523 calendar()->addIncidence( inc );
524 524
525 if ( incOld ) { 525 if ( incOld ) {
526 if ( incOld->type() == "Todo" ) 526 if ( incOld->type() == "Todo" )
527 emit todoMoved((Todo*)incOld, KOGlobals::EVENTEDITED ); 527 emit todoMoved((Todo*)incOld, KOGlobals::EVENTEDITED );
528 else 528 else
529 emit incidenceChanged(incOld, KOGlobals::EVENTEDITED); 529 emit incidenceChanged(incOld, KOGlobals::EVENTEDITED);
530 } 530 }
531 531
532} 532}
533 533
534KOAgendaView::~KOAgendaView() 534KOAgendaView::~KOAgendaView()
535{ 535{
536 delete mAgendaPopup; 536 delete mAgendaPopup;
537 delete mAllDayAgendaPopup; 537 delete mAllDayAgendaPopup;
538 delete KOAgendaItem::paintPix(); 538 delete KOAgendaItem::paintPix();
539 delete KOAgendaItem::paintPixSel(); 539 delete KOAgendaItem::paintPixSel();
540} 540}
541void KOAgendaView::resizeEvent( QResizeEvent* e ) 541void KOAgendaView::resizeEvent( QResizeEvent* e )
542{ 542{
543 //qDebug("KOAgendaView::resizeEvent( QResizeEvent* e ) %d ", e->size().width()); 543 //qDebug("KOAgendaView::resizeEvent( QResizeEvent* e ) %d ", e->size().width());
544 bool uc = false; 544 bool uc = false;
545 int ow = e->oldSize().width(); 545 int ow = e->oldSize().width();
546 int oh = e->oldSize().height(); 546 int oh = e->oldSize().height();
547 int w = e->size().width(); 547 int w = e->size().width();
548 int h = e->size().height(); 548 int h = e->size().height();
549 if ( (ow > oh && w< h ) || (ow < oh && w > h ) ) { 549 if ( (ow > oh && w< h ) || (ow < oh && w > h ) ) {
550 if ( ! mBlockUpdating && !globalFlagBlockStartup && !globalFlagBlockAgenda ) 550 if ( ! mBlockUpdating && !globalFlagBlockStartup && !globalFlagBlockAgenda )
551 uc = true; 551 uc = true;
552 //qDebug("view changed %d %d %d %d ", ow, oh , w , h); 552 //qDebug("view changed %d %d %d %d ", ow, oh , w , h);
553 } 553 }
554 mUpcomingWidth = e->size().width() ; 554 mUpcomingWidth = e->size().width() ;
555 if ( mBlockUpdating || uc ) { 555 if ( mBlockUpdating || uc ) {
556 mBlockUpdating = false; 556 mBlockUpdating = false;
557 //mAgenda->setMinimumSize(800 , 600 ); 557 //mAgenda->setMinimumSize(800 , 600 );
558 //qDebug("mAgenda->resize+++++++++++++++ "); 558 //qDebug("mAgenda->resize+++++++++++++++ ");
559 updateConfig(); 559 updateConfig();
560 //qDebug("KOAgendaView::Updating now possible "); 560 //qDebug("KOAgendaView::Updating now possible ");
561 } else 561 } else
562 createDayLabels(); 562 createDayLabels();
563 //qDebug("resizeEvent end "); 563 //qDebug("resizeEvent end ");
564 564
565} 565}
566void KOAgendaView::createDayLabels() 566void KOAgendaView::createDayLabels()
567{ 567{
568 568
569 if ( mBlockUpdating || globalFlagBlockLabel == 1) { 569 if ( mBlockUpdating || globalFlagBlockLabel == 1) {
570 // qDebug(" KOAgendaView::createDayLabels() blocked "); 570 // qDebug(" KOAgendaView::createDayLabels() blocked ");
571 return; 571 return;
572 572
573 } 573 }
574 int newHight; 574 int newHight;
575 575
576 // ### Before deleting and recreating we could check if mSelectedDates changed... 576 // ### Before deleting and recreating we could check if mSelectedDates changed...
577 // It would remove some flickering and gain speed (since this is called by 577 // It would remove some flickering and gain speed (since this is called by
578 // each updateView() call) 578 // each updateView() call)
579 579
580 int maxWid = mUpcomingWidth - mTimeLabels->width()- mAgenda->verticalScrollBar()->width() - 2; 580 int maxWid = mUpcomingWidth - mTimeLabels->width()- mAgenda->verticalScrollBar()->width() - 2;
581 mDayLabelsFrame->setMaximumWidth( mUpcomingWidth ); 581 mDayLabelsFrame->setMaximumWidth( mUpcomingWidth );
582 if ( maxWid < 0 ) 582 if ( maxWid < 0 )
583 maxWid = 20; 583 maxWid = 20;
584 584
585 QFont dlf = KOPrefs::instance()->mTimeLabelsFont; 585 QFont dlf = KOPrefs::instance()->mTimeLabelsFont;
586 QFontMetrics fm ( dlf ); 586 QFontMetrics fm ( dlf );
587 int selCount = mSelectedDates.count(); 587 int selCount = mSelectedDates.count();
588 QString dayTest = "Mon 20"; 588 QString dayTest = "Mon 20";
589 int wid = fm.width( dayTest ); 589 int wid = fm.width( dayTest );
590 maxWid -= ( selCount * 3 ); 590 maxWid -= ( selCount * 3 );
591 if ( maxWid < 0 ) 591 if ( maxWid < 0 )
592 maxWid = 20; 592 maxWid = 20;
593 int needWid = wid * selCount; 593 int needWid = wid * selCount;
594 //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid ); 594 //qDebug("++++++++Needed : %d MaxWidth: %d", needWid, maxWid );
595 //if ( needWid > maxWid ) 595 //if ( needWid > maxWid )
596 // qDebug("DAYLABELS TOOOOOOO BIG "); 596 // qDebug("DAYLABELS TOOOOOOO BIG ");
597 while ( needWid > maxWid ) { 597 while ( needWid > maxWid ) {
598 dayTest = dayTest.left( dayTest.length() - 1 ); 598 dayTest = dayTest.left( dayTest.length() - 1 );
599 wid = fm.width( dayTest ); 599 wid = fm.width( dayTest );
600 needWid = wid * selCount; 600 needWid = wid * selCount;
601 } 601 }
602 int maxLen = dayTest.length(); 602 int maxLen = dayTest.length();
603 int fontPoint = dlf.pointSize(); 603 int fontPoint = dlf.pointSize();
604 if ( maxLen < 2 ) { 604 if ( maxLen < 2 ) {
605 int fontPoint = dlf.pointSize(); 605 int fontPoint = dlf.pointSize();
606 while ( fontPoint > 4 ) { 606 while ( fontPoint > 4 ) {
607 --fontPoint; 607 --fontPoint;
608 dlf.setPointSize( fontPoint ); 608 dlf.setPointSize( fontPoint );
609 QFontMetrics f( dlf ); 609 QFontMetrics f( dlf );
610 wid = f.width( "20" ); 610 wid = f.width( "20" );
611 needWid = wid * selCount; 611 needWid = wid * selCount;
612 if ( needWid < maxWid ) 612 if ( needWid < maxWid )
613 break; 613 break;
614 } 614 }
615 maxLen = 2; 615 maxLen = 2;
616 } 616 }
617 //qDebug("Max len %d ", dayTest.length() ); 617 //qDebug("Max len %d ", dayTest.length() );
618 618
619 QFontMetrics tempF( dlf ); 619 QFontMetrics tempF( dlf );
620 newHight = tempF.height(); 620 newHight = tempF.height();
621 mDayLabels->setFont( dlf ); 621 mDayLabels->setFont( dlf );
622 // mLayoutDayLabels = new QHBoxLayout(mDayLabels);; 622 // mLayoutDayLabels = new QHBoxLayout(mDayLabels);;
623 // mLayoutDayLabels->addSpacing(mTimeLabels->width()); 623 // mLayoutDayLabels->addSpacing(mTimeLabels->width());
624 //mLayoutDayLabels->addSpacing( 2 ); 624 //mLayoutDayLabels->addSpacing( 2 );
625 // QFont lFont = dlf; 625 // QFont lFont = dlf;
626 bool appendLabels = false; 626 bool appendLabels = false;
627 QLabel *dayLabel; 627 QLabel *dayLabel;
628 dayLabel = mDayLabelsList.first(); 628 dayLabel = mDayLabelsList.first();
629 if ( !dayLabel ) { 629 if ( !dayLabel ) {
630 appendLabels = true; 630 appendLabels = true;
631 dayLabel = new QLabel(mDayLabels); 631 dayLabel = new QLabel(mDayLabels);
632 mDayLabelsList.append( dayLabel ); 632 mDayLabelsList.append( dayLabel );
633 mLayoutDayLabels->addWidget(dayLabel); 633 mLayoutDayLabels->addWidget(dayLabel);
634 } 634 }
635 dayLabel->setFixedWidth( mTimeLabels->width()+2 ); 635 dayLabel->setFixedWidth( mTimeLabels->width()+2 );
636 dayLabel->setFont( dlf ); 636 dayLabel->setFont( dlf );
637 dayLabel->setAlignment(QLabel::AlignHCenter); 637 dayLabel->setAlignment(QLabel::AlignHCenter);
638 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); 638 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) );
639 dayLabel->show(); 639 dayLabel->show();
640 DateList::ConstIterator dit; 640 DateList::ConstIterator dit;
641 bool oneday = (mSelectedDates.first() == mSelectedDates.last() );
641 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { 642 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
642 QDate date = *dit; 643 QDate date = *dit;
643 // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels); 644 // QBoxLayout *dayLayout = new QVBoxLayout(mLayoutDayLabels);
644 if ( ! appendLabels ) { 645 if ( ! appendLabels ) {
645 dayLabel = mDayLabelsList.next(); 646 dayLabel = mDayLabelsList.next();
646 if ( !dayLabel ) 647 if ( !dayLabel )
647 appendLabels = true; 648 appendLabels = true;
648 } 649 }
649 if ( appendLabels ) { 650 if ( appendLabels ) {
650 dayLabel = new QLabel(mDayLabels); 651 dayLabel = new QLabel(mDayLabels);
651 mDayLabelsList.append( dayLabel ); 652 mDayLabelsList.append( dayLabel );
652 mLayoutDayLabels->addWidget(dayLabel); 653 mLayoutDayLabels->addWidget(dayLabel);
653 } 654 }
654 dayLabel->setMinimumWidth( 1 ); 655 dayLabel->setMinimumWidth( 1 );
655 dayLabel->setMaximumWidth( 2048 ); 656 dayLabel->setMaximumWidth( 2048 );
656 dayLabel->setFont( dlf ); 657 dayLabel->setFont( dlf );
657 dayLabel->show(); 658 dayLabel->show();
658 QString str; 659 QString str;
659 int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date); 660 int dW = KOGlobals::self()->calendarSystem()->dayOfWeek(date);
660 QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true ); 661 QString dayName = KOGlobals::self()->calendarSystem()->weekDayName( dW, true );
661 switch ( maxLen ) { 662 switch ( maxLen ) {
662 case 2: 663 case 2:
663 str = QString::number( date.day() ); 664 str = QString::number( date.day() );
664 break; 665 break;
665 666
666 case 3: 667 case 3:
667 str = dayName.left( 1 ) +QString::number( date.day()); 668 str = dayName.left( 1 ) +QString::number( date.day());
668 669
669 break; 670 break;
670 case 4: 671 case 4:
671 str = dayName.left( 1 ) + " " +QString::number( date.day()); 672 str = dayName.left( 1 ) + " " +QString::number( date.day());
672 673
673 break; 674 break;
674 case 5: 675 case 5:
675 str = dayName.left( 2 ) + " " +QString::number( date.day()); 676 str = dayName.left( 2 ) + " " +QString::number( date.day());
676 677
677 break; 678 break;
678 case 6: 679 case 6:
679 str = dayName.left( 3 ) + " " +QString::number( date.day()); 680 str = dayName.left( 3 ) + " " +QString::number( date.day());
680 break; 681 break;
681 682
682 default: 683 default:
683 break; 684 break;
684 } 685 }
685 686 if ( oneday ) {
687 QString addString;
688 if ( mSelectedDates.first() == QDateTime::currentDateTime().date() )
689 addString = i18n("Today");
690 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(1) )
691 addString = i18n("Tomorrow");
692 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-1) )
693 addString = i18n("Yesterday");
694 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(-2) )
695 addString = i18n("Day before yesterday");
696 else if ( mSelectedDates.first() == QDateTime::currentDateTime().date().addDays(2) )
697 addString = i18n("Day after tomorrow");
698 if ( !addString.isEmpty() ) {
699 str = addString+", " + str;
700 }
701 }
686 dayLabel->setText(str); 702 dayLabel->setText(str);
687 dayLabel->setAlignment(QLabel::AlignHCenter); 703 dayLabel->setAlignment(QLabel::AlignHCenter);
688 if (date == QDate::currentDate()) { 704 if (date == QDate::currentDate()) {
689 QFont bFont = dlf; 705 QFont bFont = dlf;
690 bFont.setBold( true ); 706 bFont.setBold( true );
691 dayLabel->setFont(bFont); 707 dayLabel->setFont(bFont);
692 } 708 }
693 //dayLayout->addWidget(dayLabel); 709 //dayLayout->addWidget(dayLabel);
694 710
695#ifndef KORG_NOPLUGINS 711#ifndef KORG_NOPLUGINS
696 CalendarDecoration::List cds = KOCore::self()->calendarDecorations(); 712 CalendarDecoration::List cds = KOCore::self()->calendarDecorations();
697 CalendarDecoration *it; 713 CalendarDecoration *it;
698 for(it = cds.first(); it; it = cds.next()) { 714 for(it = cds.first(); it; it = cds.next()) {
699 QString text = it->shortText( date ); 715 QString text = it->shortText( date );
700 if ( !text.isEmpty() ) { 716 if ( !text.isEmpty() ) {
701 QLabel *label = new QLabel(text,mDayLabels); 717 QLabel *label = new QLabel(text,mDayLabels);
702 label->setAlignment(AlignCenter); 718 label->setAlignment(AlignCenter);
703 dayLayout->addWidget(label); 719 dayLayout->addWidget(label);
704 } 720 }
705 } 721 }
706 722
707 for(it = cds.first(); it; it = cds.next()) { 723 for(it = cds.first(); it; it = cds.next()) {
708 QWidget *wid = it->smallWidget(mDayLabels,date); 724 QWidget *wid = it->smallWidget(mDayLabels,date);
709 if ( wid ) { 725 if ( wid ) {
710 // wid->setHeight(20); 726 // wid->setHeight(20);
711 dayLayout->addWidget(wid); 727 dayLayout->addWidget(wid);
712 } 728 }
713 } 729 }
714#endif 730#endif
715 } 731 }
716 if ( ! appendLabels ) { 732 if ( ! appendLabels ) {
717 dayLabel = mDayLabelsList.next(); 733 dayLabel = mDayLabelsList.next();
718 if ( !dayLabel ) 734 if ( !dayLabel )
719 appendLabels = true; 735 appendLabels = true;
720 } 736 }
721 if ( appendLabels ) { 737 if ( appendLabels ) {
722 dayLabel = new QLabel(mDayLabels); 738 dayLabel = new QLabel(mDayLabels);
723 mDayLabelsList.append( dayLabel ); 739 mDayLabelsList.append( dayLabel );
724 mLayoutDayLabels->addWidget(dayLabel); 740 mLayoutDayLabels->addWidget(dayLabel);
725 } 741 }
726 //dayLabel->hide();//test only 742 //dayLabel->hide();//test only
727 743
728 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ; 744 int offset = (mAgenda->width() - mAgenda->verticalScrollBar()->width()-3 ) % mSelectedDates.count() ;
729 if ( offset < 0 ) offset = 0; 745 if ( offset < 0 ) offset = 0;
730 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 ); 746 //qDebug("mLayoutDayLabels->addSpacing %d ", mAgenda->verticalScrollBar()->width()+offset+2 );
731 dayLabel->setText("");//QString::number ( mSelectedDates.first().month() ) ); 747 dayLabel->setText("");//QString::number ( mSelectedDates.first().month() ) );
732 dayLabel->show(); 748 dayLabel->show();
733 dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset ); 749 dayLabel->setFixedWidth( mAgenda->verticalScrollBar()->width()+ offset );
734 //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2); 750 //qDebug("setToFixed %d ", mAgenda->verticalScrollBar()->width()+ offset+2);
735 //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2); 751 //mLayoutDayLabels->addSpacing(mAgenda->verticalScrollBar()->width()+ offset+2);
736 if ( !appendLabels ) { 752 if ( !appendLabels ) {
737 dayLabel = mDayLabelsList.next(); 753 dayLabel = mDayLabelsList.next();
738 while ( dayLabel ) { 754 while ( dayLabel ) {
739 //qDebug("!dayLabel %d",dayLabel ); 755 //qDebug("!dayLabel %d",dayLabel );
740 dayLabel->hide(); 756 dayLabel->hide();
741 dayLabel = mDayLabelsList.next(); 757 dayLabel = mDayLabelsList.next();
742 } 758 }
743 } 759 }
744 //mDayLabelsFrame->show(); 760 //mDayLabelsFrame->show();
745 //mDayLabels->show(); 761 //mDayLabels->show();
746 //qDebug("heigt %d %d %d ",mDayLabelsFrame->height(), mDayLabelsFrame->sizeHint().height(), newHight); 762 //qDebug("heigt %d %d %d ",mDayLabelsFrame->height(), mDayLabelsFrame->sizeHint().height(), newHight);
747 //mDayLabelsFrame->resize( mAgenda->visibleWidth(), newHight ); 763 //mDayLabelsFrame->resize( mAgenda->visibleWidth(), newHight );
748 mDayLabelsFrame->setFixedHeight( newHight ); 764 mDayLabelsFrame->setFixedHeight( newHight );
749} 765}
750 766
751int KOAgendaView::maxDatesHint() 767int KOAgendaView::maxDatesHint()
752{ 768{
753 // Not sure about the max number of events, so return 0 for now. 769 // Not sure about the max number of events, so return 0 for now.
754 return 0; 770 return 0;
755} 771}
756 772
757int KOAgendaView::currentDateCount() 773int KOAgendaView::currentDateCount()
758{ 774{
759 return mSelectedDates.count(); 775 return mSelectedDates.count();
760} 776}
761 777
762QPtrList<Incidence> KOAgendaView::selectedIncidences() 778QPtrList<Incidence> KOAgendaView::selectedIncidences()
763{ 779{
764 QPtrList<Incidence> selected; 780 QPtrList<Incidence> selected;
765 Incidence *incidence; 781 Incidence *incidence;
766 782
767 incidence = mAgenda->selectedIncidence(); 783 incidence = mAgenda->selectedIncidence();
768 if (incidence) selected.append(incidence); 784 if (incidence) selected.append(incidence);
769 785
770 incidence = mAllDayAgenda->selectedIncidence(); 786 incidence = mAllDayAgenda->selectedIncidence();
771 if (incidence) selected.append(incidence); 787 if (incidence) selected.append(incidence);
772 788
773 return selected; 789 return selected;
774} 790}
775 791
776DateList KOAgendaView::selectedDates() 792DateList KOAgendaView::selectedDates()
777{ 793{
778 DateList selected; 794 DateList selected;
779 QDate qd; 795 QDate qd;
780 796
781 qd = mAgenda->selectedIncidenceDate(); 797 qd = mAgenda->selectedIncidenceDate();
782 if (qd.isValid()) selected.append(qd); 798 if (qd.isValid()) selected.append(qd);
783 799
784 qd = mAllDayAgenda->selectedIncidenceDate(); 800 qd = mAllDayAgenda->selectedIncidenceDate();
785 if (qd.isValid()) selected.append(qd); 801 if (qd.isValid()) selected.append(qd);
786 802
787 return selected; 803 return selected;
788} 804}
789 805
790 806
791void KOAgendaView::updateView() 807void KOAgendaView::updateView()
792{ 808{
793 if ( mBlockUpdating ) 809 if ( mBlockUpdating )
794 return; 810 return;
795 // kdDebug() << "KOAgendaView::updateView()" << endl; 811 // kdDebug() << "KOAgendaView::updateView()" << endl;
796 fillAgenda(); 812 fillAgenda();
797 813
798} 814}
799 815
800 816
801/* 817/*
802 Update configuration settings for the agenda view. This method is not 818 Update configuration settings for the agenda view. This method is not
803 complete. 819 complete.
804*/ 820*/
805void KOAgendaView::updateConfig() 821void KOAgendaView::updateConfig()
806{ 822{
807 if ( mBlockUpdating ) 823 if ( mBlockUpdating )
808 return; 824 return;
809 // kdDebug() << "KOAgendaView::updateConfig()" << endl; 825 // kdDebug() << "KOAgendaView::updateConfig()" << endl;
810 826
811 // update config for children 827 // update config for children
812 mTimeLabels->updateConfig(); 828 mTimeLabels->updateConfig();
813 mAgenda->storePosition(); 829 mAgenda->storePosition();
814 mAgenda->updateConfig(); 830 mAgenda->updateConfig();
815 mAllDayAgenda->updateConfig(); 831 mAllDayAgenda->updateConfig();
816 // widget synchronization 832 // widget synchronization
817 //TODO: find a better way, maybe signal/slot 833 //TODO: find a better way, maybe signal/slot
818 mTimeLabels->positionChanged(); 834 mTimeLabels->positionChanged();
819 835
820 // for some reason, this needs to be called explicitly 836 // for some reason, this needs to be called explicitly
821 mTimeLabels->repaint(); 837 mTimeLabels->repaint();
822 838
823 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); 839 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width());
824 840
825 // ToolTips displaying summary of events 841 // ToolTips displaying summary of events
826 KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() 842 KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance()
827 ->mEnableToolTips); 843 ->mEnableToolTips);
828 844
829 //setHolidayMasks(); 845 //setHolidayMasks();
830 846
831 //createDayLabels(); called by via updateView(); 847 //createDayLabels(); called by via updateView();
832 mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth()); 848 mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth());
833 updateView(); 849 updateView();
834 mAgenda->restorePosition(); 850 mAgenda->restorePosition();
835} 851}
836 852
837 853
838void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) 854void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
839{ 855{
840 // kdDebug() << "KOAgendaView::updateEventDates(): " << item->text() << endl; 856 // kdDebug() << "KOAgendaView::updateEventDates(): " << item->text() << endl;
841 //qDebug("KOAgendaView::updateEventDates "); 857 //qDebug("KOAgendaView::updateEventDates ");
842 QDateTime startDt,endDt; 858 QDateTime startDt,endDt;
843 QDate startDate; 859 QDate startDate;
844 int lenInSecs; 860 int lenInSecs;
845 // if ( type == KOAgenda::RESIZETOP ) 861 // if ( type == KOAgenda::RESIZETOP )
846 // qDebug("RESIZETOP "); 862 // qDebug("RESIZETOP ");
847 // if ( type == KOAgenda::RESIZEBOTTOM ) 863 // if ( type == KOAgenda::RESIZEBOTTOM )
848 // qDebug("RESIZEBOTTOM "); 864 // qDebug("RESIZEBOTTOM ");
849 // if ( type == KOAgenda::MOVE ) 865 // if ( type == KOAgenda::MOVE )
850 // qDebug("MOVE "); 866 // qDebug("MOVE ");
851 if ( item->incidence()->type() == "Event" ) { 867 if ( item->incidence()->type() == "Event" ) {
852 startDt =item->incidence()->dtStart(); 868 startDt =item->incidence()->dtStart();
853 endDt = item->incidence()->dtEnd(); 869 endDt = item->incidence()->dtEnd();
854 lenInSecs = startDt.secsTo( endDt ); 870 lenInSecs = startDt.secsTo( endDt );
855 } 871 }
856 872
857 // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); 873 // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED );
858 874
859 if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { 875 if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) {
860 startDate = mSelectedDates[item->mLastMoveXPos]; 876 startDate = mSelectedDates[item->mLastMoveXPos];
861 } else { 877 } else {
862 if (item->cellX() < 0) { 878 if (item->cellX() < 0) {
863 startDate = (mSelectedDates.first()).addDays(item->cellX()); 879 startDate = (mSelectedDates.first()).addDays(item->cellX());
864 } else { 880 } else {
865 startDate = mSelectedDates[item->cellX()]; 881 startDate = mSelectedDates[item->cellX()];
866 } 882 }
867 } 883 }
868 startDt.setDate(startDate); 884 startDt.setDate(startDate);
869 885
870 if (item->incidence()->doesFloat()) { 886 if (item->incidence()->doesFloat()) {
871 endDt.setDate(startDate.addDays(item->cellWidth() - 1)); 887 endDt.setDate(startDate.addDays(item->cellWidth() - 1));
872 } else { 888 } else {
873 if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) 889 if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE )
874 startDt.setTime(mAgenda->gyToTime(item->cellYTop())); 890 startDt.setTime(mAgenda->gyToTime(item->cellYTop()));
875 if ( item->incidence()->type() == "Event" ) { 891 if ( item->incidence()->type() == "Event" ) {
876 if ( type == KOAgenda::MOVE ) { 892 if ( type == KOAgenda::MOVE ) {
877 endDt = startDt.addSecs(lenInSecs); 893 endDt = startDt.addSecs(lenInSecs);