BibleTime
|
#include <categoryitem.h>
Public Member Functions | |
CSwordModuleInfo::Category | category () const |
CategoryItem (CSwordModuleInfo const &module) | |
QVariant | data (int role=Qt::DisplayRole) const override |
Returns data for this item. | |
bool | fitFor (CSwordModuleInfo const &module) const override |
Returns whether this item is fit to contain the given module. | |
bool | operator< (Item const &other) const override |
Comparsion operator used sorting child items. | |
![]() | |
GroupItem () | |
![]() | |
Qt::CheckState | checkState () const |
Returns the check state of this item. | |
int | childIndex () const |
Returns the index of this item under its parent. | |
QList< Item * > & | children () |
Returns the list of child items of this node. | |
template<class T > | |
T * | getGroupItem (CSwordModuleInfo const &module, int &outIndex) |
int | indexFor (Item const &newItem) |
Returns the position for where the given child item would be inserted. | |
void | insertChild (int const index, Item *const newItem) |
Inserts the given item as a child at the given index. | |
Item (Type const type) | |
Item * | parent () const |
Returns a pointer to the parent item of this item. | |
void | setCheckState (Qt::CheckState const state) |
Sets the check state of this item. | |
Type | type () const |
Returns the type of this item. | |
virtual | ~Item () |
Private Attributes | |
CSwordModuleInfo::Category const | m_category |
Additional Inherited Members | |
![]() | |
enum | Type { ITEM_ROOT = 0 , ITEM_CATEGORY = 1 , ITEM_LANGUAGE = 2 , ITEM_MODULE = 3 , ITEM_INDEXING = 4 } |
![]() | |
static Item::Type | staticItemType () |
Definition at line 24 of file categoryitem.h.
|
inline |
Definition at line 28 of file categoryitem.h.
|
inline |
Definition at line 31 of file categoryitem.h.
References m_category.
|
overridevirtual |
Returns data for this item.
Reimplemented from BookshelfModel::Item.
Definition at line 22 of file categoryitem.cpp.
References CSwordModuleInfo::categoryIcon(), CSwordModuleInfo::categoryName(), BookshelfModel::Item::data(), and m_category.
|
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 35 of file categoryitem.h.
|
overridevirtual |
Comparsion operator used sorting child items.
Reimplemented from BookshelfModel::Item.
Definition at line 37 of file categoryitem.cpp.
References BookshelfModel::Item::ITEM_CATEGORY, m_category, BookshelfModel::Item::type(), and CSwordModuleInfo::UnknownCategory.
|
private |
Definition at line 42 of file categoryitem.h.
Referenced by category(), data(), and operator<().