Skip to content

Commit

Permalink
Allow transform effect rotation from -360 to 360
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 30, 2017
1 parent 3cd99c3 commit f9c48bf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
10 changes: 4 additions & 6 deletions python/core/effects/qgstransformeffect.sip
Expand Up @@ -157,16 +157,14 @@ class QgsTransformEffect : QgsPaintEffect

void setRotation( const double rotation );
%Docstring
Sets the transform rotation.
\param rotation degrees to rotate, clockwise
.. seealso:: rotation
Sets the transform ``rotation``, in degrees clockwise.
.. seealso:: rotation()
%End

double rotation() const;
%Docstring
Returns the transform rotation.
:return: rotation in degrees clockwise
.. seealso:: setRotation
Returns the transform rotation, in degrees clockwise.
.. seealso:: setRotation()
:rtype: float
%End

Expand Down
12 changes: 6 additions & 6 deletions src/core/effects/qgstransformeffect.h
Expand Up @@ -149,15 +149,15 @@ class CORE_EXPORT QgsTransformEffect : public QgsPaintEffect
*/
double scaleY() const { return mScaleY; }

/** Sets the transform rotation.
* \param rotation degrees to rotate, clockwise
* \see rotation
/**
* Sets the transform \a rotation, in degrees clockwise.
* \see rotation()
*/
void setRotation( const double rotation ) { mRotation = rotation; }

/** Returns the transform rotation.
* \returns rotation in degrees clockwise
* \see setRotation
/**
* Returns the transform rotation, in degrees clockwise.
* \see setRotation()
*/
double rotation() const { return mRotation; }

Expand Down
1 change: 1 addition & 0 deletions src/gui/effects/qgspainteffectwidget.cpp
Expand Up @@ -577,6 +577,7 @@ QgsTransformWidget::QgsTransformWidget( QWidget *parent )
<< QgsUnitTypes::RenderPoints << QgsUnitTypes::RenderInches );
mSpinTranslateX->setClearValue( 0 );
mSpinTranslateY->setClearValue( 0 );
mRotationSpinBox->setClearValue( 0 );
mSpinShearX->setClearValue( 0 );
mSpinShearY->setClearValue( 0 );
mSpinScaleX->setClearValue( 100.0 );
Expand Down
3 changes: 3 additions & 0 deletions src/ui/effects/widget_transform.ui
Expand Up @@ -117,6 +117,9 @@
<property name="suffix">
<string> °</string>
</property>
<property name="minimum">
<double>-360.000000000000000</double>
</property>
<property name="maximum">
<double>360.000000000000000</double>
</property>
Expand Down

0 comments on commit f9c48bf

Please sign in to comment.