Diffstat (limited to 'noncore/graphics/opie-eye/lib/slavemaster.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/lib/slavemaster.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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,11 +1,15 @@ | |||
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 | ||
9 | QDataStream & operator << (QDataStream & str, bool b) | 13 | QDataStream & operator << (QDataStream & str, bool b) |
10 | { | 14 | { |
11 | str << Q_INT8(b); | 15 | str << Q_INT8(b); |
@@ -20,13 +24,13 @@ QDataStream & operator >> (QDataStream & str, bool & b) | |||
20 | } | 24 | } |
21 | 25 | ||
22 | /* | 26 | /* |
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 ) { |
30 | s >> inf.file >> inf.pixmap >> inf.width >> inf.height; | 34 | s >> inf.file >> inf.pixmap >> inf.width >> inf.height; |
31 | return s; | 35 | return s; |
32 | } | 36 | } |
@@ -75,16 +79,16 @@ void SlaveMaster::imageInfo( const QString& str ) { | |||
75 | m_started = true; | 79 | m_started = true; |
76 | } | 80 | } |
77 | } | 81 | } |
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(); |
88 | m_inThumbNail.append( item ); | 92 | m_inThumbNail.append( item ); |
89 | 93 | ||
90 | if ( !m_started ) { | 94 | if ( !m_started ) { |
@@ -102,13 +106,13 @@ void SlaveMaster::recieve( const QCString& str, const QByteArray& at) { | |||
102 | QDataStream stream( at, IO_ReadOnly ); | 106 | QDataStream stream( at, IO_ReadOnly ); |
103 | if ( str == "pixmapsHandled(PixmapList)" ) | 107 | if ( str == "pixmapsHandled(PixmapList)" ) |
104 | stream >> pixinfos; | 108 | stream >> pixinfos; |
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 ) { |
112 | emit sig_start(); | 116 | emit sig_start(); |
113 | for ( ImageInfos::Iterator _it = infos.begin(); _it != infos.end(); ++_it ) { | 117 | for ( ImageInfos::Iterator _it = infos.begin(); _it != infos.end(); ++_it ) { |
114 | if ( (*_it).kind ) | 118 | if ( (*_it).kind ) |