update about dialog
[presencevnc] / src / vncview.h
index 6275bf5..82de593 100644 (file)
@@ -27,7 +27,7 @@
 #include "remoteview.h"
 #include "vncclientthread.h"
 
-class KConfigGroup{};
+class KConfigGroup {};
 
 #include <QClipboard>
 
@@ -40,34 +40,38 @@ class VncView: public RemoteView
     Q_OBJECT
 
 public:
-    explicit VncView(QWidget *parent = 0, const KUrl &url = KUrl(), RemoteView::Quality quality = RemoteView::Medium);
+    explicit VncView(QWidget *parent = 0, const KUrl &url = KUrl(), RemoteView::Quality quality = RemoteView::Medium, int listen_port = 0);
     ~VncView();
 
-    QSize framebufferSize();
+    QSize framebufferSize() const;
     QSize sizeHint() const;
     QSize minimumSizeHint() const;
-    void startQuitting();
-    bool isQuitting();
+    bool isQuitting() const;
+    qreal zoomFactor() const { return m_horizontalFactor;} //assumes fixed aspect ratio
     void reloadSettings();
     bool start();
     bool supportsScaling() const;
     bool supportsLocalCursor() const;
-    
+
     void setQuality(int q);
     void setViewOnly(bool viewOnly);
     void showDotCursor(DotCursorState state);
-    void sendKey(Qt::Key key);
-    
+    void useFastTransformations(bool enabled);
+    QPoint cursorPosition() const { return QPoint(cursor_x, cursor_y); }
+    void setDisplayOff(bool off) { display_off = off; }
+
 public slots:
-    void enableScaling(bool scale);
-    void scaleResize(int w, int h);
-    void forceFullRepaint();
+    void setZoomLevel(int level = -1); //'level' doesn't correspond to actual magnification, though mapping is done here
+    void sendKey(Qt::Key key);
+    void sendKeySequence(QKeySequence keys);
+    void startQuitting();
 
 protected:
     void paintEvent(QPaintEvent *event);
     bool event(QEvent *event);
     void resizeEvent(QResizeEvent *event);
     bool eventFilter(QObject *obj, QEvent *event);
+    void inputMethodEvent(QInputMethodEvent *event);
 
 private:
     VncClientThread vncThread;
@@ -77,7 +81,6 @@ private:
     QMap<unsigned int, bool> m_mods;
     int m_x, m_y, m_w, m_h;
     int cursor_x, cursor_y;
-    bool m_repaint;
     bool m_quitFlag;
     bool m_firstPasswordTry;
     bool m_dontSendClipboard;
@@ -85,15 +88,17 @@ private:
     qreal m_verticalFactor;
     QImage m_frame;
     bool m_forceLocalCursor;
-    bool force_full_repaint;
-    RemoteView::Quality quality;
     int left_zoom, right_zoom;
     bool disable_tapping;
+    RemoteView::Quality quality;
+    int listen_port;
+    Qt::TransformationMode transformation_mode;
+    bool display_off;
 
     void keyEventHandler(QKeyEvent *e);
     void unpressModifiers();
     void wheelEventHandler(QWheelEvent *event);
-    
+
 private slots:
     void mouseEventHandler(QMouseEvent *event = 0);