diff options
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 48c29ac..7c9d210 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -98,6 +98,7 @@ MainWindow::MainWindow(QString ipListUrl, QWidget* parent) : connect(ui->action_SetAsTutor, SIGNAL(triggered()), this, SLOT(onButtonStopProjection())); connect(ui->action_Lock, SIGNAL(toggled(bool)), this, SLOT(onButtonLock(bool))); connect(ui->action_Help, SIGNAL(triggered()), this, SLOT(onButtonHelp())); + connect(ui->actionReload_Room_Configuration, SIGNAL(triggered()), this, SLOT(onButtonReloadRoomConfig())); /* Stuff for the button lock */ //Setup a timeout @@ -311,6 +312,10 @@ void MainWindow::tryToUseRoomTemplate() for (auto i : rooms) { + if (!_rooms.contains(i)) { + QList<QPair<QString, QPoint>> posIpConfig; + _rooms.insert(i, posIpConfig); + } conf.beginGroup(i); if (!conf.contains("mgrIP")) { qDebug() << "Invalid config file!"; @@ -338,6 +343,7 @@ void MainWindow::tryToUseRoomTemplate() // Position is given in grid coordinates, createFrame take pixels QString computerId = conf.value("ip").toString(); QPoint coord = conf.value("pos").toPoint(); + _rooms[i].append(qMakePair(computerId, coord)); qDebug() << computerId; qDebug() << coord; qDebug() << _tileWidth ; @@ -677,6 +683,11 @@ void MainWindow::startVncServerIfNecessary(int from) } } +void MainWindow::onButtonReloadRoomConfig() +{ + _reloadWindow->show(); +} + /***************************************************************************//** * Display popup which explains possible actions about the buttons. */ |