summaryrefslogtreecommitdiffstats
path: root/src/gui/clientVNCViewer.h
diff options
context:
space:
mode:
authorSebastian2010-05-12 19:42:27 +0200
committerSebastian2010-05-12 19:42:27 +0200
commitce3329047d378a14006ce74ec273ac59e3375303 (patch)
tree782430f270b4c7aca1b35d5b7813518e3797c555 /src/gui/clientVNCViewer.h
downloadpvs-ce3329047d378a14006ce74ec273ac59e3375303.tar.gz
pvs-ce3329047d378a14006ce74ec273ac59e3375303.tar.xz
pvs-ce3329047d378a14006ce74ec273ac59e3375303.zip
initial import of latest svn version
Diffstat (limited to 'src/gui/clientVNCViewer.h')
-rw-r--r--src/gui/clientVNCViewer.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/gui/clientVNCViewer.h b/src/gui/clientVNCViewer.h
new file mode 100644
index 0000000..6ff9c33
--- /dev/null
+++ b/src/gui/clientVNCViewer.h
@@ -0,0 +1,67 @@
+/*
+ # Copyright (c) 2009, 2010 - OpenSLX Project, Computer Center University of
+ # Freiburg
+ #
+ # This program is free software distributed under the GPL version 2.
+ # See http://openslx.org/COPYING
+ #
+ # If you have any feedback please consult http://openslx.org/feedback and
+ # send your suggestions, praise, or complaints to feedback@openslx.org
+ #
+ # General information about OpenSLX can be found at http://openslx.org/
+ */
+
+#ifndef CLIENTVNCVIEWER_H_
+#define CLIENTVNCVIEWER_H_
+
+#include <QtGui>
+#include <QMouseEvent>
+#include "pvsinterface.h"
+#include "../util/vncClientThread.h"
+
+// Definition of key modifier mask constants
+#define KMOD_Alt_R 0x01
+#define KMOD_Alt_L 0x02
+#define KMOD_Meta_L 0x04
+#define KMOD_Control_L 0x08
+#define KMOD_Shift_L 0x10
+
+class ClientVNCViewer: public QDialog
+{
+Q_OBJECT
+
+public:
+ ClientVNCViewer(QWidget *parent = 0);
+ virtual ~ClientVNCViewer();
+
+public Q_SLOTS:
+ void open(QString host, int port, QString passwd, bool fullscreen = false,
+ bool smoothTransformation = false, int quality = 0);
+ void close();
+ void updateImage(int x, int y, int w, int h);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+ //bool event(QEvent *event);
+ //bool eventFilter(QObject *obj, QEvent *event);
+
+private:
+ VNCClientThread *_thread;
+ //rfbClient *_rfbclient;
+ QImage _img;
+ bool _viewOnly;
+ int _buttonMask;
+ QMap<unsigned int, bool> _modkeys;
+ bool eventFilter(QObject *obj, QEvent *event);
+ void keyEventHandler(QKeyEvent *e);
+ void unpressModifiers();
+ void wheelEventHandler(QWheelEvent *event);
+ void mouseEventHandler(QMouseEvent *event);
+
+
+ Qt::TransformationMode _mode;
+
+ OrgOpenslxPvsInterface *_ifaceDBus;
+};
+
+#endif /* CLIENTVNCVIEWER_H_ */