From 18564ae28f17b447ccd14a98743ebcb195138dae Mon Sep 17 00:00:00 2001 From: Björn Hagemeister Date: Tue, 5 Aug 2014 15:36:12 +0200 Subject: Started including button for reloading room configuration by choosing your own room first. Is not working right now. --- src/server/mainwindow/mainwindow.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/server/mainwindow/mainwindow.cpp') 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> 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. */ -- cgit v1.2.3-55-g7522