Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
YoannQDQ authored and nyalldawson committed Mar 29, 2023
1 parent 9d3140c commit 33863ce
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
4 changes: 4 additions & 0 deletions python/core/auto_generated/qgsbookmarkmanager.sip.in
Expand Up @@ -97,13 +97,17 @@ Sets the bookmark's spatial ``extent``.
Returns the bookmark's map rotation.

.. seealso:: :py:func:`setRotation`

.. versionadded:: 3.32
%End

void setRotation( double rotation );
%Docstring
Sets the bookmark's spatial map ``rotation``.

.. seealso:: :py:func:`rotation`

.. versionadded:: 3.32
%End

static QgsBookmark fromXml( const QDomElement &element, const QDomDocument &doc );
Expand Down
4 changes: 4 additions & 0 deletions src/core/qgsbookmarkmanager.h
Expand Up @@ -100,12 +100,16 @@ class CORE_EXPORT QgsBookmark
/**
* Returns the bookmark's map rotation.
* \see setRotation()
*
* \since QGIS 3.32
*/
double rotation() const;

/**
* Sets the bookmark's spatial map \a rotation.
* \see rotation()
*
* \since QGIS 3.32
*/
void setRotation( double rotation );

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsbookmarkmodel.cpp
Expand Up @@ -276,7 +276,7 @@ QVariant QgsBookmarkManagerModel::headerData( int section, Qt::Orientation orien
case ColumnYMax:
return tr( "yMax" );
case ColumnRotation:
return tr( "rotation" );
return tr( "Rotation" );
case ColumnCrs:
return tr( "CRS" );
case ColumnStore:
Expand Down
10 changes: 9 additions & 1 deletion src/ui/qgsbookmarkeditordialog.ui
Expand Up @@ -82,7 +82,7 @@
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="mRotation">
<widget class="QgsDoubleSpinBox" name="mRotation">
<property name="suffix">
<string> °</string>
</property>
Expand All @@ -95,6 +95,9 @@
<property name="maximum">
<double>360.000000000000000</double>
</property>
<property name="clearValue" stdset="0">
<double>0.000000000000000</double>
</property>
</widget>
</item>
</layout>
Expand Down Expand Up @@ -137,6 +140,11 @@
<header>qgsextentgroupbox.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>QgsDoubleSpinBox</class>
<extends>QDoubleSpinBox</extends>
<header>qgsdoublespinbox.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>mName</tabstop>
Expand Down

0 comments on commit 33863ce

Please sign in to comment.