QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsmaskingwidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmaskingwidget.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 QGSMASKINGWIDGET_H
16
#define QGSMASKINGWIDGET_H
17
18
// We don't want to expose this in the public API
19
21
22
#include "ui_qgsmaskingwidgetbase.h"
23
24
#include "qgis_gui.h"
25
#include "
qgis_sip.h
"
26
#include "
qgspanelwidget.h
"
27
#include "
qgsstyleentityvisitor.h
"
28
29
#include <QPointer>
30
31
#define SIP_NO_FILE
32
33
class
QgsMessageBarItem
;
34
42
class
GUI_EXPORT QgsMaskingWidget :
public
QgsPanelWidget
,
private
Ui::QgsMaskingWidgetBase
43
{
44
Q_OBJECT
45
public
:
47
QgsMaskingWidget( QWidget *parent =
nullptr
);
48
50
void
setLayer( QgsVectorLayer *layer );
51
53
void
apply();
54
55
private
slots:
56
60
void
onSelectionChanged();
61
62
private
:
63
QPointer< QgsVectorLayer > mLayer;
65
void
populate();
66
67
QPointer<QgsMessageBarItem> mMessageBarItem;
68
69
friend
class
TestQgsMaskingWidget;
70
};
71
72
80
class
SymbolLayerVisitor :
public
QgsStyleEntityVisitorInterface
81
{
82
public
:
83
typedef
std::function<void(
const
QgsSymbolLayer * )> SymbolLayerCallback;
84
86
SymbolLayerVisitor( SymbolLayerCallback callback );
87
88
bool
visitEnter
(
const
QgsStyleEntityVisitorInterface::Node &node )
override
;
89
91
void
visitSymbol(
const
QgsSymbol *symbol,
const
QString &leafIdentifier );
92
93
bool
visit
(
const
QgsStyleEntityVisitorInterface::StyleLeaf &leaf )
override
;
94
95
private
:
96
SymbolLayerCallback mCallback;
97
};
98
100
101
#endif
QgsMessageBarItem
Represents an item shown within a QgsMessageBar widget.
Definition
qgsmessagebaritem.h:39
QgsPanelWidget
Base class for any widget that can be shown as an inline panel.
Definition
qgspanelwidget.h:32
QgsStyleEntityVisitorInterface
An interface for classes which can visit style entity (e.g.
Definition
qgsstyleentityvisitor.h:34
QgsStyleEntityVisitorInterface::visitEnter
virtual bool visitEnter(const QgsStyleEntityVisitorInterface::Node &node)
Called when the visitor starts visiting a node.
Definition
qgsstyleentityvisitor.h:164
QgsStyleEntityVisitorInterface::visit
virtual bool visit(const QgsStyleEntityVisitorInterface::StyleLeaf &entity)
Called when the visitor will visit a style entity.
Definition
qgsstyleentityvisitor.h:148
qgis_sip.h
qgspanelwidget.h
qgsstyleentityvisitor.h
Generated on
for QGIS API Documentation by
1.17.0