Skip to content

Commit 91a8075

Browse files
committed
Fully replace node* by vertex*
1 parent 5461d3c commit 91a8075

28 files changed

+214
-212
lines changed

doc/api_break.dox

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
130130
<tr><td>QgsMultiPolylineV2<td>QgsPolyline
131131
<tr><td>QgsMultiSurfaceV2<td>QgsMultiSurface
132132
<tr><td>QgsNMEAConnection<td>QgsNmeaConnection
133+
<tr><td>QgsNodeEditor<td>QgsVertexEditor
134+
<tr><td>QgsNodeTool<td>QgsVertexTool
133135
<tr><td>QgsNumericScaleBarStyle<td>QgsNumericScaleBarRenderer
134136
<tr><td>QgsPoint<td>QgsPointXY
135137
<tr><td>QgsPointSequenceV2<td>QgsPointSequence

images/images.qrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@
273273
<file>themes/default/mActionNewSpatiaLiteLayer.svg</file>
274274
<file>themes/default/mActionNewGeoPackageLayer.svg</file>
275275
<file>themes/default/mActionNewVectorLayer.svg</file>
276-
<file>themes/default/mActionNodeTool.svg</file>
276+
<file>themes/default/mActionVertexTool.svg</file>
277277
<file>themes/default/mActionOffsetCurve.svg</file>
278278
<file>themes/default/mActionOpenTable.svg</file>
279279
<file>themes/default/mActionAddTable.svg</file>

python/gui/qgisinterface.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ Show layout manager action
230230
virtual QAction *actionSimplifyFeature() = 0;
231231
virtual QAction *actionDeleteRing() = 0;
232232
virtual QAction *actionDeletePart() = 0;
233-
virtual QAction *actionNodeTool() = 0;
233+
virtual QAction *actionVertexTool() = 0;
234234

235235
virtual QAction *actionPan() = 0;
236236
%Docstring

python/gui/qgsmaptooladvanceddigitizing.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Unregisters this maptool from the cad dock widget
7575
Returns whether functionality of advanced digitizing dock widget is currently allowed.
7676

7777
Tools may decide to switch this support on/off based on the current state of the map tool.
78-
For example, in node tool before user picks a vertex to move, advanced digitizing dock
78+
For example, in vertex tool before user picks a vertex to move, advanced digitizing dock
7979
widget should be disabled and only enabled once a vertex is being moved. Other map tools
8080
may keep advanced digitizing allowed all the time.
8181

src/app/CMakeLists.txt

+7-7
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ SET(QGIS_APP_SRCS
106106
qgsmaptoolsvgannotation.cpp
107107
qgsmaptooltextannotation.cpp
108108

109-
nodetool/qgsselectedfeature.cpp
110-
nodetool/qgsvertexentry.cpp
111-
nodetool/qgsnodeeditor.cpp
112-
nodetool/qgsnodetool.cpp
109+
vertextool/qgsselectedfeature.cpp
110+
vertextool/qgsvertexentry.cpp
111+
vertextool/qgsvertexeditor.cpp
112+
vertextool/qgsvertextool.cpp
113113

114114
qgslayerstylingwidget.cpp
115115
qgsmeasuredialog.cpp
@@ -337,9 +337,9 @@ SET (QGIS_APP_MOC_HDRS
337337
qgsmaptoolregularpolygoncenterpoint.h
338338
qgsmaptoolregularpolygoncentercorner.h
339339

340-
nodetool/qgsselectedfeature.h
341-
nodetool/qgsnodeeditor.h
342-
nodetool/qgsnodetool.h
340+
vertextool/qgsselectedfeature.h
341+
vertextool/qgsvertexeditor.h
342+
vertextool/qgsvertextool.h
343343

344344
qgslayerstylingwidget.h
345345
qgsmeasuredialog.h

src/app/qgisapp.cpp

+18-18
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
396396
#include "qgsmaptoolrotatelabel.h"
397397
#include "qgsmaptoolchangelabelproperties.h"
398398

399-
#include "nodetool/qgsnodetool.h"
399+
#include "vertextool/qgsvertextool.h"
400400

401401
// Editor widgets
402402
#include "qgseditorwidgetregistry.h"
@@ -1343,7 +1343,7 @@ QgisApp::~QgisApp()
13431343
delete mMapTools.mMoveFeature;
13441344
delete mMapTools.mMoveFeatureCopy;
13451345
delete mMapTools.mMoveLabel;
1346-
delete mMapTools.mNodeTool;
1346+
delete mMapTools.mVertexTool;
13471347
delete mMapTools.mOffsetCurve;
13481348
delete mMapTools.mPinLabels;
13491349
delete mMapTools.mReshapeFeatures;
@@ -1904,7 +1904,7 @@ void QgisApp::createActions()
19041904
connect( mActionMergeFeatures, &QAction::triggered, this, &QgisApp::mergeSelectedFeatures );
19051905
connect( mActionMergeFeatureAttributes, &QAction::triggered, this, &QgisApp::mergeAttributesOfSelectedFeatures );
19061906
connect( mActionMultiEditAttributes, &QAction::triggered, this, &QgisApp::modifyAttributesOfSelectedFeatures );
1907-
connect( mActionNodeTool, &QAction::triggered, this, &QgisApp::nodeTool );
1907+
connect( mActionVertexTool, &QAction::triggered, this, &QgisApp::vertexTool );
19081908
connect( mActionRotatePointSymbols, &QAction::triggered, this, &QgisApp::rotatePointSymbols );
19091909
connect( mActionOffsetPointSymbol, &QAction::triggered, this, &QgisApp::offsetPointSymbol );
19101910
connect( mActionSnappingOptions, &QAction::triggered, this, &QgisApp::snappingOptions );
@@ -2190,7 +2190,7 @@ void QgisApp::createActionGroups()
21902190
mMapToolGroup->addAction( mActionDeletePart );
21912191
mMapToolGroup->addAction( mActionMergeFeatures );
21922192
mMapToolGroup->addAction( mActionMergeFeatureAttributes );
2193-
mMapToolGroup->addAction( mActionNodeTool );
2193+
mMapToolGroup->addAction( mActionVertexTool );
21942194
mMapToolGroup->addAction( mActionRotatePointSymbols );
21952195
mMapToolGroup->addAction( mActionOffsetPointSymbol );
21962196
mMapToolGroup->addAction( mActionPinLabels );
@@ -2681,7 +2681,7 @@ void QgisApp::createToolBars()
26812681
tbAddCircularString->addAction( mActionCircularStringRadius );
26822682
tbAddCircularString->setDefaultAction( mActionCircularStringCurvePoint );
26832683
connect( tbAddCircularString, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
2684-
mRegularShapeDigitizeToolBar->insertWidget( mActionNodeTool, tbAddCircularString );
2684+
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddCircularString );
26852685

26862686
//circle digitize tool button
26872687
QToolButton *tbAddCircle = new QToolButton( mRegularShapeDigitizeToolBar );
@@ -2693,7 +2693,7 @@ void QgisApp::createToolBars()
26932693
tbAddCircle->addAction( mActionCircleCenterPoint );
26942694
tbAddCircle->setDefaultAction( mActionCircle2Points );
26952695
connect( tbAddCircle, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
2696-
mRegularShapeDigitizeToolBar->insertWidget( mActionNodeTool, tbAddCircle );
2696+
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddCircle );
26972697

26982698
//ellipse digitize tool button
26992699
QToolButton *tbAddEllipse = new QToolButton( mRegularShapeDigitizeToolBar );
@@ -2704,7 +2704,7 @@ void QgisApp::createToolBars()
27042704
tbAddEllipse->addAction( mActionEllipseFoci );
27052705
tbAddEllipse->setDefaultAction( mActionEllipseCenter2Points );
27062706
connect( tbAddEllipse, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
2707-
mRegularShapeDigitizeToolBar->insertWidget( mActionNodeTool, tbAddEllipse );
2707+
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddEllipse );
27082708

27092709
//Rectangle digitize tool button
27102710
QToolButton *tbAddRectangle = new QToolButton( mRegularShapeDigitizeToolBar );
@@ -2714,7 +2714,7 @@ void QgisApp::createToolBars()
27142714
tbAddRectangle->addAction( mActionRectangle3Points );
27152715
tbAddRectangle->setDefaultAction( mActionRectangleCenterPoint );
27162716
connect( tbAddRectangle, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
2717-
mRegularShapeDigitizeToolBar->insertWidget( mActionNodeTool, tbAddRectangle );
2717+
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddRectangle );
27182718

27192719
//Regular polygon digitize tool button
27202720
QToolButton *tbAddRegularPolygon = new QToolButton( mRegularShapeDigitizeToolBar );
@@ -2724,7 +2724,7 @@ void QgisApp::createToolBars()
27242724
tbAddRegularPolygon->addAction( mActionRegularPolygonCenterCorner );
27252725
tbAddRegularPolygon->setDefaultAction( mActionRegularPolygon2Points );
27262726
connect( tbAddRegularPolygon, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
2727-
mRegularShapeDigitizeToolBar->insertWidget( mActionNodeTool, tbAddRegularPolygon );
2727+
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddRegularPolygon );
27282728

27292729
// move feature tool button
27302730
QToolButton *moveFeatureButton = new QToolButton( mDigitizeToolBar );
@@ -2743,7 +2743,7 @@ void QgisApp::createToolBars()
27432743
};
27442744
moveFeatureButton->setDefaultAction( defAction );
27452745
connect( moveFeatureButton, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
2746-
mDigitizeToolBar->insertWidget( mActionNodeTool, moveFeatureButton );
2746+
mDigitizeToolBar->insertWidget( mActionVertexTool, moveFeatureButton );
27472747

27482748
bt = new QToolButton();
27492749
bt->setPopupMode( QToolButton::MenuButtonPopup );
@@ -3051,7 +3051,7 @@ void QgisApp::setTheme( const QString &themeName )
30513051
mActionSplitFeatures->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionSplitFeatures.svg" ) ) );
30523052
mActionSplitParts->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionSplitParts.svg" ) ) );
30533053
mActionDeleteSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionDeleteSelected.svg" ) ) );
3054-
mActionNodeTool->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionNodeTool.svg" ) ) );
3054+
mActionVertexTool->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionVertexTool.svg" ) ) );
30553055
mActionSimplifyFeature->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionSimplify.svg" ) ) );
30563056
mActionUndo->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionUndo.svg" ) ) );
30573057
mActionRedo->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionRedo.svg" ) ) );
@@ -3341,8 +3341,8 @@ void QgisApp::createCanvasTools()
33413341
mMapTools.mDeleteRing->setAction( mActionDeleteRing );
33423342
mMapTools.mDeletePart = new QgsMapToolDeletePart( mMapCanvas );
33433343
mMapTools.mDeletePart->setAction( mActionDeletePart );
3344-
mMapTools.mNodeTool = new QgsNodeTool( mMapCanvas, mAdvancedDigitizingDockWidget );
3345-
mMapTools.mNodeTool->setAction( mActionNodeTool );
3344+
mMapTools.mVertexTool = new QgsVertexTool( mMapCanvas, mAdvancedDigitizingDockWidget );
3345+
mMapTools.mVertexTool->setAction( mActionVertexTool );
33463346
mMapTools.mRotatePointSymbolsTool = new QgsMapToolRotatePointSymbols( mMapCanvas );
33473347
mMapTools.mRotatePointSymbolsTool->setAction( mActionRotatePointSymbols );
33483348
mMapTools.mOffsetPointSymbolTool = new QgsMapToolOffsetPointSymbol( mMapCanvas );
@@ -7904,9 +7904,9 @@ void QgisApp::mergeSelectedFeatures()
79047904
vl->triggerRepaint();
79057905
}
79067906

7907-
void QgisApp::nodeTool()
7907+
void QgisApp::vertexTool()
79087908
{
7909-
mMapCanvas->setMapTool( mMapTools.mNodeTool );
7909+
mMapCanvas->setMapTool( mMapTools.mVertexTool );
79107910
}
79117911

79127912
void QgisApp::rotatePointSymbols()
@@ -11432,7 +11432,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
1143211432
mActionMoveFeatureCopy->setEnabled( false );
1143311433
mActionRotateFeature->setEnabled( false );
1143411434
mActionOffsetCurve->setEnabled( false );
11435-
mActionNodeTool->setEnabled( false );
11435+
mActionVertexTool->setEnabled( false );
1143611436
mActionDeleteSelected->setEnabled( false );
1143711437
mActionCutFeatures->setEnabled( false );
1143811438
mActionCopyFeatures->setEnabled( false );
@@ -11609,7 +11609,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
1160911609
mActionMoveFeature->setEnabled( isEditable && canChangeGeometry );
1161011610
mActionMoveFeatureCopy->setEnabled( isEditable && canChangeGeometry );
1161111611
mActionRotateFeature->setEnabled( isEditable && canChangeGeometry );
11612-
mActionNodeTool->setEnabled( isEditable && canChangeGeometry );
11612+
mActionVertexTool->setEnabled( isEditable && canChangeGeometry );
1161311613

1161411614
if ( vlayer->geometryType() == QgsWkbTypes::PointGeometry )
1161511615
{
@@ -11763,7 +11763,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
1176311763
mActionAddRing->setEnabled( false );
1176411764
mActionFillRing->setEnabled( false );
1176511765
mActionAddPart->setEnabled( false );
11766-
mActionNodeTool->setEnabled( false );
11766+
mActionVertexTool->setEnabled( false );
1176711767
mActionMoveFeature->setEnabled( false );
1176811768
mActionMoveFeatureCopy->setEnabled( false );
1176911769
mActionRotateFeature->setEnabled( false );

src/app/qgisapp.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
448448
QAction *actionSimplifyFeature() { return mActionSimplifyFeature; }
449449
QAction *actionDeleteRing() { return mActionDeleteRing; }
450450
QAction *actionDeletePart() { return mActionDeletePart; }
451-
QAction *actionNodeTool() { return mActionNodeTool; }
451+
QAction *actionVertexTool() { return mActionVertexTool; }
452452
QAction *actionSnappingOptions() { return mActionSnappingOptions; }
453453
QAction *actionOffsetCurve() { return mActionOffsetCurve; }
454454
QAction *actionPan() { return mActionPan; }
@@ -1343,7 +1343,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
13431343
//! Modifies the attributes of selected features via feature form
13441344
void modifyAttributesOfSelectedFeatures();
13451345
//! provides operations with nodes
1346-
void nodeTool();
1346+
void vertexTool();
13471347
//! activates the rotate points tool
13481348
void rotatePointSymbols();
13491349
//! activates the offset point symbol tool
@@ -1939,7 +1939,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
19391939
QgsMapTool *mSimplifyFeature = nullptr;
19401940
QgsMapTool *mDeleteRing = nullptr;
19411941
QgsMapTool *mDeletePart = nullptr;
1942-
QgsMapTool *mNodeTool = nullptr;
1942+
QgsMapTool *mVertexTool = nullptr;
19431943
QgsMapTool *mRotatePointSymbolsTool = nullptr;
19441944
QgsMapTool *mOffsetPointSymbolTool = nullptr;
19451945
QgsMapTool *mAnnotation = nullptr;

src/app/qgisappinterface.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ QAction *QgisAppInterface::actionAddPart() { return qgis->actionAddPart(); }
603603
QAction *QgisAppInterface::actionSimplifyFeature() { return qgis->actionSimplifyFeature(); }
604604
QAction *QgisAppInterface::actionDeleteRing() { return qgis->actionDeleteRing(); }
605605
QAction *QgisAppInterface::actionDeletePart() { return qgis->actionDeletePart(); }
606-
QAction *QgisAppInterface::actionNodeTool() { return qgis->actionNodeTool(); }
606+
QAction *QgisAppInterface::actionVertexTool() { return qgis->actionVertexTool(); }
607607

608608
QAction *QgisAppInterface::actionPan() { return qgis->actionPan(); }
609609
QAction *QgisAppInterface::actionPanToSelected() { return qgis->actionPanToSelected(); }

src/app/qgisappinterface.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
404404
QAction *actionSimplifyFeature() override;
405405
QAction *actionDeleteRing() override;
406406
QAction *actionDeletePart() override;
407-
QAction *actionNodeTool() override;
407+
QAction *actionVertexTool() override;
408408

409409
//! View menu actions
410410
QAction *actionPan() override;

src/app/nodetool/qgsselectedfeature.cpp renamed to src/app/vertextool/qgsselectedfeature.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
qgsselectedfeature.cpp - selected feature of nodetool
2+
qgsselectedfeature.cpp - selected feature of vertextool
33
---------------------
44
begin : April 2009
55
copyright : (C) 2009 by Richard Kostecky
@@ -13,8 +13,8 @@
1313
* *
1414
***************************************************************************/
1515

16-
#include "nodetool/qgsselectedfeature.h"
17-
#include "nodetool/qgsvertexentry.h"
16+
#include "vertextool/qgsselectedfeature.h"
17+
#include "vertextool/qgsvertexentry.h"
1818

1919
#include "qgsfeatureiterator.h"
2020
#include "qgspoint.h"

src/app/nodetool/qgsselectedfeature.h renamed to src/app/vertextool/qgsselectedfeature.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
qgsselectedfeature.h - selected feature of nodetool
2+
qgsselectedfeature.h - selected feature of vertextool
33
---------------------
44
begin : April 2009
55
copyright : (C) 2009 by Richard Kostecky

0 commit comments

Comments
 (0)