Class: QgsElevationProfileManagerModel

List model representing the elevation profiles available in a elevation profile manager.

Added in version 4.0.

Class Hierarchy

Inheritance diagram of qgis.core.QgsElevationProfileManagerModel

Base classes

QgsProjectStoredObjectManagerModelBase

Base class for list models representing the objects available in a QgsAbstractProjectStoredObjectManager.

QAbstractListModel

QAbstractItemModel

QObject

Enums

CustomRole

Custom model roles.

Methods

indexFromProfile

Returns the model index corresponding to a profile.

profileFromIndex

Returns the profile at the corresponding index.

class qgis.core.QgsElevationProfileManagerModel[source]

Bases: QgsProjectStoredObjectManagerModelBase

__init__(manager: QgsElevationProfileManager | None, parent: QObject | None = None)

Constructor for QgsElevationProfileManagerModel, showing the elevation profiles from the specified manager.

Parameters:
class CustomRole(*values)

Bases: IntEnum

Custom model roles.

  • ElevationProfile: Elevation profile object

ElevationProfile = 257
indexFromProfile(self, profile: QgsElevationProfile | None) QModelIndex[source]

Returns the model index corresponding to a profile.

Parameters:

profile (Optional[QgsElevationProfile])

Return type:

QModelIndex

profileFromIndex(self, index: QModelIndex) QgsElevationProfile | None[source]

Returns the profile at the corresponding index.

Parameters:

index (QModelIndex)

Return type:

Optional[QgsElevationProfile]