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-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 <QMenu>
16 
17 #include <QObject>
18 #include <QString>
19 #include "../backend/bookshelfmodel/btbookshelftreemodel.h"
20 
21 
22 class QAction;
23 class QActionGroup;
24 class 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  Q_SIGNALS:
38 
39  private:
40  void initMenu(bool showNoGrouping);
41  void retranslateUi();
42 
43  private:
44  QActionGroup *m_groupingActionGroup;
50 };
void signalGroupingOrderChanged(const BtBookshelfTreeModel::Grouping &)
void initMenu(bool showNoGrouping)
BtBookshelfGroupingMenu(QWidget *parent=nullptr)
BtBookshelfGroupingMenu(bool showNoGrouping, QWidget *parent=nullptr)