| 7 | #include <QVBoxLayout> |
| 8 | |
| 9 | ExportLibraryDialog::ExportLibraryDialog(QWidget *parent) |
| 10 | : QDialog(parent), progressCount(0) |
| 11 | { |
| 12 | textLabel = new QLabel(tr("Output folder : ")); |
| 13 | path = new QLineEdit; |
| 14 | textLabel->setBuddy(path); |
| 15 | |
| 16 | accept = new QPushButton(tr("Create")); |
| 17 | accept->setDisabled(true); |
| 18 | connect(accept, &QAbstractButton::clicked, this, &ExportLibraryDialog::exportLibrary); |
| 19 | |
| 20 | cancel = new QPushButton(tr("Cancel")); |
| 21 | connect(cancel, &QAbstractButton::clicked, this, &ExportLibraryDialog::close); |
| 22 | connect(cancel, &QAbstractButton::clicked, this, &QDialog::rejected); |
| 23 | |
| 24 | find = new QPushButton(""); |
| 25 | connect(find, &QAbstractButton::clicked, this, &ExportLibraryDialog::findPath); |
| 26 | |
| 27 | auto libraryLayout = new QHBoxLayout; |
| 28 | |
| 29 | libraryLayout->addWidget(textLabel); |
| 30 | libraryLayout->addWidget(path); |
| 31 | libraryLayout->addWidget(find); |
| 32 | libraryLayout->setStretchFactor(find, 0); // TODO |
| 33 | |
| 34 | auto bottomLayout = new QHBoxLayout; |
| 35 | bottomLayout->addStretch(); |
| 36 | bottomLayout->addWidget(accept); |
| 37 | bottomLayout->addWidget(cancel); |
| 38 | |
| 39 | progressBar = new QProgressBar(this); |
| 40 | progressBar->setMinimum(0); |
| 41 | progressBar->setMaximum(0); |
| 42 | progressBar->setTextVisible(false); |
| 43 | progressBar->hide(); |
| 44 | |
| 45 | auto mainLayout = new QVBoxLayout; |
| 46 | mainLayout->addLayout(libraryLayout); |
| 47 | mainLayout->addStretch(); |
| 48 | mainLayout->addWidget(progressBar); |
| 49 | mainLayout->addLayout(bottomLayout); |
| 50 | |
| 51 | auto imgMainLayout = new QHBoxLayout; |
| 52 | imgLabel = new QLabel(this); |
| 53 | imgMainLayout->addWidget(imgLabel); |
| 54 | imgMainLayout->addLayout(mainLayout); |
| 55 | |
| 56 | setLayout(imgMainLayout); |
| 57 | |
| 58 | setModal(true); |
| 59 | setWindowTitle(tr("Create covers package")); |
| 60 | |
| 61 | initTheme(this); |
| 62 | } |
| 63 | |
| 64 | void ExportLibraryDialog::applyTheme(const Theme &theme) |
| 65 | { |
nothing calls this directly
no test coverage detected