comparison ui/administratorwindow.cpp @ 412:340b8759d005

Wording und icons in TrustBridge Administration main window.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 16 Apr 2014 17:21:54 +0200
parents 17e1c8f37d72
children b19290d6b148
comparison
equal deleted inserted replaced
410:3132ba0a305d 412:340b8759d005
27 #include "certificatetabledelegate.h" 27 #include "certificatetabledelegate.h"
28 #include "createinstallerdialog.h" 28 #include "createinstallerdialog.h"
29 #include "createcertlistdialog.h" 29 #include "createcertlistdialog.h"
30 30
31 AdministratorWindow::AdministratorWindow() { 31 AdministratorWindow::AdministratorWindow() {
32 setWindowTitle(tr("TrustBridge Administration"));
32 QString path = QStandardPaths::locate( 33 QString path = QStandardPaths::locate(
33 QStandardPaths::DataLocation, QString("certlist_last.txt")); 34 QStandardPaths::DataLocation, QString("certlist_last.txt"));
34 certList.readList(path.toLocal8Bit()); 35 certList.readList(path.toLocal8Bit());
35 createActions(); 36 createActions();
36 createMenuBar(); 37 createMenuBar();
74 QHBoxLayout *headerLayout = new QHBoxLayout; 75 QHBoxLayout *headerLayout = new QHBoxLayout;
75 QVBoxLayout *headerTextLayout = new QVBoxLayout; 76 QVBoxLayout *headerTextLayout = new QVBoxLayout;
76 QHBoxLayout *bottomLayout = new QHBoxLayout; 77 QHBoxLayout *bottomLayout = new QHBoxLayout;
77 78
78 // The certificate list 79 // The certificate list
79 QGroupBox *certBox = new QGroupBox(tr("Managed Certificates")); 80 QGroupBox *certBox = new QGroupBox(
81 tr("All managed root certificates of the certificate list:"));
80 certificateView = new QTableView; 82 certificateView = new QTableView;
81 certificateModel = new CertificateTabelModel(); 83 certificateModel = new CertificateTabelModel();
82 QSortFilterProxyModel *filterModel = new QSortFilterProxyModel(this); 84 QSortFilterProxyModel *filterModel = new QSortFilterProxyModel(this);
83 filterModel->setSourceModel(certificateModel); 85 filterModel->setSourceModel(certificateModel);
84 CertificateTableDelegate *delegate = new CertificateTableDelegate(certificateView); 86 CertificateTableDelegate *delegate = new CertificateTableDelegate(certificateView);
97 // The header (icon, about text) 99 // The header (icon, about text)
98 QImage *logoImage = new QImage(":/img/logo.png"); 100 QImage *logoImage = new QImage(":/img/logo.png");
99 QLabel *logo = new QLabel; 101 QLabel *logo = new QLabel;
100 logo->setBackgroundRole(QPalette::Base); 102 logo->setBackgroundRole(QPalette::Base);
101 logo->setPixmap(QPixmap::fromImage(*logoImage)); 103 logo->setPixmap(QPixmap::fromImage(*logoImage));
102 QLabel *title = new QLabel("<h2>" + tr("Administrator Application") + "</h2>"); 104 QLabel *title = new QLabel("<h2>" + tr("TrustBridge Adminstration") + "</h2>");
103 QLabel *subTitle = new QLabel("This Software creates a signed file containing certificates"); 105 QLabel *subTitle = new QLabel(
106 tr("Management application of the BSI certificate installer"));
104 headerTextLayout->addWidget(title); 107 headerTextLayout->addWidget(title);
105 headerTextLayout->addWidget(subTitle); 108 headerTextLayout->addWidget(subTitle);
106 headerLayout->addWidget(logo); 109 headerLayout->addWidget(logo);
107 headerLayout->addLayout(headerTextLayout); 110 headerLayout->addLayout(headerTextLayout);
108 headerLayout->setStretch(0, 0); 111 headerLayout->setStretch(0, 0);
109 headerLayout->setStretch(1, 10); 112 headerLayout->setStretch(1, 10);
110 113
111 // The buttons. 114 // The buttons.
112 bottomLayout->setAlignment(Qt::AlignBottom); 115 bottomLayout->setAlignment(Qt::AlignBottom);
113 saveButton = new QPushButton(tr("Save")); 116 saveButton = new QPushButton(QIcon(":/img/document-save.png"), tr("Save list"));
114 connect(saveButton, SIGNAL(clicked()), this, SLOT(saveCertificateFile())); 117 connect(saveButton, SIGNAL(clicked()), this, SLOT(saveCertificateFile()));
115 loadButton = new QPushButton(tr("Load")); 118 loadButton = new QPushButton(QIcon(":/img/document-open.png"), tr("Load list"));
116 connect(loadButton, SIGNAL(clicked()), this, SLOT(loadCertificateFile())); 119 connect(loadButton, SIGNAL(clicked()), this, SLOT(loadCertificateFile()));
117 addButton = new QPushButton(tr("Add")); 120 addButton = new QPushButton(QIcon(":/img/document-new.png"), tr("Add certificate"));
118 connect(addButton, SIGNAL(clicked()), this, SLOT(addCertificates())); 121 connect(addButton, SIGNAL(clicked()), this, SLOT(addCertificates()));
119 removeButton = new QPushButton(tr("Remove")); 122 removeButton = new QPushButton(QIcon(":/img/document-close.png"), tr("Remove certificate"));
120 removeButton->setEnabled(false); 123 removeButton->setEnabled(false);
121 connect(removeButton, SIGNAL(clicked()), this, SLOT(removeCertificates())); 124 connect(removeButton, SIGNAL(clicked()), this, SLOT(removeCertificates()));
122 bottomLayout->addWidget(saveButton); 125 bottomLayout->addWidget(saveButton);
123 bottomLayout->addWidget(loadButton); 126 bottomLayout->addWidget(loadButton);
124 bottomLayout->addWidget(addButton); 127 bottomLayout->addWidget(addButton);

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