From a46dc4a4061d2e33ebfe16d4f968e1fb8b03b92c Mon Sep 17 00:00:00 2001 From: Manuel Schneider Date: Tue, 22 Jul 2014 17:26:34 +0200 Subject: Add an about dialog to the client. --- src/client/toolbar/toolbar.cpp | 25 +++++++++++++++++++++++++ src/client/toolbar/toolbar.h | 2 ++ 2 files changed, 27 insertions(+) (limited to 'src/client') 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 */ @@ -244,6 +249,26 @@ void Toolbar::hideBar() move(x(), primaryScreen.top() + 2 - height()); } +/***************************************************************************//** + * @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(). */ 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_ */ -- cgit v1.2.3-55-g7522