QGIS/python/gui/auto_generated/qgsgradientstopeditor.sip.in

181 lines
4.4 KiB
Plaintext
Raw Normal View History

2017-05-23 14:45:44 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsgradientstopeditor.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsGradientStopEditor : QWidget
{
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
An interactive editor for previewing a gradient color ramp and modifying the position of color
stops along the gradient.
2017-05-23 14:45:44 +02:00
.. versionadded:: 2.16
%End
2017-05-23 14:45:44 +02:00
%TypeHeaderCode
#include "qgsgradientstopeditor.h"
%End
public:
QgsGradientStopEditor( QWidget *parent /TransferThis/ = 0, QgsGradientColorRamp *ramp = 0 );
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsGradientStopEditor.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param parent: parent widget
:param ramp: optional initial gradient ramp
2017-05-23 14:45:44 +02:00
%End
void setGradientRamp( const QgsGradientColorRamp &ramp );
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the current ramp shown in the editor.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param ramp: color ramp
.. seealso:: :py:func:`gradientRamp`
2017-05-23 14:45:44 +02:00
%End
QgsGradientColorRamp gradientRamp() const;
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current ramp created by the editor.
.. seealso:: :py:func:`setGradientRamp`
2017-05-23 14:45:44 +02:00
%End
void selectStop( int index );
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the currently selected stop.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param index: index of stop, where 0 corresponds to the first stop
.. seealso:: :py:func:`selectedStop`
2017-05-23 14:45:44 +02:00
%End
QgsGradientStop selectedStop() const;
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns details about the currently selected stop.
.. seealso:: :py:func:`selectStop`
2017-05-23 14:45:44 +02:00
%End
virtual QSize sizeHint() const;
2017-05-23 14:45:44 +02:00
virtual void paintEvent( QPaintEvent *event );
public slots:
void setSelectedStopColor( const QColor &color );
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the color for the current selected stop.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param color: new stop color
.. seealso:: :py:func:`setSelectedStopOffset`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setSelectedStopDetails`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setColor1`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setColor2`
2017-05-23 14:45:44 +02:00
%End
void setSelectedStopOffset( double offset );
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the offset for the current selected stop. This slot has no effect if either the
first or last stop is selected, as they cannot be repositioned.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param offset: new stop offset
.. seealso:: :py:func:`setSelectedStopColor`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setSelectedStopDetails`
2017-05-23 14:45:44 +02:00
%End
void setSelectedStopDetails( const QColor &color, double offset );
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the color and offset for the current selected stop.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param color: new stop color
:param offset: new stop offset
.. seealso:: :py:func:`setSelectedStopColor`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setSelectedStopOffset`
2017-05-23 14:45:44 +02:00
%End
void deleteSelectedStop();
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Deletes the current selected stop. This slot has no effect if either the
first or last stop is selected, as they cannot be deleted.
2017-05-23 14:45:44 +02:00
%End
void setColor1( const QColor &color );
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the color for the first stop.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param color: new stop color
.. seealso:: :py:func:`setColor2`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setSelectedStopColor`
2017-05-23 14:45:44 +02:00
%End
void setColor2( const QColor &color );
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the color for the last stop.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param color: new stop color
.. seealso:: :py:func:`setColor1`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setSelectedStopColor`
2017-05-23 14:45:44 +02:00
%End
signals:
void changed();
2017-05-23 14:45:44 +02:00
%Docstring
Emitted when the gradient ramp is changed by a user
%End
void selectedStopChanged( const QgsGradientStop &stop );
2017-05-23 14:45:44 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Emitted when the current selected stop changes.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param stop: details about newly selected stop
2017-05-23 14:45:44 +02:00
%End
protected:
virtual void mouseMoveEvent( QMouseEvent *event );
virtual void mousePressEvent( QMouseEvent *event );
virtual void mouseDoubleClickEvent( QMouseEvent *event );
virtual void keyPressEvent( QKeyEvent *event );
2017-05-23 14:45:44 +02:00
virtual void dragEnterEvent( QDragEnterEvent *e );
virtual void dropEvent( QDropEvent *e );
};
2017-05-23 14:45:44 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsgradientstopeditor.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/