QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgselevationprofilemanagermodel.cpp
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
17
18#include "qgselevationprofile.h"
20#include "qgsproject.h"
21
22#include "moc_qgselevationprofilemanagermodel.cpp"
23
24//
25// QgsElevationProfileManagerModel
26//
27
29 : QgsProjectStoredObjectManagerModel( manager, parent )
30{
31 connect( manager, &QgsElevationProfileManager::profileRenamed, this, &QgsElevationProfileManagerModel::objectRenamedInternal );
32}
33
35{
36 return objectFromIndex( index );
37}
38
40{
41 return indexFromObject( layout );
42}
43
44
45//
46// QgsElevationProfileManagerProxyModel
47//
48
QgsElevationProfileManagerModel(QgsElevationProfileManager *manager, QObject *parent=nullptr)
Constructor for QgsElevationProfileManagerModel, showing the elevation profiles from the specified ma...
QgsElevationProfile * profileFromIndex(const QModelIndex &index) const
Returns the profile at the corresponding index.
QModelIndex indexFromProfile(QgsElevationProfile *profile) const
Returns the model index corresponding to a profile.
QgsElevationProfileManagerProxyModel(QObject *parent=nullptr)
Constructor for QgsElevationProfileManagerProxyModel.
Manages storage of a set of elevation profiles.
void profileRenamed(QgsElevationProfile *profile, const QString &newName)
Emitted when a profile is renamed.
Represents an elevation profile attached to a project.
QgsElevationProfile * objectFromIndex(const QModelIndex &index) const
QgsProjectStoredObjectManagerModel(QgsAbstractProjectStoredObjectManager< QgsElevationProfile > *manager, QObject *parent=nullptr)