Class QfDigitizingLayerBaseModel
ClassList > QfDigitizingLayerBaseModel
A digitizing layers (map layers and markup collections) base model.
#include <qfdigitizinglayermodel.h>
Inherits the following classes: QAbstractListModel
Public Signals
| Type | Name |
|---|---|
| signal void | enabledChanged |
| signal void | markupManagerChanged |
| signal void | projectChanged |
Public Functions
| Type | Name |
|---|---|
| QfDigitizingLayerBaseModel (QObject * parent=nullptr) |
|
| QVariant | data (const QModelIndex & index, int role) override const |
| bool | enabled () const |
| int | findCollection (QfMarkupCollection * collection) const |
| int | findCollectionName (const QString & name) const |
| int | findLayer (QgsMapLayer * layer) const |
| int | findLayerName (const QString & name) const |
| QfMarkupManager * | markupManager () 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 | setMarkupManager (QfMarkupManager * markupManager) |
| void | setProject (QgsProject * project) The project from which map layers will be taken from. |
Protected Slots
| Type | Name |
|---|---|
| slot void | addCollections (const QStringList & collectionUuids) |
| slot void | addLayers (const QList< QgsMapLayer * > & layers) |
| slot void | removeCollections (const QStringList & collectionUuids) |
| slot void | removeLayers (const QStringList & layerIds) |
Public Signals Documentation
signal enabledChanged
void QfDigitizingLayerBaseModel::enabledChanged;
signal markupManagerChanged
void QfDigitizingLayerBaseModel::markupManagerChanged;
signal projectChanged
void QfDigitizingLayerBaseModel::projectChanged;
Public Functions Documentation
function QfDigitizingLayerBaseModel
explicit QfDigitizingLayerBaseModel::QfDigitizingLayerBaseModel (
QObject * parent=nullptr
)
function data
QVariant QfDigitizingLayerBaseModel::data (
const QModelIndex & index,
int role
) override const
function enabled
inline bool QfDigitizingLayerBaseModel::enabled () const
The enabled state of the model.
Note:
When disabled, any changes to the project's map layers registry and markup manager will be ignored
function findCollection
int QfDigitizingLayerBaseModel::findCollection (
QfMarkupCollection * collection
) const
Returns the model row for given markup collection.
Note:
If the collection is not found, -1 will be returned
function findCollectionName
int QfDigitizingLayerBaseModel::findCollectionName (
const QString & name
) const
Returns the model row for given markup collection name.
Note:
If the collection name is not found, -1 will be returned
function findLayer
int QfDigitizingLayerBaseModel::findLayer (
QgsMapLayer * layer
) const
Returns the model row for given map layer.
Note:
If the map layer is not found, -1 will be returned
function findLayerName
int QfDigitizingLayerBaseModel::findLayerName (
const QString & name
) const
Returns the model row for given map layer name.
Note:
If the map layer name is not found, -1 will be returned
function markupManager
inline QfMarkupManager * QfDigitizingLayerBaseModel::markupManager () const
function project
The project from which map layers will be taken from.
inline QgsProject * QfDigitizingLayerBaseModel::project () const
function roleNames
QHash< int, QByteArray > QfDigitizingLayerBaseModel::roleNames () override const
function rowCount
int QfDigitizingLayerBaseModel::rowCount (
const QModelIndex & parent
) override const
function setEnabled
void QfDigitizingLayerBaseModel::setEnabled (
bool enabled
)
The enabled state of the model.
Note:
When disabled, any changes to the project's map layers registry and markup manager will be ignored
function setMarkupManager
void QfDigitizingLayerBaseModel::setMarkupManager (
QfMarkupManager * markupManager
)
function setProject
The project from which map layers will be taken from.
void QfDigitizingLayerBaseModel::setProject (
QgsProject * project
)
Protected Slots Documentation
slot addCollections
void QfDigitizingLayerBaseModel::addCollections;
slot addLayers
void QfDigitizingLayerBaseModel::addLayers;
slot removeCollections
void QfDigitizingLayerBaseModel::removeCollections;
slot removeLayers
void QfDigitizingLayerBaseModel::removeLayers;
The documentation for this class was generated from the following file src/core/qfdigitizinglayermodel.h