QGIS API Documentation 3.99.0-Master (c22de0620c0)
Loading...
Searching...
No Matches
qgsmasksourceselectionwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmasksourceselectionwidget.h
3 ---------------------
4 begin : September 2019
5 copyright : (C) 2019 by Hugo Mercier
6 email : hugo dot mercier at oslandia 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#ifndef QGSMASKSOURCESELECTIONWIDGET_H
16#define QGSMASKSOURCESELECTIONWIDGET_H
17
18// We don't want to expose this in the public API
19
20#include "qgis_gui.h"
21#include "qgis_sip.h"
23
24#include <QWidget>
25
26#define SIP_NO_FILE
27
28class QTreeWidget;
29class QTreeWidgetItem;
30class QComboBox;
31class QToolButton;
32class QgsSymbolLayer;
33class QgsSelectiveMaskingSource;
37
46class GUI_EXPORT QgsMaskSourceSelectionWidget : public QWidget
47{
48 Q_OBJECT
49 public:
51 explicit QgsMaskSourceSelectionWidget( QWidget *parent = nullptr );
52
54 void update();
55
62
69
70 signals:
72 void changed();
73
74 private slots:
75
76 void selectedSetChanged();
77 void emitChanged();
78 void onItemChanged();
79 void newSet();
80 void removeSet();
81 void renameSet();
82
83 private:
84 bool isCustomSet() const;
85
86 QComboBox *mSetComboBox = nullptr;
87 QTreeWidget *mTree = nullptr;
88 QHash<QgsSymbolLayerReference, QTreeWidgetItem *> mItems;
89 QgsSelectiveMaskingSourceSetManagerModel *mManagerModel = nullptr;
90 QgsSelectiveMaskingSourceSetManagerProxyModel *mManagerProxyModel = nullptr;
91 QToolButton *mSetsToolButton = nullptr;
92 QAction *mRemoveAction = nullptr;
93 QAction *mRenameAction = nullptr;
94
95 int mBlockChangedSignals = 0;
96
98};
99
100#endif
void changed()
Emitted when an item was changed.
QgsSelectiveMaskingSourceSet sourceSet() const
Returns the current masking source set.
void update()
Updates the possible sources, from the project layers.
QgsMaskSourceSelectionWidget(QWidget *parent=nullptr)
constructor
void setSourceSet(const QgsSelectiveMaskingSourceSet &set)
Sets the current masking source set.
List model representing the selective masking source sets available in a selective masking source set...
QSortFilterProxyModel subclass for QgsSelectiveMaskingSourceSetManagerModel.
Represents a named set of selective masking sources (QgsSelectiveMaskSource).
Abstract base class for symbol layers.