author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/graphics | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-rw-r--r-- | noncore/graphics/opie-eye/config.in | 4 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp | 14 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/impl/dir/dir_lister.cpp | 8 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/lib/slavemaster.cpp | 12 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/phunk_view.pro | 2 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/slave/jpeg_slave.cpp | 18 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/slave/main.cpp | 16 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/slave/slave.pro | 6 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/slave/slavereciever.cpp | 22 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/slave/thumbnailtool.cpp | 11 |
10 files changed, 68 insertions, 45 deletions
diff --git a/noncore/graphics/opie-eye/config.in b/noncore/graphics/opie-eye/config.in index 996dcf3..d7f9963 100644 --- a/noncore/graphics/opie-eye/config.in +++ b/noncore/graphics/opie-eye/config.in | |||
@@ -1,9 +1,9 @@ | |||
1 | config OPIE_EYE | 1 | config OPIE_EYE |
2 | boolean "opie-eye The Image Viewer and Browser" | 2 | boolean "opie-eye The Image Viewer and Browser" |
3 | default "y" | 3 | default "y" |
4 | depends on ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI | 4 | depends on ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI |
5 | 5 | ||
6 | config OPIE_EYE_SLAVE | 6 | config OPIE_EYE_SLAVE |
7 | boolean | 7 | boolean |
8 | default "y" if OPIE_EYE | 8 | default "y" if OPIE_EYE |
9 | depends on ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI | 9 | depends on ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI |
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp index 79f4510..5599ad1 100644 --- a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp +++ b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp | |||
@@ -3,15 +3,19 @@ | |||
3 | * zecke@handhelds.org | 3 | * zecke@handhelds.org |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "dir_ifaceinfo.h" | ||
7 | |||
8 | /* OPIE */ | ||
9 | #include <opie2/odebug.h> | ||
10 | #include <qpe/config.h> | ||
11 | using namespace Opie::Core; | ||
12 | |||
13 | /* QT */ | ||
6 | #include <qwidget.h> | 14 | #include <qwidget.h> |
7 | #include <qcheckbox.h> | 15 | #include <qcheckbox.h> |
8 | #include <qhbox.h> | 16 | #include <qhbox.h> |
9 | #include <qlabel.h> | 17 | #include <qlabel.h> |
10 | 18 | ||
11 | #include <qpe/config.h> | ||
12 | |||
13 | #include "dir_ifaceinfo.h" | ||
14 | |||
15 | namespace { | 19 | namespace { |
16 | class DirImageWidget : public QHBox { | 20 | class DirImageWidget : public QHBox { |
17 | public: | 21 | public: |
@@ -41,7 +45,7 @@ QWidget* DirInterfaceInfo::configWidget(const Config& cfg) { | |||
41 | } | 45 | } |
42 | 46 | ||
43 | void DirInterfaceInfo::writeConfig( QWidget* _wid, Config& cfg) { | 47 | void DirInterfaceInfo::writeConfig( QWidget* _wid, Config& cfg) { |
44 | qWarning( "Write Config" ); | 48 | owarn << "Write Config" << oendl; |
45 | DirImageWidget* wid = static_cast<DirImageWidget*>(_wid); | 49 | DirImageWidget* wid = static_cast<DirImageWidget*>(_wid); |
46 | cfg.writeEntry("Dir_Check_All_Files", wid->chkbox->isChecked() ); | 50 | cfg.writeEntry("Dir_Check_All_Files", wid->chkbox->isChecked() ); |
47 | } | 51 | } |
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp index ffea29e..0a5cff4 100644 --- a/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp +++ b/noncore/graphics/opie-eye/impl/dir/dir_lister.cpp | |||
@@ -6,19 +6,21 @@ | |||
6 | 6 | ||
7 | #include <lib/slavemaster.h> | 7 | #include <lib/slavemaster.h> |
8 | 8 | ||
9 | 9 | /* OPIE */ | |
10 | #include <opie2/odebug.h> | ||
10 | #include <qpe/config.h> | 11 | #include <qpe/config.h> |
11 | #include <qpe/qpeapplication.h> | 12 | #include <qpe/qpeapplication.h> |
13 | using namespace Opie::Core; | ||
12 | 14 | ||
15 | /* QT */ | ||
13 | #include <qdir.h> | 16 | #include <qdir.h> |
14 | #include <qfileinfo.h> | 17 | #include <qfileinfo.h> |
15 | 18 | ||
16 | |||
17 | Dir_DirLister::Dir_DirLister( bool list ) | 19 | Dir_DirLister::Dir_DirLister( bool list ) |
18 | : PDirLister( "dir_dir_lister" ) | 20 | : PDirLister( "dir_dir_lister" ) |
19 | { | 21 | { |
20 | m_allFiles = list; | 22 | m_allFiles = list; |
21 | qWarning("All Files %d", m_allFiles ); | 23 | owarn << "All Files " << m_allFiles << "" << oendl; |
22 | 24 | ||
23 | SlaveMaster* master = SlaveMaster::self(); | 25 | SlaveMaster* master = SlaveMaster::self(); |
24 | connect( master, SIGNAL(sig_start()), this, SIGNAL(sig_start()) ); | 26 | connect( master, SIGNAL(sig_start()), this, SIGNAL(sig_start()) ); |
diff --git a/noncore/graphics/opie-eye/lib/slavemaster.cpp b/noncore/graphics/opie-eye/lib/slavemaster.cpp index 4e28535..5bb7ab8 100644 --- a/noncore/graphics/opie-eye/lib/slavemaster.cpp +++ b/noncore/graphics/opie-eye/lib/slavemaster.cpp | |||
@@ -1,8 +1,12 @@ | |||
1 | #include "slavemaster.h" | 1 | #include "slavemaster.h" |
2 | 2 | ||
3 | /* OPIE */ | ||
4 | #include <opie2/odebug.h> | ||
3 | #include <qpe/qpeapplication.h> | 5 | #include <qpe/qpeapplication.h> |
4 | #include <qpe/qcopenvelope_qws.h> | 6 | #include <qpe/qcopenvelope_qws.h> |
7 | using namespace Opie::Core; | ||
5 | 8 | ||
9 | /* QT */ | ||
6 | #include <qcopchannel_qws.h> | 10 | #include <qcopchannel_qws.h> |
7 | #include <qtimer.h> | 11 | #include <qtimer.h> |
8 | 12 | ||
@@ -23,7 +27,7 @@ QDataStream & operator >> (QDataStream & str, bool & b) | |||
23 | * ! We don't put a Pixmap in!!!! | 27 | * ! We don't put a Pixmap in!!!! |
24 | */ | 28 | */ |
25 | QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { | 29 | QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { |
26 | qWarning( "Image request is %s %d %d", inf.file.latin1(), inf.width, inf.height ); | 30 | owarn << "Image request is " << inf.file.latin1() << " " << inf.width << " " << inf.height << "" << oendl; |
27 | return s << inf.file << inf.width << inf.height; | 31 | return s << inf.file << inf.width << inf.height; |
28 | } | 32 | } |
29 | QDataStream &operator>>( QDataStream& s, PixmapInfo& inf ) { | 33 | QDataStream &operator>>( QDataStream& s, PixmapInfo& inf ) { |
@@ -78,10 +82,10 @@ void SlaveMaster::imageInfo( const QString& str ) { | |||
78 | 82 | ||
79 | void SlaveMaster::thumbNail( const QString& str, int w, int h ) { | 83 | void SlaveMaster::thumbNail( const QString& str, int w, int h ) { |
80 | if ( str.isEmpty() ) { | 84 | if ( str.isEmpty() ) { |
81 | qWarning( "Asking for empty nail" ); | 85 | owarn << "Asking for empty nail" << oendl; |
82 | return; | 86 | return; |
83 | } | 87 | } |
84 | qWarning( "Asking for thumbNail in size %d %d" + str, w,h ); | 88 | owarn << "Asking for thumbNail in size " << w << " " << h << "" + str << oendl; |
85 | PixmapInfo item; | 89 | PixmapInfo item; |
86 | item.file = str; item.width = w; item.height = h; | 90 | item.file = str; item.width = w; item.height = h; |
87 | item.pixmap = QPixmap(); | 91 | item.pixmap = QPixmap(); |
@@ -105,7 +109,7 @@ void SlaveMaster::recieve( const QCString& str, const QByteArray& at) { | |||
105 | else if ( str == "pixmapsHandled(StringList)" ) | 109 | else if ( str == "pixmapsHandled(StringList)" ) |
106 | stream >> infos; | 110 | stream >> infos; |
107 | 111 | ||
108 | qWarning( "PixInfos %d", pixinfos.count() ); | 112 | owarn << "PixInfos " << pixinfos.count() << "" << oendl; |
109 | 113 | ||
110 | bool got_data = ( !infos.isEmpty() || !pixinfos.isEmpty() ); | 114 | bool got_data = ( !infos.isEmpty() || !pixinfos.isEmpty() ); |
111 | if ( got_data ) { | 115 | if ( got_data ) { |
diff --git a/noncore/graphics/opie-eye/phunk_view.pro b/noncore/graphics/opie-eye/phunk_view.pro index 17fa22c..0e2202a 100644 --- a/noncore/graphics/opie-eye/phunk_view.pro +++ b/noncore/graphics/opie-eye/phunk_view.pro | |||
@@ -31,6 +31,6 @@ DEPENDPATH += $(OPIEDIR)/include | |||
31 | 31 | ||
32 | 32 | ||
33 | 33 | ||
34 | LIBS += -lqpe -lopieui2 | 34 | LIBS += -lqpe -lopiecore2 -lopieui2 |
35 | 35 | ||
36 | include ( $(OPIEDIR)/include.pro ) | 36 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/graphics/opie-eye/slave/jpeg_slave.cpp b/noncore/graphics/opie-eye/slave/jpeg_slave.cpp index 086b47f..fb7d5de 100644 --- a/noncore/graphics/opie-eye/slave/jpeg_slave.cpp +++ b/noncore/graphics/opie-eye/slave/jpeg_slave.cpp | |||
@@ -1,10 +1,14 @@ | |||
1 | #include "jpeg_slave.h" | 1 | #include "jpeg_slave.h" |
2 | |||
3 | #include "thumbnailtool.h" | 2 | #include "thumbnailtool.h" |
4 | 3 | ||
5 | PHUNK_VIEW_INTERFACE( "JPEG", JpegSlave ) | 4 | PHUNK_VIEW_INTERFACE( "JPEG", JpegSlave ) |
6 | 5 | ||
7 | #include <qtopia/timestring.h> | 6 | /* OPIE */ |
7 | #include <opie2/odebug.h> | ||
8 | #include <qpe/timestring.h> | ||
9 | using namespace Opie::Core; | ||
10 | |||
11 | /* QT */ | ||
8 | #include <qobject.h> | 12 | #include <qobject.h> |
9 | #include <qimage.h> | 13 | #include <qimage.h> |
10 | 14 | ||
@@ -119,7 +123,7 @@ class FatalError { | |||
119 | const char* ex; | 123 | const char* ex; |
120 | public: | 124 | public: |
121 | FatalError(const char* s) { ex = s; } | 125 | FatalError(const char* s) { ex = s; } |
122 | void debug_print() const { qWarning("exception: %s", ex ); } | 126 | void debug_print() const { owarn << "exception: " << ex << "" << oendl; } |
123 | }; | 127 | }; |
124 | 128 | ||
125 | 129 | ||
@@ -262,7 +266,7 @@ int ExifData::ReadJpegSections (QFile & infile, ReadMode_t ReadMode) | |||
262 | 266 | ||
263 | if (a >= 6){ | 267 | if (a >= 6){ |
264 | 268 | ||
265 | qWarning( "too many padding bytes" ); | 269 | owarn << "too many padding bytes" << oendl; |
266 | return false; | 270 | return false; |
267 | 271 | ||
268 | } | 272 | } |
@@ -327,7 +331,7 @@ int ExifData::ReadJpegSections (QFile & infile, ReadMode_t ReadMode) | |||
327 | return true; | 331 | return true; |
328 | 332 | ||
329 | case M_EOI: // in case it's a tables-only JPEG stream | 333 | case M_EOI: // in case it's a tables-only JPEG stream |
330 | qWarning( "No image in jpeg!" ); | 334 | owarn << "No image in jpeg!" << oendl; |
331 | return false; | 335 | return false; |
332 | 336 | ||
333 | case M_COM: // Comment section | 337 | case M_COM: // Comment section |
@@ -726,7 +730,7 @@ void ExifData::ProcessExifDir(unsigned char * DirStart, unsigned char * OffsetBa | |||
726 | // Jhead 1.3 or earlier would crop the whole directory! | 730 | // Jhead 1.3 or earlier would crop the whole directory! |
727 | // As Jhead produces this form of format incorrectness, | 731 | // As Jhead produces this form of format incorrectness, |
728 | // I'll just let it pass silently | 732 | // I'll just let it pass silently |
729 | qWarning( "Thumbnail removed with Jhead 1.3 or earlier" ); | 733 | owarn << "Thumbnail removed with Jhead 1.3 or earlier" << oendl; |
730 | }else{ | 734 | }else{ |
731 | return; | 735 | return; |
732 | } | 736 | } |
@@ -913,7 +917,7 @@ bool ExifData::scan(const QString & path) | |||
913 | ret = ReadJpegSections(f, READ_EXIF); | 917 | ret = ReadJpegSections(f, READ_EXIF); |
914 | 918 | ||
915 | if (ret == false){ | 919 | if (ret == false){ |
916 | qWarning( "Not JPEG file!" ); | 920 | owarn << "Not JPEG file!" << oendl; |
917 | DiscardData(); | 921 | DiscardData(); |
918 | f.close(); | 922 | f.close(); |
919 | return false; | 923 | return false; |
diff --git a/noncore/graphics/opie-eye/slave/main.cpp b/noncore/graphics/opie-eye/slave/main.cpp index 37020e6..5b90483 100644 --- a/noncore/graphics/opie-eye/slave/main.cpp +++ b/noncore/graphics/opie-eye/slave/main.cpp | |||
@@ -31,26 +31,26 @@ 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 | qWarning( str +" "+slave.iconViewName(str ) ); | 34 | owarn << str +" "+slave.iconViewName(str ) << oendl; |
35 | qWarning( str+" "+slave.fullImageInfo( str ) ); | 35 | owarn << str+" "+slave.fullImageInfo( str ) << oendl; |
36 | 36 | ||
37 | PNGSlave pngslave; | 37 | PNGSlave pngslave; |
38 | qWarning( str + " " + pngslave.iconViewName(str) ); | 38 | owarn << str + " " + pngslave.iconViewName(str) << oendl; |
39 | qWarning( str + " " + pngslave.fullImageInfo(str)); | 39 | owarn << str + " " + pngslave.fullImageInfo(str) << oendl; |
40 | 40 | ||
41 | 41 | ||
42 | JpegSlave jpgslave; | 42 | JpegSlave jpgslave; |
43 | qWarning( str + " " + jpgslave.iconViewName(str ) ); | 43 | owarn << str + " " + jpgslave.iconViewName(str ) << oendl; |
44 | qWarning( str + " " + jpgslave.fullImageInfo( str ) ); | 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 | qWarning( "No Thumbnail" ); | 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 | qWarning( "Saving Thumbnail" ); | 53 | owarn << "Saving Thumbnail" << oendl; |
54 | ThumbNailTool::putThumb( str, pix, 24, 24 ); | 54 | ThumbNailTool::putThumb( str, pix, 24, 24 ); |
55 | } | 55 | } |
56 | 56 | ||
diff --git a/noncore/graphics/opie-eye/slave/slave.pro b/noncore/graphics/opie-eye/slave/slave.pro index 3f42495..903d667 100644 --- a/noncore/graphics/opie-eye/slave/slave.pro +++ b/noncore/graphics/opie-eye/slave/slave.pro | |||
@@ -1,4 +1,4 @@ | |||
1 | CONFIG += qte | 1 | CONFIG = qt |
2 | TEMPLATE = app | 2 | TEMPLATE = app |
3 | TARGET = opie-eye_slave | 3 | TARGET = opie-eye_slave |
4 | DESTDIR = $(OPIEDIR)/bin | 4 | DESTDIR = $(OPIEDIR)/bin |
@@ -13,6 +13,6 @@ SOURCES = main.cpp gif_slave.cpp slavereciever.cpp \ | |||
13 | INCLUDEPATH += $(OPIEDIR)/include ../ | 13 | INCLUDEPATH += $(OPIEDIR)/include ../ |
14 | DEPENDSPATH += $(OPIEDIR)/include | 14 | DEPENDSPATH += $(OPIEDIR)/include |
15 | 15 | ||
16 | LIBS += -lqpe | 16 | LIBS += -lqpe -lopiecore2 |
17 | 17 | ||
18 | include ( $(OPIEDIR)/include.pro ) \ No newline at end of file | 18 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/graphics/opie-eye/slave/slavereciever.cpp b/noncore/graphics/opie-eye/slave/slavereciever.cpp index bbbbb30..82b3d23 100644 --- a/noncore/graphics/opie-eye/slave/slavereciever.cpp +++ b/noncore/graphics/opie-eye/slave/slavereciever.cpp | |||
@@ -5,9 +5,13 @@ | |||
5 | #include "slavereciever.h" | 5 | #include "slavereciever.h" |
6 | #include "slaveiface.h" | 6 | #include "slaveiface.h" |
7 | 7 | ||
8 | /* OPIE */ | ||
9 | #include <opie2/odebug.h> | ||
8 | #include <qpe/qcopenvelope_qws.h> | 10 | #include <qpe/qcopenvelope_qws.h> |
9 | #include <qpe/qpeapplication.h> | 11 | #include <qpe/qpeapplication.h> |
12 | using namespace Opie::Core; | ||
10 | 13 | ||
14 | /* QT */ | ||
11 | #include <qtimer.h> | 15 | #include <qtimer.h> |
12 | 16 | ||
13 | static SlaveObjects* _slaveObj = 0; | 17 | static SlaveObjects* _slaveObj = 0; |
@@ -37,7 +41,7 @@ QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { | |||
37 | */ | 41 | */ |
38 | QDataStream &operator>>( QDataStream& s, PixmapInfo& inf ) { | 42 | QDataStream &operator>>( QDataStream& s, PixmapInfo& inf ) { |
39 | s >> inf.file >> inf.width >> inf.height; | 43 | s >> inf.file >> inf.width >> inf.height; |
40 | qWarning( "Recieved %s %d %d", inf.file.latin1(), inf.width, inf.height ); | 44 | owarn << "Recieved " << inf.file.latin1() << " " << inf.width << " " << inf.height << "" << oendl; |
41 | return s; | 45 | return s; |
42 | } | 46 | } |
43 | QDataStream &operator<<( QDataStream& s, const ImageInfo& i) { | 47 | QDataStream &operator<<( QDataStream& s, const ImageInfo& i) { |
@@ -82,7 +86,7 @@ SlaveReciever::~SlaveReciever() { | |||
82 | } | 86 | } |
83 | 87 | ||
84 | void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar) { | 88 | void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar) { |
85 | qWarning( "String is %s", string.data() ); | 89 | owarn << "String is " << string.data() << "" << oendl; |
86 | QDataStream stream(ar, IO_ReadOnly ); | 90 | QDataStream stream(ar, IO_ReadOnly ); |
87 | QStringList lst; | 91 | QStringList lst; |
88 | static ImageInfo inf; | 92 | static ImageInfo inf; |
@@ -94,7 +98,7 @@ void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar) | |||
94 | }else if ( string == "thumbInfos(QStringList)" ) { | 98 | }else if ( string == "thumbInfos(QStringList)" ) { |
95 | stream >> lst; | 99 | stream >> lst; |
96 | for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { | 100 | for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { |
97 | qWarning( "Adding thumbinfo for file "+ *it ); | 101 | owarn << "Adding thumbinfo for file "+ *it << oendl; |
98 | inf.file = (*it); | 102 | inf.file = (*it); |
99 | m_inList.append(inf); | 103 | m_inList.append(inf); |
100 | } | 104 | } |
@@ -105,7 +109,7 @@ void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar) | |||
105 | }else if ( string == "fullInfos(QStringList)" ) { | 109 | }else if ( string == "fullInfos(QStringList)" ) { |
106 | stream >> lst; | 110 | stream >> lst; |
107 | for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { | 111 | for(QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) { |
108 | qWarning( "Adding fullInfo for"+ *it ); | 112 | owarn << "Adding fullInfo for"+ *it << oendl; |
109 | inf.file = (*it); | 113 | inf.file = (*it); |
110 | inf.kind = true; | 114 | inf.kind = true; |
111 | m_inList.append(inf); | 115 | m_inList.append(inf); |
@@ -117,7 +121,7 @@ void SlaveReciever::recieveAnswer( const QCString& string, const QByteArray& ar) | |||
117 | PixmapList list; | 121 | PixmapList list; |
118 | stream >> list; | 122 | stream >> list; |
119 | for(PixmapList::Iterator it = list.begin(); it != list.end(); ++it ) { | 123 | for(PixmapList::Iterator it = list.begin(); it != list.end(); ++it ) { |
120 | qWarning( "Got %d %d " + (*it).file, (*it).width , (*it).height ); | 124 | owarn << "Got " << (*it).width << " " << (*it).height << " " + (*it).file << oendl; |
121 | m_inPix.append(*it); | 125 | m_inPix.append(*it); |
122 | } | 126 | } |
123 | }else if ( string == "refUp()" ) { | 127 | }else if ( string == "refUp()" ) { |
@@ -181,7 +185,7 @@ void SlaveReciever::slotThumbNail() { | |||
181 | SlaveInterface* iface = it.data(); | 185 | SlaveInterface* iface = it.data(); |
182 | if( iface->supports(inf.file ) ) { | 186 | if( iface->supports(inf.file ) ) { |
183 | /* pixmap */ | 187 | /* pixmap */ |
184 | qWarning( "Asking for thumbNail in size %d %d for "+inf.file, inf.width, inf.height ); | 188 | owarn << "Asking for thumbNail in size " << inf.width << " " << inf.height << " for "+inf.file << oendl; |
185 | inf.pixmap = iface->pixmap(inf.file, 64, 64); | 189 | inf.pixmap = iface->pixmap(inf.file, 64, 64); |
186 | m_outPix.append( inf ); | 190 | m_outPix.append( inf ); |
187 | break; | 191 | break; |
@@ -200,7 +204,7 @@ void SlaveReciever::slotSend() { | |||
200 | 204 | ||
201 | m_out->stop(); | 205 | m_out->stop(); |
202 | 206 | ||
203 | qWarning( "Sending %d %d", outPix().count(), outInf().count() ); | 207 | owarn << "Sending " << outPix().count() << " " << outInf().count() << "" << oendl; |
204 | /* queue it and send */ | 208 | /* queue it and send */ |
205 | /* if this ever gets a service introduce request queues | 209 | /* if this ever gets a service introduce request queues |
206 | * so we can differinatate between different clients | 210 | * so we can differinatate between different clients |
@@ -209,14 +213,14 @@ void SlaveReciever::slotSend() { | |||
209 | QCopEnvelope answer("QPE/opie-eye", "pixmapsHandled(PixmapList)" ); | 213 | QCopEnvelope answer("QPE/opie-eye", "pixmapsHandled(PixmapList)" ); |
210 | answer << outPix(); | 214 | answer << outPix(); |
211 | for ( PixmapList::Iterator it = m_outPix.begin();it!=m_outPix.end();++it ) { | 215 | for ( PixmapList::Iterator it = m_outPix.begin();it!=m_outPix.end();++it ) { |
212 | qWarning( "Sending out %s %d %d", (*it).file.latin1(), (*it).width, (*it).height ); | 216 | owarn << "Sending out " << (*it).file.latin1() << " " << (*it).width << " " << (*it).height << "" << oendl; |
213 | } | 217 | } |
214 | } | 218 | } |
215 | if ( !m_outList.isEmpty() ) { | 219 | if ( !m_outList.isEmpty() ) { |
216 | QCopEnvelope answer("QPE/opie-eye", "pixmapsHandled(StringList)" ); | 220 | QCopEnvelope answer("QPE/opie-eye", "pixmapsHandled(StringList)" ); |
217 | answer << outInf(); | 221 | answer << outInf(); |
218 | for ( StringList::Iterator it = m_outList.begin();it!=m_outList.end();++it ) { | 222 | for ( StringList::Iterator it = m_outList.begin();it!=m_outList.end();++it ) { |
219 | qWarning( "Sending out2 " + (*it).file ); | 223 | owarn << "Sending out2 " + (*it).file << oendl; |
220 | } | 224 | } |
221 | } | 225 | } |
222 | 226 | ||
diff --git a/noncore/graphics/opie-eye/slave/thumbnailtool.cpp b/noncore/graphics/opie-eye/slave/thumbnailtool.cpp index a202457..d2e169c 100644 --- a/noncore/graphics/opie-eye/slave/thumbnailtool.cpp +++ b/noncore/graphics/opie-eye/slave/thumbnailtool.cpp | |||
@@ -1,5 +1,10 @@ | |||
1 | #include "thumbnailtool.h" | 1 | #include "thumbnailtool.h" |
2 | 2 | ||
3 | /* OPIE */ | ||
4 | #include <opie2/odebug.h> | ||
5 | using namespace Opie::Core; | ||
6 | |||
7 | /* QT */ | ||
3 | #include <qfileinfo.h> | 8 | #include <qfileinfo.h> |
4 | #include <qdir.h> | 9 | #include <qdir.h> |
5 | #include <qimage.h> | 10 | #include <qimage.h> |
@@ -26,13 +31,13 @@ static bool makeThumbDir( const QFileInfo& inf, bool make = false) { | |||
26 | */ | 31 | */ |
27 | QPixmap ThumbNailTool::getThumb( const QString& path, int width, int height ) { | 32 | QPixmap ThumbNailTool::getThumb( const QString& path, int width, int height ) { |
28 | QFileInfo inf( path ); | 33 | QFileInfo inf( path ); |
29 | qWarning( "Get Thumb" ); | 34 | owarn << "Get Thumb" << oendl; |
30 | if ( !makeThumbDir( inf ) ) { | 35 | if ( !makeThumbDir( inf ) ) { |
31 | QPixmap pix; | 36 | QPixmap pix; |
32 | return pix; | 37 | return pix; |
33 | } | 38 | } |
34 | QString str = QString( "/.opie-eye/%1x%2-%3" ).arg( width ).arg( height ).arg( inf.fileName() ); | 39 | QString str = QString( "/.opie-eye/%1x%2-%3" ).arg( width ).arg( height ).arg( inf.fileName() ); |
35 | qWarning( inf.dirPath()+str ); | 40 | owarn << inf.dirPath()+str << oendl; |
36 | return QPixmap( inf.dirPath()+str,"PNG" ); | 41 | return QPixmap( inf.dirPath()+str,"PNG" ); |
37 | 42 | ||
38 | } | 43 | } |
@@ -41,7 +46,7 @@ void ThumbNailTool::putThumb( const QString& path, const QPixmap& pix, int width | |||
41 | QFileInfo inf( path ); | 46 | QFileInfo inf( path ); |
42 | makeThumbDir( inf, true ); | 47 | makeThumbDir( inf, true ); |
43 | QString str = QString( "/.opie-eye/%1x%2-%3" ).arg( width ).arg( height ).arg( inf.fileName() ); | 48 | QString str = QString( "/.opie-eye/%1x%2-%3" ).arg( width ).arg( height ).arg( inf.fileName() ); |
44 | qWarning( inf.dirPath()+str ); | 49 | owarn << inf.dirPath()+str << oendl; |
45 | pix.save( inf.dirPath()+str, "PNG" ); | 50 | pix.save( inf.dirPath()+str, "PNG" ); |
46 | } | 51 | } |
47 | 52 | ||