MCPcopy Create free account
hub / github.com/YACReader/yacreader / ExportLibraryDialog

Method ExportLibraryDialog

YACReaderLibrary/export_library_dialog.cpp:9–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <QVBoxLayout>
8
9ExportLibraryDialog::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
64void ExportLibraryDialog::applyTheme(const Theme &theme)
65{

Callers

nothing calls this directly

Calls 2

hideMethod · 0.80
setDisabledMethod · 0.45

Tested by

no test coverage detected