author | zecke <zecke> | 2004-11-15 14:28:50 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-11-15 14:28:50 (UTC) |
commit | c9543dc4edd3ea586c04e8114e133296ad9529d9 (patch) (unidiff) | |
tree | a5031c6fed1808b69c174480430944f8377b88a2 /noncore/games/sfcave/sfcave.cpp | |
parent | f0c8746173f4cea9680b120bf823e77e7c8729b3 (diff) | |
download | opie-c9543dc4edd3ea586c04e8114e133296ad9529d9.zip opie-c9543dc4edd3ea586c04e8114e133296ad9529d9.tar.gz opie-c9543dc4edd3ea586c04e8114e133296ad9529d9.tar.bz2 |
Make SFCave quick launchable
Diffstat (limited to 'noncore/games/sfcave/sfcave.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/sfcave/sfcave.cpp | 48 |
1 files changed, 12 insertions, 36 deletions
diff --git a/noncore/games/sfcave/sfcave.cpp b/noncore/games/sfcave/sfcave.cpp index 9b30fe6..5dca427 100644 --- a/noncore/games/sfcave/sfcave.cpp +++ b/noncore/games/sfcave/sfcave.cpp | |||
@@ -5,8 +5,6 @@ | |||
5 | 5 | ||
6 | #ifdef QWS | 6 | #include <opie2/oapplicationfactory.h> |
7 | #include <qpe/qpeapplication.h> | ||
8 | #include <qpe/config.h> | 7 | #include <qpe/config.h> |
9 | #else | 8 | |
10 | #include <qapplication.h> | 9 | #include <qapplication.h> |
11 | #endif | ||
12 | #include <qdir.h> | 10 | #include <qdir.h> |
@@ -134,38 +132,14 @@ bool movel; | |||
134 | 132 | ||
135 | int main( int argc, char *argv[] ) | 133 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<SFCave> ) |
136 | { | ||
137 | movel = true; | ||
138 | #ifdef QWS | ||
139 | QPEApplication a( argc, argv ); | ||
140 | #else | ||
141 | QApplication a( argc, argv ); | ||
142 | #endif | ||
143 | 134 | ||
144 | int speed = 3; | 135 | SFCave :: SFCave( QWidget *w, const char *name, WFlags fl ) |
145 | for ( int i = 0 ; i < argc ; ++i ) | 136 | : QMainWindow( w, name, fl ) |
146 | { | ||
147 | if ( strcmp( argv[i], "-s" ) == 0 ) | ||
148 | { | ||
149 | if ( i+1 < argc ) | ||
150 | speed = atoi( argv[i+1] ); | ||
151 | } | ||
152 | } | ||
153 | |||
154 | SFCave app( speed ); | ||
155 | a.setMainWidget( &app ); | ||
156 | app.show(); | ||
157 | app.start(); | ||
158 | a.exec(); | ||
159 | } | ||
160 | |||
161 | SFCave :: SFCave( int spd, QWidget *w, char *name ) | ||
162 | : QMainWindow( w, name ) | ||
163 | 137 | ||
164 | { | 138 | { |
165 | replayIt = 0; | ||
166 | #ifdef QWS | ||
167 | showMaximized(); | 139 | showMaximized(); |
168 | #else | 140 | movel = true; |
169 | resize( 240, 284 ); | 141 | int spd = 3; |
170 | #endif | 142 | |
143 | |||
144 | replayIt = 0; | ||
171 | 145 | ||
@@ -215,2 +189,4 @@ SFCave :: SFCave( int spd, QWidget *w, char *name ) | |||
215 | this, SLOT( run() ) ); | 189 | this, SLOT( run() ) ); |
190 | |||
191 | QTimer::singleShot(0, this, SLOT(start())); | ||
216 | } | 192 | } |