404
|
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
|
2 * Software engineering by Intevation GmbH |
|
3 * |
|
4 * This file is Free Software under the GNU GPL (v>=2) |
|
5 * and comes with ABSOLUTELY NO WARRANTY! |
|
6 * See LICENSE.txt for details. |
|
7 */ |
199
|
8 #include "aboutdialog.h" |
|
9 #include <QDebug> |
|
10 #include <QVBoxLayout> |
|
11 #include <QTextEdit> |
|
12 #include <QPushButton> |
|
13 |
|
14 AboutDialog::AboutDialog(QMainWindow *parent) : |
|
15 QDialog(parent) |
|
16 { |
|
17 setupGUI(); |
|
18 } |
|
19 |
|
20 void AboutDialog::setupGUI() |
|
21 { |
|
22 QVBoxLayout *mainLayout = new QVBoxLayout(this); |
|
23 QTextEdit *helpText = new QTextEdit; |
|
24 helpText->setReadOnly(true); |
|
25 helpText->setPlainText(tr("This dialog contains some text about the application")); |
|
26 |
|
27 QHBoxLayout *buttonLayout = new QHBoxLayout; |
|
28 QPushButton *closeButton = new QPushButton(tr("Close")); |
|
29 connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); |
|
30 buttonLayout->insertStretch(0, 10); |
|
31 buttonLayout->addWidget(closeButton); |
|
32 |
|
33 mainLayout->addWidget(helpText); |
|
34 mainLayout->addLayout(buttonLayout); |
|
35 } |