summaryrefslogtreecommitdiffstats
path: root/src/server/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorChristian Klinger2016-05-19 18:17:52 +0200
committerChristian Klinger2016-05-19 18:17:52 +0200
commit7913223f2c35bf69af68d28d2f11dde158c94e73 (patch)
tree494041b0ae8531c3dff70dc7960f236f1302a277 /src/server/mainwindow/mainwindow.cpp
parentAdded German translation for server. (diff)
downloadpvs2-7913223f2c35bf69af68d28d2f11dde158c94e73.tar.gz
pvs2-7913223f2c35bf69af68d28d2f11dde158c94e73.tar.xz
pvs2-7913223f2c35bf69af68d28d2f11dde158c94e73.zip
added --manager-only (and removed the ipList-feature)
Diffstat (limited to 'src/server/mainwindow/mainwindow.cpp')
-rw-r--r--src/server/mainwindow/mainwindow.cpp34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 6d8d02f..c7d8a9e 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -38,6 +38,7 @@
#include "ui_mainwindow.h"
#include "ui_reloadroom.h"
+#include <iostream>
#include <vector>
#define sStrTutorNdef MainWindow::tr("No tutor defined.")
@@ -51,15 +52,18 @@
#define sStrNoDestAv MainWindow::tr("No projection destination available.")
using std::vector;
+using std::cout;
+using std::endl;
/***************************************************************************//**
* Initialize MainWindow and ListenServer.
* @param ipListUrl
* @param parent
*/
-MainWindow::MainWindow(QString ipListUrl, QWidget* parent) :
+MainWindow::MainWindow(QWidget* parent) :
QMainWindow(parent), ui(new Ui::MainWindow), _tbIconSize(24), _tbArea(Qt::LeftToolBarArea)
{
+ qDebug() << "MainWindow(parent)";
_mode = Mode::Multicast;
_streamingSource = 0;
@@ -95,12 +99,6 @@ MainWindow::MainWindow(QString ipListUrl, QWidget* parent) :
ui->action_Exit->setStatusTip(tr("Exit"));
ui->action_Lock->setStatusTip(tr("Lock or Unlock all Clients"));
- // Initialize FileDownloader.
- if (!ipListUrl.isEmpty())
- {
- _fileDownloader.connectSlot(this, SLOT(onTutorListDownloaded(QByteArray&)));
- _fileDownloader.downloadFile(QUrl(ipListUrl));
- }
// Close button in tool bar
connect(ui->action_Exit, SIGNAL(triggered()), this, SLOT(onButtonExit()));
@@ -371,6 +369,7 @@ QSize minimalGridSize(const QMap<QString, QPoint>& clientPositions, QSize& clien
*/
void MainWindow::tryToUseRoomTemplate()
{
+ qDebug() << "tryToUseRoomTemplate()";
QMap<QString, Room* > roomsList;
SYSTEM_SETTINGS(conf);
@@ -433,9 +432,16 @@ void MainWindow::tryToUseRoomTemplate()
roomsList.insert(roomName, r);
}
Global::setRooms(roomsList);
- if (myRoom != "") {
+ if (myRoom == "") {
+ /* so apparently this is not a manager of a room */
+ if (Global::manager_only) {
+ cout << "exiting because of the argument --manager-only was set and this computer is not a manager" << endl;
+ exit(0);
+ }
+ } else {
switchRoomTo(myRoom);
}
+
}
/***************************************************************************//**
@@ -650,18 +656,6 @@ void MainWindow::reset()
* Slots
*/
-/***************************************************************************//**
- * Extract information from downloaded tutorList.
- * Split downloaded file by new line and store IPs in _tutorList.
- * @param tutorList
- */
-void MainWindow::onTutorListDownloaded(QByteArray& tutorList)
-{
- QString data = QString::fromUtf8(tutorList.constData(), tutorList.size());
- _tutorList = data.split(QRegExp("[\r\n]"),QString::SkipEmptyParts);
- qDebug() << _tutorList;
-}
-
/***************************************************************************//**
* Place Frame to from user specified position.