QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
elevation
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
"
21
#include "
qgsprojectstoredobjectmanagermodel.h
"
22
23
#include <QAbstractListModel>
24
#include <QObject>
25
#include <QSortFilterProxyModel>
26
27
class
QgsProject
;
28
class
QgsElevationProfile
;
29
class
QgsElevationProfileManager
;
30
31
41
#ifdef SIP_RUN
42
class
CORE_EXPORT
QgsElevationProfileManagerModel
:
public
QgsProjectStoredObjectManagerModelBase
// for sip we skip to the base class and avoid the template difficulty
43
{
44
#else
45
class
CORE_EXPORT
QgsElevationProfileManagerModel
:
public
QgsProjectStoredObjectManagerModel
< QgsElevationProfile >
46
{
47
#endif
48
Q_OBJECT
49
50
public
:
51
// *INDENT-OFF*
52
56
enum class
CustomRole
:
int
57
{
58
ElevationProfile = Qt::UserRole + 1,
59
};
60
Q_ENUM( CustomRole )
61
// *INDENT-ON*
62
63
66
explicit
QgsElevationProfileManagerModel
(
QgsElevationProfileManager
*manager, QObject *parent
SIP_TRANSFERTHIS
=
nullptr
);
67
72
QgsElevationProfile
*profileFromIndex(
const
QModelIndex &index )
const
;
73
78
QModelIndex indexFromProfile(
QgsElevationProfile
*profile )
const
;
79
};
80
81
90
#ifdef SIP_RUN
91
class
CORE_EXPORT QgsElevationProfileManagerProxyModel :
public
QgsProjectStoredObjectManagerProxyModelBase
// for sip we skip to the base class and avoid the template difficulty
92
{
93
#else
94
class
CORE_EXPORT
QgsElevationProfileManagerProxyModel
:
public
QgsProjectStoredObjectManagerProxyModel
< QgsElevationProfile >
95
{
96
#endif
97
Q_OBJECT
98
public
:
102
explicit
QgsElevationProfileManagerProxyModel
( QObject *parent
SIP_TRANSFERTHIS
=
nullptr
);
103
};
104
105
#endif
// QGSELEVATIONPROFILEMANAGERMODEL_H
QgsElevationProfileManagerModel
List model representing the elevation profiles available in a elevation profile manager.
Definition
qgselevationprofilemanagermodel.h:46
QgsElevationProfileManagerModel::QgsElevationProfileManagerModel
QgsElevationProfileManagerModel(QgsElevationProfileManager *manager, QObject *parent=nullptr)
Constructor for QgsElevationProfileManagerModel, showing the elevation profiles from the specified ma...
Definition
qgselevationprofilemanagermodel.cpp:28
QgsElevationProfileManagerModel::CustomRole
CustomRole
Custom model roles.
Definition
qgselevationprofilemanagermodel.h:57
QgsElevationProfileManagerProxyModel::QgsElevationProfileManagerProxyModel
QgsElevationProfileManagerProxyModel(QObject *parent=nullptr)
Constructor for QgsElevationProfileManagerProxyModel.
Definition
qgselevationprofilemanagermodel.cpp:49
QgsElevationProfileManager
Manages storage of a set of elevation profiles.
Definition
qgselevationprofilemanager.h:50
QgsElevationProfile
Represents an elevation profile attached to a project.
Definition
qgselevationprofile.h:45
QgsProjectStoredObjectManagerModelBase
Base class for list models representing the objects available in a QgsAbstractProjectStoredObjectMana...
Definition
qgsprojectstoredobjectmanagermodel.h:37
QgsProjectStoredObjectManagerModel< QgsElevationProfile >::QgsProjectStoredObjectManagerModel
QgsProjectStoredObjectManagerModel(QgsAbstractProjectStoredObjectManager< QgsElevationProfile > *manager, QObject *parent=nullptr)
Definition
qgsprojectstoredobjectmanagermodel.cpp:76
QgsProjectStoredObjectManagerProxyModel< QgsElevationProfile >::QgsProjectStoredObjectManagerProxyModel
QgsProjectStoredObjectManagerProxyModel(QObject *parent=nullptr)
Definition
qgsprojectstoredobjectmanagermodel.cpp:434
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition
qgsproject.h:114
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgsprojectstoredobjectmanagermodel.h
Generated on
for QGIS API Documentation by
1.17.0