author | drw <drw> | 2003-04-29 02:28:16 (UTC) |
---|---|---|
committer | drw <drw> | 2003-04-29 02:28:16 (UTC) |
commit | e096c9d1f2be1ec74ede583fc4221871a56ef508 (patch) (unidiff) | |
tree | 1c6f49430179e2f262179951477bbe4bd7d32e71 /noncore/settings/aqpkg/main.cpp | |
parent | 2f26f696ca6acd05aa615e15d891eede9907a1c0 (diff) | |
download | opie-e096c9d1f2be1ec74ede583fc4221871a56ef508.zip opie-e096c9d1f2be1ec74ede583fc4221871a56ef508.tar.gz opie-e096c9d1f2be1ec74ede583fc4221871a56ef508.tar.bz2 |
Give aqpkg standard source headers and some minor code clean-up.
Diffstat (limited to 'noncore/settings/aqpkg/main.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/aqpkg/main.cpp | 47 |
1 files changed, 28 insertions, 19 deletions
diff --git a/noncore/settings/aqpkg/main.cpp b/noncore/settings/aqpkg/main.cpp index 15ef9d6..066d79f 100644 --- a/noncore/settings/aqpkg/main.cpp +++ b/noncore/settings/aqpkg/main.cpp | |||
@@ -1,62 +1,71 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | main.cpp - description | 2 | This file is part of the OPIE Project |
3 | ------------------- | 3 | |
4 | begin : Mon Aug 26 13:32:30 BST 2002 | 4 | =. Copyright (c) 2002 Andy Qua <andy.qua@blueyonder.co.uk> |
5 | copyright : (C) 2002 by Andy Qua | 5 | .=l. Dan Williams <drw@handhelds.org> |
6 | email : andy.qua@blueyonder.co.uk | 6 | .>+-= |
7 | ***************************************************************************/ | 7 | _;:, .> :=|. This file is free software; you can |
8 | 8 | .> <`_, > . <= redistribute it and/or modify it under | |
9 | /*************************************************************************** | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | * * | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | * This program is free software; you can redistribute it and/or modify * | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | * it under the terms of the GNU General Public License as published by * | 12 | ._= =} : or (at your option) any later version. |
13 | * the Free Software Foundation; either version 2 of the License, or * | 13 | .%`+i> _;_. |
14 | * (at your option) any later version. * | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | * * | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | ***************************************************************************/ | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
19 | ..}^=.= = ; Public License for more details. | ||
20 | ++= -. .` .: | ||
21 | : = ...= . :.=- You should have received a copy of the GNU | ||
22 | -. .:....=;==+<; General Public License along with this file; | ||
23 | -_. . . )=. = see the file COPYING. If not, write to the | ||
24 | -- :-=` Free Software Foundation, Inc., | ||
25 | 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | |||
28 | */ | ||
17 | 29 | ||
18 | #ifdef QWS | 30 | #ifdef QWS |
19 | #include <qpe/qpeapplication.h> | 31 | #include <qpe/qpeapplication.h> |
20 | #include <qpe/qcopenvelope_qws.h> | 32 | #include <qpe/qcopenvelope_qws.h> |
21 | #else | 33 | #else |
22 | #include <qapplication.h> | 34 | #include <qapplication.h> |
23 | #endif | 35 | #endif |
24 | 36 | ||
25 | #include <qobjectdefs.h> | 37 | #include <qobjectdefs.h> |
26 | 38 | ||
27 | #include "mainwin.h" | 39 | #include "mainwin.h" |
28 | #include "server.h" | 40 | #include "server.h" |
29 | 41 | ||
30 | #include "global.h" | 42 | #include "global.h" |
31 | 43 | ||
32 | 44 | ||
33 | int main(int argc, char *argv[]) | 45 | int main(int argc, char *argv[]) |
34 | { | 46 | { |
35 | // cout << "Root dir = " << ROOT << endl; | ||
36 | #ifdef QWS | 47 | #ifdef QWS |
37 | QPEApplication a( argc, argv ); | 48 | QPEApplication a( argc, argv ); |
38 | #else | 49 | #else |
39 | QApplication a( argc, argv ); | 50 | QApplication a( argc, argv ); |
40 | #endif | 51 | #endif |
41 | 52 | ||
42 | #ifdef QWS | 53 | #ifdef QWS |
43 | // Disable suspend mode | 54 | // Disable suspend mode |
44 | // cout << "Disabling suspend mode" << endl; | ||
45 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; | 55 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; |
46 | #endif | 56 | #endif |
47 | 57 | ||
48 | MainWindow *win = new MainWindow(); | 58 | MainWindow *win = new MainWindow(); |
49 | a.setMainWidget(win); | 59 | a.setMainWidget(win); |
50 | win->showMaximized(); | 60 | win->showMaximized(); |
51 | 61 | ||
52 | a.exec(); | 62 | a.exec(); |
53 | 63 | ||
54 | #ifdef QWS | 64 | #ifdef QWS |
55 | // Reenable suspend mode | 65 | // Reenable suspend mode |
56 | // cout << "Enabling suspend mode" << endl; | ||
57 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; | 66 | QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; |
58 | #endif | 67 | #endif |
59 | #ifdef _DEBUG | 68 | #ifdef _DEBUG |
60 | DumpUnfreed(); | 69 | DumpUnfreed(); |
61 | #endif | 70 | #endif |
62 | } | 71 | } |