Skip to content
Permalink
Browse files

Flip rotation spin box to QgsDoubleSpinBox

Fix some other small spin box related ux improvements (fix #11833)
  • Loading branch information
nyalldawson committed Dec 10, 2014
1 parent 714a1e6 commit 21c4cbbe1a600a4b3a1d5313bc07feafe2901aea
Showing with 9 additions and 5 deletions.
  1. +7 −4 src/app/qgisapp.cpp
  2. +2 −1 src/app/qgisapp.h
@@ -1759,11 +1759,14 @@ void QgisApp::createStatusBar()
mRotationLabel->setToolTip( tr( "Current clockwise map rotation in degrees" ) );
statusBar()->addPermanentWidget( mRotationLabel, 0 );

mRotationEdit = new QSpinBox( statusBar() );
mRotationEdit = new QgsDoubleSpinBox( statusBar() );
mRotationEdit->setObjectName( "mRotationEdit" );
mRotationEdit->setMaximumWidth( 100 );
mRotationEdit->setClearValue( 0.0 );
mRotationEdit->setKeyboardTracking( false );
mRotationEdit->setMaximumWidth( 120 );
mRotationEdit->setDecimals( 1 );
mRotationEdit->setMaximumHeight( 20 );
mRotationEdit->setRange( -180, 180 );
mRotationEdit->setRange( -180.0, 180.0 );
mRotationEdit->setWrapping( true );
mRotationEdit->setSingleStep( 5.0 );
mRotationEdit->setFont( myFont );
@@ -1772,7 +1775,7 @@ void QgisApp::createStatusBar()
"the rotation" ) );
mRotationEdit->setToolTip( tr( "Current clockwise map rotation in degrees" ) );
statusBar()->addPermanentWidget( mRotationEdit, 0 );
connect( mRotationEdit, SIGNAL( valueChanged( int ) ), this, SLOT( userRotation() ) );
connect( mRotationEdit, SIGNAL( valueChanged( double ) ), this, SLOT( userRotation() ) );

showRotation();

@@ -62,6 +62,7 @@ class QgsRectangle;
class QgsUndoWidget;
class QgsVectorLayer;
class QgsVectorLayerTools;
class QgsDoubleSpinBox;

class QDomDocument;
class QNetworkReply;
@@ -1446,7 +1447,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
//! Widget that will live on the statusbar to display "Rotation"
QLabel * mRotationLabel;
//! Widget that will live in the statusbar to display and edit rotation
QSpinBox * mRotationEdit;
QgsDoubleSpinBox * mRotationEdit;
//! The validator for the mCoordsEdit
QValidator * mRotationEditValidator;
//! Widget that will live in the statusbar to show progress of operations

0 comments on commit 21c4cbb

Please sign in to comment.
You can’t perform that action at this time.