NoTreeItemFlag = 0x00,
DeleteOnLastChildRemoved = 0x01
};
Q_DECLARE_FLAGS(TreeItemFlags, TreeItemFlag)
NoTreeItemFlag = 0x00,
DeleteOnLastChildRemoved = 0x01
};
Q_DECLARE_FLAGS(TreeItemFlags, TreeItemFlag)
int childCount(int column = 0) const;
virtual int columnCount() const = 0;
virtual QVariant data(int column, int role) const = 0;
int childCount(int column = 0) const;
virtual int columnCount() const = 0;
virtual QVariant data(int column, int role) const = 0;
virtual inline Qt::ItemFlags flags() const { return _flags; }
virtual inline void setFlags(Qt::ItemFlags flags) { _flags = flags; }
virtual inline Qt::ItemFlags flags() const { return _flags; }
virtual inline void setFlags(Qt::ItemFlags flags) { _flags = flags; }
inline AbstractTreeItem::TreeItemFlags treeItemFlags() const { return _treeItemFlags; }
inline void setTreeItemFlags(AbstractTreeItem::TreeItemFlags flags) { _treeItemFlags = flags; }
int row() const;
inline AbstractTreeItem::TreeItemFlags treeItemFlags() const { return _treeItemFlags; }
inline void setTreeItemFlags(AbstractTreeItem::TreeItemFlags flags) { _treeItemFlags = flags; }
int row() const;
virtual QStringList propertyOrder() const = 0;
QVariant data(int column, int role) const override;
virtual QStringList propertyOrder() const = 0;
QVariant data(int column, int role) const override;
virtual QString toolTip(int column) const { Q_UNUSED(column) return QString(); }
int columnCount() const override;
};
virtual QString toolTip(int column) const { Q_UNUSED(column) return QString(); }
int columnCount() const override;
};
- QVariant data(const QModelIndex &index, int role) const override;
- bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
+ QVariant data(const QModelIndex& index, int role) const override;
+ bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
- QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
- QModelIndex indexByItem(AbstractTreeItem *item) const;
+ QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
+ QModelIndex indexByItem(AbstractTreeItem* item) const;
- int rowCount(const QModelIndex &parent = QModelIndex()) const override;
- int columnCount(const QModelIndex &parent = QModelIndex()) const override;
+ int rowCount(const QModelIndex& parent = QModelIndex()) const override;
+ int columnCount(const QModelIndex& parent = QModelIndex()) const override;
- inline ChildStatus(QModelIndex parent_, int cc_, int s_, int e_) : parent(parent_), childCount(cc_), start(s_), end(e_) {};
+ inline ChildStatus(QModelIndex parent_, int cc_, int s_, int e_)
+ : parent(parent_)
+ , childCount(cc_)
+ , start(s_)
+ , end(e_){};
- void debug_rowsAboutToBeInserted(const QModelIndex &parent, int start, int end);
- void debug_rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
- void debug_rowsInserted(const QModelIndex &parent, int start, int end);
- void debug_rowsRemoved(const QModelIndex &parent, int start, int end);
- void debug_dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
+ void debug_rowsAboutToBeInserted(const QModelIndex& parent, int start, int end);
+ void debug_rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end);
+ void debug_rowsInserted(const QModelIndex& parent, int start, int end);
+ void debug_rowsRemoved(const QModelIndex& parent, int start, int end);
+ void debug_dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight);