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