BibleTime
btbookshelfwizard.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 <QWizard>
16 
17 #include <QObject>
18 #include <QString>
19 #include <QStringList>
20 #include <Qt>
21 #include "btbookshelfwizardenums.h"
22 
23 
30 class BtModuleSet;
31 class QKeyEvent;
32 class QMessageBox;
33 class QWidget;
34 
35 /** \brief The Bookshelf Manager wizard. */
36 class BtBookshelfWizard final: public QWizard {
37 
38  Q_OBJECT
39 
40 public: // methods:
41 
42  BtBookshelfWizard(QWidget * parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());
43 
44  QStringList selectedSources() const;
45  QStringList selectedLanguages() const;
46  BtModuleSet selectedWorks() const;
47  WizardTaskType taskType() const;
48  QString installPath() const;
49 
50  static void setAutoUpdateSources(bool value);
51  static bool autoUpdateSources();
52 
54  return *m_languagesPage;
55  }
56 
57  void downloadStarted();
58  void downloadFinished();
59 
60 public Q_SLOTS:
61 
62  void accept() final override;
63 
64 protected:
65  virtual void keyPressEvent(QKeyEvent * event) override;
66 
67 private: // methods:
68 
69  void retranslateUi();
70  void stopDownload();
71 
72 private: // fields:
73 
76  QMessageBox * m_closeMessageBox;
77 
86 
87 }; /* class BtBookshelfWizard */
The Bookshelf Manager wizard.
QMessageBox * m_closeMessageBox
QStringList selectedSources() const
BtBookshelfWizard(QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
virtual void keyPressEvent(QKeyEvent *event) override
BtBookshelfSourcesPage *const m_sourcesPage
QStringList selectedLanguages() const
void accept() final override
static bool autoUpdateSources()
static void setAutoUpdateSources(bool value)
BtBookshelfSourcesProgressPage *const m_sourcesProgressPage
BtBookshelfLanguagesPage *const m_languagesPage
BtBookshelfLanguagesPage & languagesPage() const noexcept
BtBookshelfInstallFinalPage *const m_installFinalPage
QString installPath() const
WizardTaskType taskType() const
BtBookshelfWorksPage *const m_removeWorksPage
BtModuleSet selectedWorks() const
BtBookshelfWorksPage *const m_updateWorksPage
BtBookshelfWorksPage *const m_installWorksPage
BtBookshelfTaskPage *const m_taskPage