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;
275 #endif // QGSPROVIDERSUBLAYERMODEL_H