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/opie-eye/slave/slavereciever.cpp | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
Diffstat (limited to 'noncore/graphics/opie-eye/slave/slavereciever.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/slave/slavereciever.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
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 | ||