# HG changeset patch # User Andre Heinecke # Date 1397724916 0 # Node ID 81cf25402cb0797eb6bb00697e5e5c5746b2178e # Parent 3d1e9df2480368c9079bbb4cc43fab17e79f10ec# Parent 8f95e7014667b13c7ec708086e165b84555e366d Merge diff -r 3d1e9df24803 -r 81cf25402cb0 ui/administratorwindow.cpp --- a/ui/administratorwindow.cpp Wed Apr 16 17:11:18 2014 +0000 +++ b/ui/administratorwindow.cpp Thu Apr 17 08:55:16 2014 +0000 @@ -29,6 +29,7 @@ #include "createcertlistdialog.h" AdministratorWindow::AdministratorWindow() { + setWindowTitle(tr("TrustBridge Administration")); QString path = QStandardPaths::locate( QStandardPaths::DataLocation, QString("certlist_last.txt")); certList.readList(path.toLocal8Bit()); @@ -48,16 +49,11 @@ menuBar = new QMenuBar(this); QMenu *menu = new QMenu(tr("Menu"), menuBar); menuBar->addMenu(menu); - QAction *createInstaller = menu->addAction(tr("Create Installer")); - QAction *settings = menu->addAction(tr("Settings")); - menu->addSeparator(); - QAction *help = menu->addAction(tr("Help")); - QAction *about = menu->addAction(tr("About")); + QAction *createInstaller = menu->addAction(tr("Create installer ...")); + QAction *about = menu->addAction(tr("About TrustBridge")); menu->addSeparator(); QAction *quit = menu->addAction(tr("Quit")); connect(createInstaller, SIGNAL(triggered()), this, SLOT(createInstaller())); - connect(settings, SIGNAL(triggered()), this, SLOT(showSettings())); - connect(help, SIGNAL(triggered()), this, SLOT(showHelp())); connect(about, SIGNAL(triggered()), this, SLOT(showAbout())); connect(quit, SIGNAL(triggered()), qApp, SLOT(quit())); setMenuBar(menuBar); @@ -76,7 +72,8 @@ QHBoxLayout *bottomLayout = new QHBoxLayout; // The certificate list - QGroupBox *certBox = new QGroupBox(tr("Managed Certificates")); + QGroupBox *certBox = new QGroupBox( + tr("All managed root certificates of the certificate list:")); certificateView = new QTableView; certificateModel = new CertificateTabelModel(); QSortFilterProxyModel *filterModel = new QSortFilterProxyModel(this); @@ -99,8 +96,9 @@ QLabel *logo = new QLabel; logo->setBackgroundRole(QPalette::Base); logo->setPixmap(QPixmap::fromImage(*logoImage)); - QLabel *title = new QLabel("

" + tr("Administrator Application") + "

"); - QLabel *subTitle = new QLabel("This Software creates a signed file containing certificates"); + QLabel *title = new QLabel("

" + tr("TrustBridge Adminstration") + "

"); + QLabel *subTitle = new QLabel( + tr("Management application of the BSI certificate installer")); headerTextLayout->addWidget(title); headerTextLayout->addWidget(subTitle); headerLayout->addWidget(logo); @@ -110,13 +108,13 @@ // The buttons. bottomLayout->setAlignment(Qt::AlignBottom); - saveButton = new QPushButton(tr("Save")); + saveButton = new QPushButton(QIcon(":/img/document-save.png"), tr("Save list")); connect(saveButton, SIGNAL(clicked()), this, SLOT(saveCertificateFile())); - loadButton = new QPushButton(tr("Load")); + loadButton = new QPushButton(QIcon(":/img/document-open.png"), tr("Load list")); connect(loadButton, SIGNAL(clicked()), this, SLOT(loadCertificateFile())); - addButton = new QPushButton(tr("Add")); + addButton = new QPushButton(QIcon(":/img/document-new.png"), tr("Add certificate")); connect(addButton, SIGNAL(clicked()), this, SLOT(addCertificates())); - removeButton = new QPushButton(tr("Remove")); + removeButton = new QPushButton(QIcon(":/img/document-close.png"), tr("Remove certificate")); removeButton->setEnabled(false); connect(removeButton, SIGNAL(clicked()), this, SLOT(removeCertificates())); bottomLayout->addWidget(saveButton); diff -r 3d1e9df24803 -r 81cf25402cb0 ui/certificatetablemodel.cpp --- a/ui/certificatetablemodel.cpp Wed Apr 16 17:11:18 2014 +0000 +++ b/ui/certificatetablemodel.cpp Thu Apr 17 08:55:16 2014 +0000 @@ -17,8 +17,8 @@ header.append(tr("Subject O")); header.append(tr("Issuer CN")); header.append(tr("Issuer O")); - header.append(tr("valid from")); - header.append(tr("valid to")); + header.append(tr("Valid from")); + header.append(tr("Valid to")); header.append(tr("SHA1 Fingerprint")); } diff -r 3d1e9df24803 -r 81cf25402cb0 ui/createcertlistdialog.cpp --- a/ui/createcertlistdialog.cpp Wed Apr 16 17:11:18 2014 +0000 +++ b/ui/createcertlistdialog.cpp Thu Apr 17 08:55:16 2014 +0000 @@ -14,31 +14,41 @@ #include #include #include +#include CreateCertListDialog::CreateCertListDialog(QMainWindow *parent) : QDialog(parent) { - setWindowTitle(tr("adminstrator - Create signed certificate list")); + setWindowTitle(tr("Save certificate list")); setupGUI(); + resize(500, 200); } void CreateCertListDialog::setupGUI() { /* Top level layout / widgets */ QVBoxLayout *topLayout = new QVBoxLayout; - QHBoxLayout *headerLayout = new QHBoxLayout; + QVBoxLayout *headerLayout = new QVBoxLayout; + QHBoxLayout *headerSubLayout = new QHBoxLayout; QVBoxLayout *centerLayout = new QVBoxLayout; QHBoxLayout *bottomLayout = new QHBoxLayout; QHBoxLayout *certLayout = new QHBoxLayout; QHBoxLayout *saveLayout = new QHBoxLayout; - QString descString = tr("Create a new, signed certificate list.\n"); - descString.append("Select the certificate and destination directory."); - QLabel *description = new QLabel(descString); - headerLayout->addWidget(description); + QLabel *header = new QLabel("

" + tr("Save certificate list") + "

"); + QLabel *description = new QLabel( + tr("Save all managed root certificates in a new, signed certificate list")); + headerSubLayout->insertSpacing(0, 40); + headerSubLayout->addWidget(description); + QFrame *headerSeparator = new QFrame(); + headerSeparator->setFrameShape(QFrame::HLine); + headerSeparator->setFrameShadow(QFrame::Sunken); + headerLayout->addWidget(header); + headerLayout->addLayout(headerSubLayout); + headerLayout->addWidget(headerSeparator); - QLabel *certLabel = new QLabel("Select certificate:"); - certLabel->setFixedWidth(140); + QLabel *certLabel = new QLabel("Select signature certificate (secret key):"); + certLabel->setFixedWidth(205); mCertFile = new QLineEdit(); QPushButton *certSelect = new QPushButton("..."); connect(certSelect, SIGNAL(clicked()), this, SLOT(openCertificateSelect())); @@ -47,27 +57,44 @@ certLayout->addWidget(mCertFile); certLayout->addWidget(certSelect); - QLabel *saveLabel = new QLabel("Select target location:"); - saveLabel->setFixedWidth(140); + QLabel *saveLabel = new QLabel("Select output folder:"); + saveLabel->setFixedWidth(205); mSaveFile = new QLineEdit(); QPushButton *saveSelect = new QPushButton("..."); connect(saveSelect, SIGNAL(clicked()), this, SLOT(openSaveLocation())); saveSelect->setFixedWidth(30); + + QString footerText = tr("In addition, each certificate list will be saved" + "automatically in the archive directory:\n"); + // TODO print out the path, not the displayName. + footerText.append(QStandardPaths::displayName(QStandardPaths::DataLocation)); + QLabel *footer = new QLabel(footerText); saveLayout->addWidget(saveLabel); saveLayout->addWidget(mSaveFile); saveLayout->addWidget(saveSelect); + centerLayout->insertSpacing(0, 10); centerLayout->addLayout(certLayout); centerLayout->addLayout(saveLayout); + centerLayout->insertSpacing(3, 10); - QPushButton *create = new QPushButton(tr("Create List")); + QPushButton *create = new QPushButton(tr("Sign list")); connect(create, SIGNAL(clicked()), this, SLOT(createList())); + QPushButton *cancel = new QPushButton(tr("Cancel")); + connect(cancel, SIGNAL(clicked()), this, SLOT(close())); bottomLayout->insertStretch(0, 10); bottomLayout->addWidget(create); + bottomLayout->addWidget(cancel); + + QFrame *bottomSeparator = new QFrame(); + bottomSeparator->setFrameShape(QFrame::HLine); + bottomSeparator->setFrameShadow(QFrame::Sunken); topLayout->addLayout(headerLayout); topLayout->addLayout(centerLayout); topLayout->insertStretch(2, 10); + topLayout->addWidget(footer); + topLayout->addWidget(bottomSeparator); topLayout->addLayout(bottomLayout); setLayout(topLayout); diff -r 3d1e9df24803 -r 81cf25402cb0 ui/createinstallerdialog.cpp --- a/ui/createinstallerdialog.cpp Wed Apr 16 17:11:18 2014 +0000 +++ b/ui/createinstallerdialog.cpp Thu Apr 17 08:55:16 2014 +0000 @@ -18,28 +18,37 @@ CreateInstallerDialog::CreateInstallerDialog(QMainWindow *parent) : QDialog(parent) { - setWindowTitle(tr("adminstrator - Create signed installer binary")); + setWindowTitle(tr("Create binary installer")); setupGUI(); + resize(500, 250); } void CreateInstallerDialog::setupGUI() { /* Top level layout / widgets */ QVBoxLayout *topLayout = new QVBoxLayout; - QHBoxLayout *headerLayout = new QHBoxLayout; + QVBoxLayout *headerLayout = new QVBoxLayout; + QHBoxLayout *headerSubLayout = new QHBoxLayout; QVBoxLayout *centerLayout = new QVBoxLayout; QHBoxLayout *bottomLayout = new QHBoxLayout; QHBoxLayout *archiveLayout = new QHBoxLayout; QHBoxLayout *certLayout = new QHBoxLayout; QHBoxLayout *saveLayout = new QHBoxLayout; - QString descString = tr("Create a new signed installer binary.\n"); - descString.append("Select the archive, certificate and destination directory."); - QLabel *description = new QLabel(descString); - headerLayout->addWidget(description); + QLabel *header = new QLabel("

" + tr("Create binary installer") + "

"); + QLabel *description = new QLabel( + tr("Create and signed a TrustBridge binary installer from source.")); + headerSubLayout->insertSpacing(0, 40); + headerSubLayout->addWidget(description); + QFrame *headerSeparator = new QFrame(); + headerSeparator->setFrameShape(QFrame::HLine); + headerSeparator->setFrameShadow(QFrame::Sunken); + headerLayout->addWidget(header); + headerLayout->addLayout(headerSubLayout); + headerLayout->addWidget(headerSeparator); - QLabel *archiveLabel = new QLabel("Select source archive:"); - archiveLabel->setFixedWidth(140); + QLabel *archiveLabel = new QLabel(tr("Select source archive:")); + archiveLabel->setFixedWidth(225); mArchiveFile = new QLineEdit(); QPushButton *archiveSelect = new QPushButton("..."); connect(archiveSelect, SIGNAL(clicked()), this, SLOT(openArchiveSelect())); @@ -48,8 +57,8 @@ archiveLayout->addWidget(mArchiveFile); archiveLayout->addWidget(archiveSelect); - QLabel *certLabel = new QLabel("Select certificate:"); - certLabel->setFixedWidth(140); + QLabel *certLabel = new QLabel(tr("Select code signing certificate (secret key):")); + certLabel->setFixedWidth(225); mCertFile = new QLineEdit(); QPushButton *certSelect = new QPushButton("..."); connect(certSelect, SIGNAL(clicked()), this, SLOT(openCertificateSelect())); @@ -58,8 +67,8 @@ certLayout->addWidget(mCertFile); certLayout->addWidget(certSelect); - QLabel *saveLabel = new QLabel("Select target location:"); - saveLabel->setFixedWidth(140); + QLabel *saveLabel = new QLabel(tr("Select output folder:")); + saveLabel->setFixedWidth(225); mSaveFile = new QLineEdit(); QPushButton *saveSelect = new QPushButton("..."); connect(saveSelect, SIGNAL(clicked()), this, SLOT(openSaveLocation())); @@ -68,18 +77,28 @@ saveLayout->addWidget(mSaveFile); saveLayout->addWidget(saveSelect); + centerLayout->insertSpacing(0, 10); centerLayout->addLayout(archiveLayout); centerLayout->addLayout(certLayout); centerLayout->addLayout(saveLayout); + centerLayout->insertSpacing(4, 10); - QPushButton *create = new QPushButton(tr("Create Installer")); + QPushButton *create = new QPushButton(tr("Create installer")); connect(create, SIGNAL(clicked()), this, SLOT(createInstaller())); + QPushButton *cancel = new QPushButton(tr("Cancel")); + connect(cancel, SIGNAL(clicked()), this, SLOT(close())); bottomLayout->insertStretch(0, 10); bottomLayout->addWidget(create); + bottomLayout->addWidget(cancel); + + QFrame *bottomSeparator = new QFrame(); + bottomSeparator->setFrameShape(QFrame::HLine); + bottomSeparator->setFrameShadow(QFrame::Sunken); topLayout->addLayout(headerLayout); topLayout->addLayout(centerLayout); topLayout->insertStretch(2, 10); + topLayout->addWidget(bottomSeparator); topLayout->addLayout(bottomLayout); setLayout(topLayout); diff -r 3d1e9df24803 -r 81cf25402cb0 ui/icons.qrc --- a/ui/icons.qrc Wed Apr 16 17:11:18 2014 +0000 +++ b/ui/icons.qrc Thu Apr 17 08:55:16 2014 +0000 @@ -5,5 +5,9 @@ img/logo-small.png img/list-add.png img/list-remove.png + img/document-save.png + img/document-open.png + img/document-new.png + img/document-close.png diff -r 3d1e9df24803 -r 81cf25402cb0 ui/img/document-close.png Binary file ui/img/document-close.png has changed diff -r 3d1e9df24803 -r 81cf25402cb0 ui/img/document-new.png Binary file ui/img/document-new.png has changed diff -r 3d1e9df24803 -r 81cf25402cb0 ui/img/document-open.png Binary file ui/img/document-open.png has changed diff -r 3d1e9df24803 -r 81cf25402cb0 ui/img/document-save.png Binary file ui/img/document-save.png has changed