author | hrw <hrw> | 2006-01-23 13:33:31 (UTC) |
---|---|---|
committer | hrw <hrw> | 2006-01-23 13:33:31 (UTC) |
commit | dccddc207399669495ec0f5b4c6faa0d5159dc87 (patch) (unidiff) | |
tree | fa9cfb30b34d67a20bf11dd6d88c01596b3e4aeb | |
parent | d5a4ddcb27db77d41de3f6a66bef4227c33d925e (diff) | |
download | opie-dccddc207399669495ec0f5b4c6faa0d5159dc87.zip opie-dccddc207399669495ec0f5b4c6faa0d5159dc87.tar.gz opie-dccddc207399669495ec0f5b4c6faa0d5159dc87.tar.bz2 |
libopiecore: /etc/oz_version renamed to /etc/openzaurus-version
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | libopie2/opiecore/device/odevice.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,350 +1,354 @@ | |||
1 | 2005-??-??Opie 1.2.2 | 1 | 2005-??-??Opie 1.2.2 |
2 | 2 | ||
3 | 3 | ||
4 | New Features | 4 | New Features |
5 | ------------ | 5 | ------------ |
6 | * Appearance: Added configuration options to set smallIconSize, bigIconSize, useBigPixmaps (hrw, drw) | 6 | * Appearance: Added configuration options to set smallIconSize, bigIconSize, useBigPixmaps (hrw, drw) |
7 | * Opie-Notes: Notes application based on NoteZ (hrw) | 7 | * Opie-Notes: Notes application based on NoteZ (hrw) |
8 | * OPIE-PackageManager: Added two configuration options: "Force recursive", "Verbose fetch" (hrw) | 8 | * OPIE-PackageManager: Added two configuration options: "Force recursive", "Verbose fetch" (hrw) |
9 | 9 | ||
10 | Fixed Bugs | 10 | Fixed Bugs |
11 | ---------- | 11 | ---------- |
12 | * #1695 - Date selector use too small fontsize on VGA screen (hrw) | 12 | * #1695 - Date selector use too small fontsize on VGA screen (hrw) |
13 | * #1686 - opie-console lack UI setting for switching scrollbar (hrw) | 13 | * #1686 - opie-console lack UI setting for switching scrollbar (hrw) |
14 | * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw) | 14 | * #1647 - Opie-console doesn't respect scroll-bar on left side (hrw) |
15 | * #1624 - Button settngs changes are applied only after restart (hrw) | 15 | * #1624 - Button settngs changes are applied only after restart (hrw) |
16 | * #1492 - Backup and Restore does not show list of backups to restore on start (hrw) | 16 | * #1492 - Backup and Restore does not show list of backups to restore on start (hrw) |
17 | * n.a. - remove hardcoded font size from wellenreiter (hrw) | 17 | * n.a. - remove hardcoded font size from wellenreiter (hrw) |
18 | * n.a. - added patch to build QT/E 2.3.10 with gcc 4.x.x (hrw) | 18 | * n.a. - added patch to build QT/E 2.3.10 with gcc 4.x.x (hrw) |
19 | * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw) | 19 | * n.a. - make blue-pin UI resizable to looks good in any resolution (hrw) |
20 | * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar) | 20 | * n.a. - fix a problem with vCard send to Sony Ericsson k600i (ar) |
21 | * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar) | 21 | * n.a. - add a patch to build Qt/E 2.3.10 on amd64 with gcc 4.x.x (ar) |
22 | * n.a. - Opie-console fallback to FixedFont settings from qpe.conf in config (hrw) | 22 | * n.a. - Opie-console fallback to FixedFont settings from qpe.conf in config (hrw) |
23 | * n.a. - Set version to 1.2.1 in About applet (hrw) | 23 | * n.a. - Set version to 1.2.1 in About applet (hrw) |
24 | 24 | ||
25 | Internal | ||
26 | -------- | ||
27 | * libopiecore: /etc/oz_version renamed to /etc/openzaurus-version (hrw) | ||
28 | |||
25 | 2005-09-11Opie 1.2.1 | 29 | 2005-09-11Opie 1.2.1 |
26 | 30 | ||
27 | 31 | ||
28 | New Features | 32 | New Features |
29 | ------------ | 33 | ------------ |
30 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) | 34 | * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) |
31 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) | 35 | * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) |
32 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) | 36 | * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) |
33 | * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) | 37 | * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl) |
34 | * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) | 38 | * Opie-Mobilemsg has gone unsupported - it never really worked and there will be a replacement (mickeyl) |
35 | * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) | 39 | * Opie-Tabmanager has gone unsupported - it barely works and there is not much of a use of it anyway (mickeyl) |
36 | * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) | 40 | * Checkbook: Added configuration option to use smaller font for checkbook transaction tab (hrw) |
37 | * ZSafe: Made UI conform to Opie standards (drw) | 41 | * ZSafe: Made UI conform to Opie standards (drw) |
38 | * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) | 42 | * Today Addressbook plugin: Fixed configuration to show/not show birthdays, use checkboxes for selection (hrw) |
39 | * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) | 43 | * Opie-Console: Read initial fixed font configuration from qpe.conf (mickeyl) |
40 | * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) | 44 | * Opie-PcmciaApplet: Configure insert/resume actions and bind unsupported cards (mickeyl) |
41 | * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) | 45 | * SysInfo: Remove CPU tab and add Devices tab instead (mickeyl) |
42 | * Opie-smb: Added Opie front end for Samba (ljp) | 46 | * Opie-smb: Added Opie front end for Samba (ljp) |
43 | * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) | 47 | * Opie-Bluetooth: Replace obex send implementation and patch libopieobex and the bluetoothapplet (Michael Haynie) |
44 | * Opieplayer: rudimentary podcast support (ljp) | 48 | * Opieplayer: rudimentary podcast support (ljp) |
45 | 49 | ||
46 | Fixed Bugs | 50 | Fixed Bugs |
47 | ---------- | 51 | ---------- |
48 | * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) | 52 | * #1377 - Suspend Powermanagement when switched to another VT (mickeyl) |
49 | - We actually suspend the complete Opie now in that case. | 53 | - We actually suspend the complete Opie now in that case. |
50 | * #1384 - Battery status updated improperly when charging (skyhusker) | 54 | * #1384 - Battery status updated improperly when charging (skyhusker) |
51 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) | 55 | * #1476 - Wrong order of application entries in the O-menu (skyhusker) |
52 | * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) | 56 | * #1514 - Remove usage of cardmon/pcmcia picture in applications. pcmcia is now an inline picture (mickeyl) |
53 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) | 57 | * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) |
54 | * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) | 58 | * #1543 - Time Settings: "predict" tab is displayed twice after reopen (hrw) |
55 | * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) | 59 | * #1546 - Battery applet popup is not always large enough to show jacket remaining info (skyhusker) |
56 | * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) | 60 | * #1557 - Light&Power-Settings don't store warning intervall and warning levels (skyhusker) |
57 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) | 61 | * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) |
58 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) | 62 | * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) |
59 | * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) | 63 | * #1635 - opie-today, datebook-plugin does not show notes (skyhusker) |
60 | * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) | 64 | * #1665 - Opie-IRC displays the host prepended to the message when peer is using and ipv6 address (skyhusker) |
61 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) | 65 | * #1666 - Opie-IRC does not allow to add !channels in config asautojoin ones (skyhusker) |
62 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) | 66 | * #1667 - Opie-IRC does not show messages from !channel (skyhusker) |
63 | * #1679 - Security PIN plugin is QVGA sized (hrw) | 67 | * #1679 - Security PIN plugin is QVGA sized (hrw) |
64 | * #1682 - Properly resize tab control in OTabWidget (drw) | 68 | * #1682 - Properly resize tab control in OTabWidget (drw) |
65 | * n.a. - always show volume and wireless applet popups inside visible screen (deller) | 69 | * n.a. - always show volume and wireless applet popups inside visible screen (deller) |
66 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) | 70 | * n.a. - scale O-Menu-Applets appropriately (mickeyl) |
67 | * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) | 71 | * n.a. - libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) |
68 | * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) | 72 | * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) |
69 | * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) | 73 | * n.a. - scale BluezApplet appropriately and use larger icons (mickeyl) |
70 | * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) | 74 | * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) |
71 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) | 75 | * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) |
72 | * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) | 76 | * n.a. - Today Addressbook plugin fix configuration to show/not show birthdays, use checkboxes for selection (hrw) |
73 | * n.a. - remove hardcoded font size from netsystemtime (hrw) | 77 | * n.a. - remove hardcoded font size from netsystemtime (hrw) |
74 | * n.a. - remove hardcoded font size from checkbook graphs (hrw) | 78 | * n.a. - remove hardcoded font size from checkbook graphs (hrw) |
75 | * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) | 79 | * n.a. - Dagger - fixes for Sword 1.5.8, morph tag x-refs, closing last tab crash (drw) |
76 | 80 | ||
77 | 81 | ||
78 | Internal | 82 | Internal |
79 | -------- | 83 | -------- |
80 | * Make BluezApplet use OTaskbarApplet (mickeyl) | 84 | * Make BluezApplet use OTaskbarApplet (mickeyl) |
81 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) | 85 | * libopiecore: rewrite OFileNotification to use the Linux 2.6 inotify interface (mickeyl) |
82 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) | 86 | * libopiecore: add ODirNotification - recursive directory notifications (mickeyl) |
83 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) | 87 | * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) |
84 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) | 88 | * libopieui: Remove OVersatileView and OVersatileViewItem (mickeyl) |
85 | * libopienet: Miscellaneous API cleanups (mickeyl) | 89 | * libopienet: Miscellaneous API cleanups (mickeyl) |
86 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) | 90 | * libopiecore: Add linux pcmcia system abstraction classes (mickeyl) |
87 | * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) | 91 | * libopiecore: ODevice now knows the default gfx driver to use (mteira,mickeyl) |
88 | * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) | 92 | * libopiecore: Add support for the Sharp SL-C3100 "Borzoi" (mickeyl) |
89 | * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) | 93 | * libopiecore: Add support for the new Linux Inputsystem Switches type [necessary for auto rotation in 2.6.13] (mickeyl) |
90 | * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) | 94 | * Remove assumptions about default gfx driver ("Transformed") all over the place (mteira,mickeyl) |
91 | * Fix / Optimize number of scanned directories (ljp) | 95 | * Fix / Optimize number of scanned directories (ljp) |
92 | * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) | 96 | * Use five point mouse calibration to make calibrated mouse drivers work on newer Zaurii (rp,mickeyl) |
93 | 97 | ||
94 | 2005-03-25Opie 1.2.0 | 98 | 2005-03-25Opie 1.2.0 |
95 | 99 | ||
96 | Fixed Bugs | 100 | Fixed Bugs |
97 | ---------- | 101 | ---------- |
98 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) | 102 | * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) |
99 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) | 103 | * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) |
100 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) | 104 | * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) |
101 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) | 105 | * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) |
102 | * n.a.- make qpeglobal.h include qglobal.h (zecke) | 106 | * n.a.- make qpeglobal.h include qglobal.h (zecke) |
103 | 107 | ||
104 | 2005-03-20Opie 1.2.0-rc1 | 108 | 2005-03-20Opie 1.2.0-rc1 |
105 | 109 | ||
106 | 110 | ||
107 | New Features | 111 | New Features |
108 | ------------ | 112 | ------------ |
109 | * Launcher: Support a static background pixmap (mickeyl) | 113 | * Launcher: Support a static background pixmap (mickeyl) |
110 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) | 114 | * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) |
111 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) | 115 | * PackageManager supports the 'lists_dir' ipkg configuration option (drw) |
112 | * Added hi-res inline images for large resolution devices (drw) | 116 | * Added hi-res inline images for large resolution devices (drw) |
113 | * Improved launcher icons for consistency (ar) | 117 | * Improved launcher icons for consistency (ar) |
114 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) | 118 | * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) |
115 | 119 | ||
116 | Fixed Bugs | 120 | Fixed Bugs |
117 | ---------- | 121 | ---------- |
118 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) | 122 | * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) |
119 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) | 123 | * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) |
120 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) | 124 | * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) |
121 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) | 125 | * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) |
122 | * #1482 - Fix double '/' in paths (zecke) | 126 | * #1482 - Fix double '/' in paths (zecke) |
123 | * #1536 - Autosave of custom locations in opie backup (ar) | 127 | * #1536 - Autosave of custom locations in opie backup (ar) |
124 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) | 128 | * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) |
125 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) | 129 | * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) |
126 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) | 130 | * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) |
127 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) | 131 | * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) |
128 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) | 132 | * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) |
129 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) | 133 | * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) |
130 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) | 134 | * #1558 - Fixed opie-login breaking opie startup (mickeyl) |
131 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) | 135 | * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) |
132 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) | 136 | * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) |
133 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) | 137 | * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) |
134 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) | 138 | * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) |
135 | * #1604 - Checkbook crashed on startup (drw) | 139 | * #1604 - Checkbook crashed on startup (drw) |
136 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) | 140 | * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) |
137 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) | 141 | * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) |
138 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) | 142 | * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) |
139 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) | 143 | * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) |
140 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) | 144 | * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) |
141 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) | 145 | * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) |
142 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) | 146 | * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) |
143 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) | 147 | * n.a. - AddressBook - fixed sorting by 'File As' name (drw) |
144 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) | 148 | * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) |
145 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) | 149 | * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) |
146 | 150 | ||
147 | Internal | 151 | Internal |
148 | -------- | 152 | -------- |
149 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) | 153 | * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) |
150 | * Killed the need for weak symbols in QtE (zecke) | 154 | * Killed the need for weak symbols in QtE (zecke) |
151 | * Added optional building libqpe without inline images (mickeyl) | 155 | * Added optional building libqpe without inline images (mickeyl) |
152 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) | 156 | * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) |
153 | 157 | ||
154 | 2005-02-03Opie 1.1.9 | 158 | 2005-02-03Opie 1.1.9 |
155 | 159 | ||
156 | New Features | 160 | New Features |
157 | ------------ | 161 | ------------ |
158 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) | 162 | * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) |
159 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) | 163 | * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) |
160 | * Usability enhancements in OpieIRC (skyhusker) | 164 | * Usability enhancements in OpieIRC (skyhusker) |
161 | 165 | ||
162 | Fixed Bugs | 166 | Fixed Bugs |
163 | ---------- | 167 | ---------- |
164 | * #1501 - Fixed bug in todo sql backend (eilers) | 168 | * #1501 - Fixed bug in todo sql backend (eilers) |
165 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) | 169 | * #1505 - Added more Swap sizes in memoryapplet (mickeyl) |
166 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) | 170 | * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) |
167 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) | 171 | * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) |
168 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) | 172 | * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) |
169 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) | 173 | * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) |
170 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) | 174 | * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) |
171 | 175 | ||
172 | Internal | 176 | Internal |
173 | -------- | 177 | -------- |
174 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) | 178 | * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) |
175 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) | 179 | * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) |
176 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) | 180 | * Made Opie compilable with Qt/Embedded 2.3.10 (ar) |
177 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) | 181 | * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) |
178 | * Build tree cleanups (mickeyl) | 182 | * Build tree cleanups (mickeyl) |
179 | 183 | ||
180 | 2004-11-26Opie 1.1.8 | 184 | 2004-11-26Opie 1.1.8 |
181 | 185 | ||
182 | New Features | 186 | New Features |
183 | ------------ | 187 | ------------ |
184 | * PackageManager supports installation of local ipkg files (drw) | 188 | * PackageManager supports installation of local ipkg files (drw) |
185 | * PackageManager supports linking of applications to root (drw) | 189 | * PackageManager supports linking of applications to root (drw) |
186 | * PackageManager supports src/gz feeds (drw,wimpie) | 190 | * PackageManager supports src/gz feeds (drw,wimpie) |
187 | * Added a syslog information tab to sysinfo (mickeyl) | 191 | * Added a syslog information tab to sysinfo (mickeyl) |
188 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) | 192 | * Added new, more consistent, PIM icons + a GIMP teplate (ar) |
189 | 193 | ||
190 | Fixed Bugs | 194 | Fixed Bugs |
191 | ---------- | 195 | ---------- |
192 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) | 196 | * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) |
193 | * #1269 - VCards were imported into personal area if it was activated (eilers) | 197 | * #1269 - VCards were imported into personal area if it was activated (eilers) |
194 | * #1464 - Packagemanager dont set active filter after install a package (drw) | 198 | * #1464 - Packagemanager dont set active filter after install a package (drw) |
195 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) | 199 | * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) |
196 | * #1493 - Fixed one column layout bug of the launcher (hrw) | 200 | * #1493 - Fixed one column layout bug of the launcher (hrw) |
197 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) | 201 | * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) |
198 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) | 202 | * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) |
199 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) | 203 | * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) |
200 | 204 | ||
201 | Internal | 205 | Internal |
202 | -------- | 206 | -------- |
203 | * Moved libopie1 to unsupported (mickeyl) | 207 | * Moved libopie1 to unsupported (mickeyl) |
204 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) | 208 | * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) |
205 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) | 209 | * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) |
206 | 210 | ||
207 | 2004-11-14Opie 1.1.7 | 211 | 2004-11-14Opie 1.1.7 |
208 | 212 | ||
209 | New Features | 213 | New Features |
210 | ------------ | 214 | ------------ |
211 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) | 215 | * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) |
212 | * Backup now uses the busy indicator when backing up and restore (ar) | 216 | * Backup now uses the busy indicator when backing up and restore (ar) |
213 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) | 217 | * OpiePlayer2 gained adding of Directories to the playlist (zecke) |
214 | * OpiePlayer2 better error handling (zecke) | 218 | * OpiePlayer2 better error handling (zecke) |
215 | * OpiePlayer2 progress indication while streaming (zecke) | 219 | * OpiePlayer2 progress indication while streaming (zecke) |
216 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) | 220 | * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) |
217 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) | 221 | * Ported brightnessapplet from Qtopia 1.7 (mickeyl) |
218 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) | 222 | * Opie-Eye got a Digital Camera File Backend (alwin,zecke) |
219 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) | 223 | * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) |
220 | * Opie-Console use Custom Font and Size in a Profile (harlekin) | 224 | * Opie-Console use Custom Font and Size in a Profile (harlekin) |
221 | * Opie-Console transparently log the Output and Input to a file (harlekin) | 225 | * Opie-Console transparently log the Output and Input to a file (harlekin) |
222 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) | 226 | * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) |
223 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) | 227 | * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) |
224 | * Opie-Security gained a 'test authentication' button (clem) | 228 | * Opie-Security gained a 'test authentication' button (clem) |
225 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults | 229 | * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults |
226 | * Opie-Mail improve the handling of POP mail boxes (alwin) | 230 | * Opie-Mail improve the handling of POP mail boxes (alwin) |
227 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) | 231 | * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) |
228 | * Opie IRC - backports of the 'NeIRC fork' (zecke) | 232 | * Opie IRC - backports of the 'NeIRC fork' (zecke) |
229 | 233 | ||
230 | Fixed Bugs | 234 | Fixed Bugs |
231 | ---------- | 235 | ---------- |
232 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) | 236 | * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) |
233 | * #608 - Make Opie usable for left handed users (zecke) | 237 | * #608 - Make Opie usable for left handed users (zecke) |
234 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) | 238 | * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) |
235 | * #1245 - Opie-Go 'paused' (zecke) | 239 | * #1245 - Opie-Go 'paused' (zecke) |
236 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) | 240 | * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) |
237 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) | 241 | * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) |
238 | * #1395 - Build VNC Backend with gcc3.4 | 242 | * #1395 - Build VNC Backend with gcc3.4 |
239 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) | 243 | * #1440 - The icon of opie-mobilemsg is missing (CoreDump) |
240 | * #1426 - Add missing opie-bartender Icon (CoreDump) | 244 | * #1426 - Add missing opie-bartender Icon (CoreDump) |
241 | * #1445 - Opie-Sheet Has No Icon (CoreDump) | 245 | * #1445 - Opie-Sheet Has No Icon (CoreDump) |
242 | * #1448 - Brightness Applet added (mickeyl) | 246 | * #1448 - Brightness Applet added (mickeyl) |
243 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) | 247 | * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) |
244 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) | 248 | * #1482 - Fix OFileSelector to be able to sort by size (zecke) |
245 | * n.a. - Opie-mail: fixed some crasher, some layout-problems | 249 | * n.a. - Opie-mail: fixed some crasher, some layout-problems |
246 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) | 250 | * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) |
247 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) | 251 | * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) |
248 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) | 252 | * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) |
249 | * 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) | 253 | * 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) |
250 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) | 254 | * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) |
251 | 255 | ||
252 | Internal | 256 | Internal |
253 | -------- | 257 | -------- |
254 | * Opie-Qashmoney has been moved to unsupported (mickeyl) | 258 | * Opie-Qashmoney has been moved to unsupported (mickeyl) |
255 | * Opie-Ubrowser has been moved to unsupported (mickeyl) | 259 | * Opie-Ubrowser has been moved to unsupported (mickeyl) |
256 | 260 | ||
257 | 2004-09-17Opie 1.1.6 | 261 | 2004-09-17Opie 1.1.6 |
258 | 262 | ||
259 | New Features | 263 | New Features |
260 | ------------ | 264 | ------------ |
261 | * Fifteen gained configurable number of items (zecke) | 265 | * Fifteen gained configurable number of items (zecke) |
262 | * Fifteen can have custom background images (zecke) | 266 | * Fifteen can have custom background images (zecke) |
263 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) | 267 | * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) |
264 | * Integrated the new security framework into libopie2 (zecke,clem) | 268 | * Integrated the new security framework into libopie2 (zecke,clem) |
265 | * Converted the launcher to use the new security framework (zecke) | 269 | * Converted the launcher to use the new security framework (zecke) |
266 | * Backup can now handle custom locations for backup and restore (ar) | 270 | * Backup can now handle custom locations for backup and restore (ar) |
267 | * Implemented right-on-hold feedback (wimpie,zecke) | 271 | * Implemented right-on-hold feedback (wimpie,zecke) |
268 | * Lots of new features in opie-reader (tim,pohly) | 272 | * Lots of new features in opie-reader (tim,pohly) |
269 | * Build system cleanups (schurig) | 273 | * Build system cleanups (schurig) |
270 | 274 | ||
271 | Fixed Bugs | 275 | Fixed Bugs |
272 | -------- | 276 | -------- |
273 | * #1005 - Fixed backup to CompactFlash (ar) | 277 | * #1005 - Fixed backup to CompactFlash (ar) |
274 | * #1167 - Fixed Opie write crashing on more text than one page (ar) | 278 | * #1167 - Fixed Opie write crashing on more text than one page (ar) |
275 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) | 279 | * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) |
276 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) | 280 | * #1359 - Fixed bookmarks in Gutenbrowser (ljp) |
277 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) | 281 | * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) |
278 | * #1370 - Pimconverter now reacts on cancel key (eilers) | 282 | * #1370 - Pimconverter now reacts on cancel key (eilers) |
279 | * #1376 - Bring back the capslock/numlock display (zecke) | 283 | * #1376 - Bring back the capslock/numlock display (zecke) |
280 | * #1383 - Language settings now warns about losing open apps (Markus Litz) | 284 | * #1383 - Language settings now warns about losing open apps (Markus Litz) |
281 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) | 285 | * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) |
282 | * #1394 - Fixed oversized headline in opie-login (coredump) | 286 | * #1394 - Fixed oversized headline in opie-login (coredump) |
283 | * #1396 - Opie-console captures the escape key and vim is working (zecke) | 287 | * #1396 - Opie-console captures the escape key and vim is working (zecke) |
284 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) | 288 | * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) |
285 | 289 | ||
286 | 2004-07-06Opie 1.1.4 | 290 | 2004-07-06Opie 1.1.4 |
287 | 291 | ||
288 | New Features | 292 | New Features |
289 | ------------ | 293 | ------------ |
290 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) | 294 | * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) |
291 | * Added Conversion tool for pim-data (eilers) | 295 | * Added Conversion tool for pim-data (eilers) |
292 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) | 296 | * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) |
293 | * Modified the PIM API for providing generic use of OPimRecords (eilers) | 297 | * Modified the PIM API for providing generic use of OPimRecords (eilers) |
294 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) | 298 | * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) |
295 | 299 | ||
296 | Fixed Bugs | 300 | Fixed Bugs |
297 | -------- | 301 | -------- |
298 | * #1068 - Country Drop Down Box Off Screen | 302 | * #1068 - Country Drop Down Box Off Screen |
299 | * #1291 - Opie tinykate does not open .desktop files (ar) | 303 | * #1291 - Opie tinykate does not open .desktop files (ar) |
300 | * #1291 - Opie sheet not saving correctly (ar) | 304 | * #1291 - Opie sheet not saving correctly (ar) |
301 | * #1294 - Opie does not know about British Summer Time | 305 | * #1294 - Opie does not know about British Summer Time |
302 | * #1314 - Drawpad initialization (mickeyl) | 306 | * #1314 - Drawpad initialization (mickeyl) |
303 | * #1317 - Packagemanager crashes on hold-down or install (chicken) | 307 | * #1317 - Packagemanager crashes on hold-down or install (chicken) |
304 | * #1321 - Batteryapplet graphic glitch (harlekin) | 308 | * #1321 - Batteryapplet graphic glitch (harlekin) |
305 | * #1324 - ZSafe not starting up (mickeyl) | 309 | * #1324 - ZSafe not starting up (mickeyl) |
306 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) | 310 | * #1328 - Personal Home Address fields is trimmed to 1char (eilers) |
307 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) | 311 | * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) |
308 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) | 312 | * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) |
309 | * #1348 - Datebook dependency on libopiedb2 (chicken) | 313 | * #1348 - Datebook dependency on libopiedb2 (chicken) |
310 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) | 314 | * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) |
311 | 315 | ||
312 | 2004-04-25Opie 1.1.3 | 316 | 2004-04-25Opie 1.1.3 |
313 | 317 | ||
314 | * Introduced first implementation of SQL-Support using SQLite (eilers) | 318 | * Introduced first implementation of SQL-Support using SQLite (eilers) |
315 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) | 319 | * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) |
316 | * Added a real system graffiti character set (brad) | 320 | * Added a real system graffiti character set (brad) |
317 | * Added Generic Keyconfig Widget (zecke) | 321 | * Added Generic Keyconfig Widget (zecke) |
318 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) | 322 | * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) |
319 | * Added new Bible reader app - opie-dagger (drw) | 323 | * Added new Bible reader app - opie-dagger (drw) |
320 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) | 324 | * Added a new Image Viewer. Work is ongoing (zecke,alwin) |
321 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) | 325 | * Added namespace usage in libopie2 and everywhere (zecke,alwin) |
322 | * Enabled the possibility to pass command line arguments to applications (mickeyl) | 326 | * Enabled the possibility to pass command line arguments to applications (mickeyl) |
323 | * Added an about applet showing some credits and information about Opie (mickeyl) | 327 | * Added an about applet showing some credits and information about Opie (mickeyl) |
324 | * Added benchmarking functionality to sysinfo (mickeyl) | 328 | * Added benchmarking functionality to sysinfo (mickeyl) |
325 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) | 329 | * Added applet and configuration application for switching hardware keyboard layouts (alwin) |
326 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) | 330 | * Ported applications from libopie1 to libopie2* (drw,ar,alwin) |
327 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) | 331 | * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) |
328 | * Clean-up of package information in control files (drw) | 332 | * Clean-up of package information in control files (drw) |
329 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) | 333 | * Repaired mediummount which was broken since integrating the quicklauncher (alwin) |
330 | * Improved big-screen support (zecke,ar) | 334 | * Improved big-screen support (zecke,ar) |
331 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) | 335 | * Improved multikeyboard support, added keyboard layout switching applet (mouse) |
332 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) | 336 | * Added a new mail client based on libetpan (harlekin,alwin,jgf) |
333 | * Added new package manager - opie-packagemanager (drw) | 337 | * Added new package manager - opie-packagemanager (drw) |
334 | * Improved light-n-power for C7x0 (mickeyl) | 338 | * Improved light-n-power for C7x0 (mickeyl) |
335 | * Added automatic rotation support for C7x0 (treke) | 339 | * Added automatic rotation support for C7x0 (treke) |
336 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) | 340 | * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) |
337 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) | 341 | * Added scanning the wireless network neighbourhood to networksettings (mickeyl) |
338 | 342 | ||
339 | 2003-11-29Opie 1.0.3 | 343 | 2003-11-29Opie 1.0.3 |
340 | 344 | ||
341 | * Released as Version 1.0.3 | 345 | * Released as Version 1.0.3 |
342 | * Improved i18n (various contributors) | 346 | * Improved i18n (various contributors) |
343 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) | 347 | * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) |
344 | * Made the Documents Tab optional (mickeyl) | 348 | * Made the Documents Tab optional (mickeyl) |
345 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) | 349 | * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) |
346 | 350 | ||
347 | 2003-08-04Opie 1.0.0 | 351 | 2003-08-04Opie 1.0.0 |
348 | 352 | ||
349 | * Released as Version 1.0.0 | 353 | * Released as Version 1.0.0 |
350 | * Including a PPP module for easy dial up (tille,harlekin,zecke) | 354 | * Including a PPP module for easy dial up (tille,harlekin,zecke) |
diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index 62bb68a..7b99eb4 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp | |||
@@ -1,817 +1,817 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | =. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> | 3 | =. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> |
4 | .=l. | 4 | .=l. |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This program is free software; you can | 6 | _;:, .> :=|. This program is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; version 2 of the License. | 10 | - . .-<_> .<> Foundation; version 2 of the License. |
11 | ._= =} : | 11 | ._= =} : |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This program is distributed in the hope that | 13 | .i_,=:_. -<s. This program is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
18 | ..}^=.= = ; Library General Public License for more | 18 | ..}^=.= = ; Library General Public License for more |
19 | ++= -. .` .: details. | 19 | ++= -. .` .: details. |
20 | : = ...= . :.=- | 20 | : = ...= . :.=- |
21 | -. .:....=;==+<; You should have received a copy of the GNU | 21 | -. .:....=;==+<; You should have received a copy of the GNU |
22 | -_. . . )=. = Library General Public License along with | 22 | -_. . . )=. = Library General Public License along with |
23 | -- :-=` this library; see the file COPYING.LIB. | 23 | -- :-=` this library; see the file COPYING.LIB. |
24 | If not, write to the Free Software Foundation, | 24 | If not, write to the Free Software Foundation, |
25 | Inc., 59 Temple Place - Suite 330, | 25 | Inc., 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | 30 | ||
31 | #include "odevice_beagle.h" | 31 | #include "odevice_beagle.h" |
32 | #include "odevice_ipaq.h" | 32 | #include "odevice_ipaq.h" |
33 | #include "odevice_mypal.h" | 33 | #include "odevice_mypal.h" |
34 | #include "odevice_jornada.h" | 34 | #include "odevice_jornada.h" |
35 | #include "odevice_ramses.h" | 35 | #include "odevice_ramses.h" |
36 | #include "odevice_simpad.h" | 36 | #include "odevice_simpad.h" |
37 | #include "odevice_yopy.h" | 37 | #include "odevice_yopy.h" |
38 | #include "odevice_zaurus.h" | 38 | #include "odevice_zaurus.h" |
39 | #include "odevice_genuineintel.h" | 39 | #include "odevice_genuineintel.h" |
40 | 40 | ||
41 | /* QT */ | 41 | /* QT */ |
42 | #include <qapplication.h> | 42 | #include <qapplication.h> |
43 | #include <qfile.h> | 43 | #include <qfile.h> |
44 | #include <qtextstream.h> | 44 | #include <qtextstream.h> |
45 | #include <qwindowsystem_qws.h> | 45 | #include <qwindowsystem_qws.h> |
46 | 46 | ||
47 | /* OPIE */ | 47 | /* OPIE */ |
48 | #include <qpe/config.h> | 48 | #include <qpe/config.h> |
49 | #include <qpe/sound.h> | 49 | #include <qpe/sound.h> |
50 | #include <qpe/qcopenvelope_qws.h> | 50 | #include <qpe/qcopenvelope_qws.h> |
51 | #include <qpe/sound.h> | 51 | #include <qpe/sound.h> |
52 | 52 | ||
53 | #include <opie2/okeyfilter.h> | 53 | #include <opie2/okeyfilter.h> |
54 | #include <opie2/oresource.h> | 54 | #include <opie2/oresource.h> |
55 | 55 | ||
56 | /* STD */ | 56 | /* STD */ |
57 | #include <fcntl.h> | 57 | #include <fcntl.h> |
58 | #include <math.h> | 58 | #include <math.h> |
59 | #include <stdlib.h> | 59 | #include <stdlib.h> |
60 | #include <signal.h> | 60 | #include <signal.h> |
61 | #include <sys/ioctl.h> | 61 | #include <sys/ioctl.h> |
62 | #include <sys/time.h> | 62 | #include <sys/time.h> |
63 | #include <unistd.h> | 63 | #include <unistd.h> |
64 | #ifndef QT_NO_SOUND | 64 | #ifndef QT_NO_SOUND |
65 | #include <linux/soundcard.h> | 65 | #include <linux/soundcard.h> |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | namespace Opie { | 68 | namespace Opie { |
69 | namespace Core { | 69 | namespace Core { |
70 | 70 | ||
71 | static const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; | 71 | static const char* PATH_PROC_CPUINFO = "/proc/cpuinfo"; |
72 | 72 | ||
73 | 73 | ||
74 | /* STATIC and common implementation */ | 74 | /* STATIC and common implementation */ |
75 | /* EXPORT */ ODistribution distributions[] = { | 75 | /* EXPORT */ ODistribution distributions[] = { |
76 | { System_Familiar, "FamiliarLinux", "/etc/familiar-version" }, | 76 | { System_Familiar, "FamiliarLinux", "/etc/familiar-version" }, |
77 | { System_OpenZaurus, "OpenZaurus", "/etc/oz_version" }, | 77 | { System_OpenZaurus, "OpenZaurus", "/etc/openzaurus-version" }, |
78 | { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" }, | 78 | { System_OpenEmbedded, "OpenEmbedded", "/etc/oe-version" }, |
79 | { System_Unknown, "Linux", "/etc/issue" }, | 79 | { System_Unknown, "Linux", "/etc/issue" }, |
80 | }; | 80 | }; |
81 | 81 | ||
82 | 82 | ||
83 | /* EXPORT */ bool isQWS(){ | 83 | /* EXPORT */ bool isQWS(){ |
84 | return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; | 84 | return qApp ? ( qApp->type() == QApplication::GuiServer ) : false; |
85 | } | 85 | } |
86 | 86 | ||
87 | /* EXPORT */ QCString makeChannel ( const char *str ){ | 87 | /* EXPORT */ QCString makeChannel ( const char *str ){ |
88 | if ( str && !::strchr ( str, '/' )) | 88 | if ( str && !::strchr ( str, '/' )) |
89 | return QCString ( "QPE/Application/" ) + str; | 89 | return QCString ( "QPE/Application/" ) + str; |
90 | else | 90 | else |
91 | return str; | 91 | return str; |
92 | } | 92 | } |
93 | 93 | ||
94 | 94 | ||
95 | 95 | ||
96 | /* Now the default implementation of ODevice */ | 96 | /* Now the default implementation of ODevice */ |
97 | 97 | ||
98 | struct default_button default_buttons [] = { | 98 | struct default_button default_buttons [] = { |
99 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), | 99 | { Qt::Key_F9, QT_TRANSLATE_NOOP("Button", "Calendar Button"), |
100 | "devicebuttons/z_calendar", | 100 | "devicebuttons/z_calendar", |
101 | "datebook", "nextView()", | 101 | "datebook", "nextView()", |
102 | "today", "raise()" }, | 102 | "today", "raise()" }, |
103 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), | 103 | { Qt::Key_F10, QT_TRANSLATE_NOOP("Button", "Contacts Button"), |
104 | "devicebuttons/z_contact", | 104 | "devicebuttons/z_contact", |
105 | "addressbook", "raise()", | 105 | "addressbook", "raise()", |
106 | "addressbook", "beamBusinessCard()" }, | 106 | "addressbook", "beamBusinessCard()" }, |
107 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), | 107 | { Qt::Key_F12, QT_TRANSLATE_NOOP("Button", "Home Button"), |
108 | "devicebuttons/z_home", | 108 | "devicebuttons/z_home", |
109 | "QPE/Launcher", "home()", | 109 | "QPE/Launcher", "home()", |
110 | "buttonsettings", "raise()" }, | 110 | "buttonsettings", "raise()" }, |
111 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), | 111 | { Qt::Key_F11, QT_TRANSLATE_NOOP("Button", "Menu Button"), |
112 | "devicebuttons/z_menu", | 112 | "devicebuttons/z_menu", |
113 | "QPE/TaskBar", "toggleMenu()", | 113 | "QPE/TaskBar", "toggleMenu()", |
114 | "QPE/TaskBar", "toggleStartMenu()" }, | 114 | "QPE/TaskBar", "toggleStartMenu()" }, |
115 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), | 115 | { Qt::Key_F13, QT_TRANSLATE_NOOP("Button", "Mail Button"), |
116 | "devicebuttons/z_mail", | 116 | "devicebuttons/z_mail", |
117 | "opiemail", "raise()", | 117 | "opiemail", "raise()", |
118 | "opiemail", "newMail()" }, | 118 | "opiemail", "newMail()" }, |
119 | }; | 119 | }; |
120 | 120 | ||
121 | ODevice *ODevice::inst() | 121 | ODevice *ODevice::inst() |
122 | { | 122 | { |
123 | static ODevice *dev = 0; | 123 | static ODevice *dev = 0; |
124 | QString cpu_info; | 124 | QString cpu_info; |
125 | 125 | ||
126 | if ( !dev ) | 126 | if ( !dev ) |
127 | { | 127 | { |
128 | QFile f( PATH_PROC_CPUINFO ); | 128 | QFile f( PATH_PROC_CPUINFO ); |
129 | if ( f.open( IO_ReadOnly ) ) | 129 | if ( f.open( IO_ReadOnly ) ) |
130 | { | 130 | { |
131 | QTextStream s( &f ); | 131 | QTextStream s( &f ); |
132 | while ( !s.atEnd() ) | 132 | while ( !s.atEnd() ) |
133 | { | 133 | { |
134 | QString line; | 134 | QString line; |
135 | line = s.readLine(); | 135 | line = s.readLine(); |
136 | if ( line.startsWith( "Hardware" ) ) | 136 | if ( line.startsWith( "Hardware" ) ) |
137 | { | 137 | { |
138 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 138 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
139 | cpu_info = line; | 139 | cpu_info = line; |
140 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); | 140 | if ( line.contains( "sharp", false ) ) dev = new Internal::Zaurus(); |
141 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); | 141 | else if ( line.contains( "ipaq", false ) ) dev = new Internal::iPAQ(); |
142 | else if ( line.contains( "mypal", false ) ) dev = new Internal::MyPal(); | 142 | else if ( line.contains( "mypal", false ) ) dev = new Internal::MyPal(); |
143 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); | 143 | else if ( line.contains( "simpad", false ) ) dev = new Internal::SIMpad(); |
144 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); | 144 | else if ( line.contains( "jornada", false ) ) dev = new Internal::Jornada(); |
145 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); | 145 | else if ( line.contains( "ramses", false ) ) dev = new Internal::Ramses(); |
146 | else if ( line.contains( "Tradesquare.NL", false ) ) dev = new Internal::Beagle(); | 146 | else if ( line.contains( "Tradesquare.NL", false ) ) dev = new Internal::Beagle(); |
147 | else qWarning( "ODevice() - unknown hardware - using default." ); | 147 | else qWarning( "ODevice() - unknown hardware - using default." ); |
148 | break; | 148 | break; |
149 | } else if ( line.startsWith( "vendor_id" ) ) { | 149 | } else if ( line.startsWith( "vendor_id" ) ) { |
150 | qDebug( "ODevice() - found '%s'", (const char*) line ); | 150 | qDebug( "ODevice() - found '%s'", (const char*) line ); |
151 | cpu_info = line; | 151 | cpu_info = line; |
152 | if( line.contains( "genuineintel", false ) ) { | 152 | if( line.contains( "genuineintel", false ) ) { |
153 | dev = new Internal::GenuineIntel(); | 153 | dev = new Internal::GenuineIntel(); |
154 | break; | 154 | break; |
155 | } | 155 | } |
156 | } | 156 | } |
157 | } | 157 | } |
158 | } | 158 | } |
159 | else | 159 | else |
160 | { | 160 | { |
161 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); | 161 | qWarning( "ODevice() - can't open '%s' - unknown hardware - using default.", PATH_PROC_CPUINFO ); |
162 | } | 162 | } |
163 | if ( !dev ) dev = new ODevice(); | 163 | if ( !dev ) dev = new ODevice(); |
164 | dev->init(cpu_info); | 164 | dev->init(cpu_info); |
165 | } | 165 | } |
166 | return dev; | 166 | return dev; |
167 | } | 167 | } |
168 | 168 | ||
169 | ODevice::ODevice() | 169 | ODevice::ODevice() |
170 | { | 170 | { |
171 | d = new ODeviceData; | 171 | d = new ODeviceData; |
172 | 172 | ||
173 | d->m_modelstr = "Unknown"; | 173 | d->m_modelstr = "Unknown"; |
174 | d->m_model = Model_Unknown; | 174 | d->m_model = Model_Unknown; |
175 | d->m_vendorstr = "Unknown"; | 175 | d->m_vendorstr = "Unknown"; |
176 | d->m_vendor = Vendor_Unknown; | 176 | d->m_vendor = Vendor_Unknown; |
177 | d->m_systemstr = "Unknown"; | 177 | d->m_systemstr = "Unknown"; |
178 | d->m_system = System_Unknown; | 178 | d->m_system = System_Unknown; |
179 | d->m_sysverstr = "0.0"; | 179 | d->m_sysverstr = "0.0"; |
180 | d->m_rotation = Rot0; | 180 | d->m_rotation = Rot0; |
181 | d->m_direction = CW; | 181 | d->m_direction = CW; |
182 | d->m_qteDriver = "Transformed"; | 182 | d->m_qteDriver = "Transformed"; |
183 | 183 | ||
184 | d->m_holdtime = 1000; // 1000ms | 184 | d->m_holdtime = 1000; // 1000ms |
185 | d->m_buttons = 0; | 185 | d->m_buttons = 0; |
186 | d->m_cpu_frequencies = new QStrList; | 186 | d->m_cpu_frequencies = new QStrList; |
187 | 187 | ||
188 | 188 | ||
189 | /* mixer */ | 189 | /* mixer */ |
190 | d->m_sound = d->m_vol = d->m_mixer = -1; | 190 | d->m_sound = d->m_vol = d->m_mixer = -1; |
191 | 191 | ||
192 | /* System QCopChannel created */ | 192 | /* System QCopChannel created */ |
193 | d->m_initializedButtonQcop = false; | 193 | d->m_initializedButtonQcop = false; |
194 | 194 | ||
195 | // New distribution detection code first checks for legacy distributions, | 195 | // New distribution detection code first checks for legacy distributions, |
196 | // identified by /etc/familiar-version or /etc/oz_version. | 196 | // identified by /etc/familiar-version or /etc/oz_version. |
197 | // Then check for OpenEmbedded and lastly, read /etc/issue | 197 | // Then check for OpenEmbedded and lastly, read /etc/issue |
198 | 198 | ||
199 | for ( unsigned int i = 0; i < sizeof(distributions)/sizeof(ODistribution); ++i ) | 199 | for ( unsigned int i = 0; i < sizeof(distributions)/sizeof(ODistribution); ++i ) |
200 | { | 200 | { |
201 | if ( QFile::exists( distributions[i].sysvfile ) ) | 201 | if ( QFile::exists( distributions[i].sysvfile ) ) |
202 | { | 202 | { |
203 | d->m_systemstr = distributions[i].sysstr; | 203 | d->m_systemstr = distributions[i].sysstr; |
204 | d->m_system = distributions[i].system; | 204 | d->m_system = distributions[i].system; |
205 | d->m_sysverstr = "<Unknown>"; | 205 | d->m_sysverstr = "<Unknown>"; |
206 | QFile f( distributions[i].sysvfile ); | 206 | QFile f( distributions[i].sysvfile ); |
207 | if ( f.open( IO_ReadOnly ) ) | 207 | if ( f.open( IO_ReadOnly ) ) |
208 | { | 208 | { |
209 | QTextStream ts( &f ); | 209 | QTextStream ts( &f ); |
210 | d->m_sysverstr = ts.readLine().replace( QRegExp( "\\\\." ), "" ); | 210 | d->m_sysverstr = ts.readLine().replace( QRegExp( "\\\\." ), "" ); |
211 | } | 211 | } |
212 | break; | 212 | break; |
213 | } | 213 | } |
214 | } | 214 | } |
215 | } | 215 | } |
216 | 216 | ||
217 | void ODevice::systemMessage( const QCString &msg, const QByteArray & ) | 217 | void ODevice::systemMessage( const QCString &msg, const QByteArray & ) |
218 | { | 218 | { |
219 | if ( msg == "deviceButtonMappingChanged()" ) { | 219 | if ( msg == "deviceButtonMappingChanged()" ) { |
220 | reloadButtonMapping(); | 220 | reloadButtonMapping(); |
221 | } | 221 | } |
222 | } | 222 | } |
223 | 223 | ||
224 | void ODevice::init(const QString&) | 224 | void ODevice::init(const QString&) |
225 | { | 225 | { |
226 | } | 226 | } |
227 | 227 | ||
228 | /** | 228 | /** |
229 | * This method initialises the button mapping | 229 | * This method initialises the button mapping |
230 | */ | 230 | */ |
231 | void ODevice::initButtons() | 231 | void ODevice::initButtons() |
232 | { | 232 | { |
233 | if ( d->m_buttons ) | 233 | if ( d->m_buttons ) |
234 | return; | 234 | return; |
235 | 235 | ||
236 | qDebug ( "init Buttons" ); | 236 | qDebug ( "init Buttons" ); |
237 | d->m_buttons = new QValueList <ODeviceButton>; | 237 | d->m_buttons = new QValueList <ODeviceButton>; |
238 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { | 238 | for ( uint i = 0; i < ( sizeof( default_buttons ) / sizeof( default_button )); i++ ) { |
239 | default_button *db = default_buttons + i; | 239 | default_button *db = default_buttons + i; |
240 | ODeviceButton b; | 240 | ODeviceButton b; |
241 | b. setKeycode ( db->code ); | 241 | b. setKeycode ( db->code ); |
242 | b. setUserText ( QObject::tr ( "Button", db->utext )); | 242 | b. setUserText ( QObject::tr ( "Button", db->utext )); |
243 | b. setPixmap ( OResource::loadPixmap ( db->pix )); | 243 | b. setPixmap ( OResource::loadPixmap ( db->pix )); |
244 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction )); | 244 | b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( db->fpressedservice ), db->fpressedaction )); |
245 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction )); | 245 | b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( db->fheldservice ), db->fheldaction )); |
246 | d->m_buttons->append ( b ); | 246 | d->m_buttons->append ( b ); |
247 | } | 247 | } |
248 | 248 | ||
249 | reloadButtonMapping(); | 249 | reloadButtonMapping(); |
250 | } | 250 | } |
251 | 251 | ||
252 | ODevice::~ODevice() | 252 | ODevice::~ODevice() |
253 | { | 253 | { |
254 | // we leak m_devicebuttons and m_cpu_frequency | 254 | // we leak m_devicebuttons and m_cpu_frequency |
255 | // but it's a singleton and it is not so importantant | 255 | // but it's a singleton and it is not so importantant |
256 | // -zecke | 256 | // -zecke |
257 | delete d; | 257 | delete d; |
258 | } | 258 | } |
259 | 259 | ||
260 | /** | 260 | /** |
261 | * This method will try to suspend the device | 261 | * This method will try to suspend the device |
262 | * It only works if the user is the QWS Server and the apm application | 262 | * It only works if the user is the QWS Server and the apm application |
263 | * is installed. | 263 | * is installed. |
264 | * It tries to suspend and then waits some time cause some distributions | 264 | * It tries to suspend and then waits some time cause some distributions |
265 | * do have asynchronus apm implementations. | 265 | * do have asynchronus apm implementations. |
266 | * This method will either fail and return false or it'll suspend the | 266 | * This method will either fail and return false or it'll suspend the |
267 | * device and return once the device got woken up | 267 | * device and return once the device got woken up |
268 | * | 268 | * |
269 | * @return if the device got suspended | 269 | * @return if the device got suspended |
270 | */ | 270 | */ |
271 | bool ODevice::suspend() | 271 | bool ODevice::suspend() |
272 | { | 272 | { |
273 | return false; // default implementation == unknown device or qvfb | 273 | return false; // default implementation == unknown device or qvfb |
274 | } | 274 | } |
275 | 275 | ||
276 | /** | 276 | /** |
277 | * This sets the display on or off | 277 | * This sets the display on or off |
278 | */ | 278 | */ |
279 | bool ODevice::setDisplayStatus( bool on ) | 279 | bool ODevice::setDisplayStatus( bool on ) |
280 | { | 280 | { |
281 | qDebug( "ODevice::setDisplayStatus( %d ) - please override me.", on ); | 281 | qDebug( "ODevice::setDisplayStatus( %d ) - please override me.", on ); |
282 | return false; // don't do anything for unknown models | 282 | return false; // don't do anything for unknown models |
283 | } | 283 | } |
284 | 284 | ||
285 | /** | 285 | /** |
286 | * This sets the display brightness | 286 | * This sets the display brightness |
287 | * | 287 | * |
288 | * @param b The brightness to be set on a scale from 0 to 255 | 288 | * @param b The brightness to be set on a scale from 0 to 255 |
289 | * @return success or failure | 289 | * @return success or failure |
290 | */ | 290 | */ |
291 | bool ODevice::setDisplayBrightness( int b ) | 291 | bool ODevice::setDisplayBrightness( int b ) |
292 | { | 292 | { |
293 | qDebug( "ODevice::setDisplayBrightness( %d ) - please override me.", b ); | 293 | qDebug( "ODevice::setDisplayBrightness( %d ) - please override me.", b ); |
294 | return false; | 294 | return false; |
295 | } | 295 | } |
296 | 296 | ||
297 | /** | 297 | /** |
298 | * | 298 | * |
299 | * @returns the number of steppings on the brightness slider | 299 | * @returns the number of steppings on the brightness slider |
300 | * in the Light-'n-Power settings. Values smaller than zero and bigger | 300 | * in the Light-'n-Power settings. Values smaller than zero and bigger |
301 | * than 255 do not make sense. | 301 | * than 255 do not make sense. |
302 | * | 302 | * |
303 | * \sa QSlider::setLineStep | 303 | * \sa QSlider::setLineStep |
304 | * \sa QSlider::setPageStep | 304 | * \sa QSlider::setPageStep |
305 | */ | 305 | */ |
306 | int ODevice::displayBrightnessResolution() const | 306 | int ODevice::displayBrightnessResolution() const |
307 | { | 307 | { |
308 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); | 308 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); |
309 | return 16; | 309 | return 16; |
310 | } | 310 | } |
311 | 311 | ||
312 | /** | 312 | /** |
313 | * This sets the display contrast | 313 | * This sets the display contrast |
314 | * @param p The contrast to be set on a scale from 0 to 255 | 314 | * @param p The contrast to be set on a scale from 0 to 255 |
315 | * @returns success or failure | 315 | * @returns success or failure |
316 | */ | 316 | */ |
317 | bool ODevice::setDisplayContrast( int p ) | 317 | bool ODevice::setDisplayContrast( int p ) |
318 | { | 318 | { |
319 | qDebug( "ODevice::setDisplayContrast( %d ) - please override me.", p ); | 319 | qDebug( "ODevice::setDisplayContrast( %d ) - please override me.", p ); |
320 | return false; | 320 | return false; |
321 | } | 321 | } |
322 | 322 | ||
323 | /** | 323 | /** |
324 | * @returns the maximum value for the contrast settings slider | 324 | * @returns the maximum value for the contrast settings slider |
325 | * or 0 if the device doesn't support setting of a contrast | 325 | * or 0 if the device doesn't support setting of a contrast |
326 | */ | 326 | */ |
327 | int ODevice::displayContrastResolution() const | 327 | int ODevice::displayContrastResolution() const |
328 | { | 328 | { |
329 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); | 329 | qDebug( "ODevice::displayBrightnessResolution() - please override me." ); |
330 | return 0; | 330 | return 0; |
331 | } | 331 | } |
332 | 332 | ||
333 | /** | 333 | /** |
334 | * This returns the vendor as string | 334 | * This returns the vendor as string |
335 | * @return Vendor as QString | 335 | * @return Vendor as QString |
336 | */ | 336 | */ |
337 | QString ODevice::vendorString() const | 337 | QString ODevice::vendorString() const |
338 | { | 338 | { |
339 | return d->m_vendorstr; | 339 | return d->m_vendorstr; |
340 | } | 340 | } |
341 | 341 | ||
342 | /** | 342 | /** |
343 | * This returns the vendor as one of the values of OVendor | 343 | * This returns the vendor as one of the values of OVendor |
344 | * @return OVendor | 344 | * @return OVendor |
345 | */ | 345 | */ |
346 | OVendor ODevice::vendor() const | 346 | OVendor ODevice::vendor() const |
347 | { | 347 | { |
348 | return d->m_vendor; | 348 | return d->m_vendor; |
349 | } | 349 | } |
350 | 350 | ||
351 | /** | 351 | /** |
352 | * This returns the model as a string | 352 | * This returns the model as a string |
353 | * @return A string representing the model | 353 | * @return A string representing the model |
354 | */ | 354 | */ |
355 | QString ODevice::modelString() const | 355 | QString ODevice::modelString() const |
356 | { | 356 | { |
357 | return d->m_modelstr; | 357 | return d->m_modelstr; |
358 | } | 358 | } |
359 | 359 | ||
360 | /** | 360 | /** |
361 | * This does return the OModel used | 361 | * This does return the OModel used |
362 | */ | 362 | */ |
363 | OModel ODevice::model() const | 363 | OModel ODevice::model() const |
364 | { | 364 | { |
365 | return d->m_model; | 365 | return d->m_model; |
366 | } | 366 | } |
367 | 367 | ||
368 | /** | 368 | /** |
369 | * This does return the systen name | 369 | * This does return the systen name |
370 | */ | 370 | */ |
371 | QString ODevice::systemString() const | 371 | QString ODevice::systemString() const |
372 | { | 372 | { |
373 | return d->m_systemstr; | 373 | return d->m_systemstr; |
374 | } | 374 | } |
375 | 375 | ||
376 | /** | 376 | /** |
377 | * Return System as OSystem value | 377 | * Return System as OSystem value |
378 | */ | 378 | */ |
379 | OSystem ODevice::system() const | 379 | OSystem ODevice::system() const |
380 | { | 380 | { |
381 | return d->m_system; | 381 | return d->m_system; |
382 | } | 382 | } |
383 | 383 | ||
384 | /** | 384 | /** |
385 | * @return the version string of the base system | 385 | * @return the version string of the base system |
386 | */ | 386 | */ |
387 | QString ODevice::systemVersionString() const | 387 | QString ODevice::systemVersionString() const |
388 | { | 388 | { |
389 | return d->m_sysverstr; | 389 | return d->m_sysverstr; |
390 | } | 390 | } |
391 | 391 | ||
392 | /** | 392 | /** |
393 | * @return the current Transformation | 393 | * @return the current Transformation |
394 | */ | 394 | */ |
395 | Transformation ODevice::rotation() const | 395 | Transformation ODevice::rotation() const |
396 | { | 396 | { |
397 | return d->m_rotation; | 397 | return d->m_rotation; |
398 | } | 398 | } |
399 | 399 | ||
400 | /** | 400 | /** |
401 | * @return the current rotation direction | 401 | * @return the current rotation direction |
402 | */ | 402 | */ |
403 | ODirection ODevice::direction() const | 403 | ODirection ODevice::direction() const |
404 | { | 404 | { |
405 | return d->m_direction; | 405 | return d->m_direction; |
406 | } | 406 | } |
407 | 407 | ||
408 | QString ODevice::qteDriver() const | 408 | QString ODevice::qteDriver() const |
409 | { | 409 | { |
410 | return d->m_qteDriver; | 410 | return d->m_qteDriver; |
411 | } | 411 | } |
412 | 412 | ||
413 | /** | 413 | /** |
414 | * This plays an alarm sound | 414 | * This plays an alarm sound |
415 | */ | 415 | */ |
416 | void ODevice::playAlarmSound() | 416 | void ODevice::playAlarmSound() |
417 | { | 417 | { |
418 | #ifndef QT_NO_SOUND | 418 | #ifndef QT_NO_SOUND |
419 | static Sound snd ( "alarm" ); | 419 | static Sound snd ( "alarm" ); |
420 | 420 | ||
421 | if ( snd. isFinished()) | 421 | if ( snd. isFinished()) |
422 | snd. play(); | 422 | snd. play(); |
423 | #endif | 423 | #endif |
424 | } | 424 | } |
425 | 425 | ||
426 | /** | 426 | /** |
427 | * This plays a key sound | 427 | * This plays a key sound |
428 | */ | 428 | */ |
429 | void ODevice::playKeySound() | 429 | void ODevice::playKeySound() |
430 | { | 430 | { |
431 | #ifndef QT_NO_SOUND | 431 | #ifndef QT_NO_SOUND |
432 | static Sound snd ( "keysound" ); | 432 | static Sound snd ( "keysound" ); |
433 | 433 | ||
434 | if ( snd. isFinished()) | 434 | if ( snd. isFinished()) |
435 | snd. play(); | 435 | snd. play(); |
436 | #endif | 436 | #endif |
437 | } | 437 | } |
438 | 438 | ||
439 | /** | 439 | /** |
440 | * This plays a touch sound | 440 | * This plays a touch sound |
441 | */ | 441 | */ |
442 | void ODevice::playTouchSound() | 442 | void ODevice::playTouchSound() |
443 | { | 443 | { |
444 | #ifndef QT_NO_SOUND | 444 | #ifndef QT_NO_SOUND |
445 | static Sound snd ( "touchsound" ); | 445 | static Sound snd ( "touchsound" ); |
446 | 446 | ||
447 | if ( snd. isFinished()) | 447 | if ( snd. isFinished()) |
448 | snd. play(); | 448 | snd. play(); |
449 | #endif | 449 | #endif |
450 | } | 450 | } |
451 | 451 | ||
452 | /** | 452 | /** |
453 | * This method will return a list of leds | 453 | * This method will return a list of leds |
454 | * available on this device | 454 | * available on this device |
455 | * @return a list of LEDs. | 455 | * @return a list of LEDs. |
456 | */ | 456 | */ |
457 | QValueList <OLed> ODevice::ledList() const | 457 | QValueList <OLed> ODevice::ledList() const |
458 | { | 458 | { |
459 | return QValueList <OLed>(); | 459 | return QValueList <OLed>(); |
460 | } | 460 | } |
461 | 461 | ||
462 | /** | 462 | /** |
463 | * This does return the state of the LEDs | 463 | * This does return the state of the LEDs |
464 | */ | 464 | */ |
465 | QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const | 465 | QValueList <OLedState> ODevice::ledStateList ( OLed /*which*/ ) const |
466 | { | 466 | { |
467 | return QValueList <OLedState>(); | 467 | return QValueList <OLedState>(); |
468 | } | 468 | } |
469 | 469 | ||
470 | /** | 470 | /** |
471 | * @return the state for a given OLed | 471 | * @return the state for a given OLed |
472 | */ | 472 | */ |
473 | OLedState ODevice::ledState ( OLed /*which*/ ) const | 473 | OLedState ODevice::ledState ( OLed /*which*/ ) const |
474 | { | 474 | { |
475 | return Led_Off; | 475 | return Led_Off; |
476 | } | 476 | } |
477 | 477 | ||
478 | /** | 478 | /** |
479 | * Set the state for a LED | 479 | * Set the state for a LED |
480 | * @param which Which OLed to use | 480 | * @param which Which OLed to use |
481 | * @param st The state to set | 481 | * @param st The state to set |
482 | * @return success or failure | 482 | * @return success or failure |
483 | */ | 483 | */ |
484 | bool ODevice::setLedState ( OLed which, OLedState st ) | 484 | bool ODevice::setLedState ( OLed which, OLedState st ) |
485 | { | 485 | { |
486 | Q_UNUSED( which ) | 486 | Q_UNUSED( which ) |
487 | Q_UNUSED( st ) | 487 | Q_UNUSED( st ) |
488 | return false; | 488 | return false; |
489 | } | 489 | } |
490 | 490 | ||
491 | /** | 491 | /** |
492 | * @return if the device has a light sensor | 492 | * @return if the device has a light sensor |
493 | */ | 493 | */ |
494 | bool ODevice::hasLightSensor() const | 494 | bool ODevice::hasLightSensor() const |
495 | { | 495 | { |
496 | return false; | 496 | return false; |
497 | } | 497 | } |
498 | 498 | ||
499 | /** | 499 | /** |
500 | * @return a value from the light sensor | 500 | * @return a value from the light sensor |
501 | */ | 501 | */ |
502 | int ODevice::readLightSensor() | 502 | int ODevice::readLightSensor() |
503 | { | 503 | { |
504 | return -1; | 504 | return -1; |
505 | } | 505 | } |
506 | 506 | ||
507 | /** | 507 | /** |
508 | * @return the light sensor resolution | 508 | * @return the light sensor resolution |
509 | */ | 509 | */ |
510 | int ODevice::lightSensorResolution() const | 510 | int ODevice::lightSensorResolution() const |
511 | { | 511 | { |
512 | return 0; | 512 | return 0; |
513 | } | 513 | } |
514 | 514 | ||
515 | /** | 515 | /** |
516 | * @return if the device has a hinge sensor | 516 | * @return if the device has a hinge sensor |
517 | */ | 517 | */ |
518 | bool ODevice::hasHingeSensor() const | 518 | bool ODevice::hasHingeSensor() const |
519 | { | 519 | { |
520 | return false; | 520 | return false; |
521 | } | 521 | } |
522 | 522 | ||
523 | /** | 523 | /** |
524 | * @return a value from the hinge sensor | 524 | * @return a value from the hinge sensor |
525 | */ | 525 | */ |
526 | OHingeStatus ODevice::readHingeSensor()const | 526 | OHingeStatus ODevice::readHingeSensor()const |
527 | { | 527 | { |
528 | return CASE_UNKNOWN; | 528 | return CASE_UNKNOWN; |
529 | } | 529 | } |
530 | 530 | ||
531 | /** | 531 | /** |
532 | * @return a list with CPU frequencies supported by the hardware | 532 | * @return a list with CPU frequencies supported by the hardware |
533 | */ | 533 | */ |
534 | const QStrList &ODevice::allowedCpuFrequencies() const | 534 | const QStrList &ODevice::allowedCpuFrequencies() const |
535 | { | 535 | { |
536 | return *d->m_cpu_frequencies; | 536 | return *d->m_cpu_frequencies; |
537 | } | 537 | } |
538 | 538 | ||
539 | 539 | ||
540 | /** | 540 | /** |
541 | * Set desired CPU frequency | 541 | * Set desired CPU frequency |
542 | * | 542 | * |
543 | * @param index index into d->m_cpu_frequencies of the frequency to be set | 543 | * @param index index into d->m_cpu_frequencies of the frequency to be set |
544 | */ | 544 | */ |
545 | bool ODevice::setCurrentCpuFrequency(uint index) | 545 | bool ODevice::setCurrentCpuFrequency(uint index) |
546 | { | 546 | { |
547 | if (index >= d->m_cpu_frequencies->count()) | 547 | if (index >= d->m_cpu_frequencies->count()) |
548 | return false; | 548 | return false; |
549 | 549 | ||
550 | char *freq = d->m_cpu_frequencies->at(index); | 550 | char *freq = d->m_cpu_frequencies->at(index); |
551 | qWarning("set freq to %s", freq); | 551 | qWarning("set freq to %s", freq); |
552 | 552 | ||
553 | int fd; | 553 | int fd; |
554 | 554 | ||
555 | if ((fd = ::open("/proc/sys/cpu/0/speed", O_WRONLY)) >= 0) { | 555 | if ((fd = ::open("/proc/sys/cpu/0/speed", O_WRONLY)) >= 0) { |
556 | char writeCommand[50]; | 556 | char writeCommand[50]; |
557 | const int count = sprintf(writeCommand, "%s\n", freq); | 557 | const int count = sprintf(writeCommand, "%s\n", freq); |
558 | int res = (::write(fd, writeCommand, count) != -1); | 558 | int res = (::write(fd, writeCommand, count) != -1); |
559 | ::close(fd); | 559 | ::close(fd); |
560 | return res; | 560 | return res; |
561 | } | 561 | } |
562 | 562 | ||
563 | return false; | 563 | return false; |
564 | } | 564 | } |
565 | 565 | ||
566 | 566 | ||
567 | /** | 567 | /** |
568 | * @return a list of hardware buttons | 568 | * @return a list of hardware buttons |
569 | */ | 569 | */ |
570 | const QValueList <ODeviceButton> &ODevice::buttons() | 570 | const QValueList <ODeviceButton> &ODevice::buttons() |
571 | { | 571 | { |
572 | initButtons(); | 572 | initButtons(); |
573 | 573 | ||
574 | return *d->m_buttons; | 574 | return *d->m_buttons; |
575 | } | 575 | } |
576 | 576 | ||
577 | /** | 577 | /** |
578 | * @return The amount of time that would count as a hold | 578 | * @return The amount of time that would count as a hold |
579 | */ | 579 | */ |
580 | uint ODevice::buttonHoldTime() const | 580 | uint ODevice::buttonHoldTime() const |
581 | { | 581 | { |
582 | return d->m_holdtime; | 582 | return d->m_holdtime; |
583 | } | 583 | } |
584 | 584 | ||
585 | /** | 585 | /** |
586 | * This method return a ODeviceButton for a key code | 586 | * This method return a ODeviceButton for a key code |
587 | * or 0 if no special hardware button is available for the device | 587 | * or 0 if no special hardware button is available for the device |
588 | * | 588 | * |
589 | * @return The devicebutton or 0l | 589 | * @return The devicebutton or 0l |
590 | * @see ODeviceButton | 590 | * @see ODeviceButton |
591 | */ | 591 | */ |
592 | const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) | 592 | const ODeviceButton *ODevice::buttonForKeycode ( ushort code ) |
593 | { | 593 | { |
594 | initButtons(); | 594 | initButtons(); |
595 | 595 | ||
596 | for ( QValueListConstIterator<ODeviceButton> it = d->m_buttons->begin(); it != d->m_buttons->end(); ++it ) { | 596 | for ( QValueListConstIterator<ODeviceButton> it = d->m_buttons->begin(); it != d->m_buttons->end(); ++it ) { |
597 | if ( (*it).keycode() == code ) | 597 | if ( (*it).keycode() == code ) |
598 | return &(*it); | 598 | return &(*it); |
599 | } | 599 | } |
600 | return 0; | 600 | return 0; |
601 | } | 601 | } |
602 | 602 | ||
603 | void ODevice::reloadButtonMapping() | 603 | void ODevice::reloadButtonMapping() |
604 | { | 604 | { |
605 | if(!d->m_buttons) | 605 | if(!d->m_buttons) |
606 | initButtons(); | 606 | initButtons(); |
607 | 607 | ||
608 | if(!d->m_initializedButtonQcop) { | 608 | if(!d->m_initializedButtonQcop) { |
609 | QCopChannel *chan = new QCopChannel("QPE/System", this, "ODevice button channel"); | 609 | QCopChannel *chan = new QCopChannel("QPE/System", this, "ODevice button channel"); |
610 | connect(chan,SIGNAL(received(const QCString&,const QByteArray&)), | 610 | connect(chan,SIGNAL(received(const QCString&,const QByteArray&)), |
611 | this,SLOT(systemMessage(const QCString&,const QByteArray&))); | 611 | this,SLOT(systemMessage(const QCString&,const QByteArray&))); |
612 | d->m_initializedButtonQcop = true; | 612 | d->m_initializedButtonQcop = true; |
613 | } | 613 | } |
614 | 614 | ||
615 | Config cfg ( "ButtonSettings" ); | 615 | Config cfg ( "ButtonSettings" ); |
616 | 616 | ||
617 | for ( uint i = 0; i < d->m_buttons->count(); i++ ) { | 617 | for ( uint i = 0; i < d->m_buttons->count(); i++ ) { |
618 | ODeviceButton &b = ( *d->m_buttons ) [i]; | 618 | ODeviceButton &b = ( *d->m_buttons ) [i]; |
619 | QString group = "Button" + QString::number ( i ); | 619 | QString group = "Button" + QString::number ( i ); |
620 | 620 | ||
621 | QCString pch, hch; | 621 | QCString pch, hch; |
622 | QCString pm, hm; | 622 | QCString pm, hm; |
623 | QByteArray pdata, hdata; | 623 | QByteArray pdata, hdata; |
624 | 624 | ||
625 | if ( cfg. hasGroup ( group )) { | 625 | if ( cfg. hasGroup ( group )) { |
626 | cfg. setGroup ( group ); | 626 | cfg. setGroup ( group ); |
627 | pch = cfg. readEntry ( "PressedActionChannel" ). latin1(); | 627 | pch = cfg. readEntry ( "PressedActionChannel" ). latin1(); |
628 | pm = cfg. readEntry ( "PressedActionMessage" ). latin1(); | 628 | pm = cfg. readEntry ( "PressedActionMessage" ). latin1(); |
629 | // pdata = decodeBase64 ( buttonFile. readEntry ( "PressedActionArgs" )); | 629 | // pdata = decodeBase64 ( buttonFile. readEntry ( "PressedActionArgs" )); |
630 | 630 | ||
631 | hch = cfg. readEntry ( "HeldActionChannel" ). latin1(); | 631 | hch = cfg. readEntry ( "HeldActionChannel" ). latin1(); |
632 | hm = cfg. readEntry ( "HeldActionMessage" ). latin1(); | 632 | hm = cfg. readEntry ( "HeldActionMessage" ). latin1(); |
633 | // hdata = decodeBase64 ( buttonFile. readEntry ( "HeldActionArgs" )); | 633 | // hdata = decodeBase64 ( buttonFile. readEntry ( "HeldActionArgs" )); |
634 | } | 634 | } |
635 | 635 | ||
636 | b. setPressedAction ( OQCopMessage ( pch, pm, pdata )); | 636 | b. setPressedAction ( OQCopMessage ( pch, pm, pdata )); |
637 | b. setHeldAction ( OQCopMessage ( hch, hm, hdata )); | 637 | b. setHeldAction ( OQCopMessage ( hch, hm, hdata )); |
638 | } | 638 | } |
639 | } | 639 | } |
640 | 640 | ||
641 | void ODevice::remapPressedAction ( int button, const OQCopMessage &action ) | 641 | void ODevice::remapPressedAction ( int button, const OQCopMessage &action ) |
642 | { | 642 | { |
643 | initButtons(); | 643 | initButtons(); |
644 | 644 | ||
645 | QString mb_chan; | 645 | QString mb_chan; |
646 | 646 | ||
647 | if ( button >= (int) d->m_buttons->count()) | 647 | if ( button >= (int) d->m_buttons->count()) |
648 | return; | 648 | return; |
649 | 649 | ||
650 | ODeviceButton &b = ( *d->m_buttons ) [button]; | 650 | ODeviceButton &b = ( *d->m_buttons ) [button]; |
651 | b. setPressedAction ( action ); | 651 | b. setPressedAction ( action ); |
652 | 652 | ||
653 | mb_chan=b. pressedAction(). channel(); | 653 | mb_chan=b. pressedAction(). channel(); |
654 | 654 | ||
655 | Config buttonFile ( "ButtonSettings" ); | 655 | Config buttonFile ( "ButtonSettings" ); |
656 | buttonFile. setGroup ( "Button" + QString::number ( button )); | 656 | buttonFile. setGroup ( "Button" + QString::number ( button )); |
657 | buttonFile. writeEntry ( "PressedActionChannel", (const char*) mb_chan); | 657 | buttonFile. writeEntry ( "PressedActionChannel", (const char*) mb_chan); |
658 | buttonFile. writeEntry ( "PressedActionMessage", (const char*) b. pressedAction(). message()); | 658 | buttonFile. writeEntry ( "PressedActionMessage", (const char*) b. pressedAction(). message()); |
659 | 659 | ||
660 | // buttonFile. writeEntry ( "PressedActionArgs", encodeBase64 ( b. pressedAction(). data())); | 660 | // buttonFile. writeEntry ( "PressedActionArgs", encodeBase64 ( b. pressedAction(). data())); |
661 | 661 | ||
662 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); | 662 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); |
663 | } | 663 | } |
664 | 664 | ||
665 | void ODevice::remapHeldAction ( int button, const OQCopMessage &action ) | 665 | void ODevice::remapHeldAction ( int button, const OQCopMessage &action ) |
666 | { | 666 | { |
667 | initButtons(); | 667 | initButtons(); |
668 | 668 | ||
669 | if ( button >= (int) d->m_buttons->count()) | 669 | if ( button >= (int) d->m_buttons->count()) |
670 | return; | 670 | return; |
671 | 671 | ||
672 | ODeviceButton &b = ( *d->m_buttons ) [button]; | 672 | ODeviceButton &b = ( *d->m_buttons ) [button]; |
673 | b. setHeldAction ( action ); | 673 | b. setHeldAction ( action ); |
674 | 674 | ||
675 | Config buttonFile ( "ButtonSettings" ); | 675 | Config buttonFile ( "ButtonSettings" ); |
676 | buttonFile. setGroup ( "Button" + QString::number ( button )); | 676 | buttonFile. setGroup ( "Button" + QString::number ( button )); |
677 | buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction(). channel()); | 677 | buttonFile. writeEntry ( "HeldActionChannel", (const char *) b. heldAction(). channel()); |
678 | buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction(). message()); | 678 | buttonFile. writeEntry ( "HeldActionMessage", (const char *) b. heldAction(). message()); |
679 | 679 | ||
680 | // buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction(). data())); | 680 | // buttonFile. writeEntry ( "HeldActionArgs", decodeBase64 ( b. heldAction(). data())); |
681 | 681 | ||
682 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); | 682 | QCopEnvelope ( "QPE/System", "deviceButtonMappingChanged()" ); |
683 | } | 683 | } |
684 | 684 | ||
685 | /** | 685 | /** |
686 | * @internal | 686 | * @internal |
687 | */ | 687 | */ |
688 | void ODevice::virtual_hook(int, void* ){ | 688 | void ODevice::virtual_hook(int, void* ){ |
689 | 689 | ||
690 | } | 690 | } |
691 | 691 | ||
692 | /** | 692 | /** |
693 | * \brief Send a QCOP Message before suspending | 693 | * \brief Send a QCOP Message before suspending |
694 | * | 694 | * |
695 | * Sends a QCOP message to channel QPE/System | 695 | * Sends a QCOP message to channel QPE/System |
696 | * with the message "aboutToSuspend()" if this | 696 | * with the message "aboutToSuspend()" if this |
697 | * is the windowing server. | 697 | * is the windowing server. |
698 | * | 698 | * |
699 | * Call this in your custom \sa suspend() Method | 699 | * Call this in your custom \sa suspend() Method |
700 | * before going to suspend. | 700 | * before going to suspend. |
701 | * | 701 | * |
702 | */ | 702 | */ |
703 | void ODevice::sendSuspendmsg() | 703 | void ODevice::sendSuspendmsg() |
704 | { | 704 | { |
705 | if ( !isQWS() ) | 705 | if ( !isQWS() ) |
706 | return; | 706 | return; |
707 | 707 | ||
708 | QCopEnvelope ( "QPE/System", "aboutToSuspend()" ); | 708 | QCopEnvelope ( "QPE/System", "aboutToSuspend()" ); |
709 | } | 709 | } |
710 | 710 | ||
711 | /** | 711 | /** |
712 | * \brief Prepend the QWSServer::KeyboardFilter to the list of installed KeyFilters | 712 | * \brief Prepend the QWSServer::KeyboardFilter to the list of installed KeyFilters |
713 | * | 713 | * |
714 | * Prepend a QWSServer::KeyboardFilter to the List of Keyboard | 714 | * Prepend a QWSServer::KeyboardFilter to the List of Keyboard |
715 | * Filters. This function is the only way to prepend a KeyFilter. | 715 | * Filters. This function is the only way to prepend a KeyFilter. |
716 | * | 716 | * |
717 | * @param aFilter The KeyFilter to be prepended to the list of filters | 717 | * @param aFilter The KeyFilter to be prepended to the list of filters |
718 | * | 718 | * |
719 | * @see Opie::Core::OKeyFilter | 719 | * @see Opie::Core::OKeyFilter |
720 | * @see Opie::Core::OKeyFilter::inst() | 720 | * @see Opie::Core::OKeyFilter::inst() |
721 | */ | 721 | */ |
722 | void ODevice::addPreHandler(QWSServer::KeyboardFilter*aFilter) | 722 | void ODevice::addPreHandler(QWSServer::KeyboardFilter*aFilter) |
723 | { | 723 | { |
724 | Opie::Core::OKeyFilter::inst()->addPreHandler(aFilter); | 724 | Opie::Core::OKeyFilter::inst()->addPreHandler(aFilter); |
725 | } | 725 | } |
726 | 726 | ||
727 | /** | 727 | /** |
728 | * \brief Remove the QWSServer::KeyboardFilter in the param from the list | 728 | * \brief Remove the QWSServer::KeyboardFilter in the param from the list |
729 | * | 729 | * |
730 | * Remove the QWSServer::KeyboardFilter \par aFilter from the List | 730 | * Remove the QWSServer::KeyboardFilter \par aFilter from the List |
731 | * of Keyfilters. Call this when you delete the KeyFilter! | 731 | * of Keyfilters. Call this when you delete the KeyFilter! |
732 | * | 732 | * |
733 | * @param aFilter The filter to be removed from the Opie::Core::OKeyFilter | 733 | * @param aFilter The filter to be removed from the Opie::Core::OKeyFilter |
734 | * @see Opie::Core::ODevice::addPreHandler | 734 | * @see Opie::Core::ODevice::addPreHandler |
735 | */ | 735 | */ |
736 | void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) | 736 | void ODevice::remPreHandler(QWSServer::KeyboardFilter*aFilter) |
737 | { | 737 | { |
738 | Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); | 738 | Opie::Core::OKeyFilter::inst()->remPreHandler(aFilter); |
739 | } | 739 | } |
740 | 740 | ||
741 | 741 | ||
742 | /** | 742 | /** |
743 | * @internal | 743 | * @internal |
744 | * | 744 | * |
745 | * @see changeMixerForAlarm | 745 | * @see changeMixerForAlarm |
746 | */ | 746 | */ |
747 | void ODevice::playingStopped() { | 747 | void ODevice::playingStopped() { |
748 | if ( sender() ) | 748 | if ( sender() ) |
749 | const_cast<QObject*>(sender())->disconnect( this ); | 749 | const_cast<QObject*>(sender())->disconnect( this ); |
750 | 750 | ||
751 | #ifndef QT_NO_SOUND | 751 | #ifndef QT_NO_SOUND |
752 | if ( d->m_sound >= 0 ) { | 752 | if ( d->m_sound >= 0 ) { |
753 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); | 753 | ::ioctl ( d->m_sound, MIXER_WRITE( d->m_mixer ), &d->m_vol ); |
754 | ::close ( d->m_sound ); | 754 | ::close ( d->m_sound ); |
755 | } | 755 | } |
756 | #endif | 756 | #endif |
757 | } | 757 | } |
758 | 758 | ||
759 | 759 | ||
760 | /** | 760 | /** |
761 | * \brief Change the Volume for the Alarm and set it back after playing is finished | 761 | * \brief Change the Volume for the Alarm and set it back after playing is finished |
762 | * | 762 | * |
763 | * If you play an Alarm Sound you might want to change the Mixer to | 763 | * If you play an Alarm Sound you might want to change the Mixer to |
764 | * full volume and ignore the user setting. After it \sa Sound::isFinished | 764 | * full volume and ignore the user setting. After it \sa Sound::isFinished |
765 | * you would turn the volume back to the user preference. | 765 | * you would turn the volume back to the user preference. |
766 | * The problem is that we used to enter the event loop while waiting | 766 | * The problem is that we used to enter the event loop while waiting |
767 | * for the sound to be finished triggering all kind of reentrance | 767 | * for the sound to be finished triggering all kind of reentrance |
768 | * problems what a library shouldn't introduce. | 768 | * problems what a library shouldn't introduce. |
769 | * Instead of manually waiting for the sound to be finished use | 769 | * Instead of manually waiting for the sound to be finished use |
770 | * this Method and it will automatically restore the Mixer to | 770 | * this Method and it will automatically restore the Mixer to |
771 | * the user configuration after the sound finished playing. | 771 | * the user configuration after the sound finished playing. |
772 | * | 772 | * |
773 | * Note: The onwership of \param snd is not transfered and playing | 773 | * Note: The onwership of \param snd is not transfered and playing |
774 | * is not started in this method. If 'snd' gets deleted before | 774 | * is not started in this method. If 'snd' gets deleted before |
775 | * playing is finished the volume doesn't get set back to | 775 | * playing is finished the volume doesn't get set back to |
776 | * the user preference! | 776 | * the user preference! |
777 | * | 777 | * |
778 | * \code | 778 | * \code |
779 | * static Sound snd("alarm"); | 779 | * static Sound snd("alarm"); |
780 | * if(!snd.isFinished()) | 780 | * if(!snd.isFinished()) |
781 | * return; | 781 | * return; |
782 | * | 782 | * |
783 | * changeMixerForAlarm( my_channel, "/dev/mixer", &snd ); | 783 | * changeMixerForAlarm( my_channel, "/dev/mixer", &snd ); |
784 | * snd.play() | 784 | * snd.play() |
785 | * \endcode | 785 | * \endcode |
786 | * | 786 | * |
787 | * | 787 | * |
788 | * | 788 | * |
789 | * @param mixer The mixer number/channel to use | 789 | * @param mixer The mixer number/channel to use |
790 | * @param file The file name. If you convert from QString use QFile::encodeName | 790 | * @param file The file name. If you convert from QString use QFile::encodeName |
791 | * @param snd The sound to wait for finishing | 791 | * @param snd The sound to wait for finishing |
792 | * | 792 | * |
793 | */ | 793 | */ |
794 | void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { | 794 | void ODevice::changeMixerForAlarm( int mixer, const char* file, Sound *snd ) { |
795 | #ifndef QT_NO_SOUND | 795 | #ifndef QT_NO_SOUND |
796 | if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { | 796 | if (( d->m_sound = ::open ( file, O_RDWR )) >= 0 ) { |
797 | if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { | 797 | if ( ::ioctl ( d->m_sound, MIXER_READ( mixer ), &d->m_vol ) >= 0 ) { |
798 | Config cfg ( "qpe" ); | 798 | Config cfg ( "qpe" ); |
799 | cfg. setGroup ( "Volume" ); | 799 | cfg. setGroup ( "Volume" ); |
800 | 800 | ||
801 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); | 801 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); |
802 | if ( volalarm < 0 ) | 802 | if ( volalarm < 0 ) |
803 | volalarm = 0; | 803 | volalarm = 0; |
804 | else if ( volalarm > 100 ) | 804 | else if ( volalarm > 100 ) |
805 | volalarm = 100; | 805 | volalarm = 100; |
806 | volalarm |= ( volalarm << 8 ); | 806 | volalarm |= ( volalarm << 8 ); |
807 | 807 | ||
808 | if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) | 808 | if ( ::ioctl ( d->m_sound, MIXER_WRITE( mixer ), &volalarm ) >= 0 ) |
809 | register_qpe_sound_finished(snd, this, SLOT(playingStopped())); | 809 | register_qpe_sound_finished(snd, this, SLOT(playingStopped())); |
810 | } | 810 | } |
811 | d->m_mixer = mixer; | 811 | d->m_mixer = mixer; |
812 | } | 812 | } |
813 | #endif | 813 | #endif |
814 | } | 814 | } |
815 | 815 | ||
816 | } | 816 | } |
817 | } | 817 | } |