QGIS/python/gui/qgscompoundcolorwidget.sip.in

157 lines
4.1 KiB
Plaintext
Raw Normal View History

2017-05-23 14:39:33 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscompoundcolorwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsCompoundColorWidget : QgsPanelWidget
{
2017-05-23 14:39:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
A custom QGIS widget for selecting a color, including options for selecting colors via
hue wheel, color swatches, and a color sampler.
2017-05-23 14:39:33 +02:00
.. versionadded:: 2.16
%End
2017-05-23 14:39:33 +02:00
%TypeHeaderCode
#include "qgscompoundcolorwidget.h"
%End
public:
enum Layout
{
2017-05-23 14:39:33 +02:00
LayoutDefault,
LayoutVertical,
};
QgsCompoundColorWidget( QWidget *parent /TransferThis/ = 0, const QColor &color = QColor(), Layout layout = LayoutDefault );
2017-05-23 14:39:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsCompoundColorWidget
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param parent: parent widget
:param color: initial color for dialog
:param layout: widget layout to use
2017-05-23 14:39:33 +02:00
%End
~QgsCompoundColorWidget();
QColor color() const;
2017-05-23 14:39:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the current color for the dialog
:return: dialog color
2017-05-23 14:39:33 +02:00
%End
2017-05-30 13:33:09 +10:00
void setAllowOpacity( const bool allowOpacity );
2017-05-23 14:39:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether opacity modification (transparency) is permitted
for the color dialog. Defaults to true.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param allowOpacity: set to false to disable opacity modification
2017-05-30 13:33:09 +10:00
.. versionadded:: 3.0
2017-05-23 14:39:33 +02:00
%End
void setDiscarded( bool discarded );
2017-05-23 14:39:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the widget's color has been "discarded" and the selected color should not
be stored in the recent color list.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param discarded: set to true to avoid adding color to recent color list on widget destruction.
2017-05-23 14:39:33 +02:00
.. versionadded:: 3.0
%End
static QgsUserColorScheme *importUserPaletteFromFile( QWidget *parent );
%Docstring
Triggers a user prompt for importing a new color scheme from an existing GPL file.
The ``parent`` argument must be set to a valid parent widget for the dialog prompts.
.. versionadded:: 3.2
.. seealso:: :py:func:`createNewUserPalette`
.. seealso:: :py:func:`removeUserPalette`
%End
static QgsUserColorScheme *createNewUserPalette( QWidget *parent );
%Docstring
Triggers a user prompt for creating a new user color scheme.
The ``parent`` argument must be set to a valid parent widget for the dialog prompts.
.. versionadded:: 3.2
.. seealso:: :py:func:`importUserPaletteFromFile`
.. seealso:: :py:func:`removeUserPalette`
%End
static bool removeUserPalette( QgsUserColorScheme *scheme, QWidget *parent );
%Docstring
Triggers a user prompt for removing an existing user color ``scheme``.
The ``parent`` argument must be set to a valid parent widget for the dialog prompts.
.. versionadded:: 3.2
.. seealso:: :py:func:`importUserPaletteFromFile`
.. seealso:: :py:func:`createNewUserPalette`
2017-05-23 14:39:33 +02:00
%End
signals:
void currentColorChanged( const QColor &color );
2017-05-23 14:39:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Emitted when the dialog's color changes
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param color: current color
2017-05-23 14:39:33 +02:00
%End
public slots:
void setColor( const QColor &color );
2017-05-23 14:39:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the current color for the dialog
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param color: desired color
2017-05-23 14:39:33 +02:00
%End
void setPreviousColor( const QColor &color );
2017-05-23 14:39:33 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the color to show in an optional "previous color" section
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param color: previous color
2017-05-23 14:39:33 +02:00
%End
protected:
2017-05-23 14:39:33 +02:00
virtual void mousePressEvent( QMouseEvent *e );
virtual void mouseMoveEvent( QMouseEvent *e );
2017-05-23 14:39:33 +02:00
virtual void mouseReleaseEvent( QMouseEvent *e );
virtual void keyPressEvent( QKeyEvent *e );
};
2017-05-23 14:39:33 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscompoundcolorwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/