summaryrefslogtreecommitdiffstats
path: root/src/client/toolbar/toolbar.cpp
diff options
context:
space:
mode:
authorManuel Schneider2014-05-07 14:15:21 +0200
committerManuel Schneider2014-05-07 14:15:21 +0200
commit867f6eb946365f47470080bbee503d295311bfd2 (patch)
tree220d5d621075b942581c0ffdb0017f84c0c28858 /src/client/toolbar/toolbar.cpp
parentReduced the class toolbar regarding the KISS paradigm. (diff)
downloadpvs2-867f6eb946365f47470080bbee503d295311bfd2.tar.gz
pvs2-867f6eb946365f47470080bbee503d295311bfd2.tar.xz
pvs2-867f6eb946365f47470080bbee503d295311bfd2.zip
Hide bar if the menu is left
Diffstat (limited to 'src/client/toolbar/toolbar.cpp')
-rw-r--r--src/client/toolbar/toolbar.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index 8de9e31..b0ded44 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -32,6 +32,9 @@ Toolbar::Toolbar(QWidget *parent) :
/* Create the connect window */
_connectWindow = new ConnectWindow(NULL);
+ // Connect the signals
+ connect(_connectWindow, SIGNAL(disconnect()), this, SLOT(onDoDisconnect()));
+ connect(_connectWindow, SIGNAL(connected(ServerConnection*)), this, SLOT(onConnected(ServerConnection*)));
/* Setup menu */
_menu = new QMenu(this);
@@ -41,15 +44,15 @@ Toolbar::Toolbar(QWidget *parent) :
_menu->addSeparator();
_menu->addAction(_acnQuit);
_ui->cmdMenu->setMenu(_menu);
+ // Connect the signals
+ connect(_menu, SIGNAL(aboutToHide()), this, SLOT(hideBar()));
+ connect(_acnDisconnect, SIGNAL(triggered()), _connectWindow, SLOT(show()));
+ connect(_acnQuit, SIGNAL(triggered()), qApp, SLOT(quit()));
- /* Connect the signals */
- connect(_connectWindow, SIGNAL(disconnect()), this, SLOT(onDoDisconnect()));
- connect(_connectWindow, SIGNAL(connected(ServerConnection*)), this, SLOT(onConnected(ServerConnection*)));
+ /* Connect the signals from vnc server */
connect(VncServer::instance(), SIGNAL(started(int, QString&, QString&)), this, SLOT(onVncServerIsRunning(int, QString&, QString&)));
- connect(_acnQuit, SIGNAL(triggered()), qApp, SLOT(quit()));
- connect(_acnDisconnect, SIGNAL(triggered()), _connectWindow, SLOT(show()));
- /* Set location */
+ /* Set position */
const QDesktopWidget desktop;
const QRect primaryScreen = desktop.screenGeometry();
move(primaryScreen.left() + (primaryScreen.width() - this->width())/2 , primaryScreen.top());