12 #ifndef TREE_MODEL_HELPERS_H
13 #define TREE_MODEL_HELPERS_H
18 #include <QAbstractItemModel>
21 template <
typename Item>
32 for (
int row = 0; row < childItems_.count(); row++)
40 void appendChild(Item* child)
45 void prependChild(Item* child)
51 void insertChild(
int row, Item* child)
56 void removeChild(
int row)
59 childItems_.removeAt(row);
67 int childCount()
const
69 return static_cast<int>(childItems_.count());
82 Item* parentItem() {
return parent_; }
86 QList<QVariant> childItems_;
Definition: tree_model_helpers.h:23
Definition: variant_pointer.h:20