Changeset View
Changeset View
Standalone View
Standalone View
isoimagewriter/mainwindow.cpp
Context not available. | |||||
121 | 121 | | |||
---|---|---|---|---|---|
122 | QWidget* MainWindow::createFormWidget() | 122 | QWidget* MainWindow::createFormWidget() | ||
123 | { | 123 | { | ||
124 | // Form | | |||
125 | m_isoImageLineEdit = new QLineEdit; | 124 | m_isoImageLineEdit = new QLineEdit; | ||
126 | m_isoImageLineEdit->setReadOnly(true); | 125 | m_isoImageLineEdit->setReadOnly(true); | ||
127 | m_isoImageLineEdit->setPlaceholderText(i18n("Path to ISO image...")); | 126 | m_isoImageLineEdit->setPlaceholderText(i18n("Path to ISO image...")); | ||
Context not available. | |||||
132 | 131 | | |||
133 | m_usbDriveComboBox = new QComboBox; | 132 | m_usbDriveComboBox = new QComboBox; | ||
134 | 133 | | |||
134 | m_verifyButton = new QPushButton(i18n("Verify")); | ||||
135 | m_verifyButton->setEnabled(false); | ||||
136 | connect(m_verifyButton, &QPushButton::clicked, this, &MainWindow::verifyImage); | ||||
137 | | ||||
135 | m_createButton = new QPushButton(i18n("Create")); | 138 | m_createButton = new QPushButton(i18n("Create")); | ||
136 | m_createButton->setEnabled(false); | 139 | m_createButton->setEnabled(false); | ||
137 | connect(m_createButton, &QPushButton::clicked, this, &MainWindow::showConfirmMessage); | 140 | connect(m_createButton, &QPushButton::clicked, this, &MainWindow::showConfirmMessage); | ||
Context not available. | |||||
146 | QHBoxLayout *footerBoxLayout = new QHBoxLayout; | 149 | QHBoxLayout *footerBoxLayout = new QHBoxLayout; | ||
147 | footerBoxLayout->addWidget(m_busyWidget); | 150 | footerBoxLayout->addWidget(m_busyWidget); | ||
148 | footerBoxLayout->addWidget(m_busyLabel); | 151 | footerBoxLayout->addWidget(m_busyLabel); | ||
149 | footerBoxLayout->addWidget(m_createButton, 0, Qt::AlignRight); | 152 | footerBoxLayout->addWidget(m_verifyButton); | ||
153 | footerBoxLayout->addWidget(m_createButton); | ||||
150 | 154 | | |||
151 | QVBoxLayout *mainVBoxLayout = new QVBoxLayout; | 155 | QVBoxLayout *mainVBoxLayout = new QVBoxLayout; | ||
152 | mainVBoxLayout->addWidget(new QLabel(i18n("Write this ISO image:"))); | 156 | mainVBoxLayout->addWidget(new QLabel(i18n("Write this ISO image:"))); | ||
Context not available. | |||||
293 | isoVerifier->moveToThread(verifierThread); | 297 | isoVerifier->moveToThread(verifierThread); | ||
294 | verifierThread->start(); | 298 | verifierThread->start(); | ||
295 | 299 | | |||
296 | // Enable the Write button (if there are USB flash disks present) | 300 | m_verifyButton->setEnabled(true); | ||
297 | m_createButton->setEnabled(m_usbDriveComboBox->count() > 0); | 301 | m_createButton->setEnabled(m_usbDriveComboBox->count() > 0); | ||
298 | } | 302 | } | ||
299 | 303 | | |||
Context not available. |