comparison ui/createinstallerdialog.cpp @ 428:d1819cd56dee

Updated dialog layout.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 17 Apr 2014 13:16:43 +0200
parents d7cda835abd6
children 9d3880db6ba7
comparison
equal deleted inserted replaced
427:d08e39b913ee 428:d1819cd56dee
27 { 27 {
28 /* Top level layout / widgets */ 28 /* Top level layout / widgets */
29 QVBoxLayout *topLayout = new QVBoxLayout; 29 QVBoxLayout *topLayout = new QVBoxLayout;
30 QVBoxLayout *headerLayout = new QVBoxLayout; 30 QVBoxLayout *headerLayout = new QVBoxLayout;
31 QHBoxLayout *headerSubLayout = new QHBoxLayout; 31 QHBoxLayout *headerSubLayout = new QHBoxLayout;
32 QVBoxLayout *centerLayout = new QVBoxLayout; 32 QHBoxLayout *centerLayout = new QHBoxLayout;
33 QHBoxLayout *bottomLayout = new QHBoxLayout; 33 QHBoxLayout *bottomLayout = new QHBoxLayout;
34 QHBoxLayout *archiveLayout = new QHBoxLayout; 34 QVBoxLayout *labelLayout = new QVBoxLayout;
35 QHBoxLayout *certLayout = new QHBoxLayout; 35 QVBoxLayout *fieldLayout = new QVBoxLayout;
36 QHBoxLayout *saveLayout = new QHBoxLayout; 36 QVBoxLayout *buttonLayout = new QVBoxLayout;
37 37
38 QLabel *header = new QLabel("<h3>" + tr("Create binary installer") + "</h3>"); 38 QLabel *header = new QLabel("<h3>" + tr("Create binary installer") + "</h3>");
39 QLabel *description = new QLabel( 39 QLabel *description = new QLabel(
40 tr("Create and sign a TrustBridge binary installer from source.")); 40 tr("Create and sign a TrustBridge binary installer from source."));
41 headerSubLayout->insertSpacing(0, 40); 41 headerSubLayout->insertSpacing(0, 40);
44 headerSeparator->setFrameShape(QFrame::HLine); 44 headerSeparator->setFrameShape(QFrame::HLine);
45 headerSeparator->setFrameShadow(QFrame::Sunken); 45 headerSeparator->setFrameShadow(QFrame::Sunken);
46 headerLayout->addWidget(header); 46 headerLayout->addWidget(header);
47 headerLayout->addLayout(headerSubLayout); 47 headerLayout->addLayout(headerSubLayout);
48 headerLayout->addWidget(headerSeparator); 48 headerLayout->addWidget(headerSeparator);
49 headerLayout->insertSpacing(4, 10);
49 50
50 QLabel *archiveLabel = new QLabel(tr("Select source archive:")); 51 QLabel *archiveLabel = new QLabel(tr("Select source archive:"));
51 archiveLabel->setFixedWidth(225); 52 QLabel *certLabel = new QLabel(tr("Select code signing certificate (secret key):"));
53 QLabel *saveLabel = new QLabel(tr("Select output folder:"));
54 labelLayout->addWidget(archiveLabel);
55 labelLayout->addWidget(certLabel);
56 labelLayout->addWidget(saveLabel);
57
52 mArchiveFile = new QLineEdit(); 58 mArchiveFile = new QLineEdit();
59 mCertFile = new QLineEdit();
60 mSaveFile = new QLineEdit();
61 fieldLayout->addWidget(mArchiveFile);
62 fieldLayout->addWidget(mCertFile);
63 fieldLayout->addWidget(mSaveFile);
64
53 QPushButton *archiveSelect = new QPushButton("..."); 65 QPushButton *archiveSelect = new QPushButton("...");
54 connect(archiveSelect, SIGNAL(clicked()), this, SLOT(openArchiveSelect())); 66 connect(archiveSelect, SIGNAL(clicked()), this, SLOT(openArchiveSelect()));
55 archiveSelect->setFixedWidth(30); 67 archiveSelect->setFixedWidth(30);
56 archiveLayout->addWidget(archiveLabel);
57 archiveLayout->addWidget(mArchiveFile);
58 archiveLayout->addWidget(archiveSelect);
59
60 QLabel *certLabel = new QLabel(tr("Select code signing certificate (secret key):"));
61 certLabel->setFixedWidth(225);
62 mCertFile = new QLineEdit();
63 QPushButton *certSelect = new QPushButton("..."); 68 QPushButton *certSelect = new QPushButton("...");
64 connect(certSelect, SIGNAL(clicked()), this, SLOT(openCertificateSelect())); 69 connect(certSelect, SIGNAL(clicked()), this, SLOT(openCertificateSelect()));
65 certSelect->setFixedWidth(30); 70 certSelect->setFixedWidth(30);
66 certLayout->addWidget(certLabel);
67 certLayout->addWidget(mCertFile);
68 certLayout->addWidget(certSelect);
69
70 QLabel *saveLabel = new QLabel(tr("Select output folder:"));
71 saveLabel->setFixedWidth(225);
72 mSaveFile = new QLineEdit();
73 QPushButton *saveSelect = new QPushButton("..."); 71 QPushButton *saveSelect = new QPushButton("...");
74 connect(saveSelect, SIGNAL(clicked()), this, SLOT(openSaveLocation())); 72 connect(saveSelect, SIGNAL(clicked()), this, SLOT(openSaveLocation()));
75 saveSelect->setFixedWidth(30); 73 saveSelect->setFixedWidth(30);
76 saveLayout->addWidget(saveLabel); 74 buttonLayout->addWidget(archiveSelect);
77 saveLayout->addWidget(mSaveFile); 75 buttonLayout->addWidget(certSelect);
78 saveLayout->addWidget(saveSelect); 76 buttonLayout->addWidget(saveSelect);
79 77
80 centerLayout->insertSpacing(0, 10); 78 centerLayout->addLayout(labelLayout);
81 centerLayout->addLayout(archiveLayout); 79 centerLayout->addLayout(fieldLayout);
82 centerLayout->addLayout(certLayout); 80 centerLayout->addLayout(buttonLayout);
83 centerLayout->addLayout(saveLayout);
84 centerLayout->insertSpacing(4, 10);
85 81
86 QPushButton *create = new QPushButton(tr("Create installer")); 82 QPushButton *create = new QPushButton(tr("Create installer"));
87 connect(create, SIGNAL(clicked()), this, SLOT(createInstaller())); 83 connect(create, SIGNAL(clicked()), this, SLOT(createInstaller()));
88 QPushButton *cancel = new QPushButton(tr("Cancel")); 84 QPushButton *cancel = new QPushButton(tr("Cancel"));
89 connect(cancel, SIGNAL(clicked()), this, SLOT(close())); 85 connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
96 bottomSeparator->setFrameShadow(QFrame::Sunken); 92 bottomSeparator->setFrameShadow(QFrame::Sunken);
97 93
98 topLayout->addLayout(headerLayout); 94 topLayout->addLayout(headerLayout);
99 topLayout->addLayout(centerLayout); 95 topLayout->addLayout(centerLayout);
100 topLayout->insertStretch(2, 10); 96 topLayout->insertStretch(2, 10);
97 centerLayout->insertSpacing(3, 10);
101 topLayout->addWidget(bottomSeparator); 98 topLayout->addWidget(bottomSeparator);
102 topLayout->addLayout(bottomLayout); 99 topLayout->addLayout(bottomLayout);
103 100
104 setLayout(topLayout); 101 setLayout(topLayout);
105 102

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