15 #include <QtAlgorithms>
17 #include "../../util/btassert.h"
35 if (newItem < *nextItem)
47 case Qt::CheckStateRole:
55 if (!child->data(role).toBool())
69 const QString first(
data(Qt::DisplayRole).toString().toLower());
70 const QString second(other.
data(Qt::DisplayRole).toString().toLower());
71 return first.localeAwareCompare(second) < 0;
Qt::CheckState m_checkState
virtual QVariant data(int role=Qt::DisplayRole) const
Returns data for this item.
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.
virtual bool operator<(const Item &other) const
Comparsion operator used sorting child items.
QList< Item * > m_children
bool fitFor(const CSwordModuleInfo &) const override
Returns whether this item is fit to contain the given module.