Diffstat (limited to 'libopie2/opiecore/oapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiecore/oapplication.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/libopie2/opiecore/oapplication.cpp b/libopie2/opiecore/oapplication.cpp index ce26420..7a6c174 100644 --- a/libopie2/opiecore/oapplication.cpp +++ b/libopie2/opiecore/oapplication.cpp | |||
@@ -37,33 +37,33 @@ OApplication* OApplication::_instance = 0; | |||
37 | /* OApplicationPrivate | 37 | /* OApplicationPrivate |
38 | /**************************************************************************************************/ | 38 | /**************************************************************************************************/ |
39 | 39 | ||
40 | class OApplicationPrivate | 40 | class OApplicationPrivate |
41 | { | 41 | { |
42 | public: | 42 | public: |
43 | OApplicationPrivate() {}; | 43 | OApplicationPrivate() {}; |
44 | ~OApplicationPrivate() {}; | 44 | ~OApplicationPrivate() {}; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | /**************************************************************************************************/ | 47 | /**************************************************************************************************/ |
48 | /* OApplication | 48 | /* OApplication |
49 | /**************************************************************************************************/ | 49 | /**************************************************************************************************/ |
50 | 50 | ||
51 | 51 | ||
52 | OApplication::OApplication( int& argc, char** argv, const QCString& rAppName ) | 52 | OApplication::OApplication( int& argc, char** argv, const QCString& rAppName ) |
53 | :OApplicationBaseClass( argc, argv ), | 53 | :QPEApplication( argc, argv ), |
54 | _appname( rAppName ), | 54 | _appname( rAppName ), |
55 | _config( 0 ) | 55 | _config( 0 ) |
56 | { | 56 | { |
57 | init(); | 57 | init(); |
58 | } | 58 | } |
59 | 59 | ||
60 | 60 | ||
61 | OApplication::~OApplication() | 61 | OApplication::~OApplication() |
62 | { | 62 | { |
63 | delete d; | 63 | delete d; |
64 | if ( _config ) | 64 | if ( _config ) |
65 | delete _config; | 65 | delete _config; |
66 | OApplication::_instance = 0; | 66 | OApplication::_instance = 0; |
67 | // after deconstruction of the one-and-only application object, | 67 | // after deconstruction of the one-and-only application object, |
68 | // the construction of another object is allowed | 68 | // the construction of another object is allowed |
69 | } | 69 | } |
@@ -80,45 +80,34 @@ OConfig* OApplication::config() | |||
80 | 80 | ||
81 | 81 | ||
82 | void OApplication::init() | 82 | void OApplication::init() |
83 | { | 83 | { |
84 | d = new OApplicationPrivate(); | 84 | d = new OApplicationPrivate(); |
85 | if ( !OApplication::_instance ) | 85 | if ( !OApplication::_instance ) |
86 | { | 86 | { |
87 | OApplication::_instance = this; | 87 | OApplication::_instance = this; |
88 | } | 88 | } |
89 | else | 89 | else |
90 | { | 90 | { |
91 | qFatal( "OApplication: Can't create more than one OApplication object. Aborting." ); | 91 | qFatal( "OApplication: Can't create more than one OApplication object. Aborting." ); |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | 95 | ||
96 | void OApplication::setMainWidget( QWidget* widget ) | ||
97 | { | ||
98 | showMainWidget( widget ); | ||
99 | } | ||
100 | |||
101 | |||
102 | void OApplication::showMainWidget( QWidget* widget, bool nomax ) | 96 | void OApplication::showMainWidget( QWidget* widget, bool nomax ) |
103 | { | 97 | { |
104 | #ifdef Q_WS_QWS | ||
105 | QPEApplication::showMainWidget( widget, nomax ); | 98 | QPEApplication::showMainWidget( widget, nomax ); |
106 | #else | ||
107 | QApplication::setMainWidget( widget ); | ||
108 | widget->show(); | ||
109 | #endif | ||
110 | widget->setCaption( _appname ); | 99 | widget->setCaption( _appname ); |
111 | } | 100 | } |
112 | 101 | ||
113 | 102 | ||
114 | void OApplication::setTitle( const QString& title ) const | 103 | void OApplication::setTitle( const QString& title ) const |
115 | { | 104 | { |
116 | if ( mainWidget() ) | 105 | if ( mainWidget() ) |
117 | { | 106 | { |
118 | if ( !title.isNull() ) | 107 | if ( !title.isNull() ) |
119 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); | 108 | mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title ); |
120 | else | 109 | else |
121 | mainWidget()->setCaption( _appname ); | 110 | mainWidget()->setCaption( _appname ); |
122 | } | 111 | } |
123 | } | 112 | } |
124 | 113 | ||