Skip to content
Permalink
Browse files

Add several mToolNames (useful for debugging)

  • Loading branch information
gacarrillor authored and nyalldawson committed Jun 19, 2020
1 parent 7d8a03b commit a0685c470f1eda27d1c087d2da75270783e4c0e2
@@ -29,6 +29,8 @@ QgsMapToolAddCircle::QgsMapToolAddCircle( QgsMapToolCapture *parentTool, QgsMapC
, mParentTool( parentTool )
, mSnapIndicator( qgis::make_unique< QgsSnapIndicator>( canvas ) )
{
mToolName = tr( "Add circle" );

clean();
connect( QgisApp::instance(), &QgisApp::newProject, this, &QgsMapToolAddCircle::stopCapturing );
connect( QgisApp::instance(), &QgisApp::projectRead, this, &QgsMapToolAddCircle::stopCapturing );
@@ -31,6 +31,7 @@ QgsMapToolAddCircularString::QgsMapToolAddCircularString( QgsMapToolCapture *par
, mShowCenterPointRubberBand( false )
, mSnapIndicator( qgis::make_unique< QgsSnapIndicator>( canvas ) )
{
mToolName = tr( "Add circular string" );
connect( QgisApp::instance(), &QgisApp::newProject, this, &QgsMapToolAddCircularString::stopCapturing );
connect( QgisApp::instance(), &QgisApp::projectRead, this, &QgsMapToolAddCircularString::stopCapturing );
}
@@ -29,6 +29,8 @@ QgsMapToolAddEllipse::QgsMapToolAddEllipse( QgsMapToolCapture *parentTool, QgsMa
, mParentTool( parentTool )
, mSnapIndicator( qgis::make_unique< QgsSnapIndicator>( canvas ) )
{
mToolName = tr( "Add ellipse" );

clean();
connect( QgisApp::instance(), &QgisApp::newProject, this, &QgsMapToolAddEllipse::stopCapturing );
connect( QgisApp::instance(), &QgisApp::projectRead, this, &QgsMapToolAddEllipse::stopCapturing );
@@ -30,6 +30,8 @@ QgsMapToolAddRectangle::QgsMapToolAddRectangle( QgsMapToolCapture *parentTool, Q
, mParentTool( parentTool )
, mSnapIndicator( qgis::make_unique< QgsSnapIndicator>( canvas ) )
{
mToolName = tr( "Add rectangle" );

clean();
connect( QgisApp::instance(), &QgisApp::newProject, this, &QgsMapToolAddRectangle::stopCapturing );
connect( QgisApp::instance(), &QgisApp::projectRead, this, &QgsMapToolAddRectangle::stopCapturing );
@@ -29,6 +29,8 @@ QgsMapToolAddRegularPolygon::QgsMapToolAddRegularPolygon( QgsMapToolCapture *par
, mParentTool( parentTool )
, mSnapIndicator( qgis::make_unique< QgsSnapIndicator>( canvas ) )
{
mToolName = tr( "Add regular polygon" );

clean();
connect( QgisApp::instance(), &QgisApp::newProject, this, &QgsMapToolAddRegularPolygon::stopCapturing );
connect( QgisApp::instance(), &QgisApp::projectRead, this, &QgsMapToolAddRegularPolygon::stopCapturing );
@@ -26,6 +26,7 @@ QgsMapToolCircle2Points::QgsMapToolCircle2Points( QgsMapToolCapture *parentTool,
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddCircle( parentTool, canvas, mode )
{
mToolName = tr( "Add circle from 2 points" );
}

void QgsMapToolCircle2Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
@@ -35,6 +35,7 @@ QgsMapToolCircle2TangentsPoint::QgsMapToolCircle2TangentsPoint( QgsMapToolCaptur
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddCircle( parentTool, canvas, mode )
{
mToolName = tr( "Add circle from 2 tangents and a point" );
}

QgsMapToolCircle2TangentsPoint::~QgsMapToolCircle2TangentsPoint()
@@ -26,6 +26,7 @@ QgsMapToolCircle3Points::QgsMapToolCircle3Points( QgsMapToolCapture *parentTool,
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddCircle( parentTool, canvas, mode )
{
mToolName = tr( "Add circle from 3 points" );
}

void QgsMapToolCircle3Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
@@ -31,6 +31,7 @@ QgsMapToolCircle3Tangents::QgsMapToolCircle3Tangents( QgsMapToolCapture *parentT
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddCircle( parentTool, canvas, mode )
{
mToolName = tr( "Add circle from 3 tangents" );
}

void QgsMapToolCircle3Tangents::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
@@ -26,6 +26,7 @@ QgsMapToolCircleCenterPoint::QgsMapToolCircleCenterPoint( QgsMapToolCapture *par
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddCircle( parentTool, canvas, mode )
{
mToolName = tr( "Add circle by a center point and another point" );
}

void QgsMapToolCircleCenterPoint::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
@@ -26,7 +26,7 @@ QgsMapToolCircularStringCurvePoint::QgsMapToolCircularStringCurvePoint( QgsMapTo
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddCircularString( parentTool, canvas, mode )
{

mToolName = tr( "Add circular string curve point" );
}

void QgsMapToolCircularStringCurvePoint::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
@@ -33,7 +33,7 @@ QgsMapToolCircularStringRadius::QgsMapToolCircularStringRadius( QgsMapToolCaptur
, mRadius( 0.0 )

{

mToolName = tr( "Add circular string by radius" );
}

void QgsMapToolCircularStringRadius::deactivate()
@@ -30,6 +30,7 @@
QgsMapToolFillRing::QgsMapToolFillRing( QgsMapCanvas *canvas )
: QgsMapToolCapture( canvas, QgisApp::instance()->cadDockWidget(), QgsMapToolCapture::CapturePolygon )
{
mToolName = tr( "Fill ring" );
}

void QgsMapToolFillRing::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
@@ -36,7 +36,9 @@
QgsMapToolOffsetCurve::QgsMapToolOffsetCurve( QgsMapCanvas *canvas )
: QgsMapToolEdit( canvas )
, mSnapIndicator( qgis::make_unique< QgsSnapIndicator >( canvas ) )
{}
{
mToolName = tr( "Map tool offset curve" );
}

QgsMapToolOffsetCurve::~QgsMapToolOffsetCurve()
{
@@ -33,7 +33,9 @@ QgsMapToolOffsetPointSymbol::QgsMapToolOffsetPointSymbol( QgsMapCanvas *canvas )
: QgsMapToolPointSymbol( canvas )
, mOffsetting( false )
, mSymbolRotation( 0.0 )
{}
{
mToolName = tr( "Map tool offset point symbol" );
}

QgsMapToolOffsetPointSymbol::~QgsMapToolOffsetPointSymbol()
{
@@ -26,7 +26,9 @@
QgsMapToolPointSymbol::QgsMapToolPointSymbol( QgsMapCanvas *canvas )
: QgsMapToolEdit( canvas )
, mFeatureNumber( -1 )
{}
{
mToolName = tr( "Map tool point symbol" );
}

void QgsMapToolPointSymbol::canvasPressEvent( QgsMapMouseEvent *e )
{
@@ -29,6 +29,7 @@ QgsMapToolRectangle3Points::QgsMapToolRectangle3Points( QgsMapToolCapture *paren
: QgsMapToolAddRectangle( parentTool, canvas, mode ),
mCreateMode( createMode )
{
mToolName = tr( "Add rectangle from 3 points" );
}

void QgsMapToolRectangle3Points::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
@@ -30,6 +30,7 @@ QgsMapToolRectangleCenter::QgsMapToolRectangleCenter( QgsMapToolCapture *parentT
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddRectangle( parentTool, canvas, mode )
{
mToolName = tr( "Add rectangle from center and a point" );
}

void QgsMapToolRectangleCenter::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
@@ -28,6 +28,7 @@ QgsMapToolRectangleExtent::QgsMapToolRectangleExtent( QgsMapToolCapture *parentT
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddRectangle( parentTool, canvas, mode )
{
mToolName = tr( "Add rectangle from extent" );
}

void QgsMapToolRectangleExtent::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
@@ -25,6 +25,7 @@ QgsMapToolRegularPolygon2Points::QgsMapToolRegularPolygon2Points( QgsMapToolCapt
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddRegularPolygon( parentTool, canvas, mode )
{
mToolName = tr( "Add regular polygon from 2 points" );
}

QgsMapToolRegularPolygon2Points::~QgsMapToolRegularPolygon2Points()
@@ -26,6 +26,7 @@ QgsMapToolRegularPolygonCenterCorner::QgsMapToolRegularPolygonCenterCorner( QgsM
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddRegularPolygon( parentTool, canvas, mode )
{
mToolName = tr( "Add regular polygon from center and a corner" );
}

QgsMapToolRegularPolygonCenterCorner::~QgsMapToolRegularPolygonCenterCorner()
@@ -25,6 +25,7 @@ QgsMapToolRegularPolygonCenterPoint::QgsMapToolRegularPolygonCenterPoint( QgsMap
QgsMapCanvas *canvas, CaptureMode mode )
: QgsMapToolAddRegularPolygon( parentTool, canvas, mode )
{
mToolName = tr( "Add regular polygon from center and a point " );
}

QgsMapToolRegularPolygonCenterPoint::~QgsMapToolRegularPolygonCenterPoint()
@@ -27,6 +27,7 @@
QgsMapToolReshape::QgsMapToolReshape( QgsMapCanvas *canvas )
: QgsMapToolCapture( canvas, QgisApp::instance()->cadDockWidget(), QgsMapToolCapture::CaptureLine )
{
mToolName = tr( "Reshape features" );
}

void QgsMapToolReshape::cadCanvasReleaseEvent( QgsMapMouseEvent *e )

0 comments on commit a0685c4

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