QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgselevationprofilemanagermodel.h
Go to the documentation of this file.
1/***************************************************************************
2 qgselevationprofilemanagermodel.cpp
3 --------------------
4 Date : July 2025
5 Copyright : (C) 2025 Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSELEVATIONPROFILEMANAGERMODEL_H
17#define QGSELEVATIONPROFILEMANAGERMODEL_H
18
19#include "qgis_core.h"
20#include "qgis_sip.h"
22
23#include <QAbstractListModel>
24#include <QObject>
25#include <QSortFilterProxyModel>
26
27class QgsProject;
30
31
41#ifdef SIP_RUN
42class CORE_EXPORT QgsElevationProfileManagerModel : public QgsProjectStoredObjectManagerModelBase // for sip we skip to the base class and avoid the template difficulty
43{
44#else
45class CORE_EXPORT QgsElevationProfileManagerModel : public QgsProjectStoredObjectManagerModel< QgsElevationProfile >
46{
47#endif
48 Q_OBJECT
49
50 public:
51
52 // *INDENT-OFF*
53
57 enum class CustomRole : int
58 {
59 ElevationProfile = Qt::UserRole + 1,
60 };
61 Q_ENUM( CustomRole )
62 // *INDENT-ON*
63
64
67 explicit QgsElevationProfileManagerModel( QgsElevationProfileManager *manager, QObject *parent SIP_TRANSFERTHIS = nullptr );
68
73 QgsElevationProfile *profileFromIndex( const QModelIndex &index ) const;
74
79 QModelIndex indexFromProfile( QgsElevationProfile *profile ) const;
80
81};
82
83
92#ifdef SIP_RUN
93class CORE_EXPORT QgsElevationProfileManagerProxyModel : public QgsProjectStoredObjectManagerProxyModelBase // for sip we skip to the base class and avoid the template difficulty
94{
95#else
97{
98#endif
99 Q_OBJECT
100 public:
101
105 explicit QgsElevationProfileManagerProxyModel( QObject *parent SIP_TRANSFERTHIS = nullptr );
106
107};
108
109#endif // QGSELEVATIONPROFILEMANAGERMODEL_H
List model representing the elevation profiles available in a elevation profile manager.
QgsElevationProfileManagerModel(QgsElevationProfileManager *manager, QObject *parent=nullptr)
Constructor for QgsElevationProfileManagerModel, showing the elevation profiles from the specified ma...
QgsElevationProfileManagerProxyModel(QObject *parent=nullptr)
Constructor for QgsElevationProfileManagerProxyModel.
Manages storage of a set of elevation profiles.
Represents an elevation profile attached to a project.
Base class for list models representing the objects available in a QgsAbstractProjectStoredObjectMana...
QgsProjectStoredObjectManagerModel(QgsAbstractProjectStoredObjectManager< QgsElevationProfile > *manager, QObject *parent=nullptr)
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:109
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53