18 #ifndef QGSPROVIDERSUBLAYERMODEL_H
19 #define QGSPROVIDERSUBLAYERMODEL_H
22 #include <QAbstractItemModel>
23 #include <QSortFilterProxyModel>
51 ProviderKey = Qt::UserRole + 1,
94 void setType(
const QString &type );
100 QString name()
const;
106 void setName(
const QString &name );
112 QString description()
const;
118 void setDescription(
const QString &description );
130 void setUri(
const QString &uri );
142 void setIcon(
const QIcon &icon );
148 SIP_PYOBJECT __repr__();
150 QString
str = QStringLiteral(
"<QgsProviderSublayerModel.NonLayerItem: %1 - %2>" ).arg( sipCpp->type(), sipCpp->name() );
151 sipRes = PyUnicode_FromString(
str.toUtf8().constData() );
159 QString mDescription;
175 void setSublayerDetails(
const QList< QgsProviderSublayerDetails > &details );
182 QList< QgsProviderSublayerDetails > sublayerDetails()
const;
199 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex() )
const override;
200 QModelIndex parent(
const QModelIndex &index )
const override;
201 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
202 int rowCount(
const QModelIndex &parent )
const override;
203 QVariant data(
const QModelIndex &index,
int role )
const override;
204 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
240 QString filterString()
const;
247 void setFilterString(
const QString &filter );
254 bool includeSystemTables()
const;
261 void setIncludeSystemTables(
bool include );
264 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent )
const override;
265 bool lessThan(
const QModelIndex &source_left,
const QModelIndex &source_right )
const override;
269 QString mFilterString;
270 bool mIncludeSystemTables =
false;
Contains details about a sub layer available from a dataset.
Contains details for a non-sublayer item to include in a QgsProviderSublayerModel.
A model for representing the sublayers present in a URI.
QList< QgsProviderSublayerDetails > mSublayers
Sublayer list.
QList< NonLayerItem > mNonLayerItems
Non layer item list.
A QSortFilterProxyModel for filtering and sorting a QgsProviderSublayerModel.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)