diff options
Diffstat (limited to 'src/backend/bookshelfmodel/indexingitem.h')
-rw-r--r-- | src/backend/bookshelfmodel/indexingitem.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/backend/bookshelfmodel/indexingitem.h b/src/backend/bookshelfmodel/indexingitem.h index a1eb812..3e1e0cd 100644 --- a/src/backend/bookshelfmodel/indexingitem.h +++ b/src/backend/bookshelfmodel/indexingitem.h @@ -4,7 +4,7 @@ * * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License * version 2.0. * @@ -20,20 +20,23 @@ namespace BookshelfModel { -class IndexingItem: public Item { - public: - static const Item::Type GROUP_TYPE = Item::ITEM_INDEXING; +class IndexingItem: public GroupItem<Item::ITEM_INDEXING> { - IndexingItem(CSwordModuleInfo *module); +public: /* Methods: */ - QVariant data(int role = Qt::DisplayRole) const; + inline IndexingItem(const CSwordModuleInfo & module) + : m_indexed(module.hasIndex()) {} - inline bool fitFor(CSwordModuleInfo *module) const { - return module->hasIndex() == m_indexed; - } + QVariant data(int role = Qt::DisplayRole) const; + + inline bool fitFor(const CSwordModuleInfo & module) const { + return module.hasIndex() == m_indexed; + } + +private: /* Fields: */ + + bool m_indexed; - protected: - bool m_indexed; }; } // namespace BookshelfModel |