Mercurial > trustbridge
comparison ui/createinstallerdialog.cpp @ 414:3d803d383b41
Wording and layout in TrustBridge administration create binary dialog.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 16 Apr 2014 17:35:08 +0200 |
parents | 17e1c8f37d72 |
children | 03c562b1a3ea |
comparison
equal
deleted
inserted
replaced
413:860affe19416 | 414:3d803d383b41 |
---|---|
16 #include <QFileDialog> | 16 #include <QFileDialog> |
17 | 17 |
18 CreateInstallerDialog::CreateInstallerDialog(QMainWindow *parent) : | 18 CreateInstallerDialog::CreateInstallerDialog(QMainWindow *parent) : |
19 QDialog(parent) | 19 QDialog(parent) |
20 { | 20 { |
21 setWindowTitle(tr("adminstrator - Create signed installer binary")); | 21 setWindowTitle(tr("Create binary installer")); |
22 setupGUI(); | 22 setupGUI(); |
23 resize(500, 250); | |
23 } | 24 } |
24 | 25 |
25 void CreateInstallerDialog::setupGUI() | 26 void CreateInstallerDialog::setupGUI() |
26 { | 27 { |
27 /* Top level layout / widgets */ | 28 /* Top level layout / widgets */ |
28 QVBoxLayout *topLayout = new QVBoxLayout; | 29 QVBoxLayout *topLayout = new QVBoxLayout; |
29 QHBoxLayout *headerLayout = new QHBoxLayout; | 30 QVBoxLayout *headerLayout = new QVBoxLayout; |
31 QHBoxLayout *headerSubLayout = new QHBoxLayout; | |
30 QVBoxLayout *centerLayout = new QVBoxLayout; | 32 QVBoxLayout *centerLayout = new QVBoxLayout; |
31 QHBoxLayout *bottomLayout = new QHBoxLayout; | 33 QHBoxLayout *bottomLayout = new QHBoxLayout; |
32 QHBoxLayout *archiveLayout = new QHBoxLayout; | 34 QHBoxLayout *archiveLayout = new QHBoxLayout; |
33 QHBoxLayout *certLayout = new QHBoxLayout; | 35 QHBoxLayout *certLayout = new QHBoxLayout; |
34 QHBoxLayout *saveLayout = new QHBoxLayout; | 36 QHBoxLayout *saveLayout = new QHBoxLayout; |
35 | 37 |
36 QString descString = tr("Create a new signed installer binary.\n"); | 38 QLabel *header = new QLabel("<h3>" + tr("Create binary installer") + "</h3>"); |
37 descString.append("Select the archive, certificate and destination directory."); | 39 QLabel *description = new QLabel( |
38 QLabel *description = new QLabel(descString); | 40 tr("Create and signed a TrustBridge binary installer from source.")); |
39 headerLayout->addWidget(description); | 41 headerSubLayout->insertSpacing(0, 40); |
42 headerSubLayout->addWidget(description); | |
43 QFrame *headerSeparator = new QFrame(); | |
44 headerSeparator->setFrameShape(QFrame::HLine); | |
45 headerSeparator->setFrameShadow(QFrame::Sunken); | |
46 headerLayout->addWidget(header); | |
47 headerLayout->addLayout(headerSubLayout); | |
48 headerLayout->addWidget(headerSeparator); | |
40 | 49 |
41 QLabel *archiveLabel = new QLabel("Select source archive:"); | 50 QLabel *archiveLabel = new QLabel(tr("Select source archive:")); |
42 archiveLabel->setFixedWidth(140); | 51 archiveLabel->setFixedWidth(140); |
43 mArchiveFile = new QLineEdit(); | 52 mArchiveFile = new QLineEdit(); |
44 QPushButton *archiveSelect = new QPushButton("..."); | 53 QPushButton *archiveSelect = new QPushButton("..."); |
45 connect(archiveSelect, SIGNAL(clicked()), this, SLOT(openArchiveSelect())); | 54 connect(archiveSelect, SIGNAL(clicked()), this, SLOT(openArchiveSelect())); |
46 archiveSelect->setFixedWidth(30); | 55 archiveSelect->setFixedWidth(30); |
47 archiveLayout->addWidget(archiveLabel); | 56 archiveLayout->addWidget(archiveLabel); |
48 archiveLayout->addWidget(mArchiveFile); | 57 archiveLayout->addWidget(mArchiveFile); |
49 archiveLayout->addWidget(archiveSelect); | 58 archiveLayout->addWidget(archiveSelect); |
50 | 59 |
51 QLabel *certLabel = new QLabel("Select certificate:"); | 60 QLabel *certLabel = new QLabel(tr("Select code signing certificate (secret key):")); |
52 certLabel->setFixedWidth(140); | 61 certLabel->setFixedWidth(140); |
53 mCertFile = new QLineEdit(); | 62 mCertFile = new QLineEdit(); |
54 QPushButton *certSelect = new QPushButton("..."); | 63 QPushButton *certSelect = new QPushButton("..."); |
55 connect(certSelect, SIGNAL(clicked()), this, SLOT(openCertificateSelect())); | 64 connect(certSelect, SIGNAL(clicked()), this, SLOT(openCertificateSelect())); |
56 certSelect->setFixedWidth(30); | 65 certSelect->setFixedWidth(30); |
57 certLayout->addWidget(certLabel); | 66 certLayout->addWidget(certLabel); |
58 certLayout->addWidget(mCertFile); | 67 certLayout->addWidget(mCertFile); |
59 certLayout->addWidget(certSelect); | 68 certLayout->addWidget(certSelect); |
60 | 69 |
61 QLabel *saveLabel = new QLabel("Select target location:"); | 70 QLabel *saveLabel = new QLabel(tr("Select output folder:")); |
62 saveLabel->setFixedWidth(140); | 71 saveLabel->setFixedWidth(140); |
63 mSaveFile = new QLineEdit(); | 72 mSaveFile = new QLineEdit(); |
64 QPushButton *saveSelect = new QPushButton("..."); | 73 QPushButton *saveSelect = new QPushButton("..."); |
65 connect(saveSelect, SIGNAL(clicked()), this, SLOT(openSaveLocation())); | 74 connect(saveSelect, SIGNAL(clicked()), this, SLOT(openSaveLocation())); |
66 saveSelect->setFixedWidth(30); | 75 saveSelect->setFixedWidth(30); |
67 saveLayout->addWidget(saveLabel); | 76 saveLayout->addWidget(saveLabel); |
68 saveLayout->addWidget(mSaveFile); | 77 saveLayout->addWidget(mSaveFile); |
69 saveLayout->addWidget(saveSelect); | 78 saveLayout->addWidget(saveSelect); |
70 | 79 |
80 centerLayout->insertSpacing(0, 10); | |
71 centerLayout->addLayout(archiveLayout); | 81 centerLayout->addLayout(archiveLayout); |
72 centerLayout->addLayout(certLayout); | 82 centerLayout->addLayout(certLayout); |
73 centerLayout->addLayout(saveLayout); | 83 centerLayout->addLayout(saveLayout); |
84 centerLayout->insertSpacing(4, 10); | |
74 | 85 |
75 QPushButton *create = new QPushButton(tr("Create Installer")); | 86 QPushButton *create = new QPushButton(tr("Create installer")); |
76 connect(create, SIGNAL(clicked()), this, SLOT(createInstaller())); | 87 connect(create, SIGNAL(clicked()), this, SLOT(createInstaller())); |
88 QPushButton *cancel = new QPushButton(tr("Cancel")); | |
89 connect(cancel, SIGNAL(clicked()), this, SLOT(close())); | |
77 bottomLayout->insertStretch(0, 10); | 90 bottomLayout->insertStretch(0, 10); |
78 bottomLayout->addWidget(create); | 91 bottomLayout->addWidget(create); |
92 bottomLayout->addWidget(cancel); | |
93 | |
94 QFrame *bottomSeparator = new QFrame(); | |
95 bottomSeparator->setFrameShape(QFrame::HLine); | |
96 bottomSeparator->setFrameShadow(QFrame::Sunken); | |
79 | 97 |
80 topLayout->addLayout(headerLayout); | 98 topLayout->addLayout(headerLayout); |
81 topLayout->addLayout(centerLayout); | 99 topLayout->addLayout(centerLayout); |
82 topLayout->insertStretch(2, 10); | 100 topLayout->insertStretch(2, 10); |
101 topLayout->addWidget(bottomSeparator); | |
83 topLayout->addLayout(bottomLayout); | 102 topLayout->addLayout(bottomLayout); |
84 | 103 |
85 setLayout(topLayout); | 104 setLayout(topLayout); |
86 | 105 |
87 return; | 106 return; |