Mercurial > trustbridge
diff ui/createinstallerdialog.cpp @ 424:81cf25402cb0
Merge
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 17 Apr 2014 08:55:16 +0000 |
parents | 03c562b1a3ea |
children | d7cda835abd6 |
line wrap: on
line diff
--- 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("<h3>" + tr("Create binary installer") + "</h3>"); + 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);