diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:33 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:33 -0400 |
commit | 4885bfcef4d89cf0cb391e00af617b9fd19c9cbb (patch) | |
tree | e8ba8579bd76a1b277231202ca6579eb19c1ab4b /src/backend/bookshelfmodel/moduleitem.h | |
parent | 294b5ec5834affa57641475946b8d2aeca53c577 (diff) |
Imported Upstream version 2.5
Diffstat (limited to 'src/backend/bookshelfmodel/moduleitem.h')
-rw-r--r-- | src/backend/bookshelfmodel/moduleitem.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/backend/bookshelfmodel/moduleitem.h b/src/backend/bookshelfmodel/moduleitem.h index 9657423..006ae97 100644 --- a/src/backend/bookshelfmodel/moduleitem.h +++ b/src/backend/bookshelfmodel/moduleitem.h @@ -19,22 +19,27 @@ #include "backend/drivers/cswordmoduleinfo.h" +class BtBookshelfTreeModel; + namespace BookshelfModel { class ModuleItem: public Item { public: - ModuleItem(CSwordModuleInfo *module); + ModuleItem(CSwordModuleInfo *module, BtBookshelfTreeModel *parentModel); - CSwordModuleInfo *moduleInfo() const { - return m_moduleInfo; - } + /** + Reimplementation of \ref Item::data which dispatches all requests to + the \ref BtBookshelfTreeModel parent model. + */ + QVariant data(int role = Qt::DisplayRole) const; - inline bool isHidden() const { - return m_moduleInfo->isHidden(); + inline CSwordModuleInfo *moduleInfo() const { + return m_moduleInfo; } protected: - CSwordModuleInfo *m_moduleInfo; + CSwordModuleInfo *m_moduleInfo; + BtBookshelfTreeModel *m_parentModel; }; } // namespace BookshelfModel |