QGIS API Documentation
3.99.0-Master (2fe06baccd8)
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
#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
QgsVectorLayer
;
30
38
class
GUI_EXPORT
QgsSymbolLayerSelectionWidget
:
public
QWidget
39
{
40
Q_OBJECT
41
public
:
43
explicit
QgsSymbolLayerSelectionWidget
( QWidget *parent =
nullptr
);
44
46
void
setLayer
(
const
QgsVectorLayer
*layer );
47
49
QSet<QString>
selection
()
const
;
50
52
void
setSelection
(
const
QSet<QString> &sel );
53
54
signals:
56
void
changed
();
57
58
private
:
60
QTreeWidget *mTree;
62
const
QgsVectorLayer
*mLayer =
nullptr
;
63
64
// Mapping between symbol layer id and tree elements
65
QHash<QString, QTreeWidgetItem *> mItems;
66
67
friend
class
TestQgsMaskingWidget
;
68
};
69
70
#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:67
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:406
qgis_sip.h
qgssymbollayerreference.h
Generated on
for QGIS API Documentation by
1.15.0