diff options
author | Manuel Schneider | 2014-05-07 14:04:29 +0200 |
---|---|---|
committer | Manuel Schneider | 2014-05-07 14:04:29 +0200 |
commit | 0cb6959642087962b54dbdbbcac2b465ad7a4d82 (patch) | |
tree | bb3787bfaa91dc287f49d714a4cf649ea77b9c07 /src/client/toolbar/toolbar.h | |
parent | Changes the ConnectionWidows gui to a relative layout. Added a stacked widget to (diff) | |
download | pvs2-0cb6959642087962b54dbdbbcac2b465ad7a4d82.tar.gz pvs2-0cb6959642087962b54dbdbbcac2b465ad7a4d82.tar.xz pvs2-0cb6959642087962b54dbdbbcac2b465ad7a4d82.zip |
Reduced the class toolbar regarding the KISS paradigm.
Diffstat (limited to 'src/client/toolbar/toolbar.h')
-rw-r--r-- | src/client/toolbar/toolbar.h | 43 |
1 files changed, 9 insertions, 34 deletions
diff --git a/src/client/toolbar/toolbar.h b/src/client/toolbar/toolbar.h index aabb596..2bc4671 100644 --- a/src/client/toolbar/toolbar.h +++ b/src/client/toolbar/toolbar.h @@ -29,56 +29,31 @@ class Toolbar : public QWidget { Q_OBJECT +public: + explicit Toolbar(QWidget *parent = 0); + virtual ~Toolbar(); + private: Ui::Toolbar *_ui; - - int _location; - int _hideTimer; - int _hideDelay; QMenu *_menu; QAction *_acnDisconnect; QAction *_acnQuit; - ServerConnection *_connection; - ConnectWindow *_connectWindow; + QTimer _hideTimer; + ServerConnection *_connection; VncWindow *_vnc; - void setLocation(); - bool hideBar(); - void setBarVisible(bool shown); - void setupMenu(); - void leaveEvent(QEvent* e); void enterEvent(QEvent* e); - void timerEvent(QTimerEvent* event); - -public: - explicit Toolbar(QWidget *parent = 0); - virtual ~Toolbar(); - - int const static POSITION_TOP_LEFT = 0; - int const static POSITION_TOP_CENTER = 1; - int const static POSITION_TOP_RIGHT = 2; - int const static POSITION_BOTTOM_LEFT = 3; - int const static POSITION_BOTTOM_CENTER = 4; - int const static POSITION_BOTTOM_RIGHT = 5; - -protected: - /* - void enterEvent(QEvent *e); - void leaveEvent(QEvent *e); - void mousePressEvent(QMouseEvent *event); - void mouseReleaseEvent(QMouseEvent *event); - void mouseMoveEvent(QMouseEvent *event); - */ private slots: - void onVncServerIsRunning(int port, QString& ropass, QString& rwpass); + void onVncServerIsRunning(int port, QString& ropass, QString& rwpass); void onDisconnected(); void onConnected(ServerConnection* connection); void onDoDisconnect(); - void onQuit(); + void showBar(); + void hideBar(); }; #endif /* PVSCLIENTGUI_H_ */ |