Mercurial > trustbridge
annotate ui/helpdialog.cpp @ 217:83a015f2e078
Remove leftover incrementation of i from former loop style. Fixes a crash when adding only one
certificate.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 26 Mar 2014 20:14:22 +0100 |
parents | 103daf2d39c0 |
children | 17e1c8f37d72 |
rev | line source |
---|---|
190
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
1 #include "helpdialog.h" |
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
2 #include <QDebug> |
192
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
3 #include <QVBoxLayout> |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
4 #include <QTextEdit> |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
5 #include <QPushButton> |
190
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
6 |
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
7 HelpDialog::HelpDialog(QMainWindow *parent) : |
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
8 QDialog(parent) |
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
9 { |
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
10 setupGUI(); |
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 } |
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
12 |
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
13 void HelpDialog::setupGUI() |
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
14 { |
192
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
15 QVBoxLayout *mainLayout = new QVBoxLayout(this); |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
16 QTextEdit *helpText = new QTextEdit; |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
17 helpText->setReadOnly(true); |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
18 helpText->setPlainText(tr("This dialog contains some text to help the user.")); |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
19 |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
20 QHBoxLayout *buttonLayout = new QHBoxLayout; |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
21 QPushButton *closeButton = new QPushButton(tr("Close")); |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
22 connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
23 buttonLayout->insertStretch(0, 10); |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
24 buttonLayout->addWidget(closeButton); |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
25 |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
26 mainLayout->addWidget(helpText); |
103daf2d39c0
Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
190
diff
changeset
|
27 mainLayout->addLayout(buttonLayout); |
190
1a66a15d0df8
Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 } |