X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmainwindow.h;h=441062b6fce74bfb5dd44b6b3e568b6a5ebb5e16;hb=e77478e32accf689ced308d6c23954f0b528c500;hp=4c50e78e0fd7212b3673ada09b45e5b147b68915;hpb=64c24021e25a85192a4b74d2f2f4a4947c4a8aa9;p=presencevnc diff --git a/src/mainwindow.h b/src/mainwindow.h index 4c50e78..441062b 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -20,54 +20,51 @@ #define MAINWINDOW_H #include "remoteview.h" -#include "vncview.h" #include -//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 VncView; class MainWindow : public QMainWindow { Q_OBJECT public: - MainWindow(QString url, int quality); + MainWindow(QString url, int quality, int listen_port, bool view_only); public slots: void about(); void showConnectDialog(); - void connectToHost(QString url); + void connectToHost(QString url, int quality, int listen_port, bool view_only); void disconnectFromHost(); - void forceResize(); - void forceResizeDelayed(); - 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 updateScreenSpace(); + void updateScreenSpaceDelayed(); + void sendTab(); + void sendEsc(); + void sendPgUp(); + void sendPgDn(); + void sendReturn(); + void setZoomLevel(int level); void showInputPanel(); void showKeyMenu(); void showPreferences(); void statusChanged(RemoteView::RemoteStatus status); void toggleFullscreen(); + void zoomSliderReleased(); + void displayStateChanged(QString state); 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; + QActionGroup *input_toolbuttons; + KeyMenu *key_menu; + bool zoom_to_cursor; }; #endif