f3451be6ab3bc65b40299bb6c8c92997e5f5327b
[presencevnc] / src / mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3
4 #include <QtGui>
5
6 #include "remoteview.h"
7 #include "vncview.h"
8
9 class MainWindow : public QMainWindow {
10         Q_OBJECT
11 public:
12         MainWindow(QString url, int quality);
13 public slots:
14         void about();
15         void connectDialog();
16         void disconnectFromHost();
17         void forceResize();
18         void forceResizeDelayed();
19         void sendTab() { vnc_view->sendKey(Qt::Key_Tab); }
20         void sendEsc() { vnc_view->sendKey(Qt::Key_Escape); }
21         void sendPgUp() { vnc_view->sendKey(Qt::Key_PageUp); }
22         void sendPgDn() { vnc_view->sendKey(Qt::Key_PageDown); }
23         void showModifierMenu();
24         void showPreferences();
25         void statusChanged(RemoteView::RemoteStatus status);
26         void toggleFullscreen();
27 protected:
28         //virtual bool event(QEvent *event);
29         void closeEvent(QCloseEvent*);
30 private:
31         void grabZoomKeys(bool grab);
32         void reloadSettings();
33         VncView *vnc_view;
34         QScrollArea *scroll_area;
35         //QWidget *menu;
36         QToolBar *toolbar;      
37         //QPoint swipe_start;
38         QAction *scaling;
39         QAction *disconnect_action;
40 };
41 #endif