QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
symbology
qgssymbolwidgetcontext.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssymbolwidgetcontext.h
3
------------------------
4
begin : September 2016
5
copyright : (C) 2016 by Nyall Dawson
6
email : nyall dot dawson at gmail 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 QGSSYMBOLWIDGETCONTEXT_H
16
#define QGSSYMBOLWIDGETCONTEXT_H
17
18
#include <memory>
19
20
#include "qgis_gui.h"
21
#include "
qgsexpressioncontext.h
"
22
23
class
QgsMapLayer
;
24
class
QgsMapCanvas
;
25
class
QgsMessageBar
;
26
34
class
GUI_EXPORT
QgsSymbolWidgetContext
// clazy:exclude=rule-of-three
35
{
36
public
:
37
QgsSymbolWidgetContext
() =
default
;
38
QgsSymbolWidgetContext
(
const
QgsSymbolWidgetContext
&other );
39
QgsSymbolWidgetContext
&
operator=
(
const
QgsSymbolWidgetContext
&other );
40
47
void
setMapCanvas
(
QgsMapCanvas
*canvas );
48
53
QgsMapCanvas
*
mapCanvas
()
const
;
54
61
void
setMessageBar
(
QgsMessageBar
*bar );
62
68
QgsMessageBar
*
messageBar
()
const
;
69
78
void
setExpressionContext
(
QgsExpressionContext
*context );
79
86
QgsExpressionContext
*
expressionContext
()
const
;
87
93
void
setAdditionalExpressionContextScopes
(
const
QList<QgsExpressionContextScope> &scopes );
94
99
QList<QgsExpressionContextScope>
additionalExpressionContextScopes
()
const
;
100
105
QList<QgsExpressionContextScope *>
globalProjectAtlasMapLayerScopes
(
const
QgsMapLayer
*layer )
const
SIP_FACTORY
;
106
114
Qgis::SymbolType
symbolType
()
const
;
115
123
void
setSymbolType
(
Qgis::SymbolType
type );
124
125
private
:
126
QPointer<QgsMapCanvas> mMapCanvas;
127
QgsMessageBar
*mMessageBar =
nullptr
;
128
std::unique_ptr<QgsExpressionContext> mExpressionContext;
129
QList<QgsExpressionContextScope> mAdditionalScopes;
130
Qgis::SymbolType
mSymbolType =
Qgis::SymbolType::Hybrid
;
131
};
132
133
#endif
// QGSSYMBOLWIDGETCONTEXT_H
Qgis::SymbolType
SymbolType
Symbol types.
Definition
qgis.h:671
Qgis::SymbolType::Hybrid
@ Hybrid
Hybrid symbol.
Definition
qgis.h:675
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition
qgsexpressioncontext.h:491
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition
qgsmapcanvas.h:96
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:83
QgsMessageBar
A bar for displaying non-blocking messages to the user.
Definition
qgsmessagebar.h:61
QgsSymbolWidgetContext::additionalExpressionContextScopes
QList< QgsExpressionContextScope > additionalExpressionContextScopes() const
Returns the list of additional expression context scopes to show as available within the layer.
Definition
qgssymbolwidgetcontext.cpp:95
QgsSymbolWidgetContext::setSymbolType
void setSymbolType(Qgis::SymbolType type)
Sets the associated symbol type, if the widget is being shown as a subcomponent of a parent symbol co...
Definition
qgssymbolwidgetcontext.cpp:127
QgsSymbolWidgetContext::setMapCanvas
void setMapCanvas(QgsMapCanvas *canvas)
Sets the map canvas associated with the widget.
Definition
qgssymbolwidgetcontext.cpp:57
QgsSymbolWidgetContext::globalProjectAtlasMapLayerScopes
QList< QgsExpressionContextScope * > globalProjectAtlasMapLayerScopes(const QgsMapLayer *layer) const
Returns list of scopes: global, project, atlas, map, layer.
Definition
qgssymbolwidgetcontext.cpp:100
QgsSymbolWidgetContext::setAdditionalExpressionContextScopes
void setAdditionalExpressionContextScopes(const QList< QgsExpressionContextScope > &scopes)
Sets a list of additional expression context scopes to show as available within the layer.
Definition
qgssymbolwidgetcontext.cpp:90
QgsSymbolWidgetContext::operator=
QgsSymbolWidgetContext & operator=(const QgsSymbolWidgetContext &other)
Definition
qgssymbolwidgetcontext.cpp:37
QgsSymbolWidgetContext::setMessageBar
void setMessageBar(QgsMessageBar *bar)
Sets the message bar associated with the widget.
Definition
qgssymbolwidgetcontext.cpp:67
QgsSymbolWidgetContext::QgsSymbolWidgetContext
QgsSymbolWidgetContext()=default
QgsSymbolWidgetContext::setExpressionContext
void setExpressionContext(QgsExpressionContext *context)
Sets the optional expression context used for the widget.
Definition
qgssymbolwidgetcontext.cpp:77
QgsSymbolWidgetContext::expressionContext
QgsExpressionContext * expressionContext() const
Returns the expression context used for the widget, if set.
Definition
qgssymbolwidgetcontext.cpp:85
QgsSymbolWidgetContext::mapCanvas
QgsMapCanvas * mapCanvas() const
Returns the map canvas associated with the widget.
Definition
qgssymbolwidgetcontext.cpp:62
QgsSymbolWidgetContext::symbolType
Qgis::SymbolType symbolType() const
Returns the associated symbol type, if the widget is being shown as a subcomponent of a parent symbol...
Definition
qgssymbolwidgetcontext.cpp:122
QgsSymbolWidgetContext::messageBar
QgsMessageBar * messageBar() const
Returns the message bar associated with the widget.
Definition
qgssymbolwidgetcontext.cpp:72
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:83
qgsexpressioncontext.h
Generated on
for QGIS API Documentation by
1.17.0