Skip to content

Commit

Permalink
more names for the map tools
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Oct 9, 2014
1 parent 2d49b59 commit 0840a9d
Show file tree
Hide file tree
Showing 22 changed files with 63 additions and 22 deletions.
1 change: 1 addition & 0 deletions src/app/nodetool/qgsmaptoolnodetool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ QgsMapToolNodeTool::QgsMapToolNodeTool( QgsMapCanvas* canvas )
, mIsPoint( false )
, mDeselectOnRelease( -1 )
{
mToolName = tr( "Node tool" );
}

QgsMapToolNodeTool::~QgsMapToolNodeTool()
Expand Down
6 changes: 4 additions & 2 deletions src/app/qgsmaptooladdfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@
#include <QMouseEvent>
#include <QSettings>

QgsMapToolAddFeature::QgsMapToolAddFeature( QgsMapCanvas* canvas ): QgsMapToolCapture( canvas )
QgsMapToolAddFeature::QgsMapToolAddFeature( QgsMapCanvas* canvas )
: QgsMapToolCapture( canvas )
{
mToolName = tr( "Add feature" );
}

QgsMapToolAddFeature::~QgsMapToolAddFeature()
{
}

bool QgsMapToolAddFeature::addFeature(QgsVectorLayer *vlayer, QgsFeature *f, bool showModal )
bool QgsMapToolAddFeature::addFeature( QgsVectorLayer *vlayer, QgsFeature *f, bool showModal )
{
QgsFeatureAction action( tr( "add feature" ), *f, vlayer, -1, -1, this );
return action.addFeature( QgsAttributeMap(), showModal );
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsmaptooladdpart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
QgsMapToolAddPart::QgsMapToolAddPart( QgsMapCanvas* canvas )
: QgsMapToolCapture( canvas )
{
mToolName = tr( "Add part" );
}

QgsMapToolAddPart::~QgsMapToolAddPart()
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgsmaptooladdring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
#include "qgsvectorlayer.h"


QgsMapToolAddRing::QgsMapToolAddRing( QgsMapCanvas* canvas ): QgsMapToolCapture( canvas, QgsMapToolCapture::CapturePolygon )
QgsMapToolAddRing::QgsMapToolAddRing( QgsMapCanvas* canvas )
: QgsMapToolCapture( canvas, QgsMapToolCapture::CapturePolygon )
{
mToolName = tr( "Add ring" );
}

QgsMapToolAddRing::~QgsMapToolAddRing()
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgsmaptooldeletepart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
#include <QMouseEvent>

QgsMapToolDeletePart::QgsMapToolDeletePart( QgsMapCanvas* canvas )
: QgsMapToolEdit( canvas ), mRubberBand( 0 )
: QgsMapToolEdit( canvas )
, mRubberBand( 0 )
{
mToolName = tr( "Delete part" );
}

QgsMapToolDeletePart::~QgsMapToolDeletePart()
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsmaptooldeletering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#include <limits>

QgsMapToolDeleteRing::QgsMapToolDeleteRing( QgsMapCanvas* canvas )
: QgsMapToolVertexEdit( canvas ), mRubberBand( 0 )
: QgsMapToolVertexEdit( canvas )
, mRubberBand( 0 )
{
mToolName = tr( "Delete ring" );
}
Expand Down
5 changes: 3 additions & 2 deletions src/app/qgsmaptoolfillring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@

#include <limits>

QgsMapToolFillRing::QgsMapToolFillRing( QgsMapCanvas* canvas ): QgsMapToolCapture( canvas, QgsMapToolCapture::CapturePolygon )
QgsMapToolFillRing::QgsMapToolFillRing( QgsMapCanvas* canvas )
: QgsMapToolCapture( canvas, QgsMapToolCapture::CapturePolygon )
{

mToolName = tr( "Fill ring" );
}

QgsMapToolFillRing::~QgsMapToolFillRing()
Expand Down
1 change: 1 addition & 0 deletions src/app/qgsmaptoolidentifyaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
QgsMapToolIdentifyAction::QgsMapToolIdentifyAction( QgsMapCanvas * canvas )
: QgsMapToolIdentify( canvas )
{
mToolName = tr( "Identify" );
// set cursor
QPixmap myIdentifyQPixmap = QPixmap(( const char ** ) identify_cursor );
mCursor = QCursor( myIdentifyQPixmap, 1, 1 );
Expand Down
6 changes: 5 additions & 1 deletion src/app/qgsmaptoollabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
#include "qgsdiagramrendererv2.h"
#include <QMouseEvent>

QgsMapToolLabel::QgsMapToolLabel( QgsMapCanvas* canvas ): QgsMapTool( canvas ), mLabelRubberBand( 0 ), mFeatureRubberBand( 0 ), mFixPointRubberBand( 0 )
QgsMapToolLabel::QgsMapToolLabel( QgsMapCanvas* canvas )
: QgsMapTool( canvas )
, mLabelRubberBand( 0 )
, mFeatureRubberBand( 0 )
, mFixPointRubberBand( 0 )
, mCurrentLayer( 0 )
{
}
Expand Down
6 changes: 5 additions & 1 deletion src/app/qgsmaptoolmeasureangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
#include <QSettings>
#include <cmath>

QgsMapToolMeasureAngle::QgsMapToolMeasureAngle( QgsMapCanvas* canvas ): QgsMapTool( canvas ), mRubberBand( 0 ), mResultDisplay( 0 )
QgsMapToolMeasureAngle::QgsMapToolMeasureAngle( QgsMapCanvas* canvas )
: QgsMapTool( canvas )
, mRubberBand( 0 )
, mResultDisplay( 0 )
{
mToolName = tr( "Measure angle" );
mSnapper.setMapCanvas( canvas );

connect( canvas, SIGNAL( destinationCrsChanged() ),
Expand Down
6 changes: 4 additions & 2 deletions src/app/qgsmaptoolmovefeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
#include <QMouseEvent>
#include <QSettings>
#include <limits>
QgsMapToolMoveFeature::QgsMapToolMoveFeature( QgsMapCanvas* canvas ): QgsMapToolEdit( canvas ), mRubberBand( 0 )
QgsMapToolMoveFeature::QgsMapToolMoveFeature( QgsMapCanvas* canvas )
: QgsMapToolEdit( canvas )
, mRubberBand( 0 )
{

mToolName = tr( "Move feature" );
}

QgsMapToolMoveFeature::~QgsMapToolMoveFeature()
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgsmaptoolmovelabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
#include "qgsvectorlayer.h"
#include <QMouseEvent>

QgsMapToolMoveLabel::QgsMapToolMoveLabel( QgsMapCanvas* canvas ): QgsMapToolLabel( canvas )
QgsMapToolMoveLabel::QgsMapToolMoveLabel( QgsMapCanvas* canvas )
: QgsMapToolLabel( canvas )
{
mToolName = tr( "Move label" );
}

QgsMapToolMoveLabel::~QgsMapToolMoveLabel()
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgsmaptoolpinlabels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
#include <qgslogger.h>
#include <QMouseEvent>

QgsMapToolPinLabels::QgsMapToolPinLabels( QgsMapCanvas* canvas ): QgsMapToolLabel( canvas )
QgsMapToolPinLabels::QgsMapToolPinLabels( QgsMapCanvas* canvas )
: QgsMapToolLabel( canvas )
{
mToolName = tr( "Pin labels" );
mRubberBand = 0;
mShowPinned = false;

Expand Down
1 change: 1 addition & 0 deletions src/app/qgsmaptoolselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
QgsMapToolSelect::QgsMapToolSelect( QgsMapCanvas* canvas )
: QgsMapTool( canvas )
{
mToolName = tr( "Select" );
mCursor = Qt::ArrowCursor;
mFillColor = QColor( 254, 178, 76, 63 );
mBorderColour = QColor( 254, 58, 29, 100 );
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgsmaptoolselectrectangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@


QgsMapToolSelectFeatures::QgsMapToolSelectFeatures( QgsMapCanvas* canvas )
: QgsMapTool( canvas ), mDragging( false )
: QgsMapTool( canvas )
, mDragging( false )
{
mToolName = tr( "Select features" );
QPixmap mySelectQPixmap = QPixmap(( const char ** ) select_cursor );
mCursor = QCursor( mySelectQPixmap, 1, 1 );
mRubberBand = 0;
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgsmaptoolshowhidelabels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@

#include <QMouseEvent>

QgsMapToolShowHideLabels::QgsMapToolShowHideLabels( QgsMapCanvas* canvas ): QgsMapToolLabel( canvas )
QgsMapToolShowHideLabels::QgsMapToolShowHideLabels( QgsMapCanvas* canvas )
: QgsMapToolLabel( canvas )
{
mToolName = tr( "Show/hide labels" );
mRubberBand = 0;
}

Expand Down
5 changes: 3 additions & 2 deletions src/app/qgsmaptoolsplitfeatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@

#include <QMouseEvent>

QgsMapToolSplitFeatures::QgsMapToolSplitFeatures( QgsMapCanvas* canvas ): QgsMapToolCapture( canvas, QgsMapToolCapture::CaptureLine )
QgsMapToolSplitFeatures::QgsMapToolSplitFeatures( QgsMapCanvas* canvas )
: QgsMapToolCapture( canvas, QgsMapToolCapture::CaptureLine )
{

mToolName = tr( "Split features" );
}

QgsMapToolSplitFeatures::~QgsMapToolSplitFeatures()
Expand Down
5 changes: 3 additions & 2 deletions src/app/qgsmaptoolsplitparts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@

#include <QMouseEvent>

QgsMapToolSplitParts::QgsMapToolSplitParts( QgsMapCanvas* canvas ): QgsMapToolCapture( canvas, QgsMapToolCapture::CaptureLine )
QgsMapToolSplitParts::QgsMapToolSplitParts( QgsMapCanvas* canvas )
: QgsMapToolCapture( canvas, QgsMapToolCapture::CaptureLine )
{

mToolName = tr( "Split parts" );
}

QgsMapToolSplitParts::~QgsMapToolSplitParts()
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgsmaptoolvertexedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
#include <QSettings>
#include <QPixmap>

QgsMapToolVertexEdit::QgsMapToolVertexEdit( QgsMapCanvas* canvas ): QgsMapToolEdit( canvas )
QgsMapToolVertexEdit::QgsMapToolVertexEdit( QgsMapCanvas* canvas )
: QgsMapToolEdit( canvas )
{

}
Expand Down
2 changes: 2 additions & 0 deletions src/gui/qgsmaptoolidentifyfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ QgsMapToolIdentifyFeature::QgsMapToolIdentifyFeature( QgsMapCanvas* canvas, QgsV
, mCanvas( canvas )
, mLayer( vl )
{
mToolName = tr( "Identify feature" );

// set cursor
QPixmap cursorPixmap = QPixmap(( const char ** ) cross_hair_cursor );
mCursor = QCursor( cursorPixmap, 1, 1 );
Expand Down
4 changes: 3 additions & 1 deletion src/gui/qgsmaptoolpan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@


QgsMapToolPan::QgsMapToolPan( QgsMapCanvas* canvas )
: QgsMapTool( canvas ), mDragging( false )
: QgsMapTool( canvas )
, mDragging( false )
{
mToolName = tr( "Pan" );
// set cursor
QBitmap panBmp = QBitmap::fromData( QSize( 16, 16 ), pan_bits );
QBitmap panBmpMask = QBitmap::fromData( QSize( 16, 16 ), pan_mask_bits );
Expand Down
6 changes: 5 additions & 1 deletion src/gui/qgsmaptoolzoom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@


QgsMapToolZoom::QgsMapToolZoom( QgsMapCanvas* canvas, bool zoomOut )
: QgsMapTool( canvas ), mZoomOut( zoomOut ), mDragging( false ), mRubberBand( 0 )
: QgsMapTool( canvas )
, mZoomOut( zoomOut )
, mDragging( false )
, mRubberBand( 0 )
{
mToolName = tr( "Zoom" );
// set the cursor
QPixmap myZoomQPixmap = QPixmap(( const char ** )( zoomOut ? zoom_out : zoom_in ) );
mCursor = QCursor( myZoomQPixmap, 7, 7 );
Expand Down

0 comments on commit 0840a9d

Please sign in to comment.