annotate ui/aboutdialog.cpp @ 405:35d6b371ba63

Add License header for CMake and shell scripts
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 16 Apr 2014 13:30:24 +0000
parents 17e1c8f37d72
children d08e39b913ee
rev   line source
404
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
2 * Software engineering by Intevation GmbH
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
3 *
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
6 * See LICENSE.txt for details.
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
7 */
199
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8 #include "aboutdialog.h"
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 #include <QDebug>
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
10 #include <QVBoxLayout>
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
11 #include <QTextEdit>
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12 #include <QPushButton>
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
14 AboutDialog::AboutDialog(QMainWindow *parent) :
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
15 QDialog(parent)
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 {
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 setupGUI();
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 }
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
19
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
20 void AboutDialog::setupGUI()
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 {
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22 QVBoxLayout *mainLayout = new QVBoxLayout(this);
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 QTextEdit *helpText = new QTextEdit;
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24 helpText->setReadOnly(true);
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
25 helpText->setPlainText(tr("This dialog contains some text about the application"));
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
27 QHBoxLayout *buttonLayout = new QHBoxLayout;
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
28 QPushButton *closeButton = new QPushButton(tr("Close"));
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
29 connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
30 buttonLayout->insertStretch(0, 10);
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
31 buttonLayout->addWidget(closeButton);
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
32
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
33 mainLayout->addWidget(helpText);
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
34 mainLayout->addLayout(buttonLayout);
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
35 }

http://wald.intevation.org/projects/trustbridge/