summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-01-02 15:20:41 (UTC)
committer mickeyl <mickeyl>2005-01-02 15:20:41 (UTC)
commit71232a4e45f78041c2ab138edf45903bbf2b34ce (patch) (unidiff)
tree6c51dc86163e656c7ac6a3cd6ea7e7e0f1ab89c0
parent226a83c4b4334648de408249dba61bd1f7e6dba3 (diff)
downloadopie-71232a4e45f78041c2ab138edf45903bbf2b34ce.zip
opie-71232a4e45f78041c2ab138edf45903bbf2b34ce.tar.gz
opie-71232a4e45f78041c2ab138edf45903bbf2b34ce.tar.bz2
Add the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog7
-rw-r--r--library/qpeapplication.h13
2 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 913dc15..ff579d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,183 +1,184 @@
1 2005-??-??Opie 1.2.0 1 2005-??-??Opie 1.2.0
2 2
3 New Features 3 New Features
4 ------------ 4 ------------
5 5
6 Fixed Bugs 6 Fixed Bugs
7 ---------- 7 ----------
8 * #1501 - Fixing bug in todo sql backend (eilers) 8 * #1501 - Fixing bug in todo sql backend (eilers)
9 9
10 Internal 10 Internal
11 -------- 11 --------
12 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl)
12 13
13 2004-11-26Opie 1.1.8 14 2004-11-26Opie 1.1.8
14 15
15 New Features 16 New Features
16 ------------ 17 ------------
17 * PackageManager supports installation of local ipkg files (drw) 18 * PackageManager supports installation of local ipkg files (drw)
18 * PackageManager supports linking of applications to root (drw) 19 * PackageManager supports linking of applications to root (drw)
19 * PackageManager supports src/gz feeds (drw,wimpie) 20 * PackageManager supports src/gz feeds (drw,wimpie)
20 * Add a syslog information tab to sysinfo (mickeyl) 21 * Added a syslog information tab to sysinfo (mickeyl)
21 * Add new, more consistent, PIM icons + a GIMP teplate (ar) 22 * Added new, more consistent, PIM icons + a GIMP teplate (ar)
22 23
23 Fixed Bugs 24 Fixed Bugs
24 ---------- 25 ----------
25 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) 26 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw)
26 * #1269 - VCards were imported into personal area if it was activated (eilers) 27 * #1269 - VCards were imported into personal area if it was activated (eilers)
27 * #1464 - Packagemanager dont set active filter after install a package (drw) 28 * #1464 - Packagemanager dont set active filter after install a package (drw)
28 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) 29 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers)
29 * #1493 - Fixed one column layout bug of the launcher (hrw) 30 * #1493 - Fixed one column layout bug of the launcher (hrw)
30 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) 31 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw)
31 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) 32 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw)
32 * n.a. - Battery Applet - fix sizing of battery info popup 33 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl)
33 34
34 Internal 35 Internal
35 -------- 36 --------
36 * Moved libopie1 to unsupported (mickeyl) 37 * Moved libopie1 to unsupported (mickeyl)
37 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) 38 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers)
38 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) 39 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers)
39 40
40 2004-11-14Opie 1.1.7 41 2004-11-14Opie 1.1.7
41 42
42 New Features 43 New Features
43 ------------ 44 ------------
44 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) 45 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers)
45 * Backup now uses the busy indicator when backing up and restore (ar) 46 * Backup now uses the busy indicator when backing up and restore (ar)
46 * OpiePlayer2 gained adding of Directories to the playlist (zecke) 47 * OpiePlayer2 gained adding of Directories to the playlist (zecke)
47 * OpiePlayer2 better error handling (zecke) 48 * OpiePlayer2 better error handling (zecke)
48 * OpiePlayer2 progress indication while streaming (zecke) 49 * OpiePlayer2 progress indication while streaming (zecke)
49 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) 50 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke)
50 * Ported brightnessapplet from Qtopia 1.7 (mickeyl) 51 * Ported brightnessapplet from Qtopia 1.7 (mickeyl)
51 * Opie-Eye got a Digital Camera File Backend (alwin,zecke) 52 * Opie-Eye got a Digital Camera File Backend (alwin,zecke)
52 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) 53 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke)
53 * Opie-Console use Custom Font and Size in a Profile (harlekin) 54 * Opie-Console use Custom Font and Size in a Profile (harlekin)
54 * Opie-Console transparently log the Output and Input to a file (harlekin) 55 * Opie-Console transparently log the Output and Input to a file (harlekin)
55 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) 56 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem)
56 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) 57 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem)
57 * Opie-Security gained a 'test authentication' button (clem) 58 * Opie-Security gained a 'test authentication' button (clem)
58 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults 59 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults
59 * Opie-Mail improve the handling of POP mail boxes (alwin) 60 * Opie-Mail improve the handling of POP mail boxes (alwin)
60 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) 61 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin)
61 * Opie IRC - backports of the 'NeIRC fork' (zecke) 62 * Opie IRC - backports of the 'NeIRC fork' (zecke)
62 63
63 Fixed Bugs 64 Fixed Bugs
64 ---------- 65 ----------
65 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) 66 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke)
66 * #608 - Make Opie usable for left handed users (zecke) 67 * #608 - Make Opie usable for left handed users (zecke)
67 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) 68 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke)
68 * #1245 - Opie-Go 'paused' (zecke) 69 * #1245 - Opie-Go 'paused' (zecke)
69 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) 70 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke)
70 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) 71 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke)
71 * #1395 - Build VNC Backend with gcc3.4 72 * #1395 - Build VNC Backend with gcc3.4
72 * #1440 - The icon of opie-mobilemsg is missing (CoreDump) 73 * #1440 - The icon of opie-mobilemsg is missing (CoreDump)
73 * #1426 - Add missing opie-bartender Icon (CoreDump) 74 * #1426 - Add missing opie-bartender Icon (CoreDump)
74 * #1445 - Opie-Sheet Has No Icon (CoreDump) 75 * #1445 - Opie-Sheet Has No Icon (CoreDump)
75 * #1448 - Brightness Applet added (mickeyl) 76 * #1448 - Brightness Applet added (mickeyl)
76 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) 77 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke)
77 * #1482 - Fix OFileSelector to be able to sort by size (zecke) 78 * #1482 - Fix OFileSelector to be able to sort by size (zecke)
78 * n.a. - Opie-mail: fixed some crasher, some layout-problems 79 * n.a. - Opie-mail: fixed some crasher, some layout-problems
79 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) 80 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke)
80 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) 81 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke)
81 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) 82 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem)
82 * 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) 83 * 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)
83 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) 84 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl)
84 85
85 Internal 86 Internal
86 -------- 87 --------
87 * Opie-Qashmoney has been moved to unsupported (mickeyl) 88 * Opie-Qashmoney has been moved to unsupported (mickeyl)
88 * Opie-Ubrowser has been moved to unsupported (mickeyl) 89 * Opie-Ubrowser has been moved to unsupported (mickeyl)
89 90
90 2004-09-17Opie 1.1.6 91 2004-09-17Opie 1.1.6
91 92
92 New Features 93 New Features
93 ------------ 94 ------------
94 * Fifteen gained configurable number of items (zecke) 95 * Fifteen gained configurable number of items (zecke)
95 * Fifteen can have custom background images (zecke) 96 * Fifteen can have custom background images (zecke)
96 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) 97 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl)
97 * Integrated the new security framework into libopie2 (zecke,clem) 98 * Integrated the new security framework into libopie2 (zecke,clem)
98 * Converted the launcher to use the new security framework (zecke) 99 * Converted the launcher to use the new security framework (zecke)
99 * Backup can now handle custom locations for backup and restore (ar) 100 * Backup can now handle custom locations for backup and restore (ar)
100 * Implemented right-on-hold feedback (wimpie,zecke) 101 * Implemented right-on-hold feedback (wimpie,zecke)
101 * Lots of new features in opie-reader (tim,pohly) 102 * Lots of new features in opie-reader (tim,pohly)
102 * Build system cleanups (schurig) 103 * Build system cleanups (schurig)
103 104
104 Fixed Bugs 105 Fixed Bugs
105 -------- 106 --------
106 * #1005 - Fixed backup to CompactFlash (ar) 107 * #1005 - Fixed backup to CompactFlash (ar)
107 * #1167 - Fixed Opie write crashing on more text than one page (ar) 108 * #1167 - Fixed Opie write crashing on more text than one page (ar)
108 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) 109 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl)
109 * #1359 - Fixed bookmarks in Gutenbrowser (ljp) 110 * #1359 - Fixed bookmarks in Gutenbrowser (ljp)
110 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) 111 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers)
111 * #1370 - Pimconverter now reacts on cancel key (eilers) 112 * #1370 - Pimconverter now reacts on cancel key (eilers)
112 * #1376 - Bring back the capslock/numlock display (zecke) 113 * #1376 - Bring back the capslock/numlock display (zecke)
113 * #1383 - Language settings now warns about losing open apps (Markus Litz) 114 * #1383 - Language settings now warns about losing open apps (Markus Litz)
114 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) 115 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl)
115 * #1394 - Fixed oversized headline in opie-login (coredump) 116 * #1394 - Fixed oversized headline in opie-login (coredump)
116 * #1396 - Opie-console captures the escape key and vim is working (zecke) 117 * #1396 - Opie-console captures the escape key and vim is working (zecke)
117 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) 118 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl)
118 119
119 2004-07-06Opie 1.1.4 120 2004-07-06Opie 1.1.4
120 121
121 New Features 122 New Features
122 ------------ 123 ------------
123 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) 124 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle)
124 * Added Conversion tool for pim-data (eilers) 125 * Added Conversion tool for pim-data (eilers)
125 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) 126 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers)
126 * Modified the PIM API for providing generic use of OPimRecords (eilers) 127 * Modified the PIM API for providing generic use of OPimRecords (eilers)
127 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) 128 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke)
128 129
129 Fixed Bugs 130 Fixed Bugs
130 -------- 131 --------
131 * #1068 - Country Drop Down Box Off Screen 132 * #1068 - Country Drop Down Box Off Screen
132 * #1291 - Opie tinykate does not open .desktop files (ar) 133 * #1291 - Opie tinykate does not open .desktop files (ar)
133 * #1291 - Opie sheet not saving correctly (ar) 134 * #1291 - Opie sheet not saving correctly (ar)
134 * #1294 - Opie does not know about British Summer Time 135 * #1294 - Opie does not know about British Summer Time
135 * #1314 - Drawpad initialization (mickeyl) 136 * #1314 - Drawpad initialization (mickeyl)
136 * #1317 - Packagemanager crashes on hold-down or install (chicken) 137 * #1317 - Packagemanager crashes on hold-down or install (chicken)
137 * #1321 - Batteryapplet graphic glitch (harlekin) 138 * #1321 - Batteryapplet graphic glitch (harlekin)
138 * #1324 - ZSafe not starting up (mickeyl) 139 * #1324 - ZSafe not starting up (mickeyl)
139 * #1328 - Personal Home Address fields is trimmed to 1char (eilers) 140 * #1328 - Personal Home Address fields is trimmed to 1char (eilers)
140 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) 141 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken)
141 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) 142 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl)
142 * #1348 - Datebook dependency on libopiedb2 (chicken) 143 * #1348 - Datebook dependency on libopiedb2 (chicken)
143 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) 144 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers)
144 145
145 2004-04-25Opie 1.1.3 146 2004-04-25Opie 1.1.3
146 147
147 * Introduced first implementation of SQL-Support using SQLite (eilers) 148 * Introduced first implementation of SQL-Support using SQLite (eilers)
148 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) 149 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp)
149 * Added a real system graffiti character set (brad) 150 * Added a real system graffiti character set (brad)
150 * Added Generic Keyconfig Widget (zecke) 151 * Added Generic Keyconfig Widget (zecke)
151 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) 152 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke)
152 * Added new Bible reader app - opie-dagger (drw) 153 * Added new Bible reader app - opie-dagger (drw)
153 * Added a new Image Viewer. Work is ongoing (zecke,alwin) 154 * Added a new Image Viewer. Work is ongoing (zecke,alwin)
154 * Added namespace usage in libopie2 and everywhere (zecke,alwin) 155 * Added namespace usage in libopie2 and everywhere (zecke,alwin)
155 * Enabled the possibility to pass command line arguments to applications (mickeyl) 156 * Enabled the possibility to pass command line arguments to applications (mickeyl)
156 * Added an about applet showing some credits and information about Opie (mickeyl) 157 * Added an about applet showing some credits and information about Opie (mickeyl)
157 * Added benchmarking functionality to sysinfo (mickeyl) 158 * Added benchmarking functionality to sysinfo (mickeyl)
158 * Added applet and configuration application for switching hardware keyboard layouts (alwin) 159 * Added applet and configuration application for switching hardware keyboard layouts (alwin)
159 * Ported applications from libopie1 to libopie2* (drw,ar,alwin) 160 * Ported applications from libopie1 to libopie2* (drw,ar,alwin)
160 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) 161 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe)
161 * Clean-up of package information in control files (drw) 162 * Clean-up of package information in control files (drw)
162 * Repaired mediummount which was broken since integrating the quicklauncher (alwin) 163 * Repaired mediummount which was broken since integrating the quicklauncher (alwin)
163 * Improved big-screen support (zecke,ar) 164 * Improved big-screen support (zecke,ar)
164 * Improved multikeyboard support, added keyboard layout switching applet (mouse) 165 * Improved multikeyboard support, added keyboard layout switching applet (mouse)
165 * Added a new mail client based on libetpan (harlekin,alwin,jgf) 166 * Added a new mail client based on libetpan (harlekin,alwin,jgf)
166 * Added new package manager - opie-packagemanager (drw) 167 * Added new package manager - opie-packagemanager (drw)
167 * Improved light-n-power for C7x0 (mickeyl) 168 * Improved light-n-power for C7x0 (mickeyl)
168 * Added automatic rotation support for C7x0 (treke) 169 * Added automatic rotation support for C7x0 (treke)
169 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) 170 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl)
170 * Added scanning the wireless network neighbourhood to networksettings (mickeyl) 171 * Added scanning the wireless network neighbourhood to networksettings (mickeyl)
171 172
172 2003-11-29Opie 1.0.3 173 2003-11-29Opie 1.0.3
173 174
174 * Released as Version 1.0.3 175 * Released as Version 1.0.3
175 * Improved i18n (various contributors) 176 * Improved i18n (various contributors)
176 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) 177 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin)
177 * Made the Documents Tab optional (mickeyl) 178 * Made the Documents Tab optional (mickeyl)
178 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) 179 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken)
179 180
180 2003-08-04Opie 1.0.0 181 2003-08-04Opie 1.0.0
181 182
182 * Released as Version 1.0.0 183 * Released as Version 1.0.0
183 * Including a PPP module for easy dial up (tille,harlekin,zecke) 184 * Including a PPP module for easy dial up (tille,harlekin,zecke)
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index 00d3d31..849d5b3 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -1,231 +1,244 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef __QPE_APPLICATION_H__ 20#ifndef __QPE_APPLICATION_H__
21#define __QPE_APPLICATION_H__ 21#define __QPE_APPLICATION_H__
22 22
23#include <stdlib.h> // for setenv() 23#include <stdlib.h> // for setenv()
24 24
25#include <qglobal.h> 25#include <qglobal.h>
26#include <qapplication.h> 26#include <qapplication.h>
27#include <qdialog.h> 27#include <qdialog.h>
28#include <qwsdisplay_qws.h> 28#include <qwsdisplay_qws.h>
29#if defined(_WS_QWS_) && !defined(Q_WS_QWS) 29#if defined(_WS_QWS_) && !defined(Q_WS_QWS)
30#define Q_WS_QWS 30#define Q_WS_QWS
31#endif 31#endif
32#include "qpedecoration_qws.h" 32#include "qpedecoration_qws.h"
33#include "timestring.h" 33#include "timestring.h"
34#include "qpeglobal.h" 34#include "qpeglobal.h"
35 35
36class QCopChannel; 36class QCopChannel;
37class QPEApplicationData; 37class QPEApplicationData;
38class QWSEvent; 38class QWSEvent;
39class QWSKeyEvent; 39class QWSKeyEvent;
40 40
41/** 41/**
42 \brief The QPEApplication class implements various system services 42 \brief The QPEApplication class implements various system services
43 that are available to all Qtopia applications. 43 that are available to all Qtopia applications.
44 44
45 Simply by using QPEApplication instead of QApplication, a standard Qt 45 Simply by using QPEApplication instead of QApplication, a standard Qt
46 application becomes a Qtopia application. It automatically follows 46 application becomes a Qtopia application. It automatically follows
47 style changes, quits and raises, and in the 47 style changes, quits and raises, and in the
48 case of \link docwidget.html document-oriented\endlink applications, 48 case of \link docwidget.html document-oriented\endlink applications,
49 changes the currently displayed document in response to the environment. 49 changes the currently displayed document in response to the environment.
50 50
51 To create a \link docwidget.html document-oriented\endlink 51 To create a \link docwidget.html document-oriented\endlink
52 application use showMainDocumentWidget(); to create a 52 application use showMainDocumentWidget(); to create a
53 non-document-oriented application use showMainWidget(). The 53 non-document-oriented application use showMainWidget(). The
54 keepRunning() function indicates whether the application will 54 keepRunning() function indicates whether the application will
55 continue running after it's processed the last \link qcop.html 55 continue running after it's processed the last \link qcop.html
56 QCop\endlink message. This can be changed using setKeepRunning(). 56 QCop\endlink message. This can be changed using setKeepRunning().
57 57
58 A variety of signals are emitted when certain events occur, for 58 A variety of signals are emitted when certain events occur, for
59 example, timeChanged(), clockChanged(), weekChanged(), 59 example, timeChanged(), clockChanged(), weekChanged(),
60 dateFormatChanged() and volumeChanged(). If the application receives 60 dateFormatChanged() and volumeChanged(). If the application receives
61 a \link qcop.html QCop\endlink message on the application's 61 a \link qcop.html QCop\endlink message on the application's
62 QPE/Application/\e{appname} channel, the appMessage() signal is 62 QPE/Application/\e{appname} channel, the appMessage() signal is
63 emitted. There are also flush() and reload() signals, which 63 emitted. There are also flush() and reload() signals, which
64 are emitted when synching begins and ends respectively - upon these 64 are emitted when synching begins and ends respectively - upon these
65 signals, the application should save and reload any data 65 signals, the application should save and reload any data
66 files that are involved in synching. Most of these signals will initially 66 files that are involved in synching. Most of these signals will initially
67 be received and unfiltered through the appMessage() signal. 67 be received and unfiltered through the appMessage() signal.
68 68
69 This class also provides a set of useful static functions. The 69 This class also provides a set of useful static functions. The
70 qpeDir() and documentDir() functions return the respective paths. 70 qpeDir() and documentDir() functions return the respective paths.
71 The grabKeyboard() and ungrabKeyboard() functions are used to 71 The grabKeyboard() and ungrabKeyboard() functions are used to
72 control whether the application takes control of the device's 72 control whether the application takes control of the device's
73 physical buttons (e.g. application launch keys). The stylus' mode of 73 physical buttons (e.g. application launch keys). The stylus' mode of
74 operation is set with setStylusOperation() and retrieved with 74 operation is set with setStylusOperation() and retrieved with
75 stylusOperation(). There are also setInputMethodHint() and 75 stylusOperation(). There are also setInputMethodHint() and
76 inputMethodHint() functions. 76 inputMethodHint() functions.
77 77
78 \ingroup qtopiaemb 78 \ingroup qtopiaemb
79*/ 79*/
80class QPEApplication : public QApplication 80class QPEApplication : public QApplication
81{ 81{
82 Q_OBJECT 82 Q_OBJECT
83public: 83public:
84 QPEApplication( int& argc, char **argv, Type=GuiClient ); 84 QPEApplication( int& argc, char **argv, Type=GuiClient );
85 ~QPEApplication(); 85 ~QPEApplication();
86 86
87 static QString qpeDir(); 87 static QString qpeDir();
88 static QString documentDir(); 88 static QString documentDir();
89 void applyStyle(); 89 void applyStyle();
90 void reset(); 90 void reset();
91 static int defaultRotation(); 91 static int defaultRotation();
92 static void setDefaultRotation(int r); 92 static void setDefaultRotation(int r);
93 static void setCurrentRotation(int r); 93 static void setCurrentRotation(int r);
94 static void setCurrentMode(int x, int y, int depth ); 94 static void setCurrentMode(int x, int y, int depth );
95 static void grabKeyboard(); 95 static void grabKeyboard();
96 static void ungrabKeyboard(); 96 static void ungrabKeyboard();
97 97
98 enum StylusMode { 98 enum StylusMode {
99 LeftOnly, 99 LeftOnly,
100 RightOnHold 100 RightOnHold
101 // RightOnHoldLeftDelayed, etc. 101 // RightOnHoldLeftDelayed, etc.
102 }; 102 };
103 static void setStylusOperation( QWidget*, StylusMode ); 103 static void setStylusOperation( QWidget*, StylusMode );
104 static StylusMode stylusOperation( QWidget* ); 104 static StylusMode stylusOperation( QWidget* );
105 105
106 enum InputMethodHint { 106 enum InputMethodHint {
107 Normal, 107 Normal,
108 AlwaysOff, 108 AlwaysOff,
109 AlwaysOn 109 AlwaysOn
110 }; 110 };
111 111
112 enum screenSaverHint { 112 enum screenSaverHint {
113 Disable = 0, 113 Disable = 0,
114 DisableLightOff = 1, 114 DisableLightOff = 1,
115 DisableSuspend = 2, 115 DisableSuspend = 2,
116 Enable = 100 116 Enable = 100
117 }; 117 };
118 118
119 static void setInputMethodHint( QWidget *, InputMethodHint ); 119 static void setInputMethodHint( QWidget *, InputMethodHint );
120 static InputMethodHint inputMethodHint( QWidget * ); 120 static InputMethodHint inputMethodHint( QWidget * );
121 121
122 void showMainWidget( QWidget*, bool nomax=FALSE ); 122 void showMainWidget( QWidget*, bool nomax=FALSE );
123 void showMainDocumentWidget( QWidget*, bool nomax=FALSE ); 123 void showMainDocumentWidget( QWidget*, bool nomax=FALSE );
124 124
125 static void showDialog( QDialog*, bool nomax=FALSE ) QPE_WEAK_SYMBOL; 125 static void showDialog( QDialog*, bool nomax=FALSE ) QPE_WEAK_SYMBOL;
126 static int execDialog ( QDialog*, bool nomax=FALSE ) QPE_WEAK_SYMBOL; 126 static int execDialog ( QDialog*, bool nomax=FALSE ) QPE_WEAK_SYMBOL;
127 static void showWidget( QWidget*, bool nomax=FALSE ) QPE_WEAK_SYMBOL; 127 static void showWidget( QWidget*, bool nomax=FALSE ) QPE_WEAK_SYMBOL;
128 /* Merge setTempScreenSaverMode */ 128 /* Merge setTempScreenSaverMode */
129#ifdef QTOPIA_INTERNAL_INITAPP 129#ifdef QTOPIA_INTERNAL_INITAPP
130 void initApp( int argv, char **argv ); 130 void initApp( int argv, char **argv );
131#endif 131#endif
132 132
133 static void setKeepRunning(); 133 static void setKeepRunning();
134 bool keepRunning() const; 134 bool keepRunning() const;
135 135
136 bool keyboardGrabbed() const; 136 bool keyboardGrabbed() const;
137 137
138 int exec(); 138 int exec();
139 139
140signals: 140signals:
141 void clientMoused(); 141 void clientMoused();
142 void timeChanged(); 142 void timeChanged();
143 void clockChanged( bool pm ); 143 void clockChanged( bool pm );
144 void micChanged( bool muted ); 144 void micChanged( bool muted );
145 void volumeChanged( bool muted ); 145 void volumeChanged( bool muted );
146 void appMessage( const QCString& msg, const QByteArray& data); 146 void appMessage( const QCString& msg, const QByteArray& data);
147 void weekChanged( bool startOnMonday ); 147 void weekChanged( bool startOnMonday );
148 void dateFormatChanged( DateFormat ); 148 void dateFormatChanged( DateFormat );
149 void flush(); 149 void flush();
150 void reload(); 150 void reload();
151 /* linkChanged signal */ 151 /* linkChanged signal */
152 152
153private slots: 153private slots:
154 void systemMessage( const QCString &msg, const QByteArray &data ); 154 void systemMessage( const QCString &msg, const QByteArray &data );
155 void pidMessage( const QCString &msg, const QByteArray &data ); 155 void pidMessage( const QCString &msg, const QByteArray &data );
156 void removeSenderFromStylusDict(); 156 void removeSenderFromStylusDict();
157 void hideOrQuit(); 157 void hideOrQuit();
158 158
159protected: 159protected:
160 bool qwsEventFilter( QWSEvent * ); 160 bool qwsEventFilter( QWSEvent * );
161 void internalSetStyle( const QString &style ); 161 void internalSetStyle( const QString &style );
162 void prepareForTermination(bool willrestart); 162 void prepareForTermination(bool willrestart);
163 virtual void restart(); 163 virtual void restart();
164 virtual void shutdown(); 164 virtual void shutdown();
165 bool eventFilter( QObject *, QEvent * ); 165 bool eventFilter( QObject *, QEvent * );
166 void timerEvent( QTimerEvent * ); 166 void timerEvent( QTimerEvent * );
167 bool raiseAppropriateWindow(); 167 bool raiseAppropriateWindow();
168 virtual void tryQuit(); 168 virtual void tryQuit();
169#ifndef OPIE_NO_ERASE_RECT_HACKFIX 169#ifndef OPIE_NO_ERASE_RECT_HACKFIX
170 #if QT_VERSION > 233 170 #if QT_VERSION > 233
171 virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!) 171 virtual void polish ( QWidget * ); // this is actually implemented in qt_override.cpp (!)
172 #endif 172 #endif
173#endif 173#endif
174private: 174private:
175 void mapToDefaultAction( QWSKeyEvent *ke, int defKey ); 175 void mapToDefaultAction( QWSKeyEvent *ke, int defKey );
176 void processQCopFile(); 176 void processQCopFile();
177 177
178#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 178#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
179 QCopChannel *sysChannel; 179 QCopChannel *sysChannel;
180 QCopChannel *pidChannel; 180 QCopChannel *pidChannel;
181#endif 181#endif
182 QPEApplicationData *d; 182 QPEApplicationData *d;
183 183
184 bool reserved_sh; 184 bool reserved_sh;
185 185
186}; 186};
187 187
188 188
189 189
190enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */ 190enum Transformation { Rot0, Rot90, Rot180, Rot270 }; /* from qgfxtransformed_qws.cpp */
191 191
192inline int TransToDeg ( Transformation t ) 192inline int TransToDeg ( Transformation t )
193{ 193{
194 int d = static_cast<int>( t ); 194 int d = static_cast<int>( t );
195 return d * 90; 195 return d * 90;
196} 196}
197 197
198inline Transformation DegToTrans ( int d ) 198inline Transformation DegToTrans ( int d )
199{ 199{
200 Transformation t = static_cast<Transformation>( d / 90 ); 200 Transformation t = static_cast<Transformation>( d / 90 );
201 return t; 201 return t;
202} 202}
203 203
204/* 204/*
205 * Set current rotation of Opie, and rotation for newly started apps. 205 * Set current rotation of Opie, and rotation for newly started apps.
206 * Differs from setDefaultRotation in that 1) it rotates currently running apps, 206 * Differs from setDefaultRotation in that 1) it rotates currently running apps,
207 * and 2) does not set deforient or save orientation to qpe.conf. 207 * and 2) does not set deforient or save orientation to qpe.conf.
208 */ 208 */
209 209
210inline void QPEApplication::setCurrentRotation( int r ) 210inline void QPEApplication::setCurrentRotation( int r )
211{ 211{
212 // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots 212 // setTransformation has been introduced in Qt/Embedded 2.3.4 snapshots
213 // for compatibility with the SharpROM use fallback to setDefaultTransformation() 213 // for compatibility with the SharpROM use fallback to setDefaultTransformation()
214#if QT_VERSION > 233 214#if QT_VERSION > 233
215 Transformation e = DegToTrans( r ); 215 Transformation e = DegToTrans( r );
216 ::setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 ); 216 ::setenv( "QWS_DISPLAY", QString( "Transformed:Rot%1:0" ).arg( r ).latin1(), 1 );
217 qApp->desktop()->qwsDisplay()->setTransformation( e ); 217 qApp->desktop()->qwsDisplay()->setTransformation( e );
218#else 218#else
219 setDefaultRotation( r ); 219 setDefaultRotation( r );
220#endif 220#endif
221} 221}
222 222
223/*
224 * Qtopia 1.7 SDK compatibility macros
225 * FIXME: Support Opie Quicklaunch Interface
226 */
227 #define QTOPIA_ADD_APPLICATION(NAME,IMPLEMENTATION) \
228 int main( int argc, char** argv ) \
229 { \
230 QPEApplication app = QPEApplication( argc, argv );\
231 IMPLEMENTATION* mw = new IMPLEMENTATION(); \
232 app.showMainWidget( mw ); \
233 app.exec(); \
234 }
235#define QTOPIA_MAIN // Bee-Bop-Alula
223 236
224/* 237/*
225 * -remove me 238 * -remove me
226 */ 239 */
227#ifdef Q_WS_QWS 240#ifdef Q_WS_QWS
228extern Q_EXPORT QRect qt_maxWindowRect; 241extern Q_EXPORT QRect qt_maxWindowRect;
229#endif 242#endif
230 243
231#endif 244#endif