24 enum Role { NodeTypeRole = Qt::UserRole + 1,
33 ValueDescriptionsRole,
37 void SetTree(std::unique_ptr<TreeNode> root);
38 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
39 QModelIndex parent(
const QModelIndex &child)
const override;
40 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
41 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
42 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
43 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
44 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
47 const TreeNode *Node(
const QModelIndex &index)
const;
48 std::unique_ptr<TreeNode> m_root;