X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmainwindow.h;h=c53e2f3293a1966f74c6d4aa19fef0868b4148c3;hb=174edef1c739c11cf92369447d435111dcbf7761;hp=2551e5827308ae329a2a6b77947db9860903be38;hpb=dc86492b6f13c94292c631520dcb05522feba2ae;p=presencevnc diff --git a/src/mainwindow.h b/src/mainwindow.h index 2551e58..c53e2f3 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -19,11 +19,27 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include - #include "remoteview.h" #include "vncview.h" +#include + +class KeyMenu; + +//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 MainWindow : public QMainWindow { Q_OBJECT public: @@ -31,7 +47,9 @@ public: public slots: void about(); void showConnectDialog(); + void connectToHost(QString url, int quality, int listen_port); void disconnectFromHost(); + void forceRepaint(); void forceResize(); void forceResizeDelayed(); void sendTab() { vnc_view->sendKey(Qt::Key_Tab); } @@ -39,19 +57,23 @@ public slots: 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(); protected: void closeEvent(QCloseEvent*); + void resizeEvent(QResizeEvent *event); private: void grabZoomKeys(bool grab); void reloadSettings(); VncView *vnc_view; - QScrollArea *scroll_area; - QToolBar *toolbar; + ScrollArea *scroll_area; + QToolBar *toolbar; + QSlider *zoom_slider; QAction *scaling, *show_toolbar, *disconnect_action; + KeyMenu *key_menu; }; #endif