QGIS/python/gui/symbology/qgssymbolselectordialog.sip.in

300 lines
6.7 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/qgssymbolselectordialog.h *
2017-06-08 15:30:38 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsSymbolSelectorWidget: QgsPanelWidget
2016-06-13 18:07:39 +10:00
{
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Symbol selector widget that can be used to select and build a symbol
2016-06-13 18:07:39 +10:00
%End
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
#include "qgssymbolselectordialog.h"
%End
2016-06-13 18:07:39 +10:00
public:
2017-09-01 15:34:16 +01:00
QgsSymbolSelectorWidget( QgsSymbol *symbol, QgsStyle *style, QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0 );
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Symbol selector widget that can be used to select and build a symbol
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param symbol: The symbol to load into the widget as a start point.
:param style: The style used by the widget.
:param vl: The vector layer for the symbol.
:param parent:
2017-06-08 15:30:38 +02:00
%End
QMenu *advancedMenu();
2017-06-08 15:30:38 +02:00
%Docstring
return menu for "advanced" button - create it if doesn't exist and show the advanced button
%End
2016-06-13 18:07:39 +10:00
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
2016-09-12 13:51:14 +10:00
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
2016-06-13 18:07:39 +10:00
QgsSymbol *symbol();
2017-06-08 15:30:38 +02:00
%Docstring
Return the symbol that is currently active in the widget. Can be null.
2017-12-15 10:36:55 -04:00
:return: The active symbol.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
protected:
void loadSymbol();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Reload the current symbol in the view.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void updateUi();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Update the state of the UI based on the currently set symbol layer.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void updateLockButton();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Update the lock button states based on the current symbol layer.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
QgsSymbolLayer *currentLayer();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
The current symbol layer that is active in the interface.
:return: The active symbol layer.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void moveLayerByOffset( int offset );
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Move the current active layer by a set offset in the list.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param offset: The offset to move the layer by
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void setWidget( QWidget *widget );
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set the properties widget for the active symbol layer.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param widget: The widget to set to configure the active symbol layer.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
signals:
2017-06-08 15:30:38 +02:00
2016-06-13 18:07:39 +10:00
void symbolModified();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Emiited when a symbol is modified in the widget.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
public slots:
2017-06-08 15:30:38 +02:00
2016-06-13 18:07:39 +10:00
void moveLayerDown();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Move the active symbol layer down.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void moveLayerUp();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Move the active symbol layer up.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void addLayer();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Add a symbol layer to the bottom of the stack.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void removeLayer();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Remove the current active symbol layer.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void lockLayer();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Lock the current active symbol layer.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void duplicateLayer();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Duplicates the current symbol layer and places the duplicated layer above the current symbol layer
2017-06-08 15:30:38 +02:00
.. versionadded:: 2.14
%End
2016-06-13 18:07:39 +10:00
void layerChanged();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Called when the layer changes in the widget. Updates the active properties for
active symbol layer.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void updateLayerPreview();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Update the single symbol layer preview in the widget.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void updatePreview();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Update the preview of the whole symbol in the interface.
2017-06-08 15:30:38 +02:00
%End
2016-06-13 18:07:39 +10:00
void symbolChanged();
2017-06-08 15:30:38 +02:00
%Docstring
Slot to update tree when a new symbol from style
%End
void changeLayer( QgsSymbolLayer *layer );
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
alters tree and sets proper widget when Layer Type is changed
\note: The layer is received from the LayerPropertiesWidget
2017-06-08 15:30:38 +02:00
%End
protected: // data
2016-06-13 18:07:39 +10:00
};
2016-08-05 08:09:43 +02:00
class QgsSymbolSelectorDialog : QDialog
{
2017-06-08 15:30:38 +02:00
%TypeHeaderCode
2017-06-08 15:30:38 +02:00
#include "qgssymbolselectordialog.h"
%End
public:
2017-09-03 19:24:41 +02:00
2017-09-01 15:34:16 +01:00
QgsSymbolSelectorDialog( QgsSymbol *symbol, QgsStyle *style, QgsVectorLayer *vl, QWidget *parent /TransferThis/ = 0, bool embedded = false );
2017-09-03 19:24:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsSymbolSelectorDialog.
2017-09-03 19:24:41 +02:00
2017-12-15 10:36:55 -04:00
:param symbol: The symbol
:param style: The style
:param vl: Associated vector layer
:param parent: Parent widget
:param embedded: True to embed in renderer properties dialog, false otherwise
2017-09-03 19:24:41 +02:00
%End
2017-06-08 15:30:38 +02:00
~QgsSymbolSelectorDialog();
QMenu *advancedMenu();
2017-06-08 15:30:38 +02:00
%Docstring
return menu for "advanced" button - create it if doesn't exist and show the advanced button
%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
2016-09-12 13:51:14 +10:00
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
QgsSymbol *symbol();
2017-06-08 15:30:38 +02:00
%Docstring
Return the symbol that is currently active in the widget. Can be null.
2017-12-15 10:36:55 -04:00
:return: The active symbol.
2017-06-08 15:30:38 +02:00
%End
protected:
2017-06-08 15:30:38 +02:00
virtual void keyPressEvent( QKeyEvent *e );
void loadSymbol();
2017-06-08 15:30:38 +02:00
void updateUi();
void updateLockButton();
QgsSymbolLayer *currentLayer();
void moveLayerByOffset( int offset );
void setWidget( QWidget *widget );
signals:
void symbolModified();
public slots:
void moveLayerDown();
void moveLayerUp();
void addLayer();
void removeLayer();
void lockLayer();
void duplicateLayer();
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Duplicates the current symbol layer and places the duplicated layer above the current symbol layer
2017-06-08 15:30:38 +02:00
.. versionadded:: 2.14
%End
void layerChanged();
void updateLayerPreview();
void updatePreview();
void symbolChanged();
2017-06-08 15:30:38 +02:00
%Docstring
Slot to update tree when a new symbol from style
%End
void changeLayer( QgsSymbolLayer *layer );
2017-06-08 15:30:38 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
alters tree and sets proper widget when Layer Type is changed
\note: The layer is received from the LayerPropertiesWidget
2017-06-08 15:30:38 +02:00
%End
};
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/qgssymbolselectordialog.h *
2017-06-08 15:30:38 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/