summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/main.cpp
authorllornkcor <llornkcor>2002-09-14 02:19:09 (UTC)
committer llornkcor <llornkcor>2002-09-14 02:19:09 (UTC)
commit2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975 (patch) (side-by-side diff)
treeeeed16b5f80dd5883991a7a06133f5f7a6936256 /noncore/apps/opie-reader/main.cpp
parent5a95ed6a000a56849b8f093deea500214856c626 (diff)
downloadopie-2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975.zip
opie-2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975.tar.gz
opie-2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975.tar.bz2
update by Tim
Diffstat (limited to 'noncore/apps/opie-reader/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/main.cpp32
1 files changed, 12 insertions, 20 deletions
diff --git a/noncore/apps/opie-reader/main.cpp b/noncore/apps/opie-reader/main.cpp
index e37f12c..08f59a8 100644
--- a/noncore/apps/opie-reader/main.cpp
+++ b/noncore/apps/opie-reader/main.cpp
@@ -1,28 +1,15 @@
#include <qpe/qpeapplication.h>
-//#include <qmainwindow.h>
#include "QTReaderApp.h"
+#include "signal.h"
+#include "stdio.h"
+#include "time.h"
+QTReaderApp* app = NULL;
-
-
-/*
-class myapp : public QPEApplication
-{
- public slots:
- void receive( const QCString& msg, const QByteArray& data )
+void handler(int signum)
{
-
- QDataStream stream( data, IO_ReadOnly );
- if ( msg == "someMessage(int,int,int)" ) {
- int a,b,c;
- stream >> a >> b >> c;
- ...
- } else if ( msg == "otherMessage(QString)" ) {
- ...
- }
-
- }
+ if (app != NULL) app->saveprefs();
+ signal(signum, handler);
}
-*/
@@ -30,2 +17,4 @@ int main( int argc, char ** argv )
{
+ signal(SIGCONT, handler);
+
QPEApplication a( argc, argv );
@@ -33,4 +22,7 @@ int main( int argc, char ** argv )
QTReaderApp m;
+
a.showMainDocumentWidget( &m );
+ app = &m;
+
return a.exec();