X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmainwindow.h;h=f487bf9d589961ec452d72a2ab14fd1ce1ad35ec;hb=8a12c6cc92f27a423f0d9b740e11a7cc8cf8bc92;hp=6111a7278c03811837d439dba8639129839737f1;hpb=57aa217e8eff5aa6a15cfd4aafe514ec62d57acd;p=presencevnc diff --git a/src/mainwindow.h b/src/mainwindow.h index 6111a72..f487bf9 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -1,35 +1,71 @@ +/* + Presence VNC + Copyright (C) 2010 Christian Pulvermacher + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ #ifndef MAINWINDOW_H #define MAINWINDOW_H +#include "remoteview.h" + #include -#include "remoteview.h" -#include "vncview.h" +class KeyMenu; +class ScrollArea; +class VncView; -class MainWindow : public QMainWindow { - Q_OBJECT +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 connectDialog(); - void disconnectFromHost(); - void about(); - void statusChanged(RemoteView::RemoteStatus status); + void about(); + void showConnectDialog(); + void connectToHost(QString url, int quality, int listen_port, bool view_only); + void disconnectFromHost(); + 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: - //virtual bool event(QEvent *event); - void closeEvent(QCloseEvent*); + void closeEvent(QCloseEvent*); + void resizeEvent(QResizeEvent *event); private: - void grabZoomKeys(bool grab); - VncView *vnc_view; - QScrollArea *scroll_area; - //QWidget *menu; - QToolBar *toolbar; - QPoint swipe_start; - QAction *scaling; - QAction *disconnect_action; - -private slots: - void sendEsc() { vnc_view->sendKey(Qt::Key_Escape); } - void sendTab() { vnc_view->sendKey(Qt::Key_Tab); } + void grabZoomKeys(bool grab); + void reloadSettings(); + + VncView *vnc_view; + ScrollArea *scroll_area; + QToolBar *toolbar; + QSlider *zoom_slider; + QAction *scaling, *show_toolbar, *disconnect_action; + QActionGroup *input_toolbuttons; + KeyMenu *key_menu; + bool zoom_to_cursor; }; #endif