diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:27 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:27 -0400 |
commit | dd2f7ce46df53f2c377c02d1bf4df8adcf092072 (patch) | |
tree | 51d4bd5d66a45a24784695c4e99b452b417dc3d1 /src/frontend/btbookshelfdockwidget.h | |
parent | b954e6dbcceaba3b50aca624e1bddc6db4830829 (diff) |
Imported Upstream version 2.3
Diffstat (limited to 'src/frontend/btbookshelfdockwidget.h')
-rw-r--r-- | src/frontend/btbookshelfdockwidget.h | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/src/frontend/btbookshelfdockwidget.h b/src/frontend/btbookshelfdockwidget.h new file mode 100644 index 0000000..d437c92 --- /dev/null +++ b/src/frontend/btbookshelfdockwidget.h @@ -0,0 +1,94 @@ +/********* +* +* In the name of the Father, and of the Son, and of the Holy Spirit. +* +* This file is part of BibleTime's source code, http://www.bibletime.info/. +* +* Copyright 1999-2009 by the BibleTime developers. +* The BibleTime source code is licensed under the GNU General Public License +* version 2.0. +* +**********/ + +#ifndef BTBOOKSHELFDOCKWIDGET_H +#define BTBOOKSHELFDOCKWIDGET_H + +#include <QDockWidget> + +class CSwordModuleInfo; +class BtBookshelfView; +class BtBookshelfModel; +class BtBookshelfTreeModel; +class BtCheckStateFilterProxyModel; +class BtModuleNameFilterProxyModel; +class QAction; +class QActionGroup; +class QLabel; +class QLineEdit; +class QMenu; +class QToolBar; +class QToolButton; + +class BtBookshelfDockWidget: public QDockWidget { + Q_OBJECT + public: + BtBookshelfDockWidget(QWidget *parent = 0, Qt::WindowFlags f = 0); + + signals: + void moduleOpenTriggered(CSwordModuleInfo *module); + void moduleSearchTriggered(CSwordModuleInfo *module); + void moduleEditPlainTriggered(CSwordModuleInfo *module); + void moduleEditHtmlTriggered(CSwordModuleInfo *module); + void moduleUnlockTriggered(CSwordModuleInfo *module); + void moduleAboutTriggered(CSwordModuleInfo *module); + + protected: + bool eventFilter(QObject *object, QEvent *event); + void initMenus(); + void retranslateInterface(); + + protected slots: + void swordSetupChanged(); + void showContextMenu(QPoint pos); + void groupingActionTriggered(QAction *action); + void showHideEnabled(bool enable); + void showItemContextMenu(CSwordModuleInfo *module, QPoint pos); + void itemActionTriggered(QAction *action); + + protected: + // Models: + BtBookshelfModel *m_bookshelfModel; + BtBookshelfTreeModel *m_bookshelfTreeModel; + BtCheckStateFilterProxyModel *m_filterProxyModel; + BtModuleNameFilterProxyModel *m_nameFilterProxyModel; + + // Widgets: + QWidget *m_widget; + BtBookshelfView *m_view; + QLabel *m_nameFilterLabel; + QLineEdit *m_nameFilterEdit; + QToolButton *m_groupingButton; + QToolButton *m_showHideButton; + + // Popup menus: + QMenu *m_contextMenu; + QMenu *m_groupingMenu; + QActionGroup *m_groupingActionGroup; + QAction *m_groupingCatLangAction; + QAction *m_groupingCatAction; + QAction *m_groupingLangCatAction; + QAction *m_groupingLangAction; + QAction *m_groupingNoneAction; + QAction *m_showHideAction; + QMenu *m_itemContextMenu; + QActionGroup *m_itemActionGroup; + QAction *m_itemOpenAction; + QAction *m_itemSearchAction; + QMenu *m_itemEditMenu; + QAction *m_itemEditPlainAction; + QAction *m_itemEditHtmlAction; + QAction *m_itemUnlockAction; + QAction *m_itemAboutAction; +}; + +#endif // BTBOOKSHELFDOCKWIDGET_H |