Diffstat (limited to 'noncore/graphics/opie-eye/slave') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/slave/slavereciever.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/noncore/graphics/opie-eye/slave/slavereciever.cpp b/noncore/graphics/opie-eye/slave/slavereciever.cpp index 951f3df..c8e33d4 100644 --- a/noncore/graphics/opie-eye/slave/slavereciever.cpp +++ b/noncore/graphics/opie-eye/slave/slavereciever.cpp | |||
@@ -10,50 +10,55 @@ | |||
10 | 10 | ||
11 | #include <qtimer.h> | 11 | #include <qtimer.h> |
12 | 12 | ||
13 | static SlaveObjects* _slaveObj = 0; | 13 | static SlaveObjects* _slaveObj = 0; |
14 | 14 | ||
15 | QDataStream & operator << (QDataStream & str, bool b) | 15 | QDataStream & operator << (QDataStream & str, bool b) |
16 | { | 16 | { |
17 | str << Q_INT8(b); | 17 | str << Q_INT8(b); |
18 | return str; | 18 | return str; |
19 | } | 19 | } |
20 | 20 | ||
21 | QDataStream & operator >> (QDataStream & str, bool & b) | 21 | QDataStream & operator >> (QDataStream & str, bool & b) |
22 | { | 22 | { |
23 | Q_INT8 l; | 23 | Q_INT8 l; |
24 | str >> l; | 24 | str >> l; |
25 | b = bool(l); | 25 | b = bool(l); |
26 | return str; | 26 | return str; |
27 | } | 27 | } |
28 | 28 | ||
29 | 29 | ||
30 | 30 | ||
31 | QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { | 31 | QDataStream &operator<<( QDataStream& s, const PixmapInfo& inf) { |
32 | return s << inf.file << inf.pixmap << inf.width << inf.height; | 32 | return s << inf.file << inf.pixmap << inf.width << inf.height; |
33 | } | 33 | } |
34 | |||
35 | /* | ||
36 | * GUI sends no QPIxmap!!! | ||
37 | */ | ||
34 | QDataStream &operator>>( QDataStream& s, PixmapInfo& inf ) { | 38 | QDataStream &operator>>( QDataStream& s, PixmapInfo& inf ) { |
35 | s >> inf.file >> inf.pixmap >> inf.width >> inf.height; | 39 | s >> inf.file >> inf.width >> inf.height; |
40 | qWarning( "Recieved %s %d %d", inf.file.latin1(), inf.width, inf.height ); | ||
36 | return s; | 41 | return s; |
37 | } | 42 | } |
38 | QDataStream &operator<<( QDataStream& s, const ImageInfo& i) { | 43 | QDataStream &operator<<( QDataStream& s, const ImageInfo& i) { |
39 | return s << i.kind << i.file << i.info; | 44 | return s << i.kind << i.file << i.info; |
40 | } | 45 | } |
41 | QDataStream &operator>>( QDataStream& s, ImageInfo& i ) { | 46 | QDataStream &operator>>( QDataStream& s, ImageInfo& i ) { |
42 | s >> i.kind >> i.file >> i.info; | 47 | s >> i.kind >> i.file >> i.info; |
43 | return s; | 48 | return s; |
44 | } | 49 | } |
45 | 50 | ||
46 | 51 | ||
47 | 52 | ||
48 | SlaveObjects* slaveObjects() { | 53 | SlaveObjects* slaveObjects() { |
49 | if ( !_slaveObj ) | 54 | if ( !_slaveObj ) |
50 | _slaveObj = new SlaveObjects; | 55 | _slaveObj = new SlaveObjects; |
51 | return _slaveObj; | 56 | return _slaveObj; |
52 | } | 57 | } |
53 | 58 | ||
54 | SlaveReciever::SlaveReciever( QObject* par) | 59 | SlaveReciever::SlaveReciever( QObject* par) |
55 | : QObject( par ) | 60 | : QObject( par ) |
56 | { | 61 | { |
57 | m_inf = new QTimer(this); | 62 | m_inf = new QTimer(this); |
58 | connect(m_inf,SIGNAL(timeout()), | 63 | connect(m_inf,SIGNAL(timeout()), |
59 | this, SLOT(slotImageInfo())); | 64 | this, SLOT(slotImageInfo())); |