QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsElevationProfileManagerModel Class Reference

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

#include <qgselevationprofilemanagermodel.h>

Inheritance diagram for QgsElevationProfileManagerModel:

Public Types

enum class  CustomRole : int { ElevationProfile = Qt::UserRole + 1 }
 Custom model roles. More...
Public Types inherited from QgsProjectStoredObjectManagerModelBase
enum class  CustomRole : int { Object = Qt::UserRole + 1 }
 Custom model roles. More...

Public Member Functions

 QgsElevationProfileManagerModel (QgsElevationProfileManager *manager, QObject *parent=nullptr)
 Constructor for QgsElevationProfileManagerModel, showing the elevation profiles from the specified manager.
QModelIndex indexFromProfile (QgsElevationProfile *profile) const
 Returns the model index corresponding to a profile.
QgsElevationProfileprofileFromIndex (const QModelIndex &index) const
 Returns the profile at the corresponding index.
Public Member Functions inherited from QgsProjectStoredObjectManagerModel< QgsElevationProfile >
 QgsProjectStoredObjectManagerModel (QgsAbstractProjectStoredObjectManager< QgsElevationProfile > *manager, QObject *parent=nullptr)
 Constructor for QgsProjectStoredObjectManagerModel, showing the objects from the specified manager.
bool allowEmptyObject () const
 Returns true if the model allows the empty object ("not set") choice.
QModelIndex indexFromObject (QgsElevationProfile *object) const
 Returns the model index corresponding to an object.
QgsElevationProfileobjectFromIndex (const QModelIndex &index) const
 Returns the object at the corresponding index.
void setAllowEmptyObject (bool allowEmpty)
 Sets whether an optional empty object ("not set") option is present in the model.
Public Member Functions inherited from QgsProjectStoredObjectManagerModelBase
 QgsProjectStoredObjectManagerModelBase (QObject *parent=nullptr)
 Constructor for QgsProjectStoredObjectManagerModelBase, with the specified parent object.
QVariant data (const QModelIndex &index, int role) const override
Qt::ItemFlags flags (const QModelIndex &index) const override
int rowCount (const QModelIndex &parent) const override
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override

Additional Inherited Members

Protected Attributes inherited from QgsProjectStoredObjectManagerModel< QgsElevationProfile >
PRIVATE QgsAbstractProjectStoredObjectManager< QgsElevationProfile > * mObjectManager
 Object manager.

Detailed Description

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

Since
QGIS 4.0

Definition at line 45 of file qgselevationprofilemanagermodel.h.

Member Enumeration Documentation

◆ CustomRole

Custom model roles.

Enumerator
ElevationProfile 

Elevation profile object.

Definition at line 57 of file qgselevationprofilemanagermodel.h.

Constructor & Destructor Documentation

◆ QgsElevationProfileManagerModel()

QgsElevationProfileManagerModel::QgsElevationProfileManagerModel ( QgsElevationProfileManager * manager,
QObject * parent = nullptr )
explicit

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

Definition at line 28 of file qgselevationprofilemanagermodel.cpp.

Member Function Documentation

◆ indexFromProfile()

QModelIndex QgsElevationProfileManagerModel::indexFromProfile ( QgsElevationProfile * profile) const

Returns the model index corresponding to a profile.

See also
profileFromIndex()

Definition at line 39 of file qgselevationprofilemanagermodel.cpp.

◆ profileFromIndex()

QgsElevationProfile * QgsElevationProfileManagerModel::profileFromIndex ( const QModelIndex & index) const

Returns the profile at the corresponding index.

See also
indexFromProfile()

Definition at line 34 of file qgselevationprofilemanagermodel.cpp.


The documentation for this class was generated from the following files: