18#include "../../util/btassert.h"
97 if (item->fitFor(module)) {
108 virtual QVariant
data(
int role = Qt::DisplayRole)
const;
158template <Item::Type TYPE>
static Item::Type staticItemType()
Qt::CheckState m_checkState
virtual QVariant data(int role=Qt::DisplayRole) const
Returns data for this item.
QList< Item * > & children()
Returns the list of child items of this node.
void insertChild(int const index, Item *const newItem)
Inserts the given item as a child at the given index.
int indexFor(Item const &newItem)
Returns the position for where the given child item would be inserted.
virtual bool operator<(Item const &other) const
Comparsion operator used sorting child items.
Type type() const
Returns the type of this item.
void setCheckState(Qt::CheckState const state)
Sets the check state of this item.
int childIndex() const
Returns the index of this item under its parent.
T * getGroupItem(CSwordModuleInfo const &module, int &outIndex)
void setParent(Item *const parent) noexcept
Qt::CheckState checkState() const
Returns the check state of this item.
virtual bool fitFor(CSwordModuleInfo const &module) const =0
Returns whether this item is fit to contain the given module.
Item * parent() const
Returns a pointer to the parent item of this item.
QList< Item * > m_children
bool fitFor(CSwordModuleInfo const &) const override
Returns whether this item is fit to contain the given module.