Class MapLayerBaseModel
A project map layers base model.
#include <maplayermodel.h>
Inherits the following classes: QAbstractListModel
Public Signals
| Type | Name |
|---|---|
| signal void | enabledChanged |
| signal void | projectChanged |
| signal void | trackingModelChanged |
Public Functions
| Type | Name |
|---|---|
| MapLayerBaseModel (QObject * parent=nullptr) |
|
| QVariant | data (const QModelIndex & index, int role) override const |
| bool | enabled () const |
| QgsProject * | project () const The project from which map layers will be taken from. |
| QHash< int, QByteArray > | roleNames () override const |
| int | rowCount (const QModelIndex & parent) override const |
| void | setEnabled (bool enabled) |
| void | setProject (QgsProject * project) The project from which map layers will be taken from. |
| void | setTrackingModel (TrackingModel * trackingModel) The tracking model against which map layers' tracking availability will be checked against. |
| TrackingModel * | trackingModel () const The tracking model against which map layers' tracking availability will be checked against. |
Protected Slots
| Type | Name |
|---|---|
| slot void | addLayers (const QList< QgsMapLayer * > & layers) |
| slot void | removeLayers (const QStringList & layerIds) |
Public Signals Documentation
signal enabledChanged
void MapLayerBaseModel::enabledChanged;
signal projectChanged
void MapLayerBaseModel::projectChanged;
signal trackingModelChanged
void MapLayerBaseModel::trackingModelChanged;
Public Functions Documentation
function MapLayerBaseModel
explicit MapLayerBaseModel::MapLayerBaseModel (
QObject * parent=nullptr
)
function data
QVariant MapLayerBaseModel::data (
const QModelIndex & index,
int role
) override const
function enabled
inline bool MapLayerBaseModel::enabled () const
The enabled state of the model.
Note:
When disabled, any changes to the project's map layers registry will be ignored
function project
The project from which map layers will be taken from.
inline QgsProject * MapLayerBaseModel::project () const
function roleNames
QHash< int, QByteArray > MapLayerBaseModel::roleNames () override const
function rowCount
int MapLayerBaseModel::rowCount (
const QModelIndex & parent
) override const
function setEnabled
void MapLayerBaseModel::setEnabled (
bool enabled
)
The enabled state of the model.
Note:
When disabled, any changes to the project's map layers registry will be ignored
function setProject
The project from which map layers will be taken from.
void MapLayerBaseModel::setProject (
QgsProject * project
)
function setTrackingModel
The tracking model against which map layers' tracking availability will be checked against.
void MapLayerBaseModel::setTrackingModel (
TrackingModel * trackingModel
)
function trackingModel
The tracking model against which map layers' tracking availability will be checked against.
inline TrackingModel * MapLayerBaseModel::trackingModel () const
Protected Slots Documentation
slot addLayers
void MapLayerBaseModel::addLayers;
slot removeLayers
void MapLayerBaseModel::removeLayers;
The documentation for this class was generated from the following file src/core/maplayermodel.h