44 if ( mExceptList == exceptList )
47 mExceptList = exceptList;
55 Q_FOREACH (
const QString&
id, ids )
76 if ( mFilters.testFlag(
All ) && mExceptList.
isEmpty() )
99 bool detectGeometry = mFilters.testFlag(
NoGeometry ) ||
QgsMapLayerProxyModel(QObject *parent=nullptr)
QgsMapLayerProxModel creates a proxy model with a QgsMapLayerModel as source model.
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
Base class for all map layer types.
void setFilterCaseSensitivity(Qt::CaseSensitivity cs)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const=0
int localeAwareCompare(const QString &other) const
virtual void sort(int column, Qt::SortOrder order)
virtual void setSourceModel(QAbstractItemModel *sourceModel)
QgsMapLayer * mapLayer(const QString &theLayerId) const
Retrieve a pointer to a registered layer by layer ID.
QStringList exceptedLayerIds() const
Get the list of maplayer ids which are excluded from the list.
void setExceptedLayerIds(const QStringList &ids)
Set the list of maplayer ids which are excluded from the list.
QgsMapLayer::LayerType type() const
Get the type of the layer.
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override
bool hasGeometryType() const
Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeome...
void setExceptedLayerList(const QList< QgsMapLayer *> &exceptList)
offer the possibility to except some layers to be listed
QString id() const
Get this layer's unique ID, this ID is used to access this layer from map layer registry.
The QgsMapLayerModel class is a model to display layers in widgets.
The QgsMapLayerProxyModel class provides an easy to use model to display the list of layers in widget...
void setDynamicSortFilter(bool enable)
void * internalPointer() const
virtual QVariant data(const QModelIndex &index, int role) const=0
QGis::GeometryType geometryType() const
Returns point, line or polygon.
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override
bool contains(const T &value) const
QAbstractItemModel * sourceModel() const
static QgsMapLayerRegistry * instance()
Returns the instance pointer, creating the object on the first call.
void setSortLocaleAware(bool on)
QgsMapLayerProxyModel * setFilters(const QgsMapLayerProxyModel::Filters &filters)
setFilters set flags that affect how layers are filtered
const Filters & filters() const
bool readOnly() const
Returns if this layer is read only.
Represents a vector layer which manages a vector based data sets.