summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Schneider2014-07-22 17:26:34 +0200
committerManuel Schneider2014-07-22 17:26:34 +0200
commita46dc4a4061d2e33ebfe16d4f968e1fb8b03b92c (patch)
tree2ed733eb3da892c3ecf726f2d9b2271ad97a40f6
parentFix login-lock-bug. Update todolist (diff)
downloadpvs2-a46dc4a4061d2e33ebfe16d4f968e1fb8b03b92c.tar.gz
pvs2-a46dc4a4061d2e33ebfe16d4f968e1fb8b03b92c.tar.xz
pvs2-a46dc4a4061d2e33ebfe16d4f968e1fb8b03b92c.zip
Add an about dialog to the client.
-rw-r--r--TODO6
-rw-r--r--src/client/toolbar/toolbar.cpp25
-rw-r--r--src/client/toolbar/toolbar.h2
3 files changed, 31 insertions, 2 deletions
diff --git a/TODO b/TODO
index 79d77c3..fb9ee0e 100644
--- a/TODO
+++ b/TODO
@@ -59,11 +59,13 @@ anmelden, in der Zwischenzeit kann das System auf den default resetten....>
[ ] Beim Client: Wenn Session-ID im laufenden betrieb geändert wird, fliegt der
Client raus. Man kann als Client (dann) keine neue Session-ID setzen.
-[ ] Informationsknopf im Clienten: <Fragzeichen-Symbol mit hinterlegtem>
+[x] Informationsknopf im Clienten: <Fragzeichen-Symbol mit hinterlegtem>
Hilfetext in Toolbar bezüglich <Erklärung der Funktion des> sichtbaren PVS-Menüs
und zur> Session-ID-Einstellung.
+^^^
+[ ] Text sinnvoll??
-[ ] Zug (eines Cleint-Rechnericons) auf Papierkorb soll Verbindung trennen, auch
+[ ] Zug (eines Client-Rechnericons) auf Papierkorb soll Verbindung trennen, auch
wenn PVS-Client auf Rechner online ist. Rechnersymbol soll schwarz werden.
<sofern der Papierkorb bleiben soll. Ggfs ist die Funktion nicht nötig?>
diff --git a/src/client/toolbar/toolbar.cpp b/src/client/toolbar/toolbar.cpp
index bdbf601..837bc08 100644
--- a/src/client/toolbar/toolbar.cpp
+++ b/src/client/toolbar/toolbar.cpp
@@ -13,6 +13,7 @@
#include "toolbar.h"
#include "ui_toolbar.h"
+
/***************************************************************************//**
* @brief Constructor of the Toolbar.
*
@@ -65,14 +66,18 @@ Toolbar::Toolbar(QWidget *parent) :
/* Setup menu */
_menu = new QMenu(this);
_acnDisconnect = new QAction(tr("Set &session ID"), this);
+ _acnAbout= new QAction(tr("&Was ist das hier?"), this);
_acnQuit = new QAction(tr("&Quit"), this);
_menu->addAction(_acnDisconnect);
_menu->addSeparator();
+ _menu->addAction(_acnAbout);
+ _menu->addSeparator();
_menu->addAction(_acnQuit);
_ui->cmdMenu->setMenu(_menu);
// Connect the signals
connect(_menu, SIGNAL(aboutToHide()), this, SLOT(hideBar()));
connect(_acnDisconnect, SIGNAL(triggered()), _connectWindow, SLOT(show()));
+ connect(_acnAbout, SIGNAL(triggered()), this, SLOT(showAboutDialog()));
connect(_acnQuit, SIGNAL(triggered()), qApp, SLOT(quit()));
/* Connect the signals from vnc server */
@@ -245,6 +250,26 @@ void Toolbar::hideBar()
}
/***************************************************************************//**
+ * @brief Toolbar::showAboutDialog
+ */
+void Toolbar::showAboutDialog()
+{
+ QMessageBox msgBox(
+ QMessageBox::NoIcon,
+ tr("Über PVS Client"),
+ tr("Der PVS Client ist Teil eines Softwaresystems zur Verwaltung "\
+ "des visuellen Datenverkehrs innerhalb der Poolräume zwischen "\
+ "Dozenten und Studenten-PCs und wurde zur Vereinfachung des "\
+ "Informationsflusses in Seminaren und allgemeinem eLearning "\
+ "entwickelt."),
+ QMessageBox::NoButton,
+ this,
+ Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint|Qt::WindowStaysOnTopHint);
+ msgBox.setIconPixmap(QIcon(":cam32.svg").pixmap(64,64));
+ msgBox.exec();
+}
+
+/***************************************************************************//**
* This slot shows the toolbar. Used after a hideBar().
*/
void Toolbar::showBar()
diff --git a/src/client/toolbar/toolbar.h b/src/client/toolbar/toolbar.h
index 11b9ac4..80ddd69 100644
--- a/src/client/toolbar/toolbar.h
+++ b/src/client/toolbar/toolbar.h
@@ -38,6 +38,7 @@ private:
Ui::Toolbar *_ui;
QMenu *_menu;
QAction *_acnDisconnect;
+ QAction *_acnAbout;
QAction *_acnQuit;
ConnectWindow *_connectWindow;
QTimer _hideTimer;
@@ -58,6 +59,7 @@ private slots:
void cameraBlink();
void showBar();
void hideBar();
+ void showAboutDialog();
};
#endif /* PVSCLIENTGUI_H_ */