BibleTime
btbookshelfgroupingmenu.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 <QMenu>
16
17#include <QObject>
18#include <QString>
19#include "../backend/bookshelfmodel/btbookshelftreemodel.h"
20
21
22class QAction;
23class QActionGroup;
24class QWidget;
25
27 Q_OBJECT
28 public:
29 explicit BtBookshelfGroupingMenu(QWidget * parent = nullptr)
30 : QMenu(parent) { initMenu(true); }
31
32 explicit BtBookshelfGroupingMenu(bool showNoGrouping,
33 QWidget * parent = nullptr)
34 : QMenu(parent) { initMenu(showNoGrouping); }
35
36 public Q_SLOTS:
37
38 void setGrouping(BtBookshelfTreeModel::Grouping const & grouping);
39
40 Q_SIGNALS:
42
43 private:
44 void initMenu(bool showNoGrouping);
45 void retranslateUi();
46
47 private:
48 QActionGroup *m_groupingActionGroup;
54};
void setGrouping(BtBookshelfTreeModel::Grouping const &grouping)
void signalGroupingOrderChanged(const BtBookshelfTreeModel::Grouping &)
void initMenu(bool showNoGrouping)
BtBookshelfGroupingMenu(QWidget *parent=nullptr)
BtBookshelfGroupingMenu(bool showNoGrouping, QWidget *parent=nullptr)