summaryrefslogtreecommitdiffstats
path: root/src/client/vnc/vncthread.h
diff options
context:
space:
mode:
authorSimon Rettberg2014-04-23 20:30:48 +0200
committerSimon Rettberg2014-04-23 20:30:48 +0200
commit4a30aa26b608238eea90e7ecb97adc3b34d68f86 (patch)
treebf3242347a1d2d688021b1a0467306a9b1fea8f5 /src/client/vnc/vncthread.h
parentMerge branch 'master' of git.openslx.org:pvs2 (diff)
downloadpvs2-4a30aa26b608238eea90e7ecb97adc3b34d68f86.tar.gz
pvs2-4a30aa26b608238eea90e7ecb97adc3b34d68f86.tar.xz
pvs2-4a30aa26b608238eea90e7ecb97adc3b34d68f86.zip
Doxygen comments, removed incomplete unused event handling for VNC RW access, introduced terminateVnc method in VncWindow
Diffstat (limited to 'src/client/vnc/vncthread.h')
-rw-r--r--src/client/vnc/vncthread.h47
1 files changed, 1 insertions, 46 deletions
diff --git a/src/client/vnc/vncthread.h b/src/client/vnc/vncthread.h
index 17e991d..2e94c2d 100644
--- a/src/client/vnc/vncthread.h
+++ b/src/client/vnc/vncthread.h
@@ -26,48 +26,6 @@ extern "C"
}
/**
- * Event classes. Not my code. Might be useful to implement remote assistance via VNC later.
- * Code might come from the KDE VNC client.
- */
-class SomeEvent
-{
-public:
- virtual ~SomeEvent(){}
- virtual void fire(rfbClient*) = 0;
-};
-
-class KeyEvent : public SomeEvent
-{
-public:
- KeyEvent(int key, int pressed) :
- _key(key), _pressed(pressed)
- {
- }
-
- void fire(rfbClient*);
-
-private:
- int _key;
- int _pressed;
-};
-
-class PointerEvent : public SomeEvent
-{
-public:
- PointerEvent(int x, int y, int buttonMask) :
- _x(x), _y(y), _buttonMask(buttonMask)
- {
- }
-
- void fire(rfbClient*);
-
-private:
- int _x;
- int _y;
- int _buttonMask;
-};
-
-/**
* VncThread - communicate with VNC server, scale image if necessary.
*
* As this class is derived from QThread and overrides the run() method,
@@ -86,7 +44,6 @@ private:
int _port;
QString _passwd;
int _quality;
- QQueue<SomeEvent*> _eventQueue;
QPainter *_painter;
QImage _img;
@@ -106,21 +63,19 @@ private:
void calcScaling();
// Callbacks for rfb lib. make them class members so the callbacks can access private members of the class.
+
static void updateImage(rfbClient *client, int x, int y, int w, int h);
static char* passwdHandler(rfbClient *client);
static rfbBool frameBufferHandler(rfbClient *client);
public:
VncThread(QString host, int port, QString passwd, int quality);
- // Do NOT delete this class directly. use VncThread::destroy() instead!
~VncThread();
const QImage& getImage() const { if (_srcStepX > 1 || _srcStepY > 1) return _imgScaled; return _img; }
const QSize& getSourceSize() const { return _clientSize; }
const QString getDesktopName() const;
void processImageUpdate(const int x, const int y, const int w, const int h);
- void mouseEvent(int x, int y, int buttonMask);
- void keyEvent(int key, bool pressed);
const bool isConnected() const { return _connected; }
void stop() { _run = false; }
void setTargetSize(const QSize size);