BibleTime
btopenworkaction.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-2025 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 "btmenuview.h"
16
17#include <memory>
18#include <QAction>
19#include <QObject>
20#include <QString>
21#include "../backend/bookshelfmodel/btbookshelftreemodel.h"
22#include "../backend/config/btconfigcore.h"
23
24
29class QActionGroup;
30class QWidget;
31
33 Q_OBJECT
34 public:
35 BtOpenWorkActionMenu(BtConfigCore groupingConfigGroup,
36 QString groupingConfigKey,
37 QWidget * parent = nullptr);
38
39 void setSourceModel(std::shared_ptr<QAbstractItemModel> model);
40
41 std::shared_ptr<QAbstractItemModel> sourceModel() const
42 { return m_treeModel->sourceModel(); }
43
45
48
49 Q_SIGNALS:
51
52 private:
53 void retranslateUi();
54
55 void postBuildMenu(QActionGroup * actions) override;
56
57 private:
58 // Models:
61
62 // Grouping menu:
65 QString const m_groupingConfigKey;
66};
67
69 Q_OBJECT
70 public:
71 explicit BtOpenWorkAction(BtConfigCore groupingConfigGroup,
72 QString groupingConfigKey,
73 QObject * parent = nullptr);
74 ~BtOpenWorkAction() override;
75
76 Q_SIGNALS:
78
79 protected:
80 void retranslateUi();
81
82 private:
84};
std::shared_ptr< QAbstractItemModel > sourceModel() const noexcept
QAbstractItemModel * model() const
Definition btmenuview.h:66
QString const m_groupingConfigKey
void setSourceModel(std::shared_ptr< QAbstractItemModel > model)
std::shared_ptr< QAbstractItemModel > sourceModel() const
void triggered(CSwordModuleInfo *module)
BtBookshelfGroupingMenu * m_groupingMenu
BtBookshelfFilterModel * postFilterModel() const
BtConfigCore m_groupingConfigGroup
BtBookshelfFilterModel * m_postFilterModel
void postBuildMenu(QActionGroup *actions) override
BtBookshelfTreeModel * m_treeModel
BtBookshelfTreeModel * treeModel() const
void triggered(CSwordModuleInfo *module)
BtOpenWorkActionMenu * m_menu