QGIS API Documentation
3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
src
gui
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
"
23
#include "
qgssymbollayerreference.h
"
24
25
#include <QWidget>
26
27
class
QTreeWidget;
28
class
QTreeWidgetItem;
29
class
QgsSymbolLayer
;
30
39
class
GUI_EXPORT
QgsMaskSourceSelectionWidget
:
public
QWidget
40
{
41
Q_OBJECT
42
public
:
43
struct
MaskSource
44
{
46
QString
layerId
;
47
49
bool
isLabeling
=
false
;
50
52
QString
symbolLayerId
;
53
};
54
56
explicit
QgsMaskSourceSelectionWidget
( QWidget *parent =
nullptr
);
57
59
void
update
();
60
62
QList<MaskSource>
selection
()
const
;
63
65
void
setSelection
(
const
QList<MaskSource> &sel );
66
67
signals:
69
void
changed
();
70
71
private
:
72
QTreeWidget *mTree;
73
QHash<QgsSymbolLayerReference, QTreeWidgetItem *> mItems;
74
75
friend
class
TestQgsMaskingWidget
;
76
};
77
78
#endif
QgsMaskSourceSelectionWidget::setSelection
void setSelection(const QList< MaskSource > &sel)
Sets the symbol layer selection.
Definition
qgsmasksourceselectionwidget.cpp:273
QgsMaskSourceSelectionWidget::changed
void changed()
Emitted when an item was changed.
QgsMaskSourceSelectionWidget::update
void update()
Updates the possible sources, from the project layers.
Definition
qgsmasksourceselectionwidget.cpp:63
QgsMaskSourceSelectionWidget::selection
QList< MaskSource > selection() const
Returns the current selection.
Definition
qgsmasksourceselectionwidget.cpp:254
QgsMaskSourceSelectionWidget::TestQgsMaskingWidget
friend class TestQgsMaskingWidget
Definition
qgsmasksourceselectionwidget.h:75
QgsMaskSourceSelectionWidget::QgsMaskSourceSelectionWidget
QgsMaskSourceSelectionWidget(QWidget *parent=nullptr)
constructor
Definition
qgsmasksourceselectionwidget.cpp:47
QgsSymbolLayer
Abstract base class for symbol layers.
Definition
qgssymbollayer.h:57
qgis_sip.h
qgssymbollayerreference.h
QgsMaskSourceSelectionWidget::MaskSource
Definition
qgsmasksourceselectionwidget.h:44
QgsMaskSourceSelectionWidget::MaskSource::symbolLayerId
QString symbolLayerId
The symbol layer id.
Definition
qgsmasksourceselectionwidget.h:52
QgsMaskSourceSelectionWidget::MaskSource::layerId
QString layerId
The source layer id.
Definition
qgsmasksourceselectionwidget.h:46
QgsMaskSourceSelectionWidget::MaskSource::isLabeling
bool isLabeling
Whether it is a labeling mask or not.
Definition
qgsmasksourceselectionwidget.h:49
Generated on
for QGIS API Documentation by
1.15.0