QGIS API Documentation
4.3.0-Master (52aa6503bed)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
symbology
qgssymbolslistwidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgssymbolslistwidget.h
3
---------------------
4
begin : June 2012
5
copyright : (C) 2012 by Arunmozhi
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 QGSSYMBOLSLISTWIDGET_H
17
#define QGSSYMBOLSLISTWIDGET_H
18
19
#include "ui_widget_symbolslist.h"
20
21
#include "qgis_gui.h"
22
#include "
qgsstylemodel.h
"
23
#include "
qgssymbolwidgetcontext.h
"
24
25
#include <QWidget>
26
27
class
QgsSymbol
;
28
class
QgsStyle
;
29
30
class
QMenu;
31
37
class
GUI_EXPORT
QgsSymbolsListWidget
:
public
QWidget,
private
Ui::SymbolsListWidget,
private
QgsExpressionContextGenerator
38
{
39
Q_OBJECT
40
41
public
:
50
QgsSymbolsListWidget
(
QgsSymbol
*symbol,
QgsStyle
*style, QMenu *menu, QWidget *parent
SIP_TRANSFERTHIS
,
QgsVectorLayer
*
layer
=
nullptr
);
51
52
53
~QgsSymbolsListWidget
()
override
;
54
60
void
setContext
(
const
QgsSymbolWidgetContext
&
context
);
61
66
QgsSymbolWidgetContext
context
()
const
;
67
71
const
QgsVectorLayer
*
layer
()
const
{
return
mLayer; }
72
73
public
slots:
74
75
void
setSymbolColor(
const
QColor &color );
76
void
setMarkerAngle(
double
angle );
77
void
setMarkerSize(
double
size );
78
void
setLineWidth(
double
width );
79
80
void
clipFeaturesToggled(
bool
checked );
81
82
void
updateDataDefinedMarkerSize();
83
void
updateDataDefinedMarkerAngle();
84
void
updateDataDefinedLineWidth();
85
86
signals:
87
91
void
changed
();
92
93
private
slots:
94
void
setSymbolFromStyle(
const
QString &name,
QgsStyle::StyleEntity
type,
const
QString &stylePath );
95
void
mSymbolUnitWidget_changed();
96
void
updateAssistantSymbol();
97
void
opacityChanged(
double
value );
98
void
createAuxiliaryField();
99
void
createSymbolAuxiliaryField();
100
void
forceRHRToggled(
bool
checked );
101
void
showAnimationSettings();
102
void
showExtentBufferSettings();
103
void
showBufferSettings();
104
void
saveSymbol();
105
void
updateSymbolDataDefinedProperty();
106
107
private
:
108
void
registerSymbolDataDefinedButton(
QgsPropertyOverrideButton
*button,
QgsSymbol::Property
key );
109
110
QgsSymbol
*mSymbol =
nullptr
;
111
std::shared_ptr<QgsSymbol> mAssistantSymbol;
112
QgsStyle
*mStyle =
nullptr
;
113
QMenu *mAdvancedMenu =
nullptr
;
114
QAction *mClipFeaturesAction =
nullptr
;
115
QAction *mStandardizeRingsAction =
nullptr
;
116
QAction *mBufferSettingsAction =
nullptr
;
117
QAction *mAnimationSettingsAction =
nullptr
;
118
QAction *mExtentBufferAction =
nullptr
;
119
QgsVectorLayer
*mLayer =
nullptr
;
120
121
QgsColorButton
*mSymbolColorButton =
nullptr
;
122
QgsOpacityWidget
*mSymbolOpacityWidget =
nullptr
;
123
QgsUnitSelectionWidget
*mSymbolUnitWidget =
nullptr
;
124
125
void
updateSymbolColor();
126
void
updateSymbolInfo();
127
QgsSymbolWidgetContext
mContext;
128
129
QgsExpressionContext
createExpressionContext
()
const override
;
130
void
registerDataDefinedButton(
QgsPropertyOverrideButton
*button,
QgsSymbolLayer::Property
key );
131
};
132
133
#endif
//QGSSYMBOLSLISTWIDGET_H
QgsColorButton
A cross platform button subclass for selecting colors.
Definition
qgscolorbutton.h:39
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
QgsOpacityWidget
A widget for setting an opacity value.
Definition
qgsopacitywidget.h:33
QgsPropertyOverrideButton
A button for controlling property overrides which may apply to a widget.
Definition
qgspropertyoverridebutton.h:50
QgsStyle
A database of saved style entities, including symbols, color ramps, text formats and others.
Definition
qgsstyle.h:91
QgsStyle::StyleEntity
StyleEntity
Enum for Entities involved in a style.
Definition
qgsstyle.h:206
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
QgsSymbol::Property
Property
Data definable properties.
Definition
qgssymbol.h:272
QgsSymbolsListWidget::context
QgsSymbolWidgetContext context() const
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expressi...
Definition
qgssymbolslistwidget.cpp:275
QgsSymbolsListWidget::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
qgssymbolslistwidget.cpp:265
QgsSymbolsListWidget::QgsSymbolsListWidget
QgsSymbolsListWidget(QgsSymbol *symbol, QgsStyle *style, QMenu *menu, QWidget *parent, QgsVectorLayer *layer=nullptr)
Constructor for QgsSymbolsListWidget.
Definition
qgssymbolslistwidget.cpp:39
QgsSymbolsListWidget::layer
const QgsVectorLayer * layer() const
Returns the vector layer associated with the widget.
Definition
qgssymbolslistwidget.h:71
QgsSymbolsListWidget::changed
void changed()
Emitted when the symbol is modified in the widget.
QgsUnitSelectionWidget
A widget displaying a combobox allowing the user to choose between various display units,...
Definition
qgsunitselectionwidget.h:163
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
qgsstylemodel.h
qgssymbolwidgetcontext.h
Generated on
for QGIS API Documentation by
1.17.0