QGIS API Documentation
3.41.0-Master (fda2aa46e9a)
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 "
qgsexpressioncontext.h
"
21
#include "qgis_gui.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
38
QgsSymbolWidgetContext
() =
default
;
39
QgsSymbolWidgetContext
(
const
QgsSymbolWidgetContext
&other );
40
QgsSymbolWidgetContext
&operator=(
const
QgsSymbolWidgetContext
&other );
41
48
void
setMapCanvas(
QgsMapCanvas
*canvas );
49
54
QgsMapCanvas
*mapCanvas()
const
;
55
62
void
setMessageBar(
QgsMessageBar
*bar );
63
69
QgsMessageBar
*messageBar()
const
;
70
79
void
setExpressionContext(
QgsExpressionContext
*context );
80
87
QgsExpressionContext
*expressionContext()
const
;
88
94
void
setAdditionalExpressionContextScopes(
const
QList< QgsExpressionContextScope > &scopes );
95
100
QList< QgsExpressionContextScope > additionalExpressionContextScopes()
const
;
101
106
QList<QgsExpressionContextScope *> globalProjectAtlasMapLayerScopes(
const
QgsMapLayer
*layer )
const
SIP_FACTORY
;
107
115
Qgis::SymbolType
symbolType()
const
;
116
124
void
setSymbolType(
Qgis::SymbolType
type );
125
126
private
:
127
128
QgsMapCanvas
*mMapCanvas =
nullptr
;
129
QgsMessageBar
*mMessageBar =
nullptr
;
130
std::unique_ptr< QgsExpressionContext > mExpressionContext;
131
QList< QgsExpressionContextScope > mAdditionalScopes;
132
Qgis::SymbolType
mSymbolType =
Qgis::SymbolType::Hybrid
;
133
134
};
135
136
#endif
// QGSSYMBOLWIDGETCONTEXT_H
Qgis::SymbolType
SymbolType
Symbol types.
Definition
qgis.h:574
Qgis::SymbolType::Hybrid
@ Hybrid
Hybrid symbol.
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition
qgsexpressioncontext.h:471
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition
qgsmapcanvas.h:93
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:76
QgsMessageBar
A bar for displaying non-blocking messages to the user.
Definition
qgsmessagebar.h:61
QgsSymbolWidgetContext
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Definition
qgssymbolwidgetcontext.h:35
QgsSymbolWidgetContext::QgsSymbolWidgetContext
QgsSymbolWidgetContext()=default
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:76
qgsexpressioncontext.h
Generated on Sun Nov 10 2024 14:15:43 for QGIS API Documentation by
1.9.8