Changeset View
Changeset View
Standalone View
Standalone View
src/core/kconcatenaterowsproxymodel.h
Show First 20 Lines • Show All 87 Lines • ▼ Show 20 Line(s) | 67 | public: | |||
---|---|---|---|---|---|
88 | * Removes the source model @p sourceModel. | 88 | * Removes the source model @p sourceModel. | ||
89 | * @param sourceModel a source model previously added to this proxy | 89 | * @param sourceModel a source model previously added to this proxy | ||
90 | * | 90 | * | ||
91 | * The ownership of @sourceModel is not affected by this. | 91 | * The ownership of @sourceModel is not affected by this. | ||
92 | */ | 92 | */ | ||
93 | Q_SCRIPTABLE void removeSourceModel(QAbstractItemModel *sourceModel); | 93 | Q_SCRIPTABLE void removeSourceModel(QAbstractItemModel *sourceModel); | ||
94 | 94 | | |||
95 | /** | 95 | /** | ||
96 | * The currently set source models | ||||
97 | */ | ||||
98 | QList<QAbstractItemModel *> sources() const; | ||||
99 | | ||||
100 | /** | ||||
96 | * Returns the proxy index for a given source index | 101 | * Returns the proxy index for a given source index | ||
97 | * @param sourceIndex an index coming from any of the source models | 102 | * @param sourceIndex an index coming from any of the source models | ||
98 | * @return a proxy index | 103 | * @return a proxy index | ||
99 | * Calling this method with an index not from a source model is undefined behavior. | 104 | * Calling this method with an index not from a source model is undefined behavior. | ||
100 | */ | 105 | */ | ||
101 | QModelIndex mapFromSource(const QModelIndex &sourceIndex) const; | 106 | QModelIndex mapFromSource(const QModelIndex &sourceIndex) const; | ||
102 | 107 | | |||
103 | /** | 108 | /** | ||
Show All 24 Lines | |||||
128 | */ | 133 | */ | ||
129 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; | 134 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; | ||
130 | /** | 135 | /** | ||
131 | * The column count for the first source model is returned here. | 136 | * The column count for the first source model is returned here. | ||
132 | * @reimp | 137 | * @reimp | ||
133 | */ | 138 | */ | ||
134 | int columnCount(const QModelIndex &parent = QModelIndex()) const override; | 139 | int columnCount(const QModelIndex &parent = QModelIndex()) const override; | ||
135 | 140 | | |||
141 | /** | ||||
142 | * The roles names for the first source model is returned here | ||||
143 | * @reimp | ||||
144 | */ | ||||
145 | QHash<int, QByteArray> roleNames() const override; | ||||
146 | | ||||
136 | private: | 147 | private: | ||
137 | Q_PRIVATE_SLOT(d, void slotRowsAboutToBeInserted(const QModelIndex &, int start, int end)) | 148 | Q_PRIVATE_SLOT(d, void slotRowsAboutToBeInserted(const QModelIndex &, int start, int end)) | ||
138 | Q_PRIVATE_SLOT(d, void slotRowsInserted(const QModelIndex &, int start, int end)) | 149 | Q_PRIVATE_SLOT(d, void slotRowsInserted(const QModelIndex &, int start, int end)) | ||
139 | Q_PRIVATE_SLOT(d, void slotRowsAboutToBeRemoved(const QModelIndex &, int start, int end)) | 150 | Q_PRIVATE_SLOT(d, void slotRowsAboutToBeRemoved(const QModelIndex &, int start, int end)) | ||
140 | Q_PRIVATE_SLOT(d, void slotRowsRemoved(const QModelIndex &, int start, int end)) | 151 | Q_PRIVATE_SLOT(d, void slotRowsRemoved(const QModelIndex &, int start, int end)) | ||
141 | Q_PRIVATE_SLOT(d, void slotColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end)) | 152 | Q_PRIVATE_SLOT(d, void slotColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end)) | ||
142 | Q_PRIVATE_SLOT(d, void slotColumnsInserted(const QModelIndex &parent, int, int)) | 153 | Q_PRIVATE_SLOT(d, void slotColumnsInserted(const QModelIndex &parent, int, int)) | ||
143 | Q_PRIVATE_SLOT(d, void slotColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end)) | 154 | Q_PRIVATE_SLOT(d, void slotColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end)) | ||
Show All 13 Lines |