summaryrefslogtreecommitdiff
path: root/noncore
authorzecke <zecke>2004-11-15 14:28:50 (UTC)
committer zecke <zecke>2004-11-15 14:28:50 (UTC)
commitc9543dc4edd3ea586c04e8114e133296ad9529d9 (patch) (side-by-side diff)
treea5031c6fed1808b69c174480430944f8377b88a2 /noncore
parentf0c8746173f4cea9680b120bf823e77e7c8729b3 (diff)
downloadopie-c9543dc4edd3ea586c04e8114e133296ad9529d9.zip
opie-c9543dc4edd3ea586c04e8114e133296ad9529d9.tar.gz
opie-c9543dc4edd3ea586c04e8114e133296ad9529d9.tar.bz2
Make SFCave quick launchable
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/sfcave/opie-sfcave.control2
-rw-r--r--noncore/games/sfcave/sfcave.cpp48
-rw-r--r--noncore/games/sfcave/sfcave.h8
-rw-r--r--noncore/games/sfcave/sfcave.pro5
4 files changed, 21 insertions, 42 deletions
diff --git a/noncore/games/sfcave/opie-sfcave.control b/noncore/games/sfcave/opie-sfcave.control
index 0ff3e2c..1d98a19 100644
--- a/noncore/games/sfcave/opie-sfcave.control
+++ b/noncore/games/sfcave/opie-sfcave.control
@@ -1,3 +1,3 @@
Package: opie-sfcave
-Files: bin/sfcave apps/Games/sfcave.desktop pics/sfcave
+Files: plugins/applications/libsfcave.so* bin/sfcave apps/Games/sfcave.desktop pics/sfcave
Priority: optional
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 @@
-#ifdef QWS
-#include <qpe/qpeapplication.h>
+#include <opie2/oapplicationfactory.h>
#include <qpe/config.h>
-#else
+
#include <qapplication.h>
-#endif
#include <qdir.h>
@@ -134,38 +132,14 @@ bool movel;
-int main( int argc, char *argv[] )
-{
- movel = true;
-#ifdef QWS
- QPEApplication a( argc, argv );
-#else
- QApplication a( argc, argv );
-#endif
+OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<SFCave> )
- int speed = 3;
- for ( int i = 0 ; i < argc ; ++i )
- {
- if ( strcmp( argv[i], "-s" ) == 0 )
- {
- if ( i+1 < argc )
- speed = atoi( argv[i+1] );
- }
- }
-
- SFCave app( speed );
- a.setMainWidget( &app );
- app.show();
- app.start();
- a.exec();
-}
-
-SFCave :: SFCave( int spd, QWidget *w, char *name )
- : QMainWindow( w, name )
+SFCave :: SFCave( QWidget *w, const char *name, WFlags fl )
+ : QMainWindow( w, name, fl )
{
- replayIt = 0;
-#ifdef QWS
showMaximized();
-#else
- resize( 240, 284 );
-#endif
+ movel = true;
+ int spd = 3;
+
+
+ replayIt = 0;
@@ -215,2 +189,4 @@ SFCave :: SFCave( int spd, QWidget *w, char *name )
this, SLOT( run() ) );
+
+ QTimer::singleShot(0, this, SLOT(start()));
}
diff --git a/noncore/games/sfcave/sfcave.h b/noncore/games/sfcave/sfcave.h
index b1fe819..7bdf881 100644
--- a/noncore/games/sfcave/sfcave.h
+++ b/noncore/games/sfcave/sfcave.h
@@ -97,5 +97,11 @@ public:
- SFCave( int speed = 3, QWidget *p = 0, char *name = 0 );
+ SFCave( QWidget *p = 0, const char *name = 0, WFlags fl = 0 );
~SFCave();
+
+ static QString appName() { return QString::fromLatin1( QUICKAPP_NAME ); }
+
+public slots:
void start();
+public:
+
void setSeed( int seed );
diff --git a/noncore/games/sfcave/sfcave.pro b/noncore/games/sfcave/sfcave.pro
index a0df828..3a26a79 100644
--- a/noncore/games/sfcave/sfcave.pro
+++ b/noncore/games/sfcave/sfcave.pro
@@ -1,4 +1,2 @@
-TEMPLATE = app
-CONFIG += qt warn_on
-DESTDIR = $(OPIEDIR)/bin
+CONFIG += qt quick-app
SOURCES = sfcave.cpp helpwindow.cpp random.cpp
@@ -11,3 +9,2 @@ LIBS += -lqpe
-
include ( $(OPIEDIR)/include.pro )