summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog11
-rw-r--r--library/datebookmonth.cpp9
2 files changed, 19 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f347db..3b0f1d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,326 +1,337 @@
1 2005-??-??Opie 1.2.2
2
3
4 New Features
5 ------------
6
7
8 Fixed Bugs
9 ----------
10 * #1695 - Date selector use too small fontsize on VGA screen (hrw)
11
1 2005-09-11Opie 1.2.1 12 2005-09-11Opie 1.2.1
2 13
3 14
4 New Features 15 New Features
5 ------------ 16 ------------
6 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) 17 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker)
7 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) 18 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly)
8 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) 19 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer)
9 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) 20 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl)
10 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) 21 * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl)
11 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) 22 * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl)
12 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) 23 * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw)
13 * ZSafe: Made UI conform to Opie standards (drw) 24 * ZSafe: Made UI conform to Opie standards (drw)
14 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) 25 * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw)
15 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) 26 * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl)
16 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) 27 * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl)
17 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) 28 * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl)
18 * Opie-smb: Added Opie front end for Samba (ljp) 29 * Opie-smb: Added Opie front end for Samba (ljp)
19 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) 30 * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie)
20 * Opieplayer: rudimentary podcast support (ljp) 31 * Opieplayer: rudimentary podcast support (ljp)
21 32
22 Fixed Bugs 33 Fixed Bugs
23 ---------- 34 ----------
24 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) 35 * #1377 - Suspend Powermanagement when switched to another VT (mickeyl)
25 - We actually suspend the complete Opie now in that case. 36 - We actually suspend the complete Opie now in that case.
26 * #1384 - Battery status updated improperly when charging (skyhusker) 37 * #1384 - Battery status updated improperly when charging (skyhusker)
27 * #1476 - Wrong order of application entries in the O-menu (skyhusker) 38 * #1476 - Wrong order of application entries in the O-menu (skyhusker)
28 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) 39 * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl)
29 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) 40 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller)
30 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) 41 * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw)
31 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) 42 * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker)
32 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) 43 * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker)
33 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) 44 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller)
34 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) 45 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker)
35 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) 46 * #1635 - opie-today, datebook-plugin does not show notes (skyhusker)
36 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) 47 * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker)
37 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) 48 * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker)
38 * #1667 - Opie-IRC does not show messages from !channel (skyhusker) 49 * #1667 - Opie-IRC does not show messages from !channel (skyhusker)
39 * #1679 - Security PIN plugin is QVGA sized (hrw) 50 * #1679 - Security PIN plugin is QVGA sized (hrw)
40 * #1682 - Properly resize tab control in OTabWidget (drw) 51 * #1682 - Properly resize tab control in OTabWidget (drw)
41 * n.a. - always show volume and wireless applet popups inside visible screen (deller) 52 * n.a. - always show volume and wireless applet popups inside visible screen (deller)
42 * n.a. - scale O-Menu-Applets appropriately (mickeyl) 53 * n.a. - scale O-Menu-Applets appropriately (mickeyl)
43 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) 54 * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker)
44 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) 55 * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl)
45 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) 56 * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl)
46 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) 57 * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham)
47 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) 58 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl)
48 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) 59 * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw)
49 * n.a. - remove hardcoded font size from netsystemtime (hrw) 60 * n.a. - remove hardcoded font size from netsystemtime (hrw)
50 * n.a. - remove hardcoded font size from checkbook graphs (hrw) 61 * n.a. - remove hardcoded font size from checkbook graphs (hrw)
51 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) 62 * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw)
52 63
53 64
54 Internal 65 Internal
55 -------- 66 --------
56 * Make BluezApplet use OTaskbarApplet (mickeyl) 67 * Make BluezApplet use OTaskbarApplet (mickeyl)
57 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) 68 * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl)
58 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) 69 * libopiecore: add ODirNotification - recursive directory notifications (mickeyl)
59 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) 70 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl)
60 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) 71 * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl)
61 * libopienet: Miscellaneous API cleanups (mickeyl) 72 * libopienet: Miscellaneous API cleanups (mickeyl)
62 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) 73 * libopiecore: Add linux pcmcia system abstraction classes (mickeyl)
63 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) 74 * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl)
64 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) 75 * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl)
65 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) 76 * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl)
66 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) 77 * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl)
67 * Fix / Optimize number of scanned directories (ljp) 78 * Fix / Optimize number of scanned directories (ljp)
68 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) 79 * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl)
69 80
70 2005-03-25Opie 1.2.0 81 2005-03-25Opie 1.2.0
71 82
72 Fixed Bugs 83 Fixed Bugs
73 ---------- 84 ----------
74 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) 85 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw)
75 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) 86 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin)
76 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) 87 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke)
77 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) 88 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw)
78 * n.a.- make qpeglobal.h include qglobal.h (zecke) 89 * n.a.- make qpeglobal.h include qglobal.h (zecke)
79 90
80 2005-03-20Opie 1.2.0-rc1 91 2005-03-20Opie 1.2.0-rc1
81 92
82 93
83 New Features 94 New Features
84 ------------ 95 ------------
85 * Launcher: Support a static background pixmap (mickeyl) 96 * Launcher: Support a static background pixmap (mickeyl)
86 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) 97 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl)
87 * PackageManager supports the 'lists_dir' ipkg configuration option (drw) 98 * PackageManager supports the 'lists_dir' ipkg configuration option (drw)
88 * Added hi-res inline images for large resolution devices (drw) 99 * Added hi-res inline images for large resolution devices (drw)
89 * Improved launcher icons for consistency (ar) 100 * Improved launcher icons for consistency (ar)
90 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) 101 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin)
91 102
92 Fixed Bugs 103 Fixed Bugs
93 ---------- 104 ----------
94 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) 105 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers)
95 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) 106 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw)
96 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) 107 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp)
97 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) 108 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke)
98 * #1482 - Fix double '/' in paths (zecke) 109 * #1482 - Fix double '/' in paths (zecke)
99 * #1536 - Autosave of custom locations in opie backup (ar) 110 * #1536 - Autosave of custom locations in opie backup (ar)
100 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) 111 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
101 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) 112 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
102 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) 113 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw)
103 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) 114 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke)
104 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) 115 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
105 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) 116 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
106 * #1558 - Fixed opie-login breaking opie startup (mickeyl) 117 * #1558 - Fixed opie-login breaking opie startup (mickeyl)
107 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) 118 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning)
108 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) 119 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar)
109 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) 120 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers)
110 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) 121 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints)
111 * #1604 - Checkbook crashed on startup (drw) 122 * #1604 - Checkbook crashed on startup (drw)
112 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) 123 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers)
113 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) 124 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers)
114 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) 125 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw)
115 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) 126 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw)
116 * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) 127 * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw)
117 * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) 128 * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw)
118 * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) 129 * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw)
119 * n.a. - AddressBook - fixed sorting by 'File As' name (drw) 130 * n.a. - AddressBook - fixed sorting by 'File As' name (drw)
120 * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) 131 * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers)
121 * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) 132 * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw)
122 133
123 Internal 134 Internal
124 -------- 135 --------
125 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) 136 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl)
126 * Killed the need for weak symbols in QtE (zecke) 137 * Killed the need for weak symbols in QtE (zecke)
127 * Added optional building libqpe without inline images (mickeyl) 138 * Added optional building libqpe without inline images (mickeyl)
128 * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) 139 * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw)
129 140
130 2005-02-03Opie 1.1.9 141 2005-02-03Opie 1.1.9
131 142
132 New Features 143 New Features
133 ------------ 144 ------------
134 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) 145 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl)
135 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) 146 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl)
136 * Usability enhancements in OpieIRC (skyhusker) 147 * Usability enhancements in OpieIRC (skyhusker)
137 148
138 Fixed Bugs 149 Fixed Bugs
139 ---------- 150 ----------
140 * #1501 - Fixed bug in todo sql backend (eilers) 151 * #1501 - Fixed bug in todo sql backend (eilers)
141 * #1505 - Added more Swap sizes in memoryapplet (mickeyl) 152 * #1505 - Added more Swap sizes in memoryapplet (mickeyl)
142 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) 153 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke)
143 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) 154 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke)
144 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) 155 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl)
145 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) 156 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl)
146 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) 157 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker)
147 158
148 Internal 159 Internal
149 -------- 160 --------
150 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) 161 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl)
151 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) 162 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl)
152 * Made Opie compilable with Qt/Embedded 2.3.10 (ar) 163 * Made Opie compilable with Qt/Embedded 2.3.10 (ar)
153 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) 164 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl)
154 * Build tree cleanups (mickeyl) 165 * Build tree cleanups (mickeyl)
155 166
156 2004-11-26Opie 1.1.8 167 2004-11-26Opie 1.1.8
157 168
158 New Features 169 New Features
159 ------------ 170 ------------
160 * PackageManager supports installation of local ipkg files (drw) 171 * PackageManager supports installation of local ipkg files (drw)
161 * PackageManager supports linking of applications to root (drw) 172 * PackageManager supports linking of applications to root (drw)
162 * PackageManager supports src/gz feeds (drw,wimpie) 173 * PackageManager supports src/gz feeds (drw,wimpie)
163 * Added a syslog information tab to sysinfo (mickeyl) 174 * Added a syslog information tab to sysinfo (mickeyl)
164 * Added new, more consistent, PIM icons + a GIMP teplate (ar) 175 * Added new, more consistent, PIM icons + a GIMP teplate (ar)
165 176
166 Fixed Bugs 177 Fixed Bugs
167 ---------- 178 ----------
168 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) 179 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw)
169 * #1269 - VCards were imported into personal area if it was activated (eilers) 180 * #1269 - VCards were imported into personal area if it was activated (eilers)
170 * #1464 - Packagemanager dont set active filter after install a package (drw) 181 * #1464 - Packagemanager dont set active filter after install a package (drw)
171 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) 182 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers)
172 * #1493 - Fixed one column layout bug of the launcher (hrw) 183 * #1493 - Fixed one column layout bug of the launcher (hrw)
173 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) 184 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw)
174 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) 185 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw)
175 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) 186 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl)
176 187
177 Internal 188 Internal
178 -------- 189 --------
179 * Moved libopie1 to unsupported (mickeyl) 190 * Moved libopie1 to unsupported (mickeyl)
180 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) 191 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers)
181 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) 192 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers)
182 193
183 2004-11-14Opie 1.1.7 194 2004-11-14Opie 1.1.7
184 195
185 New Features 196 New Features
186 ------------ 197 ------------
187 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) 198 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers)
188 * Backup now uses the busy indicator when backing up and restore (ar) 199 * Backup now uses the busy indicator when backing up and restore (ar)
189 * OpiePlayer2 gained adding of Directories to the playlist (zecke) 200 * OpiePlayer2 gained adding of Directories to the playlist (zecke)
190 * OpiePlayer2 better error handling (zecke) 201 * OpiePlayer2 better error handling (zecke)
191 * OpiePlayer2 progress indication while streaming (zecke) 202 * OpiePlayer2 progress indication while streaming (zecke)
192 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) 203 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke)
193 * Ported brightnessapplet from Qtopia 1.7 (mickeyl) 204 * Ported brightnessapplet from Qtopia 1.7 (mickeyl)
194 * Opie-Eye got a Digital Camera File Backend (alwin,zecke) 205 * Opie-Eye got a Digital Camera File Backend (alwin,zecke)
195 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) 206 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke)
196 * Opie-Console use Custom Font and Size in a Profile (harlekin) 207 * Opie-Console use Custom Font and Size in a Profile (harlekin)
197 * Opie-Console transparently log the Output and Input to a file (harlekin) 208 * Opie-Console transparently log the Output and Input to a file (harlekin)
198 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) 209 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem)
199 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) 210 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem)
200 * Opie-Security gained a 'test authentication' button (clem) 211 * Opie-Security gained a 'test authentication' button (clem)
201 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults 212 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults
202 * Opie-Mail improve the handling of POP mail boxes (alwin) 213 * Opie-Mail improve the handling of POP mail boxes (alwin)
203 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) 214 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin)
204 * Opie IRC - backports of the 'NeIRC fork' (zecke) 215 * Opie IRC - backports of the 'NeIRC fork' (zecke)
205 216
206 Fixed Bugs 217 Fixed Bugs
207 ---------- 218 ----------
208 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) 219 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke)
209 * #608 - Make Opie usable for left handed users (zecke) 220 * #608 - Make Opie usable for left handed users (zecke)
210 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) 221 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke)
211 * #1245 - Opie-Go 'paused' (zecke) 222 * #1245 - Opie-Go 'paused' (zecke)
212 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) 223 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke)
213 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) 224 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke)
214 * #1395 - Build VNC Backend with gcc3.4 225 * #1395 - Build VNC Backend with gcc3.4
215 * #1440 - The icon of opie-mobilemsg is missing (CoreDump) 226 * #1440 - The icon of opie-mobilemsg is missing (CoreDump)
216 * #1426 - Add missing opie-bartender Icon (CoreDump) 227 * #1426 - Add missing opie-bartender Icon (CoreDump)
217 * #1445 - Opie-Sheet Has No Icon (CoreDump) 228 * #1445 - Opie-Sheet Has No Icon (CoreDump)
218 * #1448 - Brightness Applet added (mickeyl) 229 * #1448 - Brightness Applet added (mickeyl)
219 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) 230 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke)
220 * #1482 - Fix OFileSelector to be able to sort by size (zecke) 231 * #1482 - Fix OFileSelector to be able to sort by size (zecke)
221 * n.a. - Opie-mail: fixed some crasher, some layout-problems 232 * n.a. - Opie-mail: fixed some crasher, some layout-problems
222 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) 233 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke)
223 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) 234 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke)
224 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) 235 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem)
225 * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) 236 * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem)
226 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) 237 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl)
227 238
228 Internal 239 Internal
229 -------- 240 --------
230 * Opie-Qashmoney has been moved to unsupported (mickeyl) 241 * Opie-Qashmoney has been moved to unsupported (mickeyl)
231 * Opie-Ubrowser has been moved to unsupported (mickeyl) 242 * Opie-Ubrowser has been moved to unsupported (mickeyl)
232 243
233 2004-09-17Opie 1.1.6 244 2004-09-17Opie 1.1.6
234 245
235 New Features 246 New Features
236 ------------ 247 ------------
237 * Fifteen gained configurable number of items (zecke) 248 * Fifteen gained configurable number of items (zecke)
238 * Fifteen can have custom background images (zecke) 249 * Fifteen can have custom background images (zecke)
239 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) 250 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl)
240 * Integrated the new security framework into libopie2 (zecke,clem) 251 * Integrated the new security framework into libopie2 (zecke,clem)
241 * Converted the launcher to use the new security framework (zecke) 252 * Converted the launcher to use the new security framework (zecke)
242 * Backup can now handle custom locations for backup and restore (ar) 253 * Backup can now handle custom locations for backup and restore (ar)
243 * Implemented right-on-hold feedback (wimpie,zecke) 254 * Implemented right-on-hold feedback (wimpie,zecke)
244 * Lots of new features in opie-reader (tim,pohly) 255 * Lots of new features in opie-reader (tim,pohly)
245 * Build system cleanups (schurig) 256 * Build system cleanups (schurig)
246 257
247 Fixed Bugs 258 Fixed Bugs
248 -------- 259 --------
249 * #1005 - Fixed backup to CompactFlash (ar) 260 * #1005 - Fixed backup to CompactFlash (ar)
250 * #1167 - Fixed Opie write crashing on more text than one page (ar) 261 * #1167 - Fixed Opie write crashing on more text than one page (ar)
251 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) 262 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl)
252 * #1359 - Fixed bookmarks in Gutenbrowser (ljp) 263 * #1359 - Fixed bookmarks in Gutenbrowser (ljp)
253 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) 264 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers)
254 * #1370 - Pimconverter now reacts on cancel key (eilers) 265 * #1370 - Pimconverter now reacts on cancel key (eilers)
255 * #1376 - Bring back the capslock/numlock display (zecke) 266 * #1376 - Bring back the capslock/numlock display (zecke)
256 * #1383 - Language settings now warns about losing open apps (Markus Litz) 267 * #1383 - Language settings now warns about losing open apps (Markus Litz)
257 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) 268 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl)
258 * #1394 - Fixed oversized headline in opie-login (coredump) 269 * #1394 - Fixed oversized headline in opie-login (coredump)
259 * #1396 - Opie-console captures the escape key and vim is working (zecke) 270 * #1396 - Opie-console captures the escape key and vim is working (zecke)
260 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) 271 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl)
261 272
262 2004-07-06Opie 1.1.4 273 2004-07-06Opie 1.1.4
263 274
264 New Features 275 New Features
265 ------------ 276 ------------
266 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) 277 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle)
267 * Added Conversion tool for pim-data (eilers) 278 * Added Conversion tool for pim-data (eilers)
268 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) 279 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers)
269 * Modified the PIM API for providing generic use of OPimRecords (eilers) 280 * Modified the PIM API for providing generic use of OPimRecords (eilers)
270 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) 281 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke)
271 282
272 Fixed Bugs 283 Fixed Bugs
273 -------- 284 --------
274 * #1068 - Country Drop Down Box Off Screen 285 * #1068 - Country Drop Down Box Off Screen
275 * #1291 - Opie tinykate does not open .desktop files (ar) 286 * #1291 - Opie tinykate does not open .desktop files (ar)
276 * #1291 - Opie sheet not saving correctly (ar) 287 * #1291 - Opie sheet not saving correctly (ar)
277 * #1294 - Opie does not know about British Summer Time 288 * #1294 - Opie does not know about British Summer Time
278 * #1314 - Drawpad initialization (mickeyl) 289 * #1314 - Drawpad initialization (mickeyl)
279 * #1317 - Packagemanager crashes on hold-down or install (chicken) 290 * #1317 - Packagemanager crashes on hold-down or install (chicken)
280 * #1321 - Batteryapplet graphic glitch (harlekin) 291 * #1321 - Batteryapplet graphic glitch (harlekin)
281 * #1324 - ZSafe not starting up (mickeyl) 292 * #1324 - ZSafe not starting up (mickeyl)
282 * #1328 - Personal Home Address fields is trimmed to 1char (eilers) 293 * #1328 - Personal Home Address fields is trimmed to 1char (eilers)
283 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) 294 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken)
284 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) 295 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl)
285 * #1348 - Datebook dependency on libopiedb2 (chicken) 296 * #1348 - Datebook dependency on libopiedb2 (chicken)
286 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) 297 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers)
287 298
288 2004-04-25Opie 1.1.3 299 2004-04-25Opie 1.1.3
289 300
290 * Introduced first implementation of SQL-Support using SQLite (eilers) 301 * Introduced first implementation of SQL-Support using SQLite (eilers)
291 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) 302 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp)
292 * Added a real system graffiti character set (brad) 303 * Added a real system graffiti character set (brad)
293 * Added Generic Keyconfig Widget (zecke) 304 * Added Generic Keyconfig Widget (zecke)
294 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) 305 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke)
295 * Added new Bible reader app - opie-dagger (drw) 306 * Added new Bible reader app - opie-dagger (drw)
296 * Added a new Image Viewer. Work is ongoing (zecke,alwin) 307 * Added a new Image Viewer. Work is ongoing (zecke,alwin)
297 * Added namespace usage in libopie2 and everywhere (zecke,alwin) 308 * Added namespace usage in libopie2 and everywhere (zecke,alwin)
298 * Enabled the possibility to pass command line arguments to applications (mickeyl) 309 * Enabled the possibility to pass command line arguments to applications (mickeyl)
299 * Added an about applet showing some credits and information about Opie (mickeyl) 310 * Added an about applet showing some credits and information about Opie (mickeyl)
300 * Added benchmarking functionality to sysinfo (mickeyl) 311 * Added benchmarking functionality to sysinfo (mickeyl)
301 * Added applet and configuration application for switching hardware keyboard layouts (alwin) 312 * Added applet and configuration application for switching hardware keyboard layouts (alwin)
302 * Ported applications from libopie1 to libopie2* (drw,ar,alwin) 313 * Ported applications from libopie1 to libopie2* (drw,ar,alwin)
303 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) 314 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe)
304 * Clean-up of package information in control files (drw) 315 * Clean-up of package information in control files (drw)
305 * Repaired mediummount which was broken since integrating the quicklauncher (alwin) 316 * Repaired mediummount which was broken since integrating the quicklauncher (alwin)
306 * Improved big-screen support (zecke,ar) 317 * Improved big-screen support (zecke,ar)
307 * Improved multikeyboard support, added keyboard layout switching applet (mouse) 318 * Improved multikeyboard support, added keyboard layout switching applet (mouse)
308 * Added a new mail client based on libetpan (harlekin,alwin,jgf) 319 * Added a new mail client based on libetpan (harlekin,alwin,jgf)
309 * Added new package manager - opie-packagemanager (drw) 320 * Added new package manager - opie-packagemanager (drw)
310 * Improved light-n-power for C7x0 (mickeyl) 321 * Improved light-n-power for C7x0 (mickeyl)
311 * Added automatic rotation support for C7x0 (treke) 322 * Added automatic rotation support for C7x0 (treke)
312 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) 323 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl)
313 * Added scanning the wireless network neighbourhood to networksettings (mickeyl) 324 * Added scanning the wireless network neighbourhood to networksettings (mickeyl)
314 325
315 2003-11-29Opie 1.0.3 326 2003-11-29Opie 1.0.3
316 327
317 * Released as Version 1.0.3 328 * Released as Version 1.0.3
318 * Improved i18n (various contributors) 329 * Improved i18n (various contributors)
319 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) 330 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin)
320 * Made the Documents Tab optional (mickeyl) 331 * Made the Documents Tab optional (mickeyl)
321 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) 332 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken)
322 333
323 2003-08-04Opie 1.0.0 334 2003-08-04Opie 1.0.0
324 335
325 * Released as Version 1.0.0 336 * Released as Version 1.0.0
326 * Including a PPP module for easy dial up (tille,harlekin,zecke) 337 * Including a PPP module for easy dial up (tille,harlekin,zecke)
diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp
index 2616b7b..ffdf335 100644
--- a/library/datebookmonth.cpp
+++ b/library/datebookmonth.cpp
@@ -1,776 +1,783 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#include "config.h" 20#include "config.h"
21#include "datebookmonth.h" 21#include "datebookmonth.h"
22#include "datebookdb.h" 22#include "datebookdb.h"
23#include "resource.h" 23#include "resource.h"
24#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25 25
26#include <qtoolbutton.h> 26#include <qtoolbutton.h>
27#include <qspinbox.h> 27#include <qspinbox.h>
28#include <qcombobox.h> 28#include <qcombobox.h>
29#include <qvaluestack.h> 29#include <qvaluestack.h>
30#include <qwhatsthis.h> 30#include <qwhatsthis.h>
31 31
32static const QColor s_colorNormalLight = QColor(255, 150, 150); 32static const QColor s_colorNormalLight = QColor(255, 150, 150);
33static const QColor s_colorRepeatLight = QColor(150, 150, 255); 33static const QColor s_colorRepeatLight = QColor(150, 150, 255);
34static const QColor s_colorHolidayLight= QColor(150, 255, 150); 34static const QColor s_colorHolidayLight= QColor(150, 255, 150);
35 35
36DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name ) 36DateBookMonthHeader::DateBookMonthHeader( QWidget *parent, const char *name )
37 : QHBox( parent, name ) 37 : QHBox( parent, name )
38{ 38{
39 setBackgroundMode( PaletteButton ); 39 setBackgroundMode( PaletteButton );
40 40
41 begin = new QToolButton( this ); 41 begin = new QToolButton( this );
42 begin->setFocusPolicy(NoFocus); 42 begin->setFocusPolicy(NoFocus);
43 begin->setPixmap( Resource::loadPixmap( "start" ) ); 43 begin->setPixmap( Resource::loadPixmap( "start" ) );
44 begin->setAutoRaise( TRUE ); 44 begin->setAutoRaise( TRUE );
45 begin->setFixedSize( begin->sizeHint() ); 45 begin->setFixedSize( begin->sizeHint() );
46 QWhatsThis::add( begin, tr("Show January in the selected year") ); 46 QWhatsThis::add( begin, tr("Show January in the selected year") );
47 47
48 back = new QToolButton( this ); 48 back = new QToolButton( this );
49 back->setFocusPolicy(NoFocus); 49 back->setFocusPolicy(NoFocus);
50 back->setPixmap( Resource::loadPixmap( "back" ) ); 50 back->setPixmap( Resource::loadPixmap( "back" ) );
51 back->setAutoRaise( TRUE ); 51 back->setAutoRaise( TRUE );
52 back->setFixedSize( back->sizeHint() ); 52 back->setFixedSize( back->sizeHint() );
53 QWhatsThis::add( back, tr("Show the previous month") ); 53 QWhatsThis::add( back, tr("Show the previous month") );
54 54
55 month = new QComboBox( FALSE, this ); 55 month = new QComboBox( FALSE, this );
56 for ( int i = 0; i < 12; ++i ) 56 for ( int i = 0; i < 12; ++i )
57 month->insertItem( Calendar::nameOfMonth( i + 1 ) ); 57 month->insertItem( Calendar::nameOfMonth( i + 1 ) );
58 58
59 year = new QSpinBox( 1752, 8000, 1, this ); 59 year = new QSpinBox( 1752, 8000, 1, this );
60 60
61 next = new QToolButton( this ); 61 next = new QToolButton( this );
62 next->setFocusPolicy(NoFocus); 62 next->setFocusPolicy(NoFocus);
63 next->setPixmap( Resource::loadPixmap( "forward" ) ); 63 next->setPixmap( Resource::loadPixmap( "forward" ) );
64 next->setAutoRaise( TRUE ); 64 next->setAutoRaise( TRUE );
65 next->setFixedSize( next->sizeHint() ); 65 next->setFixedSize( next->sizeHint() );
66 QWhatsThis::add( next, tr("Show the next month") ); 66 QWhatsThis::add( next, tr("Show the next month") );
67 67
68 end = new QToolButton( this ); 68 end = new QToolButton( this );
69 end->setFocusPolicy(NoFocus); 69 end->setFocusPolicy(NoFocus);
70 end->setPixmap( Resource::loadPixmap( "finish" ) ); 70 end->setPixmap( Resource::loadPixmap( "finish" ) );
71 end->setAutoRaise( TRUE ); 71 end->setAutoRaise( TRUE );
72 end->setFixedSize( end->sizeHint() ); 72 end->setFixedSize( end->sizeHint() );
73 QWhatsThis::add( end, tr("Show December in the selected year") ); 73 QWhatsThis::add( end, tr("Show December in the selected year") );
74 74
75 connect( month, SIGNAL( activated(int) ), 75 connect( month, SIGNAL( activated(int) ),
76 this, SLOT( updateDate() ) ); 76 this, SLOT( updateDate() ) );
77 connect( year, SIGNAL( valueChanged(int) ), 77 connect( year, SIGNAL( valueChanged(int) ),
78 this, SLOT( updateDate() ) ); 78 this, SLOT( updateDate() ) );
79 connect( begin, SIGNAL( clicked() ), 79 connect( begin, SIGNAL( clicked() ),
80 this, SLOT( firstMonth() ) ); 80 this, SLOT( firstMonth() ) );
81 connect( end, SIGNAL( clicked() ), 81 connect( end, SIGNAL( clicked() ),
82 this, SLOT( lastMonth() ) ); 82 this, SLOT( lastMonth() ) );
83 connect( back, SIGNAL( clicked() ), 83 connect( back, SIGNAL( clicked() ),
84 this, SLOT( monthBack() ) ); 84 this, SLOT( monthBack() ) );
85 connect( next, SIGNAL( clicked() ), 85 connect( next, SIGNAL( clicked() ),
86 this, SLOT( monthForward() ) ); 86 this, SLOT( monthForward() ) );
87 back->setAutoRepeat( TRUE ); 87 back->setAutoRepeat( TRUE );
88 next->setAutoRepeat( TRUE ); 88 next->setAutoRepeat( TRUE );
89} 89}
90 90
91 91
92DateBookMonthHeader::~DateBookMonthHeader() 92DateBookMonthHeader::~DateBookMonthHeader()
93{ 93{
94 94
95} 95}
96 96
97void DateBookMonthHeader::updateDate() 97void DateBookMonthHeader::updateDate()
98{ 98{
99 emit dateChanged( year->value(), month->currentItem() + 1 ); 99 emit dateChanged( year->value(), month->currentItem() + 1 );
100} 100}
101 101
102void DateBookMonthHeader::firstMonth() 102void DateBookMonthHeader::firstMonth()
103{ 103{
104 emit dateChanged( year->value(), 1 ); 104 emit dateChanged( year->value(), 1 );
105 month->setCurrentItem( 0 ); 105 month->setCurrentItem( 0 );
106} 106}
107 107
108void DateBookMonthHeader::lastMonth() 108void DateBookMonthHeader::lastMonth()
109{ 109{
110 emit dateChanged( year->value(), 12 ); 110 emit dateChanged( year->value(), 12 );
111 month->setCurrentItem( 11 ); 111 month->setCurrentItem( 11 );
112} 112}
113 113
114void DateBookMonthHeader::monthBack() 114void DateBookMonthHeader::monthBack()
115{ 115{
116 if ( month->currentItem() > 0 ) { 116 if ( month->currentItem() > 0 ) {
117 emit dateChanged( year->value(), month->currentItem() ); 117 emit dateChanged( year->value(), month->currentItem() );
118 month->setCurrentItem( month->currentItem() - 1 ); 118 month->setCurrentItem( month->currentItem() - 1 );
119 } else { 119 } else {
120 emit dateChanged( year->value() - 1, 12 ); 120 emit dateChanged( year->value() - 1, 12 );
121 // we have a signal set to a changed value in year so we only need to change 121 // we have a signal set to a changed value in year so we only need to change
122 // year to get the result... 122 // year to get the result...
123 month->setCurrentItem( 11 ); 123 month->setCurrentItem( 11 );
124 year->setValue( year->value() - 1 ); 124 year->setValue( year->value() - 1 );
125 } 125 }
126} 126}
127 127
128void DateBookMonthHeader::monthForward() 128void DateBookMonthHeader::monthForward()
129{ 129{
130 if ( month->currentItem() < 11 ) { 130 if ( month->currentItem() < 11 ) {
131 emit dateChanged( year->value(), month->currentItem() + 2 ); 131 emit dateChanged( year->value(), month->currentItem() + 2 );
132 month->setCurrentItem( month->currentItem() + 1 ); 132 month->setCurrentItem( month->currentItem() + 1 );
133 } else { 133 } else {
134 // we have a signal set to a changed value in year so we only need to change 134 // we have a signal set to a changed value in year so we only need to change
135 // year to get the result... 135 // year to get the result...
136 month->setCurrentItem( 0 ); 136 month->setCurrentItem( 0 );
137 year->setValue( year->value() + 1 ); 137 year->setValue( year->value() + 1 );
138 } 138 }
139} 139}
140 140
141void DateBookMonthHeader::setDate( int y, int m ) 141void DateBookMonthHeader::setDate( int y, int m )
142{ 142{
143 year->setValue( y ); 143 year->setValue( y );
144 month->setCurrentItem( m - 1 ); 144 month->setCurrentItem( m - 1 );
145} 145}
146 146
147//--------------------------------------------------------------------------- 147//---------------------------------------------------------------------------
148 148
149class DateBookMonthTablePrivate 149class DateBookMonthTablePrivate
150{ 150{
151public: 151public:
152 DateBookMonthTablePrivate() {}; 152 DateBookMonthTablePrivate() {};
153 ~DateBookMonthTablePrivate() { mMonthEvents.clear(); }; 153 ~DateBookMonthTablePrivate() { mMonthEvents.clear(); };
154 154
155 QValueList<EffectiveEvent> mMonthEvents; 155 QValueList<EffectiveEvent> mMonthEvents;
156 bool onMonday; 156 bool onMonday;
157}; 157};
158 158
159DateBookMonthTable::DateBookMonthTable( QWidget *parent, const char *name, 159DateBookMonthTable::DateBookMonthTable( QWidget *parent, const char *name,
160 DateBookDB *newDb ) 160 DateBookDB *newDb )
161 : QTable( 6, 7, parent, name ), 161 : QTable( 6, 7, parent, name ),
162 db( newDb ) 162 db( newDb )
163{ 163{
164 d = new DateBookMonthTablePrivate(); 164 d = new DateBookMonthTablePrivate();
165 selYear = -1; 165 selYear = -1;
166 selMonth = -1; 166 selMonth = -1;
167 selDay = -1; 167 selDay = -1;
168 168
169 /* init these as well make valgrind happy and be consistent with Qtopia1.6 -zecke */ 169 /* init these as well make valgrind happy and be consistent with Qtopia1.6 -zecke */
170 year = -1; 170 year = -1;
171 month = -1; 171 month = -1;
172 day = -1; 172 day = -1;
173 173
174 Config cfg( "qpe" ); 174 Config cfg( "qpe" );
175 cfg.setGroup( "Time" ); 175 cfg.setGroup( "Time" );
176 d->onMonday = cfg.readBoolEntry( "MONDAY" ); 176 d->onMonday = cfg.readBoolEntry( "MONDAY" );
177 177
178 horizontalHeader()->setResizeEnabled( FALSE ); 178 horizontalHeader()->setResizeEnabled( FALSE );
179 // we have to do this here... or suffer the consequences later... 179 // we have to do this here... or suffer the consequences later...
180 for ( int i = 0; i < 7; i++ ){ 180 for ( int i = 0; i < 7; i++ ){
181 horizontalHeader()->resizeSection( i, 30 ); 181 horizontalHeader()->resizeSection( i, 30 );
182 setColumnStretchable( i, TRUE ); 182 setColumnStretchable( i, TRUE );
183 } 183 }
184 setupLabels(); 184 setupLabels();
185 185
186 verticalHeader()->hide(); 186 verticalHeader()->hide();
187 setLeftMargin( 0 ); 187 setLeftMargin( 0 );
188 for ( int i = 0; i < 6; ++i ) 188 for ( int i = 0; i < 6; ++i )
189 setRowStretchable( i, TRUE ); 189 setRowStretchable( i, TRUE );
190 190
191 setSelectionMode( NoSelection ); 191 setSelectionMode( NoSelection );
192 192
193 connect( this, SIGNAL( clicked(int,int,int,const QPoint&) ), 193 connect( this, SIGNAL( clicked(int,int,int,const QPoint&) ),
194 this, SLOT( dayClicked(int,int) ) ); 194 this, SLOT( dayClicked(int,int) ) );
195 connect( this, SIGNAL( currentChanged(int,int) ), 195 connect( this, SIGNAL( currentChanged(int,int) ),
196 this, SLOT( dragDay(int,int) ) ); 196 this, SLOT( dragDay(int,int) ) );
197 setVScrollBarMode( AlwaysOff ); 197 setVScrollBarMode( AlwaysOff );
198 setHScrollBarMode( AlwaysOff ); 198 setHScrollBarMode( AlwaysOff );
199} 199}
200 200
201DateBookMonthTable::~DateBookMonthTable() 201DateBookMonthTable::~DateBookMonthTable()
202{ 202{
203 monthsEvents.clear(); 203 monthsEvents.clear();
204 delete d; 204 delete d;
205} 205}
206 206
207void DateBookMonthTable::setDate(int y, int m, int d) 207void DateBookMonthTable::setDate(int y, int m, int d)
208{ 208{
209 if (month == m && year == y) { 209 if (month == m && year == y) {
210 if ( selYear == -1 ) 210 if ( selYear == -1 )
211 year = selYear; 211 year = selYear;
212 if ( selMonth == -1 ) 212 if ( selMonth == -1 )
213 month = selMonth; 213 month = selMonth;
214 int r1, c1, r2, c2; 214 int r1, c1, r2, c2;
215 findDay(selDay, r1, c1); 215 findDay(selDay, r1, c1);
216 selDay = day = d; 216 selDay = day = d;
217 findDay(selDay, r2, c2); 217 findDay(selDay, r2, c2);
218 setCurrentCell( r2, c2 ); 218 setCurrentCell( r2, c2 );
219 //updateCell(r1,c1); 219 //updateCell(r1,c1);
220 //updateCell(r2,c2); 220 //updateCell(r2,c2);
221 } else { 221 } else {
222 selYear = year = y; 222 selYear = year = y;
223 selMonth = month = m; 223 selMonth = month = m;
224 selDay = day = d; 224 selDay = day = d;
225 setupTable(); 225 setupTable();
226 } 226 }
227} 227}
228 228
229void DateBookMonthTable::redraw() 229void DateBookMonthTable::redraw()
230{ 230{
231 setupLabels(); 231 setupLabels();
232 setupTable(); 232 setupTable();
233} 233}
234 234
235void DateBookMonthTable::setWeekStart( bool onMonday ) 235void DateBookMonthTable::setWeekStart( bool onMonday )
236{ 236{
237 d->onMonday = onMonday; 237 d->onMonday = onMonday;
238 setupLabels(); 238 setupLabels();
239 setupTable(); 239 setupTable();
240} 240}
241 241
242void DateBookMonthTable::setupTable() 242void DateBookMonthTable::setupTable()
243{ 243{
244 QValueList<Calendar::Day> days = Calendar::daysOfMonth( year, month, d->onMonday ); 244 QValueList<Calendar::Day> days = Calendar::daysOfMonth( year, month, d->onMonday );
245 QValueList<Calendar::Day>::Iterator it = days.begin(); 245 QValueList<Calendar::Day>::Iterator it = days.begin();
246 int row = 0, col = 0; 246 int row = 0, col = 0;
247 int crow = 0; 247 int crow = 0;
248 int ccol = 0; 248 int ccol = 0;
249 for ( ; it != days.end(); ++it ) { 249 for ( ; it != days.end(); ++it ) {
250 DayItemMonth *i = (DayItemMonth *)item( row, col ); 250 DayItemMonth *i = (DayItemMonth *)item( row, col );
251 if ( !i ) { 251 if ( !i ) {
252 i = new DayItemMonth( this, QTableItem::Never, "" ); 252 i = new DayItemMonth( this, QTableItem::Never, "" );
253 setItem( row, col, i ); 253 setItem( row, col, i );
254 } 254 }
255 Calendar::Day calDay = *it; 255 Calendar::Day calDay = *it;
256 i->clearEffEvents(); 256 i->clearEffEvents();
257 i->setDay( calDay.date ); 257 i->setDay( calDay.date );
258 i->setType( calDay.type ); 258 i->setType( calDay.type );
259 if ( i->day() == day && calDay.type == Calendar::Day::ThisMonth ) { 259 if ( i->day() == day && calDay.type == Calendar::Day::ThisMonth ) {
260 crow = row; 260 crow = row;
261 ccol = col; 261 ccol = col;
262 } 262 }
263 263
264 updateCell( row, col ); 264 updateCell( row, col );
265 265
266 if ( col == 6 ) { 266 if ( col == 6 ) {
267 ++row; 267 ++row;
268 col = 0; 268 col = 0;
269 } else { 269 } else {
270 ++col; 270 ++col;
271 } 271 }
272 } 272 }
273 setCurrentCell( crow, ccol ); 273 setCurrentCell( crow, ccol );
274 getEvents(); 274 getEvents();
275} 275}
276 276
277void DateBookMonthTable::findDay( int day, int &row, int &col ) 277void DateBookMonthTable::findDay( int day, int &row, int &col )
278{ 278{
279 QDate dtBegin( year, month, 1 ); 279 QDate dtBegin( year, month, 1 );
280 int skips = dtBegin.dayOfWeek(); 280 int skips = dtBegin.dayOfWeek();
281 int effective_day = day + skips - 1; // row/columns begin at 0 281 int effective_day = day + skips - 1; // row/columns begin at 0
282 // make an extra adjustment if we start on Mondays. 282 // make an extra adjustment if we start on Mondays.
283 if ( d->onMonday ) 283 if ( d->onMonday )
284 effective_day--; 284 effective_day--;
285 row = effective_day / 7; 285 row = effective_day / 7;
286 col = effective_day % 7; 286 col = effective_day % 7;
287} 287}
288 288
289void DateBookMonthTable::dayClicked( int row, int col ) 289void DateBookMonthTable::dayClicked( int row, int col )
290{ 290{
291 changeDaySelection( row, col ); 291 changeDaySelection( row, col );
292 emit dateClicked( selYear, selMonth, selDay ); 292 emit dateClicked( selYear, selMonth, selDay );
293} 293}
294 294
295void DateBookMonthTable::dragDay( int row, int col ) 295void DateBookMonthTable::dragDay( int row, int col )
296{ 296{
297 changeDaySelection( row, col ); 297 changeDaySelection( row, col );
298} 298}
299 299
300void DateBookMonthTable::changeDaySelection( int row, int col ) 300void DateBookMonthTable::changeDaySelection( int row, int col )
301{ 301{
302 DayItemMonth *i = (DayItemMonth*)item( row, col ); 302 DayItemMonth *i = (DayItemMonth*)item( row, col );
303 if ( !i ) 303 if ( !i )
304 return; 304 return;
305 switch ( i->type() ) { 305 switch ( i->type() ) {
306 case Calendar::Day::ThisMonth: 306 case Calendar::Day::ThisMonth:
307 selMonth = month; 307 selMonth = month;
308 break; 308 break;
309 case Calendar::Day::PrevMonth: 309 case Calendar::Day::PrevMonth:
310 selMonth = month-1; 310 selMonth = month-1;
311 break; 311 break;
312 default: 312 default:
313 selMonth = month+1; 313 selMonth = month+1;
314 } 314 }
315 315
316 selYear = year; 316 selYear = year;
317 if ( selMonth <= 0 ) { 317 if ( selMonth <= 0 ) {
318 selMonth = 12; 318 selMonth = 12;
319 selYear--; 319 selYear--;
320 } else if ( selMonth > 12 ) { 320 } else if ( selMonth > 12 ) {
321 selMonth = 1; 321 selMonth = 1;
322 selYear++; 322 selYear++;
323 } 323 }
324 selDay = i->day(); 324 selDay = i->day();
325} 325}
326 326
327 327
328void DateBookMonthTable::viewportMouseReleaseEvent( QMouseEvent * ) 328void DateBookMonthTable::viewportMouseReleaseEvent( QMouseEvent * )
329{ 329{
330 dayClicked( currentRow(), currentColumn() ); 330 dayClicked( currentRow(), currentColumn() );
331} 331}
332 332
333void DateBookMonthTable::getEvents() 333void DateBookMonthTable::getEvents()
334{ 334{
335 if ( !db ) 335 if ( !db )
336 return; 336 return;
337 337
338 QDate dtStart( year, month, 1 ); 338 QDate dtStart( year, month, 1 );
339 d->mMonthEvents = db->getEffectiveEvents( dtStart, 339 d->mMonthEvents = db->getEffectiveEvents( dtStart,
340 QDate( year, month, 340 QDate( year, month,
341 dtStart.daysInMonth() ) ); 341 dtStart.daysInMonth() ) );
342 QValueListIterator<EffectiveEvent> it = d->mMonthEvents.begin(); 342 QValueListIterator<EffectiveEvent> it = d->mMonthEvents.begin();
343 // now that the events are sorted, basically go through the list, make 343 // now that the events are sorted, basically go through the list, make
344 // a small list for every day and set it for each item... 344 // a small list for every day and set it for each item...
345 // clear all the items... 345 // clear all the items...
346 while ( it != d->mMonthEvents.end() ) { 346 while ( it != d->mMonthEvents.end() ) {
347 QValueList<EffectiveEvent> dayEvent; 347 QValueList<EffectiveEvent> dayEvent;
348 EffectiveEvent e = *it; 348 EffectiveEvent e = *it;
349 ++it; 349 ++it;
350 dayEvent.append( e ); 350 dayEvent.append( e );
351 while ( it != d->mMonthEvents.end() 351 while ( it != d->mMonthEvents.end()
352 && e.date() == (*it).date() ) { 352 && e.date() == (*it).date() ) {
353 dayEvent.append( *it ); 353 dayEvent.append( *it );
354 ++it; 354 ++it;
355 } 355 }
356 int row, col; 356 int row, col;
357 findDay( e.date().day(), row, col ); 357 findDay( e.date().day(), row, col );
358 DayItemMonth* w = static_cast<DayItemMonth*>( item( row, col ) ); 358 DayItemMonth* w = static_cast<DayItemMonth*>( item( row, col ) );
359 w->setEvents( dayEvent ); 359 w->setEvents( dayEvent );
360 updateCell( row, col ); 360 updateCell( row, col );
361 dayEvent.clear(); 361 dayEvent.clear();
362 } 362 }
363} 363}
364 364
365 365
366void DateBookMonthTable::setupLabels() 366void DateBookMonthTable::setupLabels()
367{ 367{
368 for ( int i = 0; i < 7; ++i ) { 368 for ( int i = 0; i < 7; ++i ) {
369 // horizontalHeader()->resizeSection( i, 30 ); 369 // horizontalHeader()->resizeSection( i, 30 );
370 // setColumnStretchable( i, TRUE ); 370 // setColumnStretchable( i, TRUE );
371 if ( d->onMonday ) 371 if ( d->onMonday )
372 horizontalHeader()->setLabel( i, Calendar::nameOfDay( i + 1 ) ); 372 horizontalHeader()->setLabel( i, Calendar::nameOfDay( i + 1 ) );
373 else { 373 else {
374 if ( i == 0 ) 374 if ( i == 0 )
375 horizontalHeader()->setLabel( i, Calendar::nameOfDay( 7 ) ); 375 horizontalHeader()->setLabel( i, Calendar::nameOfDay( 7 ) );
376 else 376 else
377 horizontalHeader()->setLabel( i, Calendar::nameOfDay( i ) ); 377 horizontalHeader()->setLabel( i, Calendar::nameOfDay( i ) );
378 } 378 }
379 } 379 }
380} 380}
381 381
382 382
383//--------------------------------------------------------------------------- 383//---------------------------------------------------------------------------
384 384
385DateBookMonth::DateBookMonth( QWidget *parent, const char *name, bool ac, 385DateBookMonth::DateBookMonth( QWidget *parent, const char *name, bool ac,
386 DateBookDB *data ) 386 DateBookDB *data )
387 : QVBox( parent, name ), 387 : QVBox( parent, name ),
388 autoClose( ac ) 388 autoClose( ac )
389{ 389{
390 setFocusPolicy(StrongFocus); 390 setFocusPolicy(StrongFocus);
391 year = QDate::currentDate().year(); 391 year = QDate::currentDate().year();
392 month = QDate::currentDate().month(); 392 month = QDate::currentDate().month();
393 day = QDate::currentDate().day(); 393 day = QDate::currentDate().day();
394 header = new DateBookMonthHeader( this, "DateBookMonthHeader" ); 394 header = new DateBookMonthHeader( this, "DateBookMonthHeader" );
395 table = new DateBookMonthTable( this, "DateBookMonthTable", data ); 395 table = new DateBookMonthTable( this, "DateBookMonthTable", data );
396 header->setDate( year, month ); 396 header->setDate( year, month );
397 table->setDate( year, month, QDate::currentDate().day() ); 397 table->setDate( year, month, QDate::currentDate().day() );
398 header->setFocusPolicy(NoFocus); 398 header->setFocusPolicy(NoFocus);
399 table->setFocusPolicy(NoFocus); 399 table->setFocusPolicy(NoFocus);
400 connect( header, SIGNAL( dateChanged(int,int) ), 400 connect( header, SIGNAL( dateChanged(int,int) ),
401 this, SLOT( setDate(int,int) ) ); 401 this, SLOT( setDate(int,int) ) );
402 connect( table, SIGNAL( dateClicked(int,int,int) ), 402 connect( table, SIGNAL( dateClicked(int,int,int) ),
403 this, SLOT( finalDate(int,int,int) ) ); 403 this, SLOT( finalDate(int,int,int) ) );
404 connect( qApp, SIGNAL(weekChanged(bool)), this, 404 connect( qApp, SIGNAL(weekChanged(bool)), this,
405 SLOT(slotWeekChange(bool)) ); 405 SLOT(slotWeekChange(bool)) );
406 table->setFocus(); 406 table->setFocus();
407} 407}
408 408
409DateBookMonth::~DateBookMonth() 409DateBookMonth::~DateBookMonth()
410{ 410{
411 411
412} 412}
413 413
414void DateBookMonth::setDate( int y, int m ) 414void DateBookMonth::setDate( int y, int m )
415{ 415{
416 /* only change the date if this is a different date, 416 /* only change the date if this is a different date,
417 * other wise we may mistakenly overide the day */ 417 * other wise we may mistakenly overide the day */
418 if ( (y != year) || (m != month) ) { 418 if ( (y != year) || (m != month) ) {
419 year = y; 419 year = y;
420 month = m; 420 month = m;
421 QDate nd( y, m, 1 ); 421 QDate nd( y, m, 1 );
422 if ( nd.daysInMonth() < day ) 422 if ( nd.daysInMonth() < day )
423 day = nd.daysInMonth(); 423 day = nd.daysInMonth();
424 table->setDate( year, month, day ); 424 table->setDate( year, month, day );
425 } 425 }
426} 426}
427 427
428void DateBookMonth::setDate( int y, int m, int d ) 428void DateBookMonth::setDate( int y, int m, int d )
429{ 429{
430 header->setDate( y, m); 430 header->setDate( y, m);
431 table->setDate( y, m, d); 431 table->setDate( y, m, d);
432 year = y; 432 year = y;
433 month = m; 433 month = m;
434 day = d; 434 day = d;
435} 435}
436 436
437/* called when we wish to close or pass back the date */ 437/* called when we wish to close or pass back the date */
438void DateBookMonth::finalDate(int y, int m, int d) 438void DateBookMonth::finalDate(int y, int m, int d)
439{ 439{
440 setDate( y, m, d ); 440 setDate( y, m, d );
441 441
442 emit dateClicked(y, m, d); 442 emit dateClicked(y, m, d);
443 // emit dateClicked(QDate(y, m, d).toString()); 443 // emit dateClicked(QDate(y, m, d).toString());
444 444
445 if ( autoClose && parentWidget() ) 445 if ( autoClose && parentWidget() )
446 parentWidget()->close(); 446 parentWidget()->close();
447} 447}
448 448
449void DateBookMonth::setDate( QDate d) 449void DateBookMonth::setDate( QDate d)
450{ 450{
451 setDate(d.year(), d.month(), d.day()); 451 setDate(d.year(), d.month(), d.day());
452} 452}
453 453
454void DateBookMonth::redraw() 454void DateBookMonth::redraw()
455{ 455{
456 table->setDate( year, month, day ); 456 table->setDate( year, month, day );
457 table->redraw(); 457 table->redraw();
458} 458}
459 459
460QDate DateBookMonth::selectedDate() const 460QDate DateBookMonth::selectedDate() const
461{ 461{
462 if ( !table ) 462 if ( !table )
463 return QDate::currentDate(); 463 return QDate::currentDate();
464 int y, m, d; 464 int y, m, d;
465 table->getDate( y, m, d ); 465 table->getDate( y, m, d );
466 return QDate( y, m, d ); 466 return QDate( y, m, d );
467} 467}
468 468
469void DateBookMonth::slotWeekChange( bool startOnMonday ) 469void DateBookMonth::slotWeekChange( bool startOnMonday )
470{ 470{
471 table->setWeekStart( startOnMonday ); 471 table->setWeekStart( startOnMonday );
472} 472}
473 473
474void DateBookMonth::keyPressEvent( QKeyEvent *e ) 474void DateBookMonth::keyPressEvent( QKeyEvent *e )
475{ 475{
476 switch(e->key()) { 476 switch(e->key()) {
477 case Key_Up: 477 case Key_Up:
478 setDate(QDate(year, month, day).addDays(-7)); 478 setDate(QDate(year, month, day).addDays(-7));
479 break; 479 break;
480 case Key_Down: 480 case Key_Down:
481 setDate(QDate(year, month, day).addDays(7)); 481 setDate(QDate(year, month, day).addDays(7));
482 break; 482 break;
483 case Key_Left: 483 case Key_Left:
484 setDate(QDate(year, month, day).addDays(-1)); 484 setDate(QDate(year, month, day).addDays(-1));
485 break; 485 break;
486 case Key_Right: 486 case Key_Right:
487 setDate(QDate(year, month, day).addDays(1)); 487 setDate(QDate(year, month, day).addDays(1));
488 break; 488 break;
489 case Key_Space: 489 case Key_Space:
490 qWarning("space"); 490 qWarning("space");
491 emit dateClicked(year, month, day); 491 emit dateClicked(year, month, day);
492 if ( autoClose && parentWidget() ) 492 if ( autoClose && parentWidget() )
493 parentWidget()->close(); 493 parentWidget()->close();
494 break; 494 break;
495 default: 495 default:
496 qWarning("ignore"); 496 qWarning("ignore");
497 e->ignore(); 497 e->ignore();
498 break; 498 break;
499 } 499 }
500} 500}
501 501
502//--------------------------------------------------------------------------- 502//---------------------------------------------------------------------------
503class DayItemMonthPrivate 503class DayItemMonthPrivate
504{ 504{
505public: 505public:
506 DayItemMonthPrivate() {}; 506 DayItemMonthPrivate() {};
507 ~DayItemMonthPrivate() { mDayEvents.clear(); }; 507 ~DayItemMonthPrivate() { mDayEvents.clear(); };
508 QValueList<EffectiveEvent> mDayEvents; 508 QValueList<EffectiveEvent> mDayEvents;
509}; 509};
510 510
511DayItemMonth::DayItemMonth( QTable *table, EditType et, const QString &t ) 511DayItemMonth::DayItemMonth( QTable *table, EditType et, const QString &t )
512 : QTableItem( table, et, t ) 512 : QTableItem( table, et, t )
513{ 513{
514 d = new DayItemMonthPrivate(); 514 d = new DayItemMonthPrivate();
515} 515}
516 516
517DayItemMonth::~DayItemMonth() 517DayItemMonth::~DayItemMonth()
518{ 518{
519 daysEvents.clear(); 519 daysEvents.clear();
520 delete d; 520 delete d;
521} 521}
522 522
523void DayItemMonth::setEvents( const QValueList<EffectiveEvent> &effEv ) 523void DayItemMonth::setEvents( const QValueList<EffectiveEvent> &effEv )
524{ 524{
525 d->mDayEvents = effEv; 525 d->mDayEvents = effEv;
526} 526}
527 527
528void DayItemMonth::clearEffEvents() 528void DayItemMonth::clearEffEvents()
529{ 529{
530 d->mDayEvents.clear(); 530 d->mDayEvents.clear();
531} 531}
532 532
533void DayItemMonth::paint( QPainter *p, const QColorGroup &cg, 533void DayItemMonth::paint( QPainter *p, const QColorGroup &cg,
534 const QRect &cr, bool selected ) 534 const QRect &cr, bool selected )
535{ 535{
536 p->save(); 536 p->save();
537 537
538 QColorGroup g( cg ); 538 QColorGroup g( cg );
539 g.setBrush( QColorGroup::Base, back ); 539 g.setBrush( QColorGroup::Base, back );
540 g.setColor( QColorGroup::Text, forg ); 540 g.setColor( QColorGroup::Text, forg );
541 if ( selected ) 541 if ( selected )
542 p->setPen( g.highlightedText() ); 542 p->setPen( g.highlightedText() );
543 else 543 else
544 p->setPen( g.text() ); 544 p->setPen( g.text() );
545 545
546 QValueStack<int> normalLine; 546 QValueStack<int> normalLine;
547 QValueStack<int> repeatLine; 547 QValueStack<int> repeatLine;
548 QValueStack<int> travelLine; 548 QValueStack<int> travelLine;
549 549
550 bool normalAllDay = FALSE; 550 bool normalAllDay = FALSE;
551 bool repeatAllDay = FALSE; 551 bool repeatAllDay = FALSE;
552 bool travelAllDay = FALSE; 552 bool travelAllDay = FALSE;
553 bool holidayAllDay = FALSE; 553 bool holidayAllDay = FALSE;
554 554
555 QValueListIterator<EffectiveEvent> itDays = d->mDayEvents.begin(); 555 QValueListIterator<EffectiveEvent> itDays = d->mDayEvents.begin();
556 556
557 for ( ; itDays != d->mDayEvents.end(); ++itDays ) { 557 for ( ; itDays != d->mDayEvents.end(); ++itDays ) {
558 int w = cr.width(); 558 int w = cr.width();
559 Event ev = (*itDays).event(); 559 Event ev = (*itDays).event();
560 560
561 int f = (*itDays).start().hour(); // assume Effective event 561 int f = (*itDays).start().hour(); // assume Effective event
562 int t = (*itDays).end().hour(); // is truncated. 562 int t = (*itDays).end().hour(); // is truncated.
563 563
564 if (ev.isAllDay()) { 564 if (ev.isAllDay()) {
565 if (!ev.hasRepeat()) { 565 if (!ev.hasRepeat()) {
566 normalAllDay = TRUE; 566 normalAllDay = TRUE;
567 if (!ev.isValidUid()) { 567 if (!ev.isValidUid()) {
568 holidayAllDay = TRUE; 568 holidayAllDay = TRUE;
569 } 569 }
570 } else { 570 } else {
571 repeatAllDay = TRUE; 571 repeatAllDay = TRUE;
572 } 572 }
573 } else { 573 } else {
574 int sLine, eLine; 574 int sLine, eLine;
575 if (f == 0) 575 if (f == 0)
576 sLine = 0; 576 sLine = 0;
577 else if (f < 8 ) 577 else if (f < 8 )
578 sLine = 1; 578 sLine = 1;
579 else if (f >= 17) 579 else if (f >= 17)
580 sLine = w - 4; 580 sLine = w - 4;
581 else { 581 else {
582 sLine = (f - 8) * (w - 8); 582 sLine = (f - 8) * (w - 8);
583 if (sLine) 583 if (sLine)
584 sLine /= 8; 584 sLine /= 8;
585 sLine += 4; 585 sLine += 4;
586 } 586 }
587 if (t == 23) 587 if (t == 23)
588 eLine = w; 588 eLine = w;
589 else if (t < 8) 589 else if (t < 8)
590 eLine = 4; 590 eLine = 4;
591 else if (t >= 17) 591 else if (t >= 17)
592 eLine = w - 1; 592 eLine = w - 1;
593 else { 593 else {
594 eLine = (t - 8) * (w - 8); 594 eLine = (t - 8) * (w - 8);
595 if (eLine) 595 if (eLine)
596 eLine /= 8; 596 eLine /= 8;
597 eLine += 4; 597 eLine += 4;
598 } 598 }
599 if (!ev.hasRepeat()) { 599 if (!ev.hasRepeat()) {
600 normalLine.push(sLine); 600 normalLine.push(sLine);
601 normalLine.push(eLine); 601 normalLine.push(eLine);
602 } else { 602 } else {
603 repeatLine.push(sLine); 603 repeatLine.push(sLine);
604 repeatLine.push(eLine); 604 repeatLine.push(eLine);
605 } 605 }
606 } 606 }
607 } 607 }
608 608
609 // draw the background 609 // draw the background
610 if (normalAllDay || repeatAllDay || travelAllDay || holidayAllDay) { 610 if (normalAllDay || repeatAllDay || travelAllDay || holidayAllDay) {
611 p->save(); 611 p->save();
612 612
613 if (normalAllDay) 613 if (normalAllDay)
614 if (repeatAllDay) { 614 if (repeatAllDay) {
615 p->fillRect( 0, 0, cr.width(), cr.height() / 2, 615 p->fillRect( 0, 0, cr.width(), cr.height() / 2,
616 s_colorNormalLight ); 616 s_colorNormalLight );
617 p->fillRect( 0, cr.height() / 2, cr.width(), cr.height() / 2, 617 p->fillRect( 0, cr.height() / 2, cr.width(), cr.height() / 2,
618 colorRepeatLight ); 618 colorRepeatLight );
619 } else { 619 } else {
620 if (!holidayAllDay) { 620 if (!holidayAllDay) {
621 p->fillRect( 0, 0, cr.width(), cr.height(), 621 p->fillRect( 0, 0, cr.width(), cr.height(),
622 s_colorNormalLight ); 622 s_colorNormalLight );
623 } else { 623 } else {
624 p->fillRect( 0, 0, cr.width(), cr.height(), 624 p->fillRect( 0, 0, cr.width(), cr.height(),
625 s_colorHolidayLight ); 625 s_colorHolidayLight );
626 } 626 }
627 } else if (repeatAllDay) { 627 } else if (repeatAllDay) {
628 p->fillRect( 0, 0, cr.width(), cr.height(), 628 p->fillRect( 0, 0, cr.width(), cr.height(),
629 s_colorRepeatLight ); 629 s_colorRepeatLight );
630 } 630 }
631 } else { 631 } else {
632 p->fillRect( 0, 0, cr.width(), 632 p->fillRect( 0, 0, cr.width(),
633 cr.height(), selected 633 cr.height(), selected
634 ? g.brush( QColorGroup::Highlight ) 634 ? g.brush( QColorGroup::Highlight )
635 : g.brush( QColorGroup::Base ) ); 635 : g.brush( QColorGroup::Base ) );
636 } 636 }
637 637
638 // The lines 638 // The lines
639 // now for the lines. 639 // now for the lines.
640 int h = 5; 640 int h = 5;
641 int y = cr.height() / 2 - h; 641 int y = cr.height() / 2 - h;
642 642
643 while(normalLine.count() >= 2) { 643 while(normalLine.count() >= 2) {
644 int x2 = normalLine.pop(); 644 int x2 = normalLine.pop();
645 int x1 = normalLine.pop(); 645 int x1 = normalLine.pop();
646 if (x2 < x1 + 2) 646 if (x2 < x1 + 2)
647 x2 = x1 + 2; 647 x2 = x1 + 2;
648 p->fillRect(x1, y, x2 - x1, h, colorNormal); 648 p->fillRect(x1, y, x2 - x1, h, colorNormal);
649 } 649 }
650 650
651 y += h; 651 y += h;
652 652
653 while(repeatLine.count() >= 2) { 653 while(repeatLine.count() >= 2) {
654 int x2 = repeatLine.pop(); 654 int x2 = repeatLine.pop();
655 int x1 = repeatLine.pop(); 655 int x1 = repeatLine.pop();
656 if (x2 < x1 + 2) 656 if (x2 < x1 + 2)
657 x2 = x1 + 2; 657 x2 = x1 + 2;
658 p->fillRect(x1, y, x2 - x1, h, colorRepeat); 658 p->fillRect(x1, y, x2 - x1, h, colorRepeat);
659 } 659 }
660 660
661 661
662 // Finally, draw the number. 662 // Finally, draw the number.
663 QFont f = p->font(); 663 QFont f = p->font();
664 f.setPointSize( ( f.pointSize() / 3 ) * 2 ); 664 if(qApp->desktop()->width() >= 480)
665 {
666 f.setPointSize( f.pointSize() - 2 );
667 }
668 else
669 {
670 f.setPointSize( ( f.pointSize() / 3 ) * 2 );
671 }
665 p->setFont( f ); 672 p->setFont( f );
666 QFontMetrics fm( f ); 673 QFontMetrics fm( f );
667 p->drawText( 1, 1 + fm.ascent(), QString::number( day() ) ); 674 p->drawText( 1, 1 + fm.ascent(), QString::number( day() ) );
668 675
669 p->restore(); 676 p->restore();
670} 677}
671 678
672 679
673 680
674void DayItemMonth::setType( Calendar::Day::Type t ) 681void DayItemMonth::setType( Calendar::Day::Type t )
675{ 682{
676 switch ( t ) { 683 switch ( t ) {
677 case Calendar::Day::PrevMonth: 684 case Calendar::Day::PrevMonth:
678 case Calendar::Day::NextMonth: 685 case Calendar::Day::NextMonth:
679 back = QBrush( QColor( 224, 224, 224 ) ); 686 back = QBrush( QColor( 224, 224, 224 ) );
680 forg = black; 687 forg = black;
681 break; 688 break;
682 case Calendar::Day::ThisMonth: 689 case Calendar::Day::ThisMonth:
683 back = QBrush( white ); 690 back = QBrush( white );
684 forg = black; 691 forg = black;
685 break; 692 break;
686 } 693 }
687 typ = t; 694 typ = t;
688} 695}
689 696
690 697
691 698
692DateButton::DateButton( bool longDate, QWidget *parent, const char * name ) 699DateButton::DateButton( bool longDate, QWidget *parent, const char * name )
693 :QPushButton( parent, name ) 700 :QPushButton( parent, name )
694{ 701{
695 longFormat = longDate; 702 longFormat = longDate;
696 df = DateFormat('/', DateFormat::MonthDayYear, DateFormat::MonthDayYear); 703 df = DateFormat('/', DateFormat::MonthDayYear, DateFormat::MonthDayYear);
697 setDate( QDate::currentDate() ); 704 setDate( QDate::currentDate() );
698 705
699 connect(this,SIGNAL(pressed()),this,SLOT(pickDate())); 706 connect(this,SIGNAL(pressed()),this,SLOT(pickDate()));
700 707
701 708
702} 709}
703 710
704 711
705void DateButton::pickDate() 712void DateButton::pickDate()
706{ 713{
707 static QPopupMenu *m1 = 0; 714 static QPopupMenu *m1 = 0;
708 static DateBookMonth *picker = 0; 715 static DateBookMonth *picker = 0;
709 if ( !m1 ) { 716 if ( !m1 ) {
710 m1 = new QPopupMenu( this ); 717 m1 = new QPopupMenu( this );
711 picker = new DateBookMonth( m1, 0, TRUE ); 718 picker = new DateBookMonth( m1, 0, TRUE );
712 m1->insertItem( picker ); 719 m1->insertItem( picker );
713 connect( picker, SIGNAL( dateClicked(int,int,int) ), 720 connect( picker, SIGNAL( dateClicked(int,int,int) ),
714 this, SLOT( setDate(int,int,int) ) ); 721 this, SLOT( setDate(int,int,int) ) );
715 connect( picker, SIGNAL( dateClicked(int,int,int) ), 722 connect( picker, SIGNAL( dateClicked(int,int,int) ),
716 this, SIGNAL( dateSelected(int,int,int) ) ); 723 this, SIGNAL( dateSelected(int,int,int) ) );
717 connect( m1, SIGNAL( aboutToHide() ), 724 connect( m1, SIGNAL( aboutToHide() ),
718 this, SLOT( gotHide() ) ); 725 this, SLOT( gotHide() ) );
719 } 726 }
720 picker->slotWeekChange( weekStartsMonday ); 727 picker->slotWeekChange( weekStartsMonday );
721 picker->setDate( currDate.year(), currDate.month(), currDate.day() ); 728 picker->setDate( currDate.year(), currDate.month(), currDate.day() );
722 m1->popup(mapToGlobal(QPoint(0,height()))); 729 m1->popup(mapToGlobal(QPoint(0,height())));
723 picker->setFocus(); 730 picker->setFocus();
724} 731}
725 732
726 733
727void DateButton::gotHide() 734void DateButton::gotHide()
728{ 735{
729 // we have to redo the button... 736 // we have to redo the button...
730 setDown( false ); 737 setDown( false );
731} 738}
732 739
733 740
734// void dateSelected( int year, int month, int day ); 741// void dateSelected( int year, int month, int day );
735 742
736void DateButton::setWeekStartsMonday( int b ) 743void DateButton::setWeekStartsMonday( int b )
737{ 744{
738 weekStartsMonday = b; 745 weekStartsMonday = b;
739} 746}
740 747
741void DateButton::setDate( int y, int m, int d ) 748void DateButton::setDate( int y, int m, int d )
742{ 749{
743 setDate( QDate( y,m,d) ); 750 setDate( QDate( y,m,d) );
744} 751}
745 752
746void DateButton::setDate( QDate d ) 753void DateButton::setDate( QDate d )
747{ 754{
748 currDate = d; 755 currDate = d;
749 setText( longFormat ? TimeString::longDateString( d, df ) : 756 setText( longFormat ? TimeString::longDateString( d, df ) :
750 TimeString::shortDate( d, df ) ); 757 TimeString::shortDate( d, df ) );
751 758
752} 759}
753 760
754void DateButton::setDateFormat( DateFormat f ) 761void DateButton::setDateFormat( DateFormat f )
755{ 762{
756 df = f; 763 df = f;
757 setDate( currDate ); 764 setDate( currDate );
758} 765}
759 766
760bool DateButton::customWhatsThis() const 767bool DateButton::customWhatsThis() const
761{ 768{
762 return TRUE; 769 return TRUE;
763} 770}
764 771
765 772
766// this class is only here for Sharp ROM compatibility 773// this class is only here for Sharp ROM compatibility
767// I have reverse engineered this class and it seems to 774// I have reverse engineered this class and it seems to
768// work (only qtmail seems to use it) - sandman 775// work (only qtmail seems to use it) - sandman
769// DO NOT USE IT IN NEW CODE !! 776// DO NOT USE IT IN NEW CODE !!
770 777
771DateBookMonthPopup::DateBookMonthPopup ( QWidget *w ) 778DateBookMonthPopup::DateBookMonthPopup ( QWidget *w )
772 : QPopupMenu ( w ) 779 : QPopupMenu ( w )
773{ 780{
774 m_dbm = new DateBookMonth( this, 0, TRUE ); 781 m_dbm = new DateBookMonth( this, 0, TRUE );
775 insertItem( m_dbm ); 782 insertItem( m_dbm );
776} 783}