28 Q_DISABLE_COPY(QHeaderDataProxyModel)
29 Q_PROPERTY(QAbstractItemModel *sourceModel READ sourceModel)
31 explicit QHeaderDataProxyModel(QObject *parent =
nullptr);
32 ~QHeaderDataProxyModel();
34 void setSourceModel(QAbstractItemModel *newSourceModel);
35 QPointer<QAbstractItemModel> sourceModel()
const;
36 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
37 QModelIndex parent(
const QModelIndex &child)
const override;
38 QModelIndex sibling(
int row,
int column,
const QModelIndex &idx)
const override;
39 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
40 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
41 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
42 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole) override;
43 bool hasChildren(
const QModelIndex &parent = QModelIndex())
const override;
44 QHash<
int, QByteArray> roleNames()
const override;
46 inline QVariant variantValue()
const;
47 inline Qt::Orientation orientation()
const;
48 inline void setOrientation(Qt::Orientation o);
50 QQuickHeaderViewBase *m_headerView =
nullptr;
53 inline void connectToModel();
54 inline void disconnectFromModel();
55 QPointer<QAbstractItemModel> m_model =
nullptr;
56 Qt::Orientation m_orientation = Qt::Horizontal;