comparison ui/helpdialog.cpp @ 192:103daf2d39c0

Added some content and a close button to the help dialog.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 26 Mar 2014 12:22:09 +0100
parents 1a66a15d0df8
children 17e1c8f37d72
comparison
equal deleted inserted replaced
191:246c21b1727f 192:103daf2d39c0
1 #include "helpdialog.h" 1 #include "helpdialog.h"
2 #include <QDebug> 2 #include <QDebug>
3 #include <QVBoxLayout>
4 #include <QTextEdit>
5 #include <QPushButton>
3 6
4 HelpDialog::HelpDialog(QMainWindow *parent) : 7 HelpDialog::HelpDialog(QMainWindow *parent) :
5 QDialog(parent) 8 QDialog(parent)
6 { 9 {
7 setupGUI(); 10 setupGUI();
8 } 11 }
9 12
10 void HelpDialog::setupGUI() 13 void HelpDialog::setupGUI()
11 { 14 {
12 15 QVBoxLayout *mainLayout = new QVBoxLayout(this);
16 QTextEdit *helpText = new QTextEdit;
17 helpText->setReadOnly(true);
18 helpText->setPlainText(tr("This dialog contains some text to help the user."));
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);
13 } 28 }

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