BibleTime
btbookshelfinstallfinalpage.h
Go to the documentation of this file.
1/*********
2*
3* In the name of the Father, and of the Son, and of the Holy Spirit.
4*
5* This file is part of BibleTime's source code, https://bibletime.info/
6*
7* Copyright 1999-2026 by the BibleTime developers.
8* The BibleTime source code is licensed under the GNU General Public License
9* version 2.0.
10*
11**********/
12
13#pragma once
14
16
17#include <limits>
18#include <QList>
19#include <QObject>
20#include <QString>
21#include "../../backend/drivers/btmoduleset.h"
22
23
24class BtInstallThread;
26class QLabel;
27class QProgressBar;
28class QPushButton;
29class QVBoxLayout;
30class QWidget;
31
33
34 Q_OBJECT
35
36public: // constants:
37
38 // Maximum number of modules the current QProgressBar logic can handle:
39 static constexpr int const MAX_MODULES =
40 std::numeric_limits<int>::max() / 100;
41
42public: // methods:
43
44 BtBookshelfInstallFinalPage(QWidget * parent = nullptr);
45 ~BtBookshelfInstallFinalPage() noexcept final override { destroyThread(); }
46
47 void destroyThread() noexcept;
48
49 void initializePage() final override;
50 bool isComplete() const final override;
51 int nextId() const final override;
53
54public Q_SLOTS:
55 void slotStopInstall();
56
57private Q_SLOTS:
58
59 void slotInstallStarted(int moduleIndex);
60 void slotOneItemCompleted(int moduleIndex, bool status);
61 void slotStatusUpdated(int moduleIndex, int status);
62 void slotThreadFinished();
63
64private: // methods:
65
66 void retranslateUi();
67
68private: // fields:
69
70 QLabel * m_msgLabel;
71 QLabel * m_msgLabel2;
72 QProgressBar * m_progressBar;
73 QPushButton * m_stopButton;
75 QVBoxLayout * m_verticalLayout;
76
77 bool m_installFailed = false;
78 bool m_installCompleted = false;
79
81 int m_lastStatus = -1;
82
83}; /* class BtBookshelfInstallFinalPage */
QList< CSwordModuleInfo * > m_modules
void slotOneItemCompleted(int moduleIndex, bool status)
BtModuleSet selectedWorks() const
static constexpr int const MAX_MODULES
void slotStatusUpdated(int moduleIndex, int status)
~BtBookshelfInstallFinalPage() noexcept final override