add toolbar
[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 connectDialog();
15         void disconnectFromHost();
16         void about();
17         void statusChanged(RemoteView::RemoteStatus status);
18 protected:
19         //virtual bool event(QEvent *event);
20         void closeEvent(QCloseEvent*);
21 private:
22         void grabZoomKeys(bool grab);
23         VncView *vnc_view;
24         QScrollArea *scroll_area;
25         //QWidget *menu;
26         QToolBar *toolbar;      
27         QPoint swipe_start;
28         QAction *scaling;
29         QAction *disconnect_action;
30
31 private slots:
32         void sendEsc() { vnc_view->sendKey(Qt::Key_Escape); }
33         void sendTab() { vnc_view->sendKey(Qt::Key_Tab); }
34 };
35 #endif