15#include <QApplication>
18#include <QProgressBar>
22#include <QStringLiteral>
26#include "../../backend/btinstallthread.h"
27#include "../../backend/drivers/btmoduleset.h"
28#include "../../backend/drivers/cswordmoduleinfo.h"
29#include "../../backend/managers/cswordbackend.h"
30#include "../../util/btconnect.h"
38 "GUI/BookshelfWizard/InstallPage/installPathIndex";
50 QSizePolicy::Expanding));
65 QHBoxLayout *
const horizontalLayout =
new QHBoxLayout();
67 horizontalLayout->addSpacerItem(
68 new QSpacerItem(1, 1, QSizePolicy::Expanding));
70 horizontalLayout->addSpacerItem(
71 new QSpacerItem(1, 1, QSizePolicy::Expanding));
77 QSizePolicy::Expanding));
97 setTitle(QApplication::translate(
98 "BookshelfWizard",
"Updating Works"));
99 setSubTitle(QApplication::translate(
101 "The selected works are being updated."));
103 setTitle(QApplication::translate(
104 "BookshelfWizard",
"Installing Works"));
105 setSubTitle(QApplication::translate(
107 "The selected works are being installed."));
120 m_modules = btWiz.selectedWorks().values();
126 Qt::QueuedConnection);
129 Qt::QueuedConnection);
132 Qt::QueuedConnection);
135 Qt::QueuedConnection);
159 tr(
"Installing \"%1\"").arg(
m_modules.at(moduleIndex)->name()));
185 bool const successful)
200 tr(
"Some of the selected works were not installed."));
201 m_msgLabel->setStyleSheet(
"QLabel{color:red}");
203 m_msgLabel->setText(tr(
"The selected works have been installed."));
210 Q_EMIT QWizardPage::completeChanged();
BtBookshelfInstallFinalPage(QWidget *parent=nullptr)
QList< CSwordModuleInfo * > m_modules
void slotThreadFinished()
void slotOneItemCompleted(int moduleIndex, bool status)
static constexpr int const MAX_MODULES
BtInstallThread * m_thread
void initializePage() final override
QPushButton * m_stopButton
void slotInstallStarted(int moduleIndex)
bool isComplete() const final override
void slotStatusUpdated(int moduleIndex, int status)
void destroyThread() noexcept
int nextId() const final override
QVBoxLayout * m_verticalLayout
QProgressBar * m_progressBar
BtBookshelfWizard & btWizard() const noexcept
void downloadStarted(int moduleIndex)
void preparingInstall(int moduleIndex)
void installCompleted(int moduleIndex, bool success)
void statusUpdated(int moduleIndex, int progressPercent)
void reloadModules()
Reloads all Sword modules.
static CSwordBackend & instance() noexcept
QString const installPathKey
QString const groupingOrderKey