-
Notifications
You must be signed in to change notification settings - Fork 0
/
screenpacket.h
44 lines (41 loc) · 980 Bytes
/
screenpacket.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef SCREENPACKET_H
#define SCREENPACKET_H
#include "packet.h"
#include "rect.h"
#include <QByteArray>
#include <QPixmap>
#include <QImage>
class QGraphicsPixmapItem;
namespace DG{
class ScreenPacket : public Packet{
private:
quint32 _row;
quint32 _col;
Rect _rect;
QByteArray _buffer;
private:
mutable bool _pixmapGenerated;
mutable QPixmap _pixmap;
public:
ScreenPacket();
ScreenPacket(int state);
void setRect(const Rect& rect);
void setIndex(quint32 row, quint32 col);
void setImage(const QImage& image);
public:
quint32 row() const;
quint32 col() const;
const Rect& rect() const;
QPixmap pixmap() const;
public:
QDataStream& serialize(QDataStream& stream) const;
QDataStream& unserialize(QDataStream& stream);
public:
virtual quint64 size() const;
public:
QGraphicsPixmapItem* graphicsPixmapItem() const;
public:
bool dumpPixmap() const;
};
}
#endif // SCREENPACKET_H