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-2021 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 
15 #include "btbookshelfwizardpage.h"
16 
17 #include <QList>
18 #include <QObject>
19 #include <QString>
20 #include "../../backend/drivers/btmoduleset.h"
21 
22 
23 class BtInstallThread;
24 class CSwordModuleInfo;
25 class QLabel;
26 class QProgressBar;
27 class QPushButton;
28 class QVBoxLayout;
29 class QWidget;
30 
32 
33  Q_OBJECT
34 
35 public: // methods:
36 
37  BtBookshelfInstallFinalPage(QWidget * parent = nullptr);
38  ~BtBookshelfInstallFinalPage() noexcept final override { destroyThread(); }
39 
40  void destroyThread() noexcept;
41 
42  void initializePage() final override;
43  bool isComplete() const final override;
44  int nextId() const final override;
46 
47 public Q_SLOTS:
48  void slotStopInstall();
49 
50 private Q_SLOTS:
51 
52  void slotInstallStarted(int moduleIndex);
53  void slotOneItemCompleted(int moduleIndex, bool status);
54  void slotStatusUpdated(int moduleIndex, int status);
55  void slotThreadFinished();
56 
57 private: // methods:
58 
59  void retranslateUi();
60 
61 private: // fields:
62 
63  QLabel * m_msgLabel;
64  QLabel * m_msgLabel2;
65  QProgressBar * m_progressBar;
66  QPushButton * m_stopButton;
68  QVBoxLayout * m_verticalLayout;
69 
70  bool m_installFailed = false;
71  bool m_installCompleted = false;
72 
74  int m_lastStatus = -1;
75 
76 }; /* class BtBookshelfInstallFinalPage */
BtBookshelfInstallFinalPage(QWidget *parent=nullptr)
QList< CSwordModuleInfo * > m_modules
void slotOneItemCompleted(int moduleIndex, bool status)
BtModuleSet selectedWorks() const
bool isComplete() const final override
void slotStatusUpdated(int moduleIndex, int status)
~BtBookshelfInstallFinalPage() noexcept final override