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