BibleTime
src
frontend
btbookshelfdockwidget.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 <QDockWidget>
16
17
#include <QObject>
18
#include <QString>
19
#include <Qt>
20
#include "../backend/bookshelfmodel/btbookshelftreemodel.h"
21
22
23
class
BtBookshelfWidget
;
24
class
CSwordModuleInfo
;
25
class
QAction
;
26
class
QLabel;
27
class
QMenu
;
28
class
QPushButton;
29
class
QStackedWidget;
30
class
QWidget
;
31
32
class
BtBookshelfDockWidget
:
public
QDockWidget
{
33
Q_OBJECT
34
public
:
35
BtBookshelfDockWidget
(
QWidget
*parent =
nullptr
, Qt::WindowFlags f = Qt::WindowFlags());
36
37
static
BtBookshelfDockWidget
*
getInstance
() {
return
m_instance
; }
38
39
BtBookshelfTreeModel::Grouping
groupingOrder
()
const
40
{
return
m_treeModel
->
groupingOrder
(); }
41
42
void
loadBookshelfState
();
43
void
saveBookshelfState
();
44
45
Q_SIGNALS:
46
void
moduleHovered
(
CSwordModuleInfo
*module);
47
void
moduleOpenTriggered
(
CSwordModuleInfo
*module);
48
void
moduleSearchTriggered
(
CSwordModuleInfo
*module);
49
void
moduleUnlockTriggered
(
CSwordModuleInfo
*module);
50
void
moduleAboutTriggered
(
CSwordModuleInfo
*module);
51
void
groupingOrderChanged
(
BtBookshelfTreeModel::Grouping
newGrouping);
52
void
installWorksClicked
();
53
54
protected
:
55
void
initMenus
();
56
void
retranslateUi
();
57
58
protected
:
59
BtBookshelfTreeModel
*
m_treeModel
;
60
61
QStackedWidget *
m_stackedWidget
;
62
BtBookshelfWidget
*
m_bookshelfWidget
;
63
QWidget
*
m_welcomeWidget
;
64
QLabel *
m_installLabel
;
65
QPushButton *
m_installButton
;
66
67
// Item context menu:
68
QMenu
*
m_itemContextMenu
;
69
QAction
*
m_itemOpenAction
;
70
QAction
*
m_itemSearchAction
;
71
QAction
*
m_itemUnlockAction
;
72
QAction
*
m_itemAboutAction
;
73
74
static
BtBookshelfDockWidget
*
m_instance
;
75
};
BtBookshelfDockWidget
Definition:
btbookshelfdockwidget.h:32
BtBookshelfDockWidget::groupingOrder
BtBookshelfTreeModel::Grouping groupingOrder() const
Definition:
btbookshelfdockwidget.h:39
BtBookshelfDockWidget::moduleUnlockTriggered
void moduleUnlockTriggered(CSwordModuleInfo *module)
BtBookshelfDockWidget::m_itemAboutAction
QAction * m_itemAboutAction
Definition:
btbookshelfdockwidget.h:72
BtBookshelfDockWidget::m_instance
static BtBookshelfDockWidget * m_instance
Definition:
btbookshelfdockwidget.h:74
BtBookshelfDockWidget::installWorksClicked
void installWorksClicked()
BtBookshelfDockWidget::m_welcomeWidget
QWidget * m_welcomeWidget
Definition:
btbookshelfdockwidget.h:63
BtBookshelfDockWidget::moduleHovered
void moduleHovered(CSwordModuleInfo *module)
BtBookshelfDockWidget::m_installLabel
QLabel * m_installLabel
Definition:
btbookshelfdockwidget.h:64
BtBookshelfDockWidget::BtBookshelfDockWidget
BtBookshelfDockWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Definition:
btbookshelfdockwidget.cpp:46
BtBookshelfDockWidget::m_itemContextMenu
QMenu * m_itemContextMenu
Definition:
btbookshelfdockwidget.h:68
BtBookshelfDockWidget::m_bookshelfWidget
BtBookshelfWidget * m_bookshelfWidget
Definition:
btbookshelfdockwidget.h:62
BtBookshelfDockWidget::moduleOpenTriggered
void moduleOpenTriggered(CSwordModuleInfo *module)
BtBookshelfDockWidget::loadBookshelfState
void loadBookshelfState()
Definition:
btbookshelfdockwidget.cpp:212
BtBookshelfDockWidget::getInstance
static BtBookshelfDockWidget * getInstance()
Definition:
btbookshelfdockwidget.h:37
BtBookshelfDockWidget::groupingOrderChanged
void groupingOrderChanged(BtBookshelfTreeModel::Grouping newGrouping)
BtBookshelfDockWidget::m_itemOpenAction
QAction * m_itemOpenAction
Definition:
btbookshelfdockwidget.h:69
BtBookshelfDockWidget::m_installButton
QPushButton * m_installButton
Definition:
btbookshelfdockwidget.h:65
BtBookshelfDockWidget::saveBookshelfState
void saveBookshelfState()
Definition:
btbookshelfdockwidget.cpp:216
BtBookshelfDockWidget::m_stackedWidget
QStackedWidget * m_stackedWidget
Definition:
btbookshelfdockwidget.h:61
BtBookshelfDockWidget::m_treeModel
BtBookshelfTreeModel * m_treeModel
Definition:
btbookshelfdockwidget.h:59
BtBookshelfDockWidget::m_itemSearchAction
QAction * m_itemSearchAction
Definition:
btbookshelfdockwidget.h:70
BtBookshelfDockWidget::moduleAboutTriggered
void moduleAboutTriggered(CSwordModuleInfo *module)
BtBookshelfDockWidget::initMenus
void initMenus()
Definition:
btbookshelfdockwidget.cpp:152
BtBookshelfDockWidget::moduleSearchTriggered
void moduleSearchTriggered(CSwordModuleInfo *module)
BtBookshelfDockWidget::retranslateUi
void retranslateUi()
Definition:
btbookshelfdockwidget.cpp:200
BtBookshelfDockWidget::m_itemUnlockAction
QAction * m_itemUnlockAction
Definition:
btbookshelfdockwidget.h:71
BtBookshelfTreeModel::Grouping
Definition:
btbookshelftreemodel.h:66
BtBookshelfTreeModel
Definition:
btbookshelftreemodel.h:36
BtBookshelfTreeModel::groupingOrder
Grouping const & groupingOrder() const
Definition:
btbookshelftreemodel.h:133
BtBookshelfWidget
Definition:
btbookshelfwidget.h:39
CSwordModuleInfo
Definition:
cswordmoduleinfo.h:49
QAction
QDockWidget
QMenu
QWidget
Generated by
1.9.1