QGIS API Documentation
3.99.0-Master (a5475b57e34)
Loading...
Searching...
No Matches
src
gui
qgssymbollayerselectionwidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssymbollayerselectionwidget.h
3
---------------------
4
begin : July 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 QGSSYMBOLLAYERSELECTIONWIDGET_H
16
#define QGSSYMBOLLAYERSELECTIONWIDGET_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
"
22
#include "
qgssymbollayerreference.h
"
23
24
#include <QWidget>
25
26
#define SIP_NO_FILE
27
28
class
QTreeWidget;
29
class
QTreeWidgetItem;
30
class
QgsVectorLayer
;
31
39
class
GUI_EXPORT
QgsSymbolLayerSelectionWidget
:
public
QWidget
40
{
41
Q_OBJECT
42
public
:
44
explicit
QgsSymbolLayerSelectionWidget
( QWidget *parent =
nullptr
);
45
47
void
setLayer
(
const
QgsVectorLayer
*layer );
48
50
QSet<QString>
selection
()
const
;
51
53
void
setSelection
(
const
QSet<QString> &sel );
54
55
signals:
57
void
changed
();
58
59
private
:
61
QTreeWidget *mTree;
63
const
QgsVectorLayer
*mLayer =
nullptr
;
64
65
// Mapping between symbol layer id and tree elements
66
QHash<QString, QTreeWidgetItem *> mItems;
67
68
friend
class
TestQgsMaskingWidget
;
69
};
70
71
#endif
QgsSymbolLayerSelectionWidget::setSelection
void setSelection(const QSet< QString > &sel)
Sets the symbol layer selection.
Definition
qgssymbollayerselectionwidget.cpp:168
QgsSymbolLayerSelectionWidget::TestQgsMaskingWidget
friend class TestQgsMaskingWidget
Definition
qgssymbollayerselectionwidget.h:68
QgsSymbolLayerSelectionWidget::QgsSymbolLayerSelectionWidget
QgsSymbolLayerSelectionWidget(QWidget *parent=nullptr)
Default constructor.
Definition
qgssymbollayerselectionwidget.cpp:31
QgsSymbolLayerSelectionWidget::changed
void changed()
Signal emitted when something the configuration is changed.
QgsSymbolLayerSelectionWidget::selection
QSet< QString > selection() const
Returns current symbol layer selection.
Definition
qgssymbollayerselectionwidget.cpp:157
QgsSymbolLayerSelectionWidget::setLayer
void setLayer(const QgsVectorLayer *layer)
Populate the tree with selectable symbol layers from a given layer.
Definition
qgssymbollayerselectionwidget.cpp:47
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:409
qgis_sip.h
qgssymbollayerreference.h
Generated on
for QGIS API Documentation by
1.15.0