summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gui/server_normal/help.ui613
-rw-r--r--gui/server_normal/mainwindow.ui89
-rw-r--r--src/server/helpwindow/helpwindow.cpp56
-rw-r--r--src/server/helpwindow/helpwindow.h16
-rw-r--r--src/server/mainwindow/mainwindow.cpp3
5 files changed, 100 insertions, 677 deletions
diff --git a/gui/server_normal/help.ui b/gui/server_normal/help.ui
deleted file mode 100644
index 1bf4d6d..0000000
--- a/gui/server_normal/help.ui
+++ /dev/null
@@ -1,613 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Help</class>
- <widget class="QDialog" name="Help">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>603</width>
- <height>675</height>
- </rect>
- </property>
- <property name="minimumSize">
- <size>
- <width>400</width>
- <height>500</height>
- </size>
- </property>
- <property name="windowTitle">
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QFrame" name="fromFrame_8">
- <property name="frameShape">
- <enum>QFrame::Box</enum>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="refreshIcon">
- <property name="minimumSize">
- <size>
- <width>54</width>
- <height>53</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../pvsmgr.qrc">:/reloadClassroom</pixmap>
- </property>
- <property name="scaledContents">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="refresh">
- <property name="text">
- <string>Refresh classroom configuration after choosing the room.</string>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="formFrame_7">
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <layout class="QFormLayout" name="LockScreen">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <property name="formAlignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="horizontalSpacing">
- <number>6</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="lockScreenIcon">
- <property name="minimumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</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>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="formFrame_6">
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <layout class="QFormLayout" name="Tutor2All">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <property name="formAlignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="tutor2allIcon">
- <property name="minimumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</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="0" column="1">
- <widget class="QLabel" name="tutor2all">
- <property name="text">
- <string>Start projection from tutor to all connected students.</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="formFrame_5">
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <layout class="QFormLayout" name="Tutor2Student">
- <property name="formAlignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="tutor2studentIcon">
- <property name="minimumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</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="0" column="1">
- <widget class="QLabel" name="tutor2student">
- <property name="text">
- <string>Start projection from tutor to selected student.</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="formFrame_4">
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <layout class="QFormLayout" name="Student2Tutor">
- <property name="formAlignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="student2tutorIcon">
- <property name="minimumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</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="0" column="1">
- <widget class="QLabel" name="student2tutor">
- <property name="text">
- <string>Start projection from selected student to tutor.</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="formFrame_3">
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <layout class="QFormLayout" name="Student2Tutor_exclusiv">
- <property name="formAlignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="student2tutor_exclIcon">
- <property name="minimumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</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="0" column="1">
- <widget class="QLabel" name="student2tutor_exclusive">
- <property name="text">
- <string>Start projection from selected student to tutor and blank all others.</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- <property name="indent">
- <number>0</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="formFrame_2">
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <layout class="QFormLayout" name="SetTutor">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
- </property>
- <property name="formAlignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item row="0" column="1">
- <widget class="QLabel" name="setTutor">
- <property name="text">
- <string>Set selected client to tutor.</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="setTutorIcon">
- <property name="minimumSize">
- <size>
- <width>54</width>
- <height>53</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</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>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="frame">
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <widget class="QLabel" name="deleteIcon">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>0</y>
- <width>53</width>
- <height>54</height>
- </rect>
- </property>
- <property name="minimumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="../../pvsmgr.qrc">:/trash</pixmap>
- </property>
- <property name="scaledContents">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QLabel" name="reset_2">
- <property name="geometry">
- <rect>
- <x>70</x>
- <y>0</y>
- <width>506</width>
- <height>54</height>
- </rect>
- </property>
- <property name="text">
- <string>Delete selected client</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="formFrame">
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <layout class="QFormLayout" name="Reset">
- <property name="formAlignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="resetIcon">
- <property name="minimumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>53</width>
- <height>54</height>
- </size>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</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="0" column="1">
- <widget class="QLabel" name="reset">
- <property name="text">
- <string>Stop running projections.</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="pushButton">
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources>
- <include location="../../pvsmgr.qrc"/>
- </resources>
- <connections/>
-</ui>
diff --git a/gui/server_normal/mainwindow.ui b/gui/server_normal/mainwindow.ui
index 1f58ec4..c16d408 100644
--- a/gui/server_normal/mainwindow.ui
+++ b/gui/server_normal/mainwindow.ui
@@ -160,12 +160,12 @@ QLabel#examModeLabel {
<normaloff>:/exit</normaloff>
<normalon>:/exit</normalon>:/exit</iconset>
</property>
- <property name="text">
- <string>&amp;Exit</string>
- </property>
<property name="toolTip">
<string>Exit</string>
</property>
+ <property name="text">
+ <string>Exit</string>
+ </property>
<property name="shortcut">
<string>Ctrl+Q</string>
</property>
@@ -178,11 +178,11 @@ QLabel#examModeLabel {
<iconset resource="../../pvsmgr.qrc">
<normaloff>:/lock</normaloff>:/lock</iconset>
</property>
- <property name="text">
- <string>lock</string>
- </property>
<property name="toolTip">
- <string>Lock or Unlock all Clients</string>
+ <string>Lock/Unlock all clients</string>
+ </property>
+ <property name="text">
+ <string>This will show a black screen on all connected clients, except the tutor's client.</string>
</property>
<property name="shortcut">
<string>Ctrl+A</string>
@@ -193,17 +193,23 @@ QLabel#examModeLabel {
<iconset resource="../../pvsmgr.qrc">
<normaloff>:/student2tutor</normaloff>:/student2tutor</iconset>
</property>
- <property name="text">
+ <property name="toolTip">
<string>Student's Screen to Tutor</string>
</property>
+ <property name="text">
+ <string>Stream currently selected client's screen content to the tutor's client.</string>
+ </property>
</action>
<action name="action_StudentToTutorExclusive">
<property name="icon">
<iconset resource="../../pvsmgr.qrc">
<normaloff>:/student2tutorextension</normaloff>:/student2tutorextension</iconset>
</property>
+ <property name="toolTip">
+ <string>Student's Screen to Tutor, others blanked.</string>
+ </property>
<property name="text">
- <string>Student's Screen to Tutor, others blanked</string>
+ <string>Stream currently selected client's screen content to the tutor's client while showing a locked black screen on all other clients.</string>
</property>
</action>
<action name="action_TutorToStudent">
@@ -211,26 +217,38 @@ QLabel#examModeLabel {
<iconset resource="../../pvsmgr.qrc">
<normaloff>:/tutor2student</normaloff>:/tutor2student</iconset>
</property>
- <property name="text">
+ <property name="toolTip">
<string>Tutor's Screen to Student</string>
</property>
+ <property name="text">
+ <string>Stream the tutor's screen contents to the currently selected client.</string>
+ </property>
</action>
<action name="action_TutorToAll">
<property name="icon">
<iconset resource="../../pvsmgr.qrc">
<normaloff>:/tutor2all</normaloff>:/tutor2all</iconset>
</property>
- <property name="text">
+ <property name="toolTip">
<string>Tutor's Screen to Everyone</string>
</property>
+ <property name="text">
+ <string>Stream the tutor's screen contents to everyone.</string>
+ </property>
</action>
<action name="action_StopProjection">
<property name="icon">
- <iconset resource="../../pvsmgr.qrc">
+ <iconset resource="../../pvsclient.qrc">
<normaloff>:/reset</normaloff>:/reset</iconset>
</property>
+ <property name="toolTip">
+ <string>Reset</string>
+ </property>
<property name="text">
- <string>Stop Projection on every Client</string>
+ <string>Unlock all clients, stop any running screen content streaming.</string>
+ </property>
+ <property name="shortcut">
+ <string>R</string>
</property>
</action>
<action name="action_SetAsTutor">
@@ -238,11 +256,14 @@ QLabel#examModeLabel {
<iconset resource="../../pvsmgr.qrc">
<normaloff>:/dozent</normaloff>:/dozent</iconset>
</property>
+ <property name="toolTip">
+ <string>Declare tutor</string>
+ </property>
<property name="text">
- <string>SetAsTutor</string>
+ <string>Declare the currently selected client as tutor. The tutor will be excluded from screen locking and can be used as a fixed source/target for screen content streaming.</string>
</property>
- <property name="toolTip">
- <string>Set current Frame as Tutor</string>
+ <property name="shortcut">
+ <string>T</string>
</property>
</action>
<action name="action_DeleteClient">
@@ -250,12 +271,15 @@ QLabel#examModeLabel {
<iconset resource="../../pvsmgr.qrc">
<normaloff>:/trash</normaloff>:/trash</iconset>
</property>
- <property name="text">
- <string>Delete Client</string>
- </property>
<property name="toolTip">
<string>Delete Client</string>
</property>
+ <property name="text">
+ <string>Delete currently selected client. Only allowed for disconnected clients.</string>
+ </property>
+ <property name="shortcut">
+ <string>Del</string>
+ </property>
<property name="visible">
<bool>true</bool>
</property>
@@ -265,12 +289,15 @@ QLabel#examModeLabel {
<iconset resource="../../pvsmgr.qrc">
<normaloff>:/helpme</normaloff>:/helpme</iconset>
</property>
- <property name="text">
- <string>Help</string>
- </property>
<property name="toolTip">
<string>Help</string>
</property>
+ <property name="text">
+ <string>Show this help text.</string>
+ </property>
+ <property name="shortcut">
+ <string>F1</string>
+ </property>
<property name="visible">
<bool>true</bool>
</property>
@@ -280,11 +307,11 @@ QLabel#examModeLabel {
<iconset resource="../../pvsmgr.qrc">
<normaloff>:/reloadClassroom</normaloff>:/reloadClassroom</iconset>
</property>
- <property name="text">
- <string>Reload Room Configuration</string>
- </property>
<property name="toolTip">
- <string>Reload Room Configuration</string>
+ <string>Load a new room layout</string>
+ </property>
+ <property name="text">
+ <string>This shows a list of preconfigured rooms which you can load. This will reset the currently shown layout and disconnect all clients.</string>
</property>
</action>
<action name="action_LockSingle">
@@ -292,16 +319,20 @@ QLabel#examModeLabel {
<iconset resource="../../pvsmgr.qrc">
<normaloff>:/lock-single</normaloff>:/lock-single</iconset>
</property>
- <property name="text">
+ <property name="toolTip">
<string>Lock/Unlock single client</string>
</property>
- <property name="toolTip">
- <string>Lock or unlock the selected client</string>
+ <property name="text">
+ <string>Lock or unlock the selected client only.</string>
+ </property>
+ <property name="shortcut">
+ <string>L</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
+ <include location="../../pvsclient.qrc"/>
<include location="../../pvsmgr.qrc"/>
</resources>
<connections/>
diff --git a/src/server/helpwindow/helpwindow.cpp b/src/server/helpwindow/helpwindow.cpp
index bc04d30..2ae47ee 100644
--- a/src/server/helpwindow/helpwindow.cpp
+++ b/src/server/helpwindow/helpwindow.cpp
@@ -1,23 +1,43 @@
#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;
-}
-
-/*
- * Slots
- */
+#include <QPushButton>
+#include <QBoxLayout>
+#include <QAction>
+#include <QLabel>
-void HelpWindow::onButtonCancel()
+HelpWindow::HelpWindow(const QList<QAction*> &actions, QWidget *parent) :
+ QDialog(parent)
{
- this->hide();
+ QBoxLayout *layout = new QBoxLayout(QBoxLayout::TopToBottom, this);
+ layout->setMargin(3);
+ // Add help items
+ for (QAction *action : actions) {
+ if (action->icon().isNull() || action->text().isEmpty())
+ continue;
+ QBoxLayout *rowLayout = new QBoxLayout(QBoxLayout::LeftToRight, nullptr);
+ QLabel *icon = new QLabel(this);
+ icon->setPixmap(action->icon().pixmap(55, 55, QIcon::Normal, QIcon::Off));
+ rowLayout->addWidget(icon);
+ QBoxLayout *textLayout = new QBoxLayout(QBoxLayout::TopToBottom, nullptr);
+ QLabel *headline = new QLabel(action->toolTip(), this);
+ QFont boldFont = headline->font();
+ boldFont.setBold(true);
+ headline->setFont(boldFont);
+ textLayout->addWidget(headline);
+ QLabel *description = new QLabel(action->text(), this);
+ description->setWordWrap(true);
+ textLayout->addWidget(description);
+ textLayout->addStretch(1);
+ rowLayout->addLayout(textLayout, 1);
+ layout->addLayout(rowLayout);
+ }
+ // Add close button
+ QPushButton *close = new QPushButton(tr("Close"), this);
+ QFont bigFont = close->font();
+ bigFont.setPointSize(20);
+ close->setFont(bigFont);
+ connect(close, SIGNAL(clicked()), this, SLOT(hide()));
+ layout->addStretch(1);
+ layout->addWidget(close);
+ this->setMinimumSize(600, 600);
}
diff --git a/src/server/helpwindow/helpwindow.h b/src/server/helpwindow/helpwindow.h
index 528a4d3..2f0cdcb 100644
--- a/src/server/helpwindow/helpwindow.h
+++ b/src/server/helpwindow/helpwindow.h
@@ -3,26 +3,12 @@
#include <QDialog>
-namespace Ui
-{
-class Help;
-}
-
class HelpWindow : public QDialog
{
Q_OBJECT
public:
- explicit HelpWindow(QWidget *parent = 0);
- ~HelpWindow();
- Ui::Help *ui;
-
- // void show();
-
-private:
-
-private slots:
- void onButtonCancel();
+ explicit HelpWindow(const QList<QAction*> &actions, QWidget *parent = nullptr);
};
#endif
diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp
index 6ff8fc3..17bfdb2 100644
--- a/src/server/mainwindow/mainwindow.cpp
+++ b/src/server/mainwindow/mainwindow.cpp
@@ -78,8 +78,6 @@ MainWindow::MainWindow(QWidget* parent) :
_virtRows = 0;
_sessionNameWindow = new SessionNameWindow(this);
- _helpWindow = new HelpWindow(this);
- _helpWindow->setWindowTitle(tr("Help"));
_reloadWindow = new ReloadRoomWindow(this);
_reloadWindow->setWindowTitle(tr("Reload Room"));
ui->setupUi(this);
@@ -111,6 +109,7 @@ MainWindow::MainWindow(QWidget* parent) :
_dropMarker = new QLabel(ui->frmRoom);
_dropMarker->setStyleSheet("background-color: #448; border-radius: 2px;");
_dropMarker->hide();
+ _helpWindow = new HelpWindow(ui->toolBar->actions(), this);
serverApp->setExam(false);