diff options
Diffstat (limited to 'src/client/vnc/vncthread.h')
-rw-r--r-- | src/client/vnc/vncthread.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/client/vnc/vncthread.h b/src/client/vnc/vncthread.h index afdb92a..38f5e17 100644 --- a/src/client/vnc/vncthread.h +++ b/src/client/vnc/vncthread.h @@ -17,6 +17,7 @@ #include <QtCore> #include <QImage> #include <QThread> +#include <QSharedPointer> class QPainter; @@ -45,23 +46,20 @@ private: QString _passwd; int _quality; - QPainter *_painter; QImage _img; - QImage _imgScaled; + QSharedPointer<QImage> _imgScaled; QSize _clientSize; QSize _localSize; - QMutex _mutex; - - QSize _newLocalSize; - volatile bool _hasNewLocalSize; int _srcStepX, _srcStepY, _dstStepX, _dstStepY; volatile bool _connected; volatile bool _run; + bool _started; void calcScaling(); - void processImageUpdate(const int x, const int y, const int w, const int h); + void processImageUpdate(int x, int y, int w, int h); + void emitStarted(); // Callbacks for rfb lib. make them class members so the callbacks can access private members of the class. @@ -73,12 +71,11 @@ public: VncThread(QString host, int port, QString passwd, int quality); ~VncThread(); - const QImage& getImage() const { if (_srcStepX > 1 || _srcStepY > 1) return _imgScaled; return _img; } const QSize& getSourceSize() const { return _clientSize; } const QString getDesktopName() const; bool isConnected() { return _connected; } void stop() { _run = false; } - void setTargetSize(const QSize size); + void setTargetBuffer(QSharedPointer<QImage> &buffer); void run(); int const static HIGH = 0; |