Mercurial > trustbridge
annotate ui/statusdialog.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 |
rev | line source |
---|---|
404 | 1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU GPL (v>=2) | |
5 * and comes with ABSOLUTELY NO WARRANTY! | |
6 * See LICENSE.txt for details. | |
7 */ | |
211
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
8 #include "statusdialog.h" |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
9 #include <QDebug> |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
10 #include <QVBoxLayout> |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 #include <QTextEdit> |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
12 #include <QPushButton> |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
13 |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
14 StatusDialog::StatusDialog(QMainWindow *parent) : |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
15 QDialog(parent) |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
16 { |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
17 setupGUI(); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
18 } |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
19 |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
20 void StatusDialog::setupGUI() |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
21 { |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 QVBoxLayout *mainLayout = new QVBoxLayout(this); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 QTextEdit *helpText = new QTextEdit; |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 helpText->setReadOnly(true); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
25 QString dummyText = tr("The following certificates are successfully installed:\r"); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 dummyText.append(tr("* Email CA 2013\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 dummyText.append(tr("* Server CA 2010\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 dummyText.append(tr("\rThe following certificates are successfully removed:\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
29 dummyText.append(tr("* Email CA 2010\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
30 dummyText.append(tr("\rErrors while processing certificates:\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
31 dummyText.append(tr("* PCA-1-Verwaltung-08\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 helpText->setPlainText(dummyText); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
34 QHBoxLayout *buttonLayout = new QHBoxLayout; |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
35 QPushButton *closeButton = new QPushButton(tr("Close")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
36 connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
37 buttonLayout->insertStretch(0, 10); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
38 buttonLayout->addWidget(closeButton); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
39 |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
40 mainLayout->addWidget(helpText); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
41 mainLayout->addLayout(buttonLayout); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
42 } |