summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/main.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/main.cpp') (more/less context) (ignore 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,38 +1,30 @@
#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
+void handler(int signum)
{
- public slots:
- void receive( const QCString& msg, const QByteArray& data )
- {
-
- 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);
}
-*/
int main( int argc, char ** argv )
{
+ signal(SIGCONT, handler);
+
QPEApplication a( argc, argv );
QTReaderApp m;
+
a.showMainDocumentWidget( &m );
+ app = &m;
+
return a.exec();
}