summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-08-05 15:36:12 +0200
committerBjörn Hagemeister2014-08-05 15:36:12 +0200
commit18564ae28f17b447ccd14a98743ebcb195138dae (patch)
tree5912cbd9a984fdc04b18a59a1e34748925b0a323 /src/server/mainwindow/mainwindow.cpp
parentMinimal changes: some qDebugs(), changed index of for - loop. (diff)
downloadpvs2-18564ae28f17b447ccd14a98743ebcb195138dae.tar.gz
pvs2-18564ae28f17b447ccd14a98743ebcb195138dae.tar.xz
pvs2-18564ae28f17b447ccd14a98743ebcb195138dae.zip
Started including button for reloading room configuration by choosing your own room first.
Is not working right now.
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp11
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.
*/