QGIS API Documentation 3.99.0-Master (357b655ed83)
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#define SIP_NO_FILE
20
21#include "qgis_gui.h"
22#include "qgis_sip.h"
24
25#include <QWidget>
26
27class QTreeWidget;
28class QTreeWidgetItem;
29class QComboBox;
30class QToolButton;
31class QgsSymbolLayer;
32class QgsSelectiveMaskingSource;
36
45class GUI_EXPORT QgsMaskSourceSelectionWidget : public QWidget
46{
47 Q_OBJECT
48 public:
50 explicit QgsMaskSourceSelectionWidget( QWidget *parent = nullptr );
51
53 void update();
54
61
68
69 signals:
71 void changed();
72
73 private slots:
74
75 void selectedSetChanged();
76 void emitChanged();
77 void onItemChanged();
78 void newSet();
79 void removeSet();
80 void renameSet();
81
82 private:
83 bool isCustomSet() const;
84
85 QComboBox *mSetComboBox = nullptr;
86 QTreeWidget *mTree = nullptr;
87 QHash<QgsSymbolLayerReference, QTreeWidgetItem *> mItems;
88 QgsSelectiveMaskingSourceSetManagerModel *mManagerModel = nullptr;
89 QgsSelectiveMaskingSourceSetManagerProxyModel *mManagerProxyModel = nullptr;
90 QToolButton *mSetsToolButton = nullptr;
91 QAction *mRemoveAction = nullptr;
92 QAction *mRenameAction = nullptr;
93
94 int mBlockChangedSignals = 0;
95
97};
98
99#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.