annotate ui/statusdialog.cpp @ 485:5834b340c54c

Emit a signal for last modified date in downloader.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 24 Apr 2014 14:54:24 +0200
parents 17e1c8f37d72
children
rev   line source
404
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 211
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 211
diff changeset
2 * Software engineering by Intevation GmbH
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 211
diff changeset
3 *
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 211
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 211
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 211
diff changeset
6 * See LICENSE.txt for details.
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 211
diff changeset
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 }

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