author | alwin <alwin> | 2004-04-06 12:48:22 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-04-06 12:48:22 (UTC) |
commit | 4aa395c79d046fafe11d0e9c9838f6565019d7d3 (patch) (unidiff) | |
tree | 067b3d46d42379f437806fb4d24ea0b86e862eca | |
parent | 19a3f177cdf334259438a0f2266255886f3063bb (diff) | |
download | opie-4aa395c79d046fafe11d0e9c9838f6565019d7d3.zip opie-4aa395c79d046fafe11d0e9c9838f6565019d7d3.tar.gz opie-4aa395c79d046fafe11d0e9c9838f6565019d7d3.tar.bz2 |
use OApplication
-rw-r--r-- | noncore/graphics/opie-eye/slave/main.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/noncore/graphics/opie-eye/slave/main.cpp b/noncore/graphics/opie-eye/slave/main.cpp index 5b90483..1629f02 100644 --- a/noncore/graphics/opie-eye/slave/main.cpp +++ b/noncore/graphics/opie-eye/slave/main.cpp | |||
@@ -6,54 +6,54 @@ | |||
6 | #include "png_slave.h" | 6 | #include "png_slave.h" |
7 | #include "jpeg_slave.h" | 7 | #include "jpeg_slave.h" |
8 | #include "thumbnailtool.h" | 8 | #include "thumbnailtool.h" |
9 | #include "slavereciever.h" | 9 | #include "slavereciever.h" |
10 | 10 | ||
11 | #include <qpixmap.h> | 11 | #include <qpixmap.h> |
12 | #include <qcopchannel_qws.h> | 12 | #include <qcopchannel_qws.h> |
13 | 13 | ||
14 | #include <qtopia/qpeapplication.h> | 14 | #include <opie2/oapplication.h> |
15 | 15 | ||
16 | int main( int argc, char* argv[] ) { | 16 | int main( int argc, char* argv[] ) { |
17 | QPEApplication app( argc, argv ); | 17 | Opie::Core::OApplication app( argc, argv,"opie-eye-slave" ); |
18 | SlaveReciever rec( 0 ); | 18 | SlaveReciever rec( 0 ); |
19 | 19 | ||
20 | QCopChannel chan( "QPE/opie-eye_slave" ); | 20 | QCopChannel chan( "QPE/opie-eye_slave" ); |
21 | QObject::connect(&chan,SIGNAL(received(const QCString&, const QByteArray&)), | 21 | QObject::connect(&chan,SIGNAL(received(const QCString&, const QByteArray&)), |
22 | &rec, SLOT(recieveAnswer(const QCString&,const QByteArray&))); | 22 | &rec, SLOT(recieveAnswer(const QCString&,const QByteArray&))); |
23 | QObject::connect(qApp,SIGNAL(appMessage(const QCString&, const QByteArray&)), | 23 | QObject::connect(qApp,SIGNAL(appMessage(const QCString&, const QByteArray&)), |
24 | &rec, SLOT(recieveAnswer(const QCString&,const QByteArray&))); | 24 | &rec, SLOT(recieveAnswer(const QCString&,const QByteArray&))); |
25 | 25 | ||
26 | return app.exec(); | 26 | return app.exec(); |
27 | } | 27 | } |
28 | 28 | ||
29 | #ifdef DEBUG_IT | 29 | #ifdef DEBUG_IT |
30 | int main( int argc, char* argv[] ) { | 30 | int main( int argc, char* argv[] ) { |
31 | QString str = QString::fromLatin1(argv[2] ); | 31 | QString str = QString::fromLatin1(argv[2] ); |
32 | QApplication app( argc, argv ); | 32 | QApplication app( argc, argv ); |
33 | GifSlave slave; | 33 | GifSlave slave; |
34 | owarn << str +" "+slave.iconViewName(str ) << oendl; | 34 | owarn << str +" "+slave.iconViewName(str ) << oendl; |
35 | owarn << str+" "+slave.fullImageInfo( str ) << oendl; | 35 | owarn << str+" "+slave.fullImageInfo( str ) << oendl; |
36 | 36 | ||
37 | PNGSlave pngslave; | 37 | PNGSlave pngslave; |
38 | owarn << str + " " + pngslave.iconViewName(str) << oendl; | 38 | owarn << str + " " + pngslave.iconViewName(str) << oendl; |
39 | owarn << str + " " + pngslave.fullImageInfo(str) << oendl; | 39 | owarn << str + " " + pngslave.fullImageInfo(str) << oendl; |
40 | 40 | ||
41 | 41 | ||
42 | JpegSlave jpgslave; | 42 | JpegSlave jpgslave; |
43 | owarn << str + " " + jpgslave.iconViewName(str ) << oendl; | 43 | owarn << str + " " + jpgslave.iconViewName(str ) << oendl; |
44 | owarn << str + " " + jpgslave.fullImageInfo( str ) << oendl; | 44 | owarn << str + " " + jpgslave.fullImageInfo( str ) << oendl; |
45 | //return app.exec(); | 45 | //return app.exec(); |
46 | QPixmap pix = ThumbNailTool::getThumb( str, 24, 24 ); | 46 | QPixmap pix = ThumbNailTool::getThumb( str, 24, 24 ); |
47 | if ( pix.isNull() ) { | 47 | if ( pix.isNull() ) { |
48 | owarn << "No Thumbnail" << oendl; | 48 | owarn << "No Thumbnail" << oendl; |
49 | pix = slave.pixmap(str, 24, 24); | 49 | pix = slave.pixmap(str, 24, 24); |
50 | } | 50 | } |
51 | 51 | ||
52 | if (!pix.isNull() ) { | 52 | if (!pix.isNull() ) { |
53 | owarn << "Saving Thumbnail" << oendl; | 53 | owarn << "Saving Thumbnail" << oendl; |
54 | ThumbNailTool::putThumb( str, pix, 24, 24 ); | 54 | ThumbNailTool::putThumb( str, pix, 24, 24 ); |
55 | } | 55 | } |
56 | 56 | ||
57 | } | 57 | } |
58 | 58 | ||
59 | #endif | 59 | #endif |