Allow transform effect rotation from -360 to 360

This commit is contained in:
Nyall Dawson 2017-05-30 15:31:45 +10:00
parent 3cd99c31f4
commit f9c48bf0ce
4 changed files with 14 additions and 12 deletions

View File

@ -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

View File

@ -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; }

View File

@ -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 );

View File

@ -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>