Skip to content

Commit

Permalink
sipify gui part 4
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 24, 2017
1 parent 801a0ea commit cc5e713
Show file tree
Hide file tree
Showing 20 changed files with 796 additions and 427 deletions.
13 changes: 0 additions & 13 deletions python/auto_sip.blacklist
Expand Up @@ -157,19 +157,6 @@ gui/qgsfiledropedit.sip
gui/qgsfloatingwidget.sip
gui/qgsfocuswatcher.sip
gui/qgsformannotation.sip
gui/qgsgeometryrubberband.sip
gui/qgsgradientcolorrampdialog.sip
gui/qgsgradientstopeditor.sip
gui/qgshelp.sip
gui/qgshighlight.sip
gui/qgshistogramwidget.sip
gui/qgskeyvaluewidget.sip
gui/qgslistwidget.sip
gui/qgslegendfilterbutton.sip
gui/qgslimitedrandomcolorrampdialog.sip
gui/qgslonglongvalidator.sip
gui/qgsludialog.sip
gui/qgsmanageconnectionsdialog.sip
gui/qgsmaptip.sip
gui/qgsmaptool.sip
gui/qgsmaptooladvanceddigitizing.sip
Expand Down
105 changes: 60 additions & 45 deletions python/gui/qgsgeometryrubberband.sip
@@ -1,77 +1,92 @@
/***************************************************************************
qgsgeometryrubberband.h
-----------------------
begin : December 2014
copyright : (C) 2014 by Marco Hugentobler
email : marco at sourcepole dot ch
***************************************************************************/

/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/

/** A rubberband class for QgsAbstractGeometry (considering curved geometries)*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsgeometryrubberband.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/






class QgsGeometryRubberBand: QgsMapCanvasItem
{
%Docstring
A rubberband class for QgsAbstractGeometry (considering curved geometries)*
%End

%TypeHeaderCode
#include "qgsgeometryrubberband.h"
%End
public:
enum IconType
{
/**
* No icon is used
*/

ICON_NONE,
/**
* A cross is used to highlight points (+)
*/

ICON_CROSS,
/**
* A cross is used to highlight points (x)
*/

ICON_X,
/**
* A box is used to highlight points (□)
*/

ICON_BOX,
/**
* A circle is used to highlight points (○)
*/

ICON_CIRCLE,
/**
* A full box is used to highlight points (■)
*/

ICON_FULL_BOX
};

QgsGeometryRubberBand( QgsMapCanvas *mapCanvas, QgsWkbTypes::GeometryType geomType = QgsWkbTypes::LineGeometry );
~QgsGeometryRubberBand();

/** Sets geometry (takes ownership). Geometry is expected to be in map coordinates */
void setGeometry( QgsAbstractGeometry *geom /Transfer/ );
/** Returns a pointer to the geometry*/
%Docstring
Sets geometry (takes ownership). Geometry is expected to be in map coordinates
%End
const QgsAbstractGeometry *geometry();
/** Moves vertex to new position (in map coordinates)*/
%Docstring
Returns a pointer to the geometry
:rtype: QgsAbstractGeometry
%End
void moveVertex( QgsVertexId id, const QgsPointV2 &newPos );
/** Sets fill color for vertex markers*/
%Docstring
Moves vertex to new position (in map coordinates)
%End
void setFillColor( const QColor &c );
/** Sets stroke color for vertex markers*/
%Docstring
Sets fill color for vertex markers
%End
void setStrokeColor( const QColor &c );
/** Sets stroke width*/
%Docstring
Sets stroke color for vertex markers
%End
void setStrokeWidth( int width );
/** Sets pen style*/
%Docstring
Sets stroke width
%End
void setLineStyle( Qt::PenStyle penStyle );
/** Sets brush style*/
%Docstring
Sets pen style
%End
void setBrushStyle( Qt::BrushStyle brushStyle );
/** Sets vertex marker icon type*/
%Docstring
Sets brush style
%End
void setIconType( IconType iconType );
%Docstring
Sets vertex marker icon type
%End

protected:
virtual void paint( QPainter *painter );

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsgeometryrubberband.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
78 changes: 53 additions & 25 deletions python/gui/qgsgradientcolorrampdialog.sip
@@ -1,50 +1,78 @@
/** \ingroup gui
* \class QgsGradientColorRampDialog
* A dialog which allows users to modify the properties of a QgsGradientColorRamp.
* \note added in QGIS 3.0
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsgradientcolorrampdialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/





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

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

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

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

/** Sets the color ramp to show in the dialog.
* @param ramp color ramp
* @see ramp()
*/
void setRamp( const QgsGradientColorRamp &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

public slots:

/** Sets the start color for the gradient ramp.
* @see setColor2()
*/
void setColor1( const QColor &color );
%Docstring
Sets the start color for the gradient ramp.
.. seealso:: setColor2()
%End

/** Sets the end color for the gradient ramp.
* @see setColor1()
*/
void setColor2( const QColor &color );
%Docstring
Sets the end color for the gradient ramp.
.. seealso:: setColor1()
%End

};



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

0 comments on commit cc5e713

Please sign in to comment.