QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
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 // *INDENT-OFF*
52
56 enum class CustomRole : int
57 {
58 Object = Qt::UserRole + 1,
59 IsEmptyObject = Qt::UserRole + 2,
60 SetId = Qt::UserRole + 3,
61 };
62 Q_ENUM( CustomRole )
63 // *INDENT-ON*
64
65
69
74 QgsSelectiveMaskingSourceSet *setFromIndex( const QModelIndex &index ) const;
75
80 QModelIndex indexFromSet( QgsSelectiveMaskingSourceSet *set ) const;
81
82 QVariant data( const QModelIndex &index, int role ) const override;
83};
84
85
94#ifdef SIP_RUN
95class CORE_EXPORT QgsSelectiveMaskingSourceSetManagerProxyModel : public QgsProjectStoredObjectManagerProxyModelBase // for sip we skip to the base class and avoid the template difficulty
96{
97#else
98class CORE_EXPORT QgsSelectiveMaskingSourceSetManagerProxyModel : public QgsProjectStoredObjectManagerProxyModel< QgsSelectiveMaskingSourceSet >
99{
100#endif
101 Q_OBJECT
102 public:
106 explicit QgsSelectiveMaskingSourceSetManagerProxyModel( QObject *parent SIP_TRANSFERTHIS = nullptr );
107};
108
109#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:52