author | llornkcor <llornkcor> | 2002-09-14 02:19:09 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-09-14 02:19:09 (UTC) |
commit | 2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975 (patch) (unidiff) | |
tree | eeed16b5f80dd5883991a7a06133f5f7a6936256 /noncore/apps/opie-reader/main.cpp | |
parent | 5a95ed6a000a56849b8f093deea500214856c626 (diff) | |
download | opie-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.cpp | 32 |
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 @@ | |||
1 | #include <qpe/qpeapplication.h> | 1 | #include <qpe/qpeapplication.h> |
2 | //#include <qmainwindow.h> | ||
3 | #include "QTReaderApp.h" | 2 | #include "QTReaderApp.h" |
4 | 3 | ||
4 | #include "signal.h" | ||
5 | #include "stdio.h" | ||
6 | #include "time.h" | ||
5 | 7 | ||
8 | QTReaderApp* app = NULL; | ||
6 | 9 | ||
7 | 10 | void handler(int signum) | |
8 | |||
9 | /* | ||
10 | class myapp : public QPEApplication | ||
11 | { | ||
12 | public slots: | ||
13 | void receive( const QCString& msg, const QByteArray& data ) | ||
14 | { | 11 | { |
15 | 12 | if (app != NULL) app->saveprefs(); | |
16 | QDataStream stream( data, IO_ReadOnly ); | 13 | signal(signum, handler); |
17 | if ( msg == "someMessage(int,int,int)" ) { | ||
18 | int a,b,c; | ||
19 | stream >> a >> b >> c; | ||
20 | ... | ||
21 | } else if ( msg == "otherMessage(QString)" ) { | ||
22 | ... | ||
23 | } | ||
24 | |||
25 | } | ||
26 | } | 14 | } |
27 | */ | ||
28 | 15 | ||
29 | int main( int argc, char ** argv ) | 16 | int main( int argc, char ** argv ) |
30 | { | 17 | { |
18 | signal(SIGCONT, handler); | ||
19 | |||
31 | QPEApplication a( argc, argv ); | 20 | QPEApplication a( argc, argv ); |
32 | 21 | ||
33 | QTReaderApp m; | 22 | QTReaderApp m; |
23 | |||
34 | a.showMainDocumentWidget( &m ); | 24 | a.showMainDocumentWidget( &m ); |
35 | 25 | ||
26 | app = &m; | ||
27 | |||
36 | return a.exec(); | 28 | return a.exec(); |
37 | } | 29 | } |
38 | 30 | ||