Skip to content
Permalink
Browse files
sipify QgsColor*
  • Loading branch information
Gustry authored and 3nids committed May 1, 2017
1 parent 1ed8880 commit 1f8c31115884594913070522d845f875527499f6
@@ -280,11 +280,6 @@ gui/qgscodeeditorsql.sip
gui/qgscodeeditorhtml.sip
gui/qgscodeeditorcss.sip
gui/qgscharacterselectdialog.sip
gui/qgscolorbrewercolorrampdialog.sip
gui/qgscolordialog.sip
gui/qgscolorschemelist.sip
gui/qgscolorswatchgrid.sip
gui/qgscolorwidgets.sip
gui/qgscomposerinterface.sip
gui/qgscomposeritemcombobox.sip
gui/qgscomposerruler.sip
@@ -1,73 +1,102 @@
/** \ingroup gui
* \class QgsColorBrewerColorRampDialog
* A widget which allows users to modify the properties of a QgsColorBrewerColorRamp.
* \note added in QGIS 3.0
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscolorbrewercolorrampdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/




class QgsColorBrewerColorRampWidget : QgsPanelWidget
{
%TypeHeaderCode
#include <qgscolorbrewercolorrampdialog.h>
%Docstring
A widget which allows users to modify the properties of a QgsColorBrewerColorRamp.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgscolorbrewercolorrampdialog.h"
%End
public:

/** Constructor for QgsColorBrewerColorRampDialog.
* @param ramp initial ramp to show in dialog
* @param parent parent widget
*/
QgsColorBrewerColorRampWidget( const QgsColorBrewerColorRamp& ramp, QWidget* parent /TransferThis/ = nullptr );
QgsColorBrewerColorRampWidget( const QgsColorBrewerColorRamp &ramp, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsColorBrewerColorRampWidget.
\param ramp initial ramp to show in dialog
\param parent parent widget
%End

/** Returns a color ramp representing the current settings from the dialog.
* @see setRamp()
*/
QgsColorBrewerColorRamp ramp() const;
%Docstring
Returns a color ramp representing the current settings from the dialog.
.. seealso:: setRamp()
:rtype: QgsColorBrewerColorRamp
%End

/** Sets the color ramp to show in the dialog.
* @param ramp color ramp
* @see ramp()
*/
void setRamp( const QgsColorBrewerColorRamp& ramp );
void setRamp( const QgsColorBrewerColorRamp &ramp );
%Docstring
Sets the color ramp to show in the dialog.
\param ramp color ramp
.. seealso:: ramp()
%End

signals:

//! Emitted when the dialog settings change
void changed();
};
%Docstring
Emitted when the dialog settings change
%End

/** \ingroup gui
* \class QgsColorBrewerColorRampDialog
* A dialog which allows users to modify the properties of a QgsColorBrewerColorRamp.
* \note added in QGIS 3.0
*/
};

class QgsColorBrewerColorRampDialog : QDialog
{
%TypeHeaderCode
#include <qgscolorbrewercolorrampdialog.h>
%Docstring
A dialog which allows users to modify the properties of a QgsColorBrewerColorRamp.
.. versionadded:: 3.0
%End

%TypeHeaderCode
#include "qgscolorbrewercolorrampdialog.h"
%End
public:

/** Constructor for QgsColorBrewerColorRampDialog.
* @param ramp initial ramp to show in dialog
* @param parent parent widget
*/
QgsColorBrewerColorRampDialog( const QgsColorBrewerColorRamp& ramp, QWidget* parent /TransferThis/ = nullptr );
QgsColorBrewerColorRampDialog( const QgsColorBrewerColorRamp &ramp, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsColorBrewerColorRampDialog.
\param ramp initial ramp to show in dialog
\param parent parent widget
%End

/** Returns a color ramp representing the current settings from the dialog.
* @see setRamp()
*/
QgsColorBrewerColorRamp ramp() const;
%Docstring
Returns a color ramp representing the current settings from the dialog.
.. seealso:: setRamp()
:rtype: QgsColorBrewerColorRamp
%End

/** Sets the color ramp to show in the dialog.
* @param ramp color ramp
* @see ramp()
*/
void setRamp( const QgsColorBrewerColorRamp& ramp );
void setRamp( const QgsColorBrewerColorRamp &ramp );
%Docstring
Sets the color ramp to show in the dialog.
\param ramp color ramp
.. seealso:: ramp()
%End

signals:

//! Emitted when the dialog settings change
void changed();
%Docstring
Emitted when the dialog settings change
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscolorbrewercolorrampdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
@@ -1,87 +1,114 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscolordialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/




/** \ingroup gui
* \class QgsColorDialog
* A custom QGIS dialog for selecting a color. Has many improvements over the standard Qt color picker dialog, including
* hue wheel supports, color swatches, and a color sampler.
* \note Added in version 2.5
*/

class QgsColorDialog : QDialog
{
%TypeHeaderCode
#include <qgscolordialog.h>
%Docstring
A custom QGIS dialog for selecting a color. Has many improvements over the standard Qt color picker dialog, including
hue wheel supports, color swatches, and a color sampler.
.. versionadded:: 2.5
%End

%TypeHeaderCode
#include "qgscolordialog.h"
%End
public:

/** Create a new color picker dialog
* @param parent parent widget
* @param fl window flags
* @param color initial color for dialog
*/
QgsColorDialog( QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags,
const QColor& color = QColor() );

~QgsColorDialog();
QgsColorDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags,
const QColor &color = QColor() );
%Docstring
Create a new color picker dialog
\param parent parent widget
\param fl window flags
\param color initial color for dialog
%End

/** Returns the current color for the dialog
* @returns dialog color
*/
QColor color() const;
%Docstring
Returns the current color for the dialog
:return: dialog color
:rtype: QColor
%End

/** Sets the title for the color dialog
* @param title title for dialog box
*/
void setTitle( const QString& title );
void setTitle( const QString &title );
%Docstring
Sets the title for the color dialog
\param title title for dialog box
%End

/** Sets whether alpha modification (transparency) is permitted
* for the color dialog. Defaults to true.
* @param allowAlpha set to false to disable alpha modification
*/
void setAllowAlpha( const bool allowAlpha );
%Docstring
Sets whether alpha modification (transparency) is permitted
for the color dialog. Defaults to true.
\param allowAlpha set to false to disable alpha modification
%End

/** Return a color selection from a color dialog, with live updating of interim selections.
* @param initialColor the initial color of the selection dialog.
* @param updateObject the receiver object of the live updating.
* @param updateSlot the receiver object's slot for live updating (e.g. SLOT( setValidColor( const QColor& ) ) ).
* @param parent parent widget
* @param title the title of the dialog.
* @param allowAlpha set to true to allow modification of color alpha value (transparency)
* @return Selected color on accepted() or initialColor on rejected().
* @see getColor
*/
static QColor getLiveColor( const QColor& initialColor, QObject* updateObject, const char* updateSlot,
QWidget* parent = 0,
const QString& title = QString(),
static QColor getLiveColor( const QColor &initialColor, QObject *updateObject, const char *updateSlot,
QWidget *parent = 0,
const QString &title = QString(),
const bool allowAlpha = true );
%Docstring
Return a color selection from a color dialog, with live updating of interim selections.
\param initialColor the initial color of the selection dialog.
\param updateObject the receiver object of the live updating.
\param updateSlot the receiver object's slot for live updating (e.g. SLOT( setValidColor( const QColor& ) ) ).
\param parent parent widget
\param title the title of the dialog.
\param allowAlpha set to true to allow modification of color alpha value (transparency)
:return: Selected color on accepted() or initialColor on rejected().
.. seealso:: getColor
:rtype: QColor
%End

/** Return a color selection from a color dialog.
* @param initialColor the initial color of the selection dialog.
* @param parent parent widget
* @param title the title of the dialog.
* @param allowAlpha set to true to allow modification of color alpha value (transparency)
* @return Selected color on accepted() or initialColor on rejected().
* @see getLiveColor
*/
static QColor getColor( const QColor &initialColor, QWidget *parent, const QString &title = QString(),
const bool allowAlpha = false );
%Docstring
Return a color selection from a color dialog.
\param initialColor the initial color of the selection dialog.
\param parent parent widget
\param title the title of the dialog.
\param allowAlpha set to true to allow modification of color alpha value (transparency)
:return: Selected color on accepted() or initialColor on rejected().
.. seealso:: getLiveColor
:rtype: QColor
%End

signals:

/** Emitted when the dialog's color changes
* @param color current color
*/
void currentColorChanged( const QColor &color );
%Docstring
Emitted when the dialog's color changes
\param color current color
%End

public slots:

/** Sets the current color for the dialog
* @param color desired color
*/
void setColor( const QColor &color );
%Docstring
Sets the current color for the dialog
\param color desired color
%End

protected:

void closeEvent( QCloseEvent* e );
virtual void closeEvent( QCloseEvent *e );


};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgscolordialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

0 comments on commit 1f8c311

Please sign in to comment.