summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oapplication.h
Unidiff
Diffstat (limited to 'libopie2/opiecore/oapplication.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oapplication.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libopie2/opiecore/oapplication.h b/libopie2/opiecore/oapplication.h
index 4d25202..8326847 100644
--- a/libopie2/opiecore/oapplication.h
+++ b/libopie2/opiecore/oapplication.h
@@ -12,61 +12,65 @@
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// the below stuff will fail with moc because moc does not pre process headers
37// This will make usage of signal and slots hard inside QPEApplication -zecke
38
36#ifdef QWS 39#ifdef QWS
37 #include <qpe/qpeapplication.h> 40 #include <qpe/qpeapplication.h>
38 #define OApplicationBaseClass QPEApplication 41 #define OApplicationBaseClass QPEApplication
39#else 42#else
40 #include <qapplication.h> 43 #include <qapplication.h>
41 #define OApplicationBaseClass QApplication 44 #define OApplicationBaseClass QApplication
42#endif 45#endif
43 46
44class OApplicationPrivate; 47class OApplicationPrivate;
45class OConfig; 48class OConfig;
46 49
47class OApplication: public OApplicationBaseClass 50class OApplication: public OApplicationBaseClass
48{ 51{
52// Q_OBJECT would fail -zecke
49 public: 53 public:
50 54
51 /** 55 /**
52 * Constructor. Parses command-line arguments and sets the window caption. 56 * Constructor. Parses command-line arguments and sets the window caption.
53 * 57 *
54 * @param rAppName application name. Will be used for finding the 58 * @param rAppName application name. Will be used for finding the
55 * associated message, icon and configuration files 59 * associated message, icon and configuration files
56 * 60 *
57 */ 61 */
58 OApplication( int& argc, char** argv, const QCString& rAppName ); 62 OApplication( int& argc, char** argv, const QCString& rAppName );
59 /** 63 /**
60 * Destructor. Destroys the application object and its children. 64 * Destructor. Destroys the application object and its children.
61 */ 65 */
62 virtual ~OApplication(); 66 virtual ~OApplication();
63 67
64 /** 68 /**
65 * Returns the current application object. 69 * Returns the current application object.
66 * 70 *
67 * This is similar to the global @ref QApplication pointer qApp. It 71 * This is similar to the global @ref QApplication pointer qApp. It
68 * allows access to the single global OApplication object, since 72 * allows access to the single global OApplication object, since
69 * more than one cannot be created in the same application. It 73 * more than one cannot be created in the same application. It
70 * saves you the trouble of having to pass the pointer explicitly 74 * saves you the trouble of having to pass the pointer explicitly
71 * to every function that may require it. 75 * to every function that may require it.
72 * 76 *
@@ -93,38 +97,38 @@ class OApplication: public OApplicationBaseClass
93 /** 97 /**
94 * Sets the main widget - reimplemented to call showMainWidget() 98 * Sets the main widget - reimplemented to call showMainWidget()
95 * on Qt/Embedded. 99 * on Qt/Embedded.
96 * 100 *
97 * @param mainWidget the widget to become the main widget 101 * @param mainWidget the widget to become the main widget
98 * @see QWidget object 102 * @see QWidget object
99 */ 103 */
100 virtual void setMainWidget( QWidget *mainWidget ); 104 virtual void setMainWidget( QWidget *mainWidget );
101 105
102 /** 106 /**
103 * Shows the main widget - reimplemented to call setMainWidget() 107 * Shows the main widget - reimplemented to call setMainWidget()
104 * on platforms other than Qt/Embedded. 108 * on platforms other than Qt/Embedded.
105 * 109 *
106 * @param mainWidget the widget to become the main widget 110 * @param mainWidget the widget to become the main widget
107 * @see QWidget object 111 * @see QWidget object
108 */ 112 */
109 virtual void showMainWidget( QWidget* widget, bool nomax = false ); 113 virtual void showMainWidget( QWidget* widget, bool nomax = false );
110 114
111 /** 115 /**
112 * Set the application title. The application title will be concatenated 116 * Set the application title. The application title will be concatenated
113 * to the application name given in the constructor. 117 * to the application name given in the constructor.
114 * 118 *
115 * @param title the title. If not given, resets caption to appname 119 * @param title the title. If not given, resets caption to appname
116 */ 120 */
117 virtual void setTitle( QString title = QString::null ) const; 121 virtual void setTitle( const QString& title = QString::null ) const;
118 //virtual void setTitle() const; 122 //virtual void setTitle() const;
119 123
120 protected: 124 protected:
121 void init(); 125 void init();
122 126
123 private: 127 private:
124 const QCString _appname; 128 const QCString _appname;
125 static OApplication* _instance; 129 static OApplication* _instance;
126 OConfig* _config; 130 OConfig* _config;
127 OApplicationPrivate* d; 131 OApplicationPrivate* d;
128}; 132};
129 133
130#endif // OAPPLICATION_H 134#endif // OAPPLICATION_H