Skip to content

Commit 0840a9d

Browse files
committedOct 9, 2014
more names for the map tools
1 parent 2d49b59 commit 0840a9d

22 files changed

+63
-22
lines changed
 

‎src/app/nodetool/qgsmaptoolnodetool.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ QgsMapToolNodeTool::QgsMapToolNodeTool( QgsMapCanvas* canvas )
4040
, mIsPoint( false )
4141
, mDeselectOnRelease( -1 )
4242
{
43+
mToolName = tr( "Node tool" );
4344
}
4445

4546
QgsMapToolNodeTool::~QgsMapToolNodeTool()

‎src/app/qgsmaptooladdfeature.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@
3030
#include <QMouseEvent>
3131
#include <QSettings>
3232

33-
QgsMapToolAddFeature::QgsMapToolAddFeature( QgsMapCanvas* canvas ): QgsMapToolCapture( canvas )
33+
QgsMapToolAddFeature::QgsMapToolAddFeature( QgsMapCanvas* canvas )
34+
: QgsMapToolCapture( canvas )
3435
{
36+
mToolName = tr( "Add feature" );
3537
}
3638

3739
QgsMapToolAddFeature::~QgsMapToolAddFeature()
3840
{
3941
}
4042

41-
bool QgsMapToolAddFeature::addFeature(QgsVectorLayer *vlayer, QgsFeature *f, bool showModal )
43+
bool QgsMapToolAddFeature::addFeature( QgsVectorLayer *vlayer, QgsFeature *f, bool showModal )
4244
{
4345
QgsFeatureAction action( tr( "add feature" ), *f, vlayer, -1, -1, this );
4446
return action.addFeature( QgsAttributeMap(), showModal );

‎src/app/qgsmaptooladdpart.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
QgsMapToolAddPart::QgsMapToolAddPart( QgsMapCanvas* canvas )
2626
: QgsMapToolCapture( canvas )
2727
{
28+
mToolName = tr( "Add part" );
2829
}
2930

3031
QgsMapToolAddPart::~QgsMapToolAddPart()

‎src/app/qgsmaptooladdring.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
#include "qgsvectorlayer.h"
2323

2424

25-
QgsMapToolAddRing::QgsMapToolAddRing( QgsMapCanvas* canvas ): QgsMapToolCapture( canvas, QgsMapToolCapture::CapturePolygon )
25+
QgsMapToolAddRing::QgsMapToolAddRing( QgsMapCanvas* canvas )
26+
: QgsMapToolCapture( canvas, QgsMapToolCapture::CapturePolygon )
2627
{
28+
mToolName = tr( "Add ring" );
2729
}
2830

2931
QgsMapToolAddRing::~QgsMapToolAddRing()

‎src/app/qgsmaptooldeletepart.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@
2424
#include <QMouseEvent>
2525

2626
QgsMapToolDeletePart::QgsMapToolDeletePart( QgsMapCanvas* canvas )
27-
: QgsMapToolEdit( canvas ), mRubberBand( 0 )
27+
: QgsMapToolEdit( canvas )
28+
, mRubberBand( 0 )
2829
{
30+
mToolName = tr( "Delete part" );
2931
}
3032

3133
QgsMapToolDeletePart::~QgsMapToolDeletePart()

‎src/app/qgsmaptooldeletering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
#include <limits>
2424

2525
QgsMapToolDeleteRing::QgsMapToolDeleteRing( QgsMapCanvas* canvas )
26-
: QgsMapToolVertexEdit( canvas ), mRubberBand( 0 )
26+
: QgsMapToolVertexEdit( canvas )
27+
, mRubberBand( 0 )
2728
{
2829
mToolName = tr( "Delete ring" );
2930
}

‎src/app/qgsmaptoolfillring.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525

2626
#include <limits>
2727

28-
QgsMapToolFillRing::QgsMapToolFillRing( QgsMapCanvas* canvas ): QgsMapToolCapture( canvas, QgsMapToolCapture::CapturePolygon )
28+
QgsMapToolFillRing::QgsMapToolFillRing( QgsMapCanvas* canvas )
29+
: QgsMapToolCapture( canvas, QgsMapToolCapture::CapturePolygon )
2930
{
30-
31+
mToolName = tr( "Fill ring" );
3132
}
3233

3334
QgsMapToolFillRing::~QgsMapToolFillRing()

‎src/app/qgsmaptoolidentifyaction.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
QgsMapToolIdentifyAction::QgsMapToolIdentifyAction( QgsMapCanvas * canvas )
4747
: QgsMapToolIdentify( canvas )
4848
{
49+
mToolName = tr( "Identify" );
4950
// set cursor
5051
QPixmap myIdentifyQPixmap = QPixmap(( const char ** ) identify_cursor );
5152
mCursor = QCursor( myIdentifyQPixmap, 1, 1 );

‎src/app/qgsmaptoollabel.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@
2525
#include "qgsdiagramrendererv2.h"
2626
#include <QMouseEvent>
2727

28-
QgsMapToolLabel::QgsMapToolLabel( QgsMapCanvas* canvas ): QgsMapTool( canvas ), mLabelRubberBand( 0 ), mFeatureRubberBand( 0 ), mFixPointRubberBand( 0 )
28+
QgsMapToolLabel::QgsMapToolLabel( QgsMapCanvas* canvas )
29+
: QgsMapTool( canvas )
30+
, mLabelRubberBand( 0 )
31+
, mFeatureRubberBand( 0 )
32+
, mFixPointRubberBand( 0 )
2933
, mCurrentLayer( 0 )
3034
{
3135
}

‎src/app/qgsmaptoolmeasureangle.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@
2525
#include <QSettings>
2626
#include <cmath>
2727

28-
QgsMapToolMeasureAngle::QgsMapToolMeasureAngle( QgsMapCanvas* canvas ): QgsMapTool( canvas ), mRubberBand( 0 ), mResultDisplay( 0 )
28+
QgsMapToolMeasureAngle::QgsMapToolMeasureAngle( QgsMapCanvas* canvas )
29+
: QgsMapTool( canvas )
30+
, mRubberBand( 0 )
31+
, mResultDisplay( 0 )
2932
{
33+
mToolName = tr( "Measure angle" );
3034
mSnapper.setMapCanvas( canvas );
3135

3236
connect( canvas, SIGNAL( destinationCrsChanged() ),

‎src/app/qgsmaptoolmovefeature.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@
2424
#include <QMouseEvent>
2525
#include <QSettings>
2626
#include <limits>
27-
QgsMapToolMoveFeature::QgsMapToolMoveFeature( QgsMapCanvas* canvas ): QgsMapToolEdit( canvas ), mRubberBand( 0 )
27+
QgsMapToolMoveFeature::QgsMapToolMoveFeature( QgsMapCanvas* canvas )
28+
: QgsMapToolEdit( canvas )
29+
, mRubberBand( 0 )
2830
{
29-
31+
mToolName = tr( "Move feature" );
3032
}
3133

3234
QgsMapToolMoveFeature::~QgsMapToolMoveFeature()

‎src/app/qgsmaptoolmovelabel.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
#include "qgsvectorlayer.h"
2323
#include <QMouseEvent>
2424

25-
QgsMapToolMoveLabel::QgsMapToolMoveLabel( QgsMapCanvas* canvas ): QgsMapToolLabel( canvas )
25+
QgsMapToolMoveLabel::QgsMapToolMoveLabel( QgsMapCanvas* canvas )
26+
: QgsMapToolLabel( canvas )
2627
{
28+
mToolName = tr( "Move label" );
2729
}
2830

2931
QgsMapToolMoveLabel::~QgsMapToolMoveLabel()

‎src/app/qgsmaptoolpinlabels.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828
#include <qgslogger.h>
2929
#include <QMouseEvent>
3030

31-
QgsMapToolPinLabels::QgsMapToolPinLabels( QgsMapCanvas* canvas ): QgsMapToolLabel( canvas )
31+
QgsMapToolPinLabels::QgsMapToolPinLabels( QgsMapCanvas* canvas )
32+
: QgsMapToolLabel( canvas )
3233
{
34+
mToolName = tr( "Pin labels" );
3335
mRubberBand = 0;
3436
mShowPinned = false;
3537

‎src/app/qgsmaptoolselect.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
QgsMapToolSelect::QgsMapToolSelect( QgsMapCanvas* canvas )
3232
: QgsMapTool( canvas )
3333
{
34+
mToolName = tr( "Select" );
3435
mCursor = Qt::ArrowCursor;
3536
mFillColor = QColor( 254, 178, 76, 63 );
3637
mBorderColour = QColor( 254, 58, 29, 100 );

‎src/app/qgsmaptoolselectrectangle.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@
3030

3131

3232
QgsMapToolSelectFeatures::QgsMapToolSelectFeatures( QgsMapCanvas* canvas )
33-
: QgsMapTool( canvas ), mDragging( false )
33+
: QgsMapTool( canvas )
34+
, mDragging( false )
3435
{
36+
mToolName = tr( "Select features" );
3537
QPixmap mySelectQPixmap = QPixmap(( const char ** ) select_cursor );
3638
mCursor = QCursor( mySelectQPixmap, 1, 1 );
3739
mRubberBand = 0;

‎src/app/qgsmaptoolshowhidelabels.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@
2727

2828
#include <QMouseEvent>
2929

30-
QgsMapToolShowHideLabels::QgsMapToolShowHideLabels( QgsMapCanvas* canvas ): QgsMapToolLabel( canvas )
30+
QgsMapToolShowHideLabels::QgsMapToolShowHideLabels( QgsMapCanvas* canvas )
31+
: QgsMapToolLabel( canvas )
3132
{
33+
mToolName = tr( "Show/hide labels" );
3234
mRubberBand = 0;
3335
}
3436

‎src/app/qgsmaptoolsplitfeatures.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222

2323
#include <QMouseEvent>
2424

25-
QgsMapToolSplitFeatures::QgsMapToolSplitFeatures( QgsMapCanvas* canvas ): QgsMapToolCapture( canvas, QgsMapToolCapture::CaptureLine )
25+
QgsMapToolSplitFeatures::QgsMapToolSplitFeatures( QgsMapCanvas* canvas )
26+
: QgsMapToolCapture( canvas, QgsMapToolCapture::CaptureLine )
2627
{
27-
28+
mToolName = tr( "Split features" );
2829
}
2930

3031
QgsMapToolSplitFeatures::~QgsMapToolSplitFeatures()

‎src/app/qgsmaptoolsplitparts.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@
2222

2323
#include <QMouseEvent>
2424

25-
QgsMapToolSplitParts::QgsMapToolSplitParts( QgsMapCanvas* canvas ): QgsMapToolCapture( canvas, QgsMapToolCapture::CaptureLine )
25+
QgsMapToolSplitParts::QgsMapToolSplitParts( QgsMapCanvas* canvas )
26+
: QgsMapToolCapture( canvas, QgsMapToolCapture::CaptureLine )
2627
{
27-
28+
mToolName = tr( "Split parts" );
2829
}
2930

3031
QgsMapToolSplitParts::~QgsMapToolSplitParts()

‎src/app/qgsmaptoolvertexedit.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
#include <QSettings>
3131
#include <QPixmap>
3232

33-
QgsMapToolVertexEdit::QgsMapToolVertexEdit( QgsMapCanvas* canvas ): QgsMapToolEdit( canvas )
33+
QgsMapToolVertexEdit::QgsMapToolVertexEdit( QgsMapCanvas* canvas )
34+
: QgsMapToolEdit( canvas )
3435
{
3536

3637
}

‎src/gui/qgsmaptoolidentifyfeature.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ QgsMapToolIdentifyFeature::QgsMapToolIdentifyFeature( QgsMapCanvas* canvas, QgsV
2424
, mCanvas( canvas )
2525
, mLayer( vl )
2626
{
27+
mToolName = tr( "Identify feature" );
28+
2729
// set cursor
2830
QPixmap cursorPixmap = QPixmap(( const char ** ) cross_hair_cursor );
2931
mCursor = QCursor( cursorPixmap, 1, 1 );

‎src/gui/qgsmaptoolpan.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,10 @@
2323

2424

2525
QgsMapToolPan::QgsMapToolPan( QgsMapCanvas* canvas )
26-
: QgsMapTool( canvas ), mDragging( false )
26+
: QgsMapTool( canvas )
27+
, mDragging( false )
2728
{
29+
mToolName = tr( "Pan" );
2830
// set cursor
2931
QBitmap panBmp = QBitmap::fromData( QSize( 16, 16 ), pan_bits );
3032
QBitmap panBmpMask = QBitmap::fromData( QSize( 16, 16 ), pan_mask_bits );

‎src/gui/qgsmaptoolzoom.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@
2828

2929

3030
QgsMapToolZoom::QgsMapToolZoom( QgsMapCanvas* canvas, bool zoomOut )
31-
: QgsMapTool( canvas ), mZoomOut( zoomOut ), mDragging( false ), mRubberBand( 0 )
31+
: QgsMapTool( canvas )
32+
, mZoomOut( zoomOut )
33+
, mDragging( false )
34+
, mRubberBand( 0 )
3235
{
36+
mToolName = tr( "Zoom" );
3337
// set the cursor
3438
QPixmap myZoomQPixmap = QPixmap(( const char ** )( zoomOut ? zoom_out : zoom_in ) );
3539
mCursor = QCursor( myZoomQPixmap, 7, 7 );

0 commit comments

Comments
 (0)
Please sign in to comment.