annotate ui/helpdialog.cpp @ 1306:845048d4a69f

(issue159) Use user specific appdata directory for nss list with simple rights. Using the ProgramData folder with resticted access rights failed in case the process was not elevated.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 13 Oct 2014 12:31:37 +0200
parents 17e1c8f37d72
children
rev   line source
404
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 192
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 192
diff changeset
2 * Software engineering by Intevation GmbH
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 192
diff changeset
3 *
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 192
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 192
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 192
diff changeset
6 * See LICENSE.txt for details.
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 192
diff changeset
7 */
190
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8 #include "helpdialog.h"
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 #include <QDebug>
192
103daf2d39c0 Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 190
diff changeset
10 #include <QVBoxLayout>
103daf2d39c0 Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 190
diff changeset
11 #include <QTextEdit>
103daf2d39c0 Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 190
diff changeset
12 #include <QPushButton>
190
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
14 HelpDialog::HelpDialog(QMainWindow *parent) :
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
15 QDialog(parent)
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 {
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 setupGUI();
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 }
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
19
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
20 void HelpDialog::setupGUI()
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 {
192
103daf2d39c0 Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 190
diff changeset
22 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
23 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
24 helpText->setReadOnly(true);
103daf2d39c0 Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 190
diff changeset
25 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
26
103daf2d39c0 Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 190
diff changeset
27 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
28 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
29 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
30 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
31 buttonLayout->addWidget(closeButton);
103daf2d39c0 Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 190
diff changeset
32
103daf2d39c0 Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 190
diff changeset
33 mainLayout->addWidget(helpText);
103daf2d39c0 Added some content and a close button to the help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 190
diff changeset
34 mainLayout->addLayout(buttonLayout);
190
1a66a15d0df8 Added stub for help dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
35 }

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