summaryrefslogtreecommitdiffstats
path: root/src/client/toolbar/toolbar.cpp
diff options
context:
space:
mode:
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());