Diffstat (limited to 'libopie2/opiecore/oapplication.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/oapplication.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libopie2/opiecore/oapplication.h b/libopie2/opiecore/oapplication.h index 3043910..72a659e 100644 --- a/libopie2/opiecore/oapplication.h +++ b/libopie2/opiecore/oapplication.h | |||
@@ -1,97 +1,92 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de> | 4 | Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de> |
5 | =. | 5 | =. |
6 | .=l. | 6 | .=l. |
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef OAPPLICATION_H | 31 | #ifndef OAPPLICATION_H |
32 | #define OAPPLICATION_H | 32 | #define OAPPLICATION_H |
33 | 33 | ||
34 | #define oApp OApplication::oApplication() | 34 | #define oApp OApplication::oApplication() |
35 | 35 | ||
36 | #ifdef QWS | 36 | |
37 | #include <qpe/qpeapplication.h> | 37 | #include <qpe/qpeapplication.h> |
38 | #else | 38 | |
39 | #include <qapplication.h> | ||
40 | #endif | ||
41 | 39 | ||
42 | class OApplicationPrivate; | 40 | class OApplicationPrivate; |
43 | class OConfig; | 41 | class OConfig; |
44 | 42 | ||
45 | #ifdef QWS | 43 | |
46 | class OApplication : public QPEApplication | 44 | class OApplication : public QPEApplication |
47 | #else | ||
48 | class OApplication : public QApplication | ||
49 | #endif | ||
50 | { | 45 | { |
51 | Q_OBJECT | 46 | Q_OBJECT |
52 | 47 | ||
53 | public: | 48 | public: |
54 | /** | 49 | /** |
55 | * Constructor. Parses command-line arguments and sets the window caption. | 50 | * Constructor. Parses command-line arguments and sets the window caption. |
56 | * | 51 | * |
57 | * @param rAppName application name. Will be used for finding the | 52 | * @param rAppName application name. Will be used for finding the |
58 | * associated message, icon and configuration files | 53 | * associated message, icon and configuration files |
59 | * | 54 | * |
60 | */ | 55 | */ |
61 | OApplication( int& argc, char** argv, const QCString& rAppName ); | 56 | OApplication( int& argc, char** argv, const QCString& rAppName ); |
62 | /** | 57 | /** |
63 | * Destructor. Destroys the application object and its children. | 58 | * Destructor. Destroys the application object and its children. |
64 | */ | 59 | */ |
65 | virtual ~OApplication(); | 60 | virtual ~OApplication(); |
66 | /** | 61 | /** |
67 | * @returns the process-wide application object | 62 | * @returns the process-wide application object |
68 | * | 63 | * |
69 | * This is similar to the global @ref QApplication pointer qApp. It | 64 | * This is similar to the global @ref QApplication pointer qApp. It |
70 | * allows access to the single global OApplication object, since | 65 | * allows access to the single global OApplication object, since |
71 | * more than one cannot be created in the same application. It | 66 | * more than one cannot be created in the same application. It |
72 | * saves you the trouble of having to pass the pointer explicitly | 67 | * saves you the trouble of having to pass the pointer explicitly |
73 | * to every function that may require it. | 68 | * to every function that may require it. |
74 | */ | 69 | */ |
75 | static OApplication* oApplication() { return _instance; }; | 70 | static OApplication* oApplication() { return _instance; }; |
76 | /** | 71 | /** |
77 | * Returns the application name as given during creation. | 72 | * Returns the application name as given during creation. |
78 | * | 73 | * |
79 | * @returns a reference to the application name | 74 | * @returns a reference to the application name |
80 | */ | 75 | */ |
81 | const QCString& appName() const { return _appname; }; | 76 | const QCString& appName() const { return _appname; }; |
82 | /** | 77 | /** |
83 | * @returns the application session config object. | 78 | * @returns the application session config object. |
84 | * | 79 | * |
85 | * @see OConfig | 80 | * @see OConfig |
86 | */ | 81 | */ |
87 | OConfig* config(); | 82 | OConfig* config(); |
88 | /** | 83 | /** |
89 | * Shows the main @a widget and sets the name of the application as window caption. | 84 | * Shows the main @a widget and sets the name of the application as window caption. |
90 | */ | 85 | */ |
91 | virtual void showMainWidget( QWidget* widget, bool nomax = false ); | 86 | virtual void showMainWidget( QWidget* widget, bool nomax = false ); |
92 | /** | 87 | /** |
93 | * Set the application title. The application title will be concatenated | 88 | * Set the application title. The application title will be concatenated |
94 | * to the application name given in the constructor. | 89 | * to the application name given in the constructor. |
95 | * | 90 | * |
96 | * @param title the title. If not given, resets caption to appname | 91 | * @param title the title. If not given, resets caption to appname |
97 | */ | 92 | */ |