QGIS/python/gui/auto_generated/symbology/qgsrendererwidget.sip.in

271 lines
7.0 KiB
Plaintext
Raw Normal View History

2017-06-08 15:30:38 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/gui/symbology/qgsrendererwidget.h *
2017-06-08 15:30:38 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2016-08-06 11:01:42 +02:00
class QgsRendererWidget : QgsPanelWidget
{
2017-06-08 15:30:38 +02:00
%Docstring
Base class for renderer settings widgets
WORKFLOW:
- open renderer dialog with some RENDERER (never null!)
- find out which widget to use
- instantiate it and set in stacked widget
- on any change of renderer type, create some default (dummy?) version and change the stacked widget
2017-07-02 21:17:54 +02:00
- when clicked OK/Apply, get the renderer from active widget and clone it for the layer
%End
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
#include "qgsrendererwidget.h"
%End
public:
QgsRendererWidget( QgsVectorLayer *layer, QgsStyle *style );
virtual QgsFeatureRenderer *renderer() = 0;
2017-06-08 15:30:38 +02:00
%Docstring
Returns pointer to the renderer (no transfer of ownership)
2017-06-08 15:30:38 +02:00
%End
void showSymbolLevelsDialog( QgsFeatureRenderer *r );
2017-06-08 15:30:38 +02:00
%Docstring
show a dialog with renderer's symbol level settings
%End
2017-06-08 15:30:38 +02:00
virtual void setContext( const QgsSymbolWidgetContext &context );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the context in which the renderer widget is shown, e.g., the associated map canvas and expression contexts.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param context: symbol widget context
.. seealso:: :py:func:`context`
2017-12-15 10:36:55 -04:00
2017-06-08 15:30:38 +02:00
.. versionadded:: 3.0
%End
QgsSymbolWidgetContext context() const;
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the context in which the renderer widget is shown, e.g., the associated map canvas and expression contexts.
.. seealso:: :py:func:`setContext`
2017-12-15 10:36:55 -04:00
2017-06-08 15:30:38 +02:00
.. versionadded:: 3.0
%End
2016-09-12 13:51:14 +10:00
const QgsVectorLayer *vectorLayer() const;
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the vector layer associated with the widget.
2017-06-08 15:30:38 +02:00
.. versionadded:: 2.12
%End
void applyChanges();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
This method should be called whenever the renderer is actually set on the layer.
2017-06-08 15:30:38 +02:00
%End
signals:
2017-06-08 15:30:38 +02:00
void layerVariablesChanged();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Emitted when expression context variables on the associated
vector layers have been changed. Will request the parent dialog
to re-synchronize with the variables.
2017-06-08 15:30:38 +02:00
%End
protected:
2017-06-08 15:30:38 +02:00
virtual QList<QgsSymbol *> selectedSymbols();
%Docstring
2017-12-15 10:36:55 -04:00
Subclasses may provide the capability of changing multiple symbols at once by implementing the following two methods
2017-06-08 15:30:38 +02:00
and by connecting the slot contextMenuViewCategories(const QPoint&)*
%End
virtual void refreshSymbolView();
QgsDataDefinedSizeLegendWidget *createDataDefinedSizeLegendWidget( const QgsMarkerSymbol *symbol, const QgsDataDefinedSizeLegend *ddsLegend ) /Factory/;
%Docstring
2017-12-15 10:36:55 -04:00
Creates widget to setup data-defined size legend.
Returns newly created panel - may be null if it could not be opened. Ownership is transferred to the caller.
.. versionadded:: 3.0
%End
protected slots:
void contextMenuViewCategories( QPoint p );
void changeSymbolColor();
2017-06-08 15:30:38 +02:00
%Docstring
Change color of selected symbols
%End
void changeSymbolOpacity();
2017-06-08 15:30:38 +02:00
%Docstring
Change opacity of selected symbols
%End
void changeSymbolUnit();
2017-06-08 15:30:38 +02:00
%Docstring
Change units mm/map units of selected symbols
%End
void changeSymbolWidth();
2017-06-08 15:30:38 +02:00
%Docstring
Change line widths of selected symbols
%End
void changeSymbolSize();
2017-06-08 15:30:38 +02:00
%Docstring
Change marker sizes of selected symbols
%End
void changeSymbolAngle();
2017-06-08 15:30:38 +02:00
%Docstring
Change marker angles of selected symbols
%End
2014-01-26 18:35:21 +01:00
virtual void copy();
virtual void paste();
private:
2018-01-16 11:41:23 -04:00
virtual void apply();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
This will be called whenever the renderer is set on a layer.
This can be overwritten in subclasses.
2017-06-08 15:30:38 +02:00
%End
};
2017-06-08 15:30:38 +02:00
class QgsDataDefinedValueDialog : QDialog
{
2017-06-08 15:30:38 +02:00
%Docstring
Utility classes for "en masse" size definition
%End
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
#include "qgsrendererwidget.h"
%End
public:
2017-06-08 15:30:38 +02:00
QgsDataDefinedValueDialog( const QList<QgsSymbol *> &symbolList, QgsVectorLayer *layer, const QString &label );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param symbolList: must not be empty
:param layer: must not be null
:param label: value label
2017-06-08 15:30:38 +02:00
%End
void setContext( const QgsSymbolWidgetContext &context );
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param context: symbol widget context
.. seealso:: :py:func:`context`
2017-12-15 10:36:55 -04:00
2017-06-08 15:30:38 +02:00
.. versionadded:: 3.0
%End
QgsSymbolWidgetContext context() const;
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
.. seealso:: :py:func:`setContext`
2017-12-15 10:36:55 -04:00
2017-06-08 15:30:38 +02:00
.. versionadded:: 3.0
%End
const QgsVectorLayer *vectorLayer() const;
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the vector layer associated with the widget.
2017-06-08 15:30:38 +02:00
.. versionadded:: 2.12
%End
public slots:
void dataDefinedChanged();
protected:
2017-06-08 15:30:38 +02:00
void init( int propertyKey ); // needed in children ctor to call virtual
private:
2018-01-16 11:41:23 -04:00
QgsProperty symbolDataDefined() const;
virtual QgsProperty symbolDataDefined( const QgsSymbol * ) const = 0;
virtual double value( const QgsSymbol * ) const = 0;
virtual void setDataDefined( QgsSymbol *symbol, const QgsProperty &dd ) = 0;
};
class QgsDataDefinedSizeDialog : QgsDataDefinedValueDialog
{
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
2017-06-08 15:30:38 +02:00
#include "qgsrendererwidget.h"
%End
public:
2017-06-08 15:30:38 +02:00
QgsDataDefinedSizeDialog( const QList<QgsSymbol *> &symbolList, QgsVectorLayer *layer );
protected:
2017-06-08 15:30:38 +02:00
virtual QgsProperty symbolDataDefined( const QgsSymbol *symbol ) const;
virtual double value( const QgsSymbol *symbol ) const;
virtual void setDataDefined( QgsSymbol *symbol, const QgsProperty &dd );
};
class QgsDataDefinedRotationDialog : QgsDataDefinedValueDialog
{
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
2017-06-08 15:30:38 +02:00
#include "qgsrendererwidget.h"
%End
public:
2017-06-08 15:30:38 +02:00
QgsDataDefinedRotationDialog( const QList<QgsSymbol *> &symbolList, QgsVectorLayer *layer );
protected:
2017-06-08 15:30:38 +02:00
virtual QgsProperty symbolDataDefined( const QgsSymbol *symbol ) const;
2017-06-08 15:30:38 +02:00
virtual double value( const QgsSymbol *symbol ) const;
virtual void setDataDefined( QgsSymbol *symbol, const QgsProperty &dd );
2017-06-08 15:30:38 +02:00
};
class QgsDataDefinedWidthDialog : QgsDataDefinedValueDialog
{
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
2017-06-08 15:30:38 +02:00
#include "qgsrendererwidget.h"
%End
public:
2017-06-08 15:30:38 +02:00
QgsDataDefinedWidthDialog( const QList<QgsSymbol *> &symbolList, QgsVectorLayer *layer );
protected:
2017-06-08 15:30:38 +02:00
virtual QgsProperty symbolDataDefined( const QgsSymbol *symbol ) const;
2017-06-08 15:30:38 +02:00
virtual double value( const QgsSymbol *symbol ) const;
virtual void setDataDefined( QgsSymbol *symbol, const QgsProperty &dd );
};
2017-06-08 15:30:38 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/gui/symbology/qgsrendererwidget.h *
2017-06-08 15:30:38 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/