author | zecke <zecke> | 2004-11-15 17:09:35 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-11-15 17:09:35 (UTC) |
commit | 43773cc47947f88f48aa7a9f64ff58defff70c83 (patch) (side-by-side diff) | |
tree | 3a52b3cd048687183bc3475587f4b89f523ca8c9 /noncore | |
parent | 6d7b1a9a5f32a0b69c5ee9cc963e8a43a76327cf (diff) | |
download | opie-43773cc47947f88f48aa7a9f64ff58defff70c83.zip opie-43773cc47947f88f48aa7a9f64ff58defff70c83.tar.gz opie-43773cc47947f88f48aa7a9f64ff58defff70c83.tar.bz2 |
-Opie ZSafe is now quicklaunchable
-And it uses OConfig the right was now (in ~/Settings)
-rw-r--r-- | noncore/apps/zsafe/main.cpp | 96 | ||||
-rw-r--r-- | noncore/apps/zsafe/zsafe.pro | 4 |
2 files changed, 3 insertions, 97 deletions
diff --git a/noncore/apps/zsafe/main.cpp b/noncore/apps/zsafe/main.cpp index 2707730..6dfd455 100644 --- a/noncore/apps/zsafe/main.cpp +++ b/noncore/apps/zsafe/main.cpp @@ -10,30 +10,9 @@ #include "zsafe.h" -#ifndef NO_OPIE /* OPIE */ #include <opie2/odebug.h> -using namespace Opie::Core; -#endif /* QT */ -#ifdef DESKTOP -#include <qapplication.h> -#else -#include <qpe/qpeapplication.h> -#endif - -/* STD */ -#include <stdio.h> -#include <signal.h> - -ZSafe *zs; -#ifdef DESKTOP -QApplication *appl; -#else -QPEApplication *appl; -#endif - -int DeskW; -int DeskH; +#include <opie2/oapplicationfactory.h> void suspend (int signum) @@ -48,76 +27,5 @@ void resume (int signum) } -int main( int argc, char ** argv ) -{ -#ifndef Q_WS_WIN - // install signal handler -// signal (SIGSTOP, suspend); -#endif - -#ifdef DESKTOP - QApplication a( argc, argv ); -#else - QPEApplication a( argc, argv ); -#endif - appl = &a; -#ifdef DESKTOP - if (argc >= 3) - { -#ifndef Q_WS_WIN - DeskW = atoi(argv[1]); - DeskH = atoi(argv[2]); -#else - int w, h; - sscanf (argv[1], "%d", &w); - sscanf (argv[2], "%d", &h); - DeskW = w; - DeskH = h; -#endif - } - else - { - DeskW = 600; - DeskH = 400; - } -#else - DeskW = a.desktop()->width(); - DeskH = a.desktop()->height(); +OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<ZSafe> ) -#ifndef NO_OPIE - owarn << "Width: " << DeskW << " Height: " << DeskH << oendl; -#endif -#ifdef JPATCH_HDE - // nothings -#else - if (DeskW > 240) - { - DeskW -= 20; - DeskH += 25; -#ifndef NO_OPIE - owarn << "Changed width: " << DeskW << " Height: " << DeskH << oendl; -#endif - } -#endif - -#endif - - ZSafe *mw = new ZSafe( 0, 0, QWidget::WDestructiveClose ); -// ZSafe mw; -// zs = &mw; - zs = mw; - -#ifndef Q_WS_WIN -// signal (SIGCONT, resume); -#endif -#ifdef DESKTOP - a.setMainWidget(mw); - mw->show(); -#else - // a.showMainWidget( &mw ); - a.showMainDocumentWidget( mw ); -#endif - int ret = a.exec(); - - return ret; -} diff --git a/noncore/apps/zsafe/zsafe.pro b/noncore/apps/zsafe/zsafe.pro index 236d11e..e53015d 100644 --- a/noncore/apps/zsafe/zsafe.pro +++ b/noncore/apps/zsafe/zsafe.pro @@ -1,5 +1,3 @@ -TEMPLATE = app -CONFIG = qt warn_on -DESTDIR = $(OPIEDIR)/bin +CONFIG = qt quick-app HEADERS = zsafe.h krc2.h category.h categorylist.h zlistview.h \ scqtfiledlg.h |