QGIS API Documentation
3.0.2-Girona (307d082)
|
The QgsMapLayerProxyModel class provides an easy to use model to display the list of layers in widgets. More...
#include <qgsmaplayerproxymodel.h>
Public Types | |
enum | Filter { RasterLayer = 1, NoGeometry = 2, PointLayer = 4, LineLayer = 8, PolygonLayer = 16, HasGeometry = PointLayer | LineLayer | PolygonLayer, VectorLayer = NoGeometry | HasGeometry, PluginLayer = 32, WritableLayer = 64, All = RasterLayer | VectorLayer | PluginLayer } |
Public Member Functions | |
QgsMapLayerProxyModel (QObject *parent=nullptr) | |
QgsMapLayerProxModel creates a proxy model with a QgsMapLayerModel as source model. More... | |
QStringList | exceptedLayerIds () const |
Get the list of maplayer ids which are excluded from the list. More... | |
QList< QgsMapLayer * > | exceptedLayerList () |
Get the list of maplayers which are excluded from the list. More... | |
QStringList | excludedProviders () const |
Returns the list of data providers which are excluded from the model. More... | |
bool | filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override |
const Filters & | filters () const |
bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override |
void | setExceptedLayerIds (const QStringList &ids) |
Set the list of maplayer ids which are excluded from the list. More... | |
void | setExceptedLayerList (const QList< QgsMapLayer *> &exceptList) |
offer the possibility to except some layers to be listed More... | |
void | setExcludedProviders (const QStringList &providers) |
Sets a list of data providers which should be excluded from the model. More... | |
QgsMapLayerProxyModel * | setFilters (QgsMapLayerProxyModel::Filters filters) |
setFilters set flags that affect how layers are filtered More... | |
QgsMapLayerModel * | sourceLayerModel () const |
layerModel returns the QgsMapLayerModel used in this QSortFilterProxyModel More... | |
Properties | |
QStringList | exceptedLayerIds |
QList< QgsMapLayer * > | exceptedLayerList |
QgsMapLayerProxyModel::Filters | filters |
The QgsMapLayerProxyModel class provides an easy to use model to display the list of layers in widgets.
Definition at line 33 of file qgsmaplayerproxymodel.h.
Enumerator | |
---|---|
RasterLayer | |
NoGeometry | |
PointLayer | |
LineLayer | |
PolygonLayer | |
HasGeometry | |
VectorLayer | |
PluginLayer | |
WritableLayer | |
All |
Definition at line 42 of file qgsmaplayerproxymodel.h.
|
explicit |
QgsMapLayerProxModel creates a proxy model with a QgsMapLayerModel as source model.
It can be used to filter the layers list in a widget.
Definition at line 25 of file qgsmaplayerproxymodel.cpp.
QStringList QgsMapLayerProxyModel::exceptedLayerIds | ( | ) | const |
Get the list of maplayer ids which are excluded from the list.
|
inline |
Get the list of maplayers which are excluded from the list.
Definition at line 80 of file qgsmaplayerproxymodel.h.
|
inline |
Returns the list of data providers which are excluded from the model.
Definition at line 99 of file qgsmaplayerproxymodel.h.
|
override |
Definition at line 83 of file qgsmaplayerproxymodel.cpp.
|
inline |
Definition at line 75 of file qgsmaplayerproxymodel.h.
|
override |
Definition at line 139 of file qgsmaplayerproxymodel.cpp.
void QgsMapLayerProxyModel::setExceptedLayerIds | ( | const QStringList & | ids | ) |
Set the list of maplayer ids which are excluded from the list.
Definition at line 54 of file qgsmaplayerproxymodel.cpp.
void QgsMapLayerProxyModel::setExceptedLayerList | ( | const QList< QgsMapLayer *> & | exceptList | ) |
offer the possibility to except some layers to be listed
Definition at line 45 of file qgsmaplayerproxymodel.cpp.
void QgsMapLayerProxyModel::setExcludedProviders | ( | const QStringList & | providers | ) |
Sets a list of data providers which should be excluded from the model.
Definition at line 77 of file qgsmaplayerproxymodel.cpp.
QgsMapLayerProxyModel * QgsMapLayerProxyModel::setFilters | ( | QgsMapLayerProxyModel::Filters | filters | ) |
setFilters set flags that affect how layers are filtered
filters | are Filter flags |
Definition at line 38 of file qgsmaplayerproxymodel.cpp.
|
inline |
layerModel returns the QgsMapLayerModel used in this QSortFilterProxyModel
Definition at line 67 of file qgsmaplayerproxymodel.h.
|
readwrite |
Definition at line 39 of file qgsmaplayerproxymodel.h.
|
readwrite |
Definition at line 38 of file qgsmaplayerproxymodel.h.
|
readwrite |
Definition at line 37 of file qgsmaplayerproxymodel.h.