QGIS API Documentation 3.99.0-Master (e9821da5c6b)
Loading...
Searching...
No Matches
qgsselectivemaskingsourcesetmanagermodel.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsselectivemaskingsourcesetmanagermodel.cpp
3 --------------------
4 Date : January 2026
5 Copyright : (C) 2026 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 QGSSELECTIVEMASKINGSOURCESETMANAGERMODEL_H
17#define QGSSELECTIVEMASKINGSOURCESETMANAGERMODEL_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 QgsSelectiveMaskingSourceSetManagerModel : public QgsProjectStoredObjectManagerModelBase // for sip we skip to the base class and avoid the template difficulty
43{
44#else
45class CORE_EXPORT QgsSelectiveMaskingSourceSetManagerModel : public QgsProjectStoredObjectManagerModel< QgsSelectiveMaskingSourceSet >
46{
47#endif
48 Q_OBJECT
49
50 public:
51
52 // *INDENT-OFF*
53
57 enum class CustomRole : int
58 {
59 Object = Qt::UserRole + 1,
60 IsEmptyObject = Qt::UserRole + 2,
61 SetId = Qt::UserRole + 3,
62 };
63 Q_ENUM( CustomRole )
64 // *INDENT-ON*
65
66
70
75 QgsSelectiveMaskingSourceSet *setFromIndex( const QModelIndex &index ) const;
76
81 QModelIndex indexFromSet( QgsSelectiveMaskingSourceSet *set ) const;
82
83 QVariant data( const QModelIndex &index, int role ) const override;
84
85};
86
87
96#ifdef SIP_RUN
97class CORE_EXPORT QgsSelectiveMaskingSourceSetManagerProxyModel : public QgsProjectStoredObjectManagerProxyModelBase // for sip we skip to the base class and avoid the template difficulty
98{
99#else
100class CORE_EXPORT QgsSelectiveMaskingSourceSetManagerProxyModel : public QgsProjectStoredObjectManagerProxyModel< QgsSelectiveMaskingSourceSet >
101{
102#endif
103 Q_OBJECT
104 public:
105
109 explicit QgsSelectiveMaskingSourceSetManagerProxyModel( QObject *parent SIP_TRANSFERTHIS = nullptr );
110
111};
112
113#endif // QGSSELECTIVEMASKINGSOURCESETMANAGERMODEL_H
Base class for list models representing the objects available in a QgsAbstractProjectStoredObjectMana...
QVariant data(const QModelIndex &index, int role) const override
QgsProjectStoredObjectManagerModel(QgsAbstractProjectStoredObjectManager< QgsSelectiveMaskingSourceSet > *manager, QObject *parent=nullptr)
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:113
List model representing the selective masking source sets available in a selective masking source set...
QgsSelectiveMaskingSourceSetManagerModel(QgsSelectiveMaskingSourceSetManager *manager, QObject *parent=nullptr)
Constructor for QgsSelectiveMaskingSourceSetManagerModel, showing the sets from the specified manager...
QgsSelectiveMaskingSourceSetManagerProxyModel(QObject *parent=nullptr)
Constructor for QgsSelectiveMaskingSourceSetManagerProxyModel.
Manages storage of a set of selective masking source sets.
Represents a named set of selective masking sources (QgsSelectiveMaskSource).
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53