Mercurial > trustbridge
annotate ui/statusdialog.cpp @ 306:9c5e6b142611
Set the home directory to a temporary location to avoid writing into real nss stores
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 03 Apr 2014 15:30:25 +0200 |
parents | be628d261617 |
children | 17e1c8f37d72 |
rev | line source |
---|---|
211
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
1 #include "statusdialog.h" |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
2 #include <QDebug> |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
3 #include <QVBoxLayout> |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
4 #include <QTextEdit> |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
5 #include <QPushButton> |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
6 |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
7 StatusDialog::StatusDialog(QMainWindow *parent) : |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
8 QDialog(parent) |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
9 { |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
10 setupGUI(); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
11 } |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
12 |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
13 void StatusDialog::setupGUI() |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
14 { |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
15 QVBoxLayout *mainLayout = new QVBoxLayout(this); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
16 QTextEdit *helpText = new QTextEdit; |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
17 helpText->setReadOnly(true); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
18 QString dummyText = tr("The following certificates are successfully installed:\r"); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
19 dummyText.append(tr("* Email CA 2013\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
20 dummyText.append(tr("* Server CA 2010\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
21 dummyText.append(tr("\rThe following certificates are successfully removed:\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
22 dummyText.append(tr("* Email CA 2010\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
23 dummyText.append(tr("\rErrors while processing certificates:\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
24 dummyText.append(tr("* PCA-1-Verwaltung-08\r")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
25 helpText->setPlainText(dummyText); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
26 |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
27 QHBoxLayout *buttonLayout = new QHBoxLayout; |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
28 QPushButton *closeButton = new QPushButton(tr("Close")); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
29 connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
30 buttonLayout->insertStretch(0, 10); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
31 buttonLayout->addWidget(closeButton); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
32 |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
33 mainLayout->addWidget(helpText); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
34 mainLayout->addLayout(buttonLayout); |
be628d261617
Added new status dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff
changeset
|
35 } |