Skip to content

Class QfMapLayerBaseModel

ClassList > QfMapLayerBaseModel

A project map layers base model.

  • #include <qfmaplayermodel.h>

Inherits the following classes: QAbstractListModel

Public Signals

Type Name
signal void enabledChanged
signal void projectChanged
signal void trackingModelChanged

Public Functions

Type Name
QfMapLayerBaseModel (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 (QfTrackingModel * trackingModel)
The tracking model against which map layers' tracking availability will be checked against.
QfTrackingModel * 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 QfMapLayerBaseModel::enabledChanged;

signal projectChanged

void QfMapLayerBaseModel::projectChanged;

signal trackingModelChanged

void QfMapLayerBaseModel::trackingModelChanged;

Public Functions Documentation

function QfMapLayerBaseModel

explicit QfMapLayerBaseModel::QfMapLayerBaseModel (
    QObject * parent=nullptr
) 

function data

QVariant QfMapLayerBaseModel::data (
    const QModelIndex & index,
    int role
) override const

function enabled

inline bool QfMapLayerBaseModel::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 * QfMapLayerBaseModel::project () const


function roleNames

QHash< int, QByteArray > QfMapLayerBaseModel::roleNames () override const

function rowCount

int QfMapLayerBaseModel::rowCount (
    const QModelIndex & parent
) override const

function setEnabled

void QfMapLayerBaseModel::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 QfMapLayerBaseModel::setProject (
    QgsProject * project
) 


function setTrackingModel

The tracking model against which map layers' tracking availability will be checked against.

void QfMapLayerBaseModel::setTrackingModel (
    QfTrackingModel * trackingModel
) 


function trackingModel

The tracking model against which map layers' tracking availability will be checked against.

inline QfTrackingModel * QfMapLayerBaseModel::trackingModel () const


Protected Slots Documentation

slot addLayers

void QfMapLayerBaseModel::addLayers;

slot removeLayers

void QfMapLayerBaseModel::removeLayers;


The documentation for this class was generated from the following file src/core/qfmaplayermodel.h