From 5471fa5ac6178695b7917e44c76c0fc0f285e41a Mon Sep 17 00:00:00 2001 From: Björn Hagemeister Date: Mon, 19 May 2014 17:30:48 +0200 Subject: Help window --- gui/server_normal/help.cpp | 14 --- gui/server_normal/help.h | 22 ---- gui/server_normal/help.ui | 238 +++++++++++++++++++++++++++++++++-- src/server/helpwindow/helpwindow.cpp | 29 +++++ src/server/helpwindow/helpwindow.h | 28 +++++ src/server/mainwindow/mainwindow.cpp | 11 ++ src/server/mainwindow/mainwindow.h | 3 + 7 files changed, 301 insertions(+), 44 deletions(-) delete mode 100644 gui/server_normal/help.cpp delete mode 100644 gui/server_normal/help.h create mode 100644 src/server/helpwindow/helpwindow.cpp create mode 100644 src/server/helpwindow/helpwindow.h 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 - -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 @@ + - - - - help - + Help + 0 0 - 400 - 300 + 601 + 483 Form + + + + 20 + 10 + 562 + 421 + + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + + 53 + 54 + + + + QFrame::Box + + + + + + :/lock + + + true + + + + + + + Lock all connected students screens. + + + + + + + + 53 + 54 + + + + false + + + QFrame::Box + + + + + + :/tutor2all + + + true + + + + + + + Start projection from tutor to all connected students. + + + + + + + + 53 + 54 + + + + QFrame::Box + + + + + + :/tutor2student + + + true + + + + + + + Start projection from tutor to selected student. + + + + + + + + 53 + 54 + + + + QFrame::Box + + + + + + :/student2tutor + + + true + + + + + + + Start projection from selected student to tutor. + + + + + + + + 53 + 54 + + + + QFrame::Box + + + + + + :/student2tutorextension + + + true + + + + + + + Start projection from selected student to tutor and hide all other screens. + + + + + + + QFrame::Box + + + + + + :/reset + + + true + + + + + + + Stop running projections. + + + + + + + QFrame::Box + + + + + + :/dozent + + + true + + + + + + + Set selected client to tutor. + + + + + + + + + 240 + 440 + 121 + 31 + + + + Cancel + + - + + + 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 + +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); @@ -677,6 +680,14 @@ void MainWindow::prepareForProjection(Client * const from, Client * const to) from->startVncServer(); } +/***************************************************************************//** + * 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 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 -- cgit v1.2.3-55-g7522