QGIS API Documentation
4.3.0-Master (8c22baaae17)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
symbology
qgslayerpropertieswidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgslayerpropertieswidget.h
3
---------------------
4
begin : June 2012
5
copyright : (C) 2012 by Martin Dobias
6
email : aruntheguy at gmail.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
16
#ifndef QGSLAYERPROPERTIESWIDGET_H
17
#define QGSLAYERPROPERTIESWIDGET_H
18
19
#include "ui_widget_layerproperties.h"
20
21
#include "
qgsexpressioncontext.h
"
22
#include "
qgssymbollayer.h
"
23
#include "
qgssymbolwidgetcontext.h
"
24
25
class
QgsSymbol
;
26
class
QgsSymbolLayer
;
27
class
QgsSymbolLayerWidget
;
28
class
QgsVectorLayer
;
29
class
QgsMapCanvas
;
30
class
QgsPanelWidget
;
31
32
#include <QMap>
33
#include <QStandardItemModel>
34
#include "qgis_gui.h"
35
44
class
GUI_EXPORT
QgsLayerPropertiesWidget
:
public
QgsPanelWidget
,
public
QgsExpressionContextGenerator
,
private
Ui::LayerPropertiesWidget
45
{
46
Q_OBJECT
47
48
public
:
56
QgsLayerPropertiesWidget
(
QgsSymbolLayer
*layer,
const
QgsSymbol
*symbol,
QgsVectorLayer
*vl, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
57
63
void
setContext
(
const
QgsSymbolWidgetContext
&
context
);
64
69
QgsSymbolWidgetContext
context
()
const
;
70
76
void
setDockMode
(
bool
dockMode
)
override
;
77
78
public
slots:
79
void
layerTypeChanged
();
80
void
emitSignalChanged
();
81
82
signals:
83
87
void
changeLayer
(
QgsSymbolLayer
*layer );
88
89
protected
:
90
void
populateLayerTypes
();
91
void
updateSymbolLayerWidget
(
QgsSymbolLayer
*layer );
92
93
QgsExpressionContext
createExpressionContext
()
const override
;
94
100
void
registerDataDefinedButton
(
QgsPropertyOverrideButton
*button,
QgsSymbolLayer::Property
key );
101
102
protected
:
// data
103
QgsSymbolLayer
*
mLayer
=
nullptr
;
104
105
const
QgsSymbol
*
mSymbol
=
nullptr
;
106
QgsVectorLayer
*
mVectorLayer
=
nullptr
;
107
108
private
slots:
109
void
reloadLayer();
110
void
mEnabledCheckBox_toggled(
bool
enabled );
111
void
updateProperty();
112
113
private
:
114
QgsSymbolWidgetContext
mContext;
115
};
116
117
#endif
//QGSLAYERPROPERTIESWIDGET_H
QgsExpressionContextGenerator
Abstract interface for generating an expression context.
Definition
qgsexpressioncontextgenerator.h:36
QgsExpressionContextGenerator::createExpressionContext
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition
qgsexpressioncontext.h:491
QgsLayerPropertiesWidget::QgsLayerPropertiesWidget
QgsLayerPropertiesWidget(QgsSymbolLayer *layer, const QgsSymbol *symbol, QgsVectorLayer *vl, QWidget *parent=nullptr)
Constructor for QgsLayerPropertiesWidget.
Definition
qgslayerpropertieswidget.cpp:117
QgsLayerPropertiesWidget::populateLayerTypes
void populateLayerTypes()
Definition
qgslayerpropertieswidget.cpp:187
QgsLayerPropertiesWidget::changeLayer
void changeLayer(QgsSymbolLayer *layer)
Emitted when the symbol layer is changed in the widget.
QgsLayerPropertiesWidget::context
QgsSymbolWidgetContext context() const
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expressi...
Definition
qgslayerpropertieswidget.cpp:176
QgsLayerPropertiesWidget::mLayer
QgsSymbolLayer * mLayer
Definition
qgslayerpropertieswidget.h:103
QgsLayerPropertiesWidget::layerTypeChanged
void layerTypeChanged()
Definition
qgslayerpropertieswidget.cpp:329
QgsLayerPropertiesWidget::setContext
void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression ...
Definition
qgslayerpropertieswidget.cpp:165
QgsLayerPropertiesWidget::emitSignalChanged
void emitSignalChanged()
Definition
qgslayerpropertieswidget.cpp:449
QgsLayerPropertiesWidget::mVectorLayer
QgsVectorLayer * mVectorLayer
Definition
qgslayerpropertieswidget.h:106
QgsLayerPropertiesWidget::updateSymbolLayerWidget
void updateSymbolLayerWidget(QgsSymbolLayer *layer)
Definition
qgslayerpropertieswidget.cpp:212
QgsLayerPropertiesWidget::registerDataDefinedButton
void registerDataDefinedButton(QgsPropertyOverrideButton *button, QgsSymbolLayer::Property key)
Registers a data defined override button.
Definition
qgslayerpropertieswidget.cpp:314
QgsLayerPropertiesWidget::mSymbol
const QgsSymbol * mSymbol
Definition
qgslayerpropertieswidget.h:105
QgsMapCanvas
Map canvas is a class for displaying all GIS data types on a canvas.
Definition
qgsmapcanvas.h:96
QgsPanelWidget
Base class for any widget that can be shown as an inline panel.
Definition
qgspanelwidget.h:32
QgsPanelWidget::dockMode
bool dockMode() const
Returns the dock mode state.
Definition
qgspanelwidget.h:94
QgsPanelWidget::QgsPanelWidget
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
Definition
qgspanelwidget.cpp:30
QgsPanelWidget::setDockMode
virtual void setDockMode(bool dockMode)
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.
Definition
qgspanelwidget.cpp:74
QgsPropertyOverrideButton
A button for controlling property overrides which may apply to a widget.
Definition
qgspropertyoverridebutton.h:50
QgsSymbolLayerWidget
Abstract base class for widgets used to configure QgsSymbolLayer classes.
Definition
qgssymbollayerwidget.h:41
QgsSymbolLayer
Abstract base class for symbol layers.
Definition
qgssymbollayer.h:58
QgsSymbolLayer::Property
Property
Data definable properties.
Definition
qgssymbollayer.h:149
QgsSymbolWidgetContext
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Definition
qgssymbolwidgetcontext.h:35
QgsSymbol
Abstract base class for all rendered symbols.
Definition
qgssymbol.h:227
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
qgsexpressioncontext.h
qgssymbollayer.h
qgssymbolwidgetcontext.h
Generated on
for QGIS API Documentation by
1.17.0