| 1 | // Copyright (C) 2020 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QQUICKHEADERVIEW_P_P_H |
| 5 | #define |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtCore/QAbstractItemModel> |
| 19 | #include <QtCore/QPointer> |
| 20 | #if QT_CONFIG(transposeproxymodel) |
| 21 | #include <QtCore/QTransposeProxyModel> |
| 22 | #endif |
| 23 | #include <QtQuick/private/qquicktableview_p_p.h> |
| 24 | #include <private/qquickheaderview_p.h> |
| 25 | |
| 26 | QT_BEGIN_NAMESPACE |
| 27 | |
| 28 | class Q_QUICKTEMPLATES2_EXPORT : public QAbstractItemModel |
| 29 | { |
| 30 | Q_OBJECT |
| 31 | Q_DISABLE_COPY() |
| 32 | Q_PROPERTY(QAbstractItemModel *sourceModel READ sourceModel) |
| 33 | public: |
| 34 | explicit (QObject *parent = nullptr); |
| 35 | (); |
| 36 | |
| 37 | void (QAbstractItemModel *newSourceModel); |
| 38 | QPointer<QAbstractItemModel> () const; |
| 39 | QModelIndex (int row, int column, const QModelIndex &parent = QModelIndex()) const override; |
| 40 | QModelIndex (const QModelIndex &child) const override; |
| 41 | QModelIndex (int row, int column, const QModelIndex &idx) const override; |
| 42 | int (const QModelIndex &parent = QModelIndex()) const override; |
| 43 | int columnCount(const QModelIndex &parent = QModelIndex()) const override; |
| 44 | QVariant (const QModelIndex &index, int role = Qt::DisplayRole) const override; |
| 45 | bool (const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; |
| 46 | bool (const QModelIndex &parent = QModelIndex()) const override; |
| 47 | QHash<int, QByteArray> () const override; |
| 48 | |
| 49 | inline QVariant () const; |
| 50 | inline Qt::Orientation () const; |
| 51 | inline void (Qt::Orientation o); |
| 52 | |
| 53 | QQuickHeaderViewBase * = nullptr; |
| 54 | |
| 55 | private: |
| 56 | inline void (); |
| 57 | inline void (); |
| 58 | QPointer<QAbstractItemModel> = nullptr; |
| 59 | Qt::Orientation = Qt::Horizontal; |
| 60 | }; |
| 61 | |
| 62 | class : public QQuickTableViewPrivate |
| 63 | { |
| 64 | Q_DECLARE_PUBLIC(QQuickHeaderViewBase) |
| 65 | public: |
| 66 | (); |
| 67 | (); |
| 68 | |
| 69 | void (); |
| 70 | Qt::Orientation () const; |
| 71 | void (Qt::Orientation orientation); |
| 72 | const QPointer<QQuickItem> (int row, int col) const; |
| 73 | QVariant () const override; |
| 74 | void (const QVariant &newModel) override; |
| 75 | void () override; |
| 76 | void () override; |
| 77 | QAbstractItemModel *() override; |
| 78 | |
| 79 | protected: |
| 80 | QHeaderDataProxyModel ; |
| 81 | #if QT_CONFIG(transposeproxymodel) |
| 82 | QTransposeProxyModel ; |
| 83 | #endif |
| 84 | struct |
| 85 | { |
| 86 | int ; |
| 87 | qreal ; |
| 88 | }; |
| 89 | QStack<SectionSize> ; |
| 90 | bool = false; |
| 91 | QString ; |
| 92 | |
| 93 | int (const int visualIndex) const final; |
| 94 | int logicalColumnIndex(const int visualIndex) const final; |
| 95 | int (const int logicalIndex) const final; |
| 96 | int visualColumnIndex(const int logicalIndex) const final; |
| 97 | }; |
| 98 | |
| 99 | class : public QQuickHeaderViewBasePrivate |
| 100 | { |
| 101 | Q_DECLARE_PUBLIC(QQuickHorizontalHeaderView) |
| 102 | public: |
| 103 | (); |
| 104 | (); |
| 105 | |
| 106 | bool m_movableColumns = false; |
| 107 | }; |
| 108 | |
| 109 | class : public QQuickHeaderViewBasePrivate |
| 110 | { |
| 111 | Q_DECLARE_PUBLIC(QQuickVerticalHeaderView) |
| 112 | public: |
| 113 | (); |
| 114 | (); |
| 115 | |
| 116 | bool = false; |
| 117 | }; |
| 118 | |
| 119 | QT_END_NAMESPACE |
| 120 | |
| 121 | #endif // QQUICKHEADERVIEW_P_P_H |
| 122 | |