doubleclicking slider sets 100% zoom
[presencevnc] / src / mainwindow.h
index 52656e8..f152f6a 100644 (file)
 
 #include <QtGui>
 
-//fix tearing during scrolling
-class ScrollArea : public QScrollArea {
-public:
-       ScrollArea(QWidget *parent) : QScrollArea(parent) { }
-protected:
-       virtual void scrollContentsBy(int dx, int dy)
-       {
-               QScrollArea::scrollContentsBy(dx, dy);
-               if(widget())
-                       widget()->update(); //update whole widget
-       }
-};
+class KeyMenu;
+class ScrollArea;
 
 class MainWindow : public QMainWindow {
        Q_OBJECT
@@ -44,28 +34,34 @@ public:
 public slots:
        void about();
        void showConnectDialog();
-       void connectToHost(QString url);
+       void connectToHost(QString url, int quality, int listen_port);
        void disconnectFromHost();
-       void forceResize();
-       void forceResizeDelayed();
+       void forceRepaint();
+       void updateScreenSpace();
+       void updateScreenSpaceDelayed();
        void sendTab() { vnc_view->sendKey(Qt::Key_Tab); }
        void sendEsc() { vnc_view->sendKey(Qt::Key_Escape); }
        void sendPgUp() { vnc_view->sendKey(Qt::Key_PageUp); }
        void sendPgDn() { vnc_view->sendKey(Qt::Key_PageDown); }
        void sendReturn() { vnc_view->sendKey(Qt::Key_Return); }
+       void setZoomLevel(int level);
        void showInputPanel();
-       void showModifierMenu();
+       void showKeyMenu();
        void showPreferences();
        void statusChanged(RemoteView::RemoteStatus status);
        void toggleFullscreen();
+       void zoomSliderReleased();
 protected:
        void closeEvent(QCloseEvent*);
+       void resizeEvent(QResizeEvent *event);
 private:
        void grabZoomKeys(bool grab);
        void reloadSettings();
        VncView *vnc_view;
        ScrollArea *scroll_area;
-       QToolBar *toolbar;      
+       QToolBar *toolbar;
+       QSlider *zoom_slider;
        QAction *scaling, *show_toolbar, *disconnect_action;
+       KeyMenu *key_menu;
 };
 #endif