comparison ui/aboutdialog.cpp @ 199:4790a26c2e8b

Added about dialog.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 26 Mar 2014 13:29:49 +0100
parents
children 17e1c8f37d72
comparison
equal deleted inserted replaced
193:17eb8ad43984 199:4790a26c2e8b
1 #include "aboutdialog.h"
2 #include <QDebug>
3 #include <QVBoxLayout>
4 #include <QTextEdit>
5 #include <QPushButton>
6
7 AboutDialog::AboutDialog(QMainWindow *parent) :
8 QDialog(parent)
9 {
10 setupGUI();
11 }
12
13 void AboutDialog::setupGUI()
14 {
15 QVBoxLayout *mainLayout = new QVBoxLayout(this);
16 QTextEdit *helpText = new QTextEdit;
17 helpText->setReadOnly(true);
18 helpText->setPlainText(tr("This dialog contains some text about the application"));
19
20 QHBoxLayout *buttonLayout = new QHBoxLayout;
21 QPushButton *closeButton = new QPushButton(tr("Close"));
22 connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
23 buttonLayout->insertStretch(0, 10);
24 buttonLayout->addWidget(closeButton);
25
26 mainLayout->addWidget(helpText);
27 mainLayout->addLayout(buttonLayout);
28 }

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