# HG changeset patch # User Raimund Renkert # Date 1397661837 -7200 # Node ID 860affe19416cb9e4f32b6e64f5819cd038d6eb9 # Parent 340b8759d005f9f95d17dd10c28d48eaa4172b20 Wording und Layout in TrustBridge create certificate file dialog. diff -r 340b8759d005 -r 860affe19416 ui/createcertlistdialog.cpp --- a/ui/createcertlistdialog.cpp Wed Apr 16 17:21:54 2014 +0200 +++ b/ui/createcertlistdialog.cpp Wed Apr 16 17:23:57 2014 +0200 @@ -14,30 +14,40 @@ #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:"); + QLabel *certLabel = new QLabel("Select signature certificate (secret key):"); certLabel->setFixedWidth(140); mCertFile = new QLineEdit(); QPushButton *certSelect = new QPushButton("..."); @@ -47,27 +57,44 @@ certLayout->addWidget(mCertFile); certLayout->addWidget(certSelect); - QLabel *saveLabel = new QLabel("Select target location:"); + QLabel *saveLabel = new QLabel("Select output folder:"); saveLabel->setFixedWidth(140); 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")); 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);