mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
more names for the map tools
This commit is contained in:
parent
2d49b59cc1
commit
0840a9d7ee
@ -40,6 +40,7 @@ QgsMapToolNodeTool::QgsMapToolNodeTool( QgsMapCanvas* canvas )
|
||||
, mIsPoint( false )
|
||||
, mDeselectOnRelease( -1 )
|
||||
{
|
||||
mToolName = tr( "Node tool" );
|
||||
}
|
||||
|
||||
QgsMapToolNodeTool::~QgsMapToolNodeTool()
|
||||
|
@ -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 );
|
||||
|
@ -25,6 +25,7 @@
|
||||
QgsMapToolAddPart::QgsMapToolAddPart( QgsMapCanvas* canvas )
|
||||
: QgsMapToolCapture( canvas )
|
||||
{
|
||||
mToolName = tr( "Add part" );
|
||||
}
|
||||
|
||||
QgsMapToolAddPart::~QgsMapToolAddPart()
|
||||
|
@ -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()
|
||||
|
@ -24,8 +24,10 @@
|
||||
#include <QMouseEvent>
|
||||
|
||||
QgsMapToolDeletePart::QgsMapToolDeletePart( QgsMapCanvas* canvas )
|
||||
: QgsMapToolEdit( canvas ), mRubberBand( 0 )
|
||||
: QgsMapToolEdit( canvas )
|
||||
, mRubberBand( 0 )
|
||||
{
|
||||
mToolName = tr( "Delete part" );
|
||||
}
|
||||
|
||||
QgsMapToolDeletePart::~QgsMapToolDeletePart()
|
||||
|
@ -23,7 +23,8 @@
|
||||
#include <limits>
|
||||
|
||||
QgsMapToolDeleteRing::QgsMapToolDeleteRing( QgsMapCanvas* canvas )
|
||||
: QgsMapToolVertexEdit( canvas ), mRubberBand( 0 )
|
||||
: QgsMapToolVertexEdit( canvas )
|
||||
, mRubberBand( 0 )
|
||||
{
|
||||
mToolName = tr( "Delete ring" );
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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 );
|
||||
|
@ -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 )
|
||||
{
|
||||
}
|
||||
|
@ -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() ),
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 );
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -30,7 +30,8 @@
|
||||
#include <QSettings>
|
||||
#include <QPixmap>
|
||||
|
||||
QgsMapToolVertexEdit::QgsMapToolVertexEdit( QgsMapCanvas* canvas ): QgsMapToolEdit( canvas )
|
||||
QgsMapToolVertexEdit::QgsMapToolVertexEdit( QgsMapCanvas* canvas )
|
||||
: QgsMapToolEdit( canvas )
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
|
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user