BibleTime
|
#include <moduleitem.h>
Public Member Functions | |
QVariant | data (int role=Qt::DisplayRole) const override |
bool | fitFor (CSwordModuleInfo const &) const override |
Returns whether this item is fit to contain the given module. More... | |
CSwordModuleInfo & | moduleInfo () const |
ModuleItem (CSwordModuleInfo &module, BtBookshelfTreeModel &parentModel) | |
Public Member Functions inherited from BookshelfModel::Item | |
Qt::CheckState | checkState () const |
Returns the check state of this item. More... | |
int | childIndex () const |
Returns the index of this item under its parent. More... | |
QList< Item * > & | children () |
Returns the list of child items of this node. More... | |
template<class T > | |
T * | getGroupItem (CSwordModuleInfo &module, int &outIndex) |
int | indexFor (Item const &newItem) |
Returns the position for where the given child item would be inserted. More... | |
void | insertChild (int index, Item *newItem) |
Inserts the given item as a child at the given index. More... | |
Item (Type type) | |
virtual bool | operator< (const Item &other) const |
Comparsion operator used sorting child items. More... | |
Item * | parent () const |
Returns a pointer to the parent item of this item. More... | |
void | setCheckState (const Qt::CheckState state) |
Sets the check state of this item. More... | |
Type | type () const |
Returns the type of this item. More... | |
virtual | ~Item () |
Private Attributes | |
CSwordModuleInfo & | m_moduleInfo |
BtBookshelfTreeModel & | m_parentModel |
Additional Inherited Members | |
Public Types inherited from BookshelfModel::Item | |
enum | Type { ITEM_ROOT = 0 , ITEM_CATEGORY = 1 , ITEM_LANGUAGE = 2 , ITEM_MODULE = 3 , ITEM_INDEXING = 4 } |
Definition at line 26 of file moduleitem.h.
|
inline |
Definition at line 30 of file moduleitem.h.
|
overridevirtual |
Reimplementation of Item::data() which dispatches all requests to the parent model (BtBookshelfTreeModel).
Reimplemented from BookshelfModel::Item.
Definition at line 20 of file moduleitem.cpp.
References BtBookshelfTreeModel::data(), m_moduleInfo, and m_parentModel.
|
inlineoverridevirtual |
Returns whether this item is fit to contain the given module.
[in] | module | The module to check with. |
true | If this item is a group and can contain the given module. |
false | This item is not a group or is a wrong group. |
Implements BookshelfModel::Item.
Definition at line 44 of file moduleitem.h.
|
inline |
Definition at line 42 of file moduleitem.h.
References m_moduleInfo.
Referenced by BtBookshelfTreeModel::data(), and BtBookshelfTreeModel::setData().
|
private |
Definition at line 48 of file moduleitem.h.
Referenced by data(), and moduleInfo().
|
private |
Definition at line 49 of file moduleitem.h.
Referenced by data().