summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Hagemeister2014-05-19 17:30:48 +0200
committerBjörn Hagemeister2014-05-19 17:30:48 +0200
commit5471fa5ac6178695b7917e44c76c0fc0f285e41a (patch)
treee2bb67b277033e5643c0b1908b9fe175d1ad49fb
parentCommiting forgotten icon, plus first changes on help - Button implementation,... (diff)
downloadpvs2-5471fa5ac6178695b7917e44c76c0fc0f285e41a.tar.gz
pvs2-5471fa5ac6178695b7917e44c76c0fc0f285e41a.tar.xz
pvs2-5471fa5ac6178695b7917e44c76c0fc0f285e41a.zip
Help window
-rw-r--r--gui/server_normal/help.cpp14
-rw-r--r--gui/server_normal/help.h22
-rw-r--r--gui/server_normal/help.ui238
-rw-r--r--src/server/helpwindow/helpwindow.cpp29
-rw-r--r--src/server/helpwindow/helpwindow.h28
-rw-r--r--src/server/mainwindow/mainwindow.cpp11
-rw-r--r--src/server/mainwindow/mainwindow.h3
7 files changed, 301 insertions, 44 deletions
diff --git a/gui/server_normal/help.cpp b/gui/server_normal/help.cpp
deleted file mode 100644
index 8242374..0000000
--- a/gui/server_normal/help.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "help.h"
-#include "ui_help.h"
-
-help::help(QWidget *parent) :
- QWidget(parent),
- ui(new Ui::help)
-{
- ui->setupUi(this);
-}
-
-help::~help()
-{
- delete ui;
-}
diff --git a/gui/server_normal/help.h b/gui/server_normal/help.h
deleted file mode 100644
index c26d5d4..0000000
--- a/gui/server_normal/help.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef HELP_H
-#define HELP_H
-
-#include <QWidget>
-
-namespace Ui {
-class help;
-}
-
-class help : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit help(QWidget *parent = 0);
- ~help();
-
-private:
- Ui::help *ui;
-};
-
-#endif // HELP_H
diff --git a/gui/server_normal/help.ui b/gui/server_normal/help.ui
index a7267ee..9dbc55b 100644
--- a/gui/server_normal/help.ui
+++ b/gui/server_normal/help.ui
@@ -1,21 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <author/>
- <comment/>
- <exportmacro/>
- <class>help</class>
- <widget class="QWidget" name="help">
+ <class>Help</class>
+ <widget class="QDialog" name="Help">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>400</width>
- <height>300</height>
+ <width>601</width>
+ <height>483</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
+ <widget class="QWidget" name="formLayoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>10</y>
+ <width>562</width>
+ <height>421</height>
+ </rect>
+ </property>
+ <layout class="QFormLayout" name="formLayout">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="lockScreenIcon">
+ <property name="maximumSize">
+ <size>
+ <width>53</width>
+ <height>54</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../../pvsmgr.qrc">:/lock</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="lockScreen">
+ <property name="text">
+ <string>Lock all connected students screens.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="tutor2allIcon">
+ <property name="maximumSize">
+ <size>
+ <width>53</width>
+ <height>54</height>
+ </size>
+ </property>
+ <property name="autoFillBackground">
+ <bool>false</bool>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../../pvsmgr.qrc">:/tutor2all</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLabel" name="tutor2all">
+ <property name="text">
+ <string>Start projection from tutor to all connected students.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="tutor2studentIcon">
+ <property name="maximumSize">
+ <size>
+ <width>53</width>
+ <height>54</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../../pvsmgr.qrc">:/tutor2student</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLabel" name="tutor2student">
+ <property name="text">
+ <string>Start projection from tutor to selected student.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="student2tutorIcon">
+ <property name="maximumSize">
+ <size>
+ <width>53</width>
+ <height>54</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../../pvsmgr.qrc">:/student2tutor</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLabel" name="student2tutor">
+ <property name="text">
+ <string>Start projection from selected student to tutor.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="student2tutor_exclIcon">
+ <property name="maximumSize">
+ <size>
+ <width>53</width>
+ <height>54</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../../pvsmgr.qrc">:/student2tutorextension</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QLabel" name="student2tutor_exclusive">
+ <property name="text">
+ <string>Start projection from selected student to tutor and hide all other screens.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="resetIcon">
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../../pvsmgr.qrc">:/reset</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QLabel" name="reset">
+ <property name="text">
+ <string>Stop running projections.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="setTutorIcon">
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="pixmap">
+ <pixmap resource="../../pvsmgr.qrc">:/dozent</pixmap>
+ </property>
+ <property name="scaledContents">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <widget class="QLabel" name="setTutor">
+ <property name="text">
+ <string>Set selected client to tutor.</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QPushButton" name="pushButton">
+ <property name="geometry">
+ <rect>
+ <x>240</x>
+ <y>440</y>
+ <width>121</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
</widget>
- <pixmapfunction/>
+ <resources>
+ <include location="../../pvsmgr.qrc"/>
+ </resources>
<connections/>
</ui>
diff --git a/src/server/helpwindow/helpwindow.cpp b/src/server/helpwindow/helpwindow.cpp
new file mode 100644
index 0000000..b209080
--- /dev/null
+++ b/src/server/helpwindow/helpwindow.cpp
@@ -0,0 +1,29 @@
+#include "helpwindow.h"
+#include "ui_help.h"
+
+HelpWindow::HelpWindow(QWidget *parent) :
+ QDialog(parent), ui(new Ui::Help)
+{
+ ui->setupUi(this);
+ connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(onButtonCancel()));
+}
+
+HelpWindow::~HelpWindow()
+{
+ delete ui;
+}
+
+/*void HelpWindow::show()
+{
+ this->showNormal();
+}
+*/
+
+/*
+ * Slots
+ */
+
+void HelpWindow::onButtonCancel()
+{
+ this->hide();
+}
diff --git a/src/server/helpwindow/helpwindow.h b/src/server/helpwindow/helpwindow.h
new file mode 100644
index 0000000..9a40299
--- /dev/null
+++ b/src/server/helpwindow/helpwindow.h
@@ -0,0 +1,28 @@
+#ifndef HELPWINDOW_H
+#define HELPWINDOW_H
+
+#include <QDialog>
+
+namespace Ui {
+class Help;
+}
+
+class HelpWindow : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit HelpWindow(QWidget *parent = 0);
+ ~HelpWindow();
+
+ // void show();
+
+private:
+ Ui::Help *ui;
+
+
+private slots:
+ void onButtonCancel();
+
+};
+#endif
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index ca9ecca..ce24227 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -23,6 +23,7 @@
#include "../clicklabel/clicklabel.h"
#include "../sessionnamewindow/sessionnamewindow.h"
#include "../connectionframe/connectionframe.h"
+#include "../helpwindow/helpwindow.h"
// Network
#include "../net/listenserver.h"
#include "../net/client.h"
@@ -57,6 +58,7 @@ MainWindow::MainWindow(QString ipListUrl, QWidget* parent) :
_selectedFrame = NULL;
_sessionNameWindow = new SessionNameWindow(this);
+ _helpWindow = new HelpWindow(this);
ui->setupUi(this);
Global::setSessionName();
@@ -94,6 +96,7 @@ MainWindow::MainWindow(QString ipListUrl, QWidget* parent) :
connect(ui->action_SetAsTutor, SIGNAL(triggered()), this, SLOT(onButtonSetAsTutor()));
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()));
/* Stuff for the button lock */
_buttonLockTimer = new QTimer(this);
@@ -678,6 +681,14 @@ void MainWindow::prepareForProjection(Client * const from, Client * const to)
}
/***************************************************************************//**
+ * Display popup which explains possible actions about the buttons.
+ */
+void MainWindow::onButtonHelp()
+{
+ _helpWindow->show();
+}
+
+/***************************************************************************//**
* Handle projection from tutor to all.
* Get the client who is tutor and set the projectionSource of all
* clients, except the tutor ones, to false.
diff --git a/src/server/mainwindow/mainwindow.h b/src/server/mainwindow/mainwindow.h
index 5dd177d..02e9bac 100644
--- a/src/server/mainwindow/mainwindow.h
+++ b/src/server/mainwindow/mainwindow.h
@@ -10,6 +10,7 @@ class SessionNameWindow;
class ConnectionFrame;
class ListenServer;
class DiscoveryListener;
+class HelpWindow;
namespace Ui{
class MainWindow;
@@ -32,6 +33,7 @@ private:
// Ui stuff
Ui::MainWindow *ui;
SessionNameWindow *_sessionNameWindow;
+ HelpWindow *_helpWindow;
QLabel *_sessionNameLabel;
int _tbIconSize;
Qt::ToolBarArea _tbArea;
@@ -91,6 +93,7 @@ protected slots:
void onButtonLock(bool checked);
void onButtonExit();
void onButtonSetAsTutor();
+ void onButtonHelp();
void DisableButtons();
void EnableButtons();
// connection frame