Skip to content
Permalink
Browse files

Fully replace node* by vertex*

  • Loading branch information
DelazJ committed Jan 31, 2018
1 parent 5461d3c commit 91a80759bf18eba5772e43f157b3234beb4d8d85
@@ -130,6 +130,8 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
<tr><td>QgsMultiPolylineV2<td>QgsPolyline
<tr><td>QgsMultiSurfaceV2<td>QgsMultiSurface
<tr><td>QgsNMEAConnection<td>QgsNmeaConnection
<tr><td>QgsNodeEditor<td>QgsVertexEditor
<tr><td>QgsNodeTool<td>QgsVertexTool
<tr><td>QgsNumericScaleBarStyle<td>QgsNumericScaleBarRenderer
<tr><td>QgsPoint<td>QgsPointXY
<tr><td>QgsPointSequenceV2<td>QgsPointSequence
@@ -273,7 +273,7 @@
<file>themes/default/mActionNewSpatiaLiteLayer.svg</file>
<file>themes/default/mActionNewGeoPackageLayer.svg</file>
<file>themes/default/mActionNewVectorLayer.svg</file>
<file>themes/default/mActionNodeTool.svg</file>
<file>themes/default/mActionVertexTool.svg</file>
<file>themes/default/mActionOffsetCurve.svg</file>
<file>themes/default/mActionOpenTable.svg</file>
<file>themes/default/mActionAddTable.svg</file>
File renamed without changes.
@@ -230,7 +230,7 @@ Show layout manager action
virtual QAction *actionSimplifyFeature() = 0;
virtual QAction *actionDeleteRing() = 0;
virtual QAction *actionDeletePart() = 0;
virtual QAction *actionNodeTool() = 0;
virtual QAction *actionVertexTool() = 0;

virtual QAction *actionPan() = 0;
%Docstring
@@ -75,7 +75,7 @@ Unregisters this maptool from the cad dock widget
Returns whether functionality of advanced digitizing dock widget is currently allowed.

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

@@ -106,10 +106,10 @@ SET(QGIS_APP_SRCS
qgsmaptoolsvgannotation.cpp
qgsmaptooltextannotation.cpp

nodetool/qgsselectedfeature.cpp
nodetool/qgsvertexentry.cpp
nodetool/qgsnodeeditor.cpp
nodetool/qgsnodetool.cpp
vertextool/qgsselectedfeature.cpp
vertextool/qgsvertexentry.cpp
vertextool/qgsvertexeditor.cpp
vertextool/qgsvertextool.cpp

qgslayerstylingwidget.cpp
qgsmeasuredialog.cpp
@@ -337,9 +337,9 @@ SET (QGIS_APP_MOC_HDRS
qgsmaptoolregularpolygoncenterpoint.h
qgsmaptoolregularpolygoncentercorner.h

nodetool/qgsselectedfeature.h
nodetool/qgsnodeeditor.h
nodetool/qgsnodetool.h
vertextool/qgsselectedfeature.h
vertextool/qgsvertexeditor.h
vertextool/qgsvertextool.h

qgslayerstylingwidget.h
qgsmeasuredialog.h
@@ -396,7 +396,7 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
#include "qgsmaptoolrotatelabel.h"
#include "qgsmaptoolchangelabelproperties.h"

#include "nodetool/qgsnodetool.h"
#include "vertextool/qgsvertextool.h"

// Editor widgets
#include "qgseditorwidgetregistry.h"
@@ -1343,7 +1343,7 @@ QgisApp::~QgisApp()
delete mMapTools.mMoveFeature;
delete mMapTools.mMoveFeatureCopy;
delete mMapTools.mMoveLabel;
delete mMapTools.mNodeTool;
delete mMapTools.mVertexTool;
delete mMapTools.mOffsetCurve;
delete mMapTools.mPinLabels;
delete mMapTools.mReshapeFeatures;
@@ -1904,7 +1904,7 @@ void QgisApp::createActions()
connect( mActionMergeFeatures, &QAction::triggered, this, &QgisApp::mergeSelectedFeatures );
connect( mActionMergeFeatureAttributes, &QAction::triggered, this, &QgisApp::mergeAttributesOfSelectedFeatures );
connect( mActionMultiEditAttributes, &QAction::triggered, this, &QgisApp::modifyAttributesOfSelectedFeatures );
connect( mActionNodeTool, &QAction::triggered, this, &QgisApp::nodeTool );
connect( mActionVertexTool, &QAction::triggered, this, &QgisApp::vertexTool );
connect( mActionRotatePointSymbols, &QAction::triggered, this, &QgisApp::rotatePointSymbols );
connect( mActionOffsetPointSymbol, &QAction::triggered, this, &QgisApp::offsetPointSymbol );
connect( mActionSnappingOptions, &QAction::triggered, this, &QgisApp::snappingOptions );
@@ -2190,7 +2190,7 @@ void QgisApp::createActionGroups()
mMapToolGroup->addAction( mActionDeletePart );
mMapToolGroup->addAction( mActionMergeFeatures );
mMapToolGroup->addAction( mActionMergeFeatureAttributes );
mMapToolGroup->addAction( mActionNodeTool );
mMapToolGroup->addAction( mActionVertexTool );
mMapToolGroup->addAction( mActionRotatePointSymbols );
mMapToolGroup->addAction( mActionOffsetPointSymbol );
mMapToolGroup->addAction( mActionPinLabels );
@@ -2681,7 +2681,7 @@ void QgisApp::createToolBars()
tbAddCircularString->addAction( mActionCircularStringRadius );
tbAddCircularString->setDefaultAction( mActionCircularStringCurvePoint );
connect( tbAddCircularString, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
mRegularShapeDigitizeToolBar->insertWidget( mActionNodeTool, tbAddCircularString );
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddCircularString );

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

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

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

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

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

bt = new QToolButton();
bt->setPopupMode( QToolButton::MenuButtonPopup );
@@ -3051,7 +3051,7 @@ void QgisApp::setTheme( const QString &themeName )
mActionSplitFeatures->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionSplitFeatures.svg" ) ) );
mActionSplitParts->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionSplitParts.svg" ) ) );
mActionDeleteSelected->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionDeleteSelected.svg" ) ) );
mActionNodeTool->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionNodeTool.svg" ) ) );
mActionVertexTool->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionVertexTool.svg" ) ) );
mActionSimplifyFeature->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionSimplify.svg" ) ) );
mActionUndo->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionUndo.svg" ) ) );
mActionRedo->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionRedo.svg" ) ) );
@@ -3341,8 +3341,8 @@ void QgisApp::createCanvasTools()
mMapTools.mDeleteRing->setAction( mActionDeleteRing );
mMapTools.mDeletePart = new QgsMapToolDeletePart( mMapCanvas );
mMapTools.mDeletePart->setAction( mActionDeletePart );
mMapTools.mNodeTool = new QgsNodeTool( mMapCanvas, mAdvancedDigitizingDockWidget );
mMapTools.mNodeTool->setAction( mActionNodeTool );
mMapTools.mVertexTool = new QgsVertexTool( mMapCanvas, mAdvancedDigitizingDockWidget );
mMapTools.mVertexTool->setAction( mActionVertexTool );
mMapTools.mRotatePointSymbolsTool = new QgsMapToolRotatePointSymbols( mMapCanvas );
mMapTools.mRotatePointSymbolsTool->setAction( mActionRotatePointSymbols );
mMapTools.mOffsetPointSymbolTool = new QgsMapToolOffsetPointSymbol( mMapCanvas );
@@ -7904,9 +7904,9 @@ void QgisApp::mergeSelectedFeatures()
vl->triggerRepaint();
}

void QgisApp::nodeTool()
void QgisApp::vertexTool()
{
mMapCanvas->setMapTool( mMapTools.mNodeTool );
mMapCanvas->setMapTool( mMapTools.mVertexTool );
}

void QgisApp::rotatePointSymbols()
@@ -11432,7 +11432,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionMoveFeatureCopy->setEnabled( false );
mActionRotateFeature->setEnabled( false );
mActionOffsetCurve->setEnabled( false );
mActionNodeTool->setEnabled( false );
mActionVertexTool->setEnabled( false );
mActionDeleteSelected->setEnabled( false );
mActionCutFeatures->setEnabled( false );
mActionCopyFeatures->setEnabled( false );
@@ -11609,7 +11609,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionMoveFeature->setEnabled( isEditable && canChangeGeometry );
mActionMoveFeatureCopy->setEnabled( isEditable && canChangeGeometry );
mActionRotateFeature->setEnabled( isEditable && canChangeGeometry );
mActionNodeTool->setEnabled( isEditable && canChangeGeometry );
mActionVertexTool->setEnabled( isEditable && canChangeGeometry );

if ( vlayer->geometryType() == QgsWkbTypes::PointGeometry )
{
@@ -11763,7 +11763,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionAddRing->setEnabled( false );
mActionFillRing->setEnabled( false );
mActionAddPart->setEnabled( false );
mActionNodeTool->setEnabled( false );
mActionVertexTool->setEnabled( false );
mActionMoveFeature->setEnabled( false );
mActionMoveFeatureCopy->setEnabled( false );
mActionRotateFeature->setEnabled( false );
@@ -448,7 +448,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionSimplifyFeature() { return mActionSimplifyFeature; }
QAction *actionDeleteRing() { return mActionDeleteRing; }
QAction *actionDeletePart() { return mActionDeletePart; }
QAction *actionNodeTool() { return mActionNodeTool; }
QAction *actionVertexTool() { return mActionVertexTool; }
QAction *actionSnappingOptions() { return mActionSnappingOptions; }
QAction *actionOffsetCurve() { return mActionOffsetCurve; }
QAction *actionPan() { return mActionPan; }
@@ -1343,7 +1343,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
//! Modifies the attributes of selected features via feature form
void modifyAttributesOfSelectedFeatures();
//! provides operations with nodes
void nodeTool();
void vertexTool();
//! activates the rotate points tool
void rotatePointSymbols();
//! activates the offset point symbol tool
@@ -1939,7 +1939,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QgsMapTool *mSimplifyFeature = nullptr;
QgsMapTool *mDeleteRing = nullptr;
QgsMapTool *mDeletePart = nullptr;
QgsMapTool *mNodeTool = nullptr;
QgsMapTool *mVertexTool = nullptr;
QgsMapTool *mRotatePointSymbolsTool = nullptr;
QgsMapTool *mOffsetPointSymbolTool = nullptr;
QgsMapTool *mAnnotation = nullptr;
@@ -603,7 +603,7 @@ QAction *QgisAppInterface::actionAddPart() { return qgis->actionAddPart(); }
QAction *QgisAppInterface::actionSimplifyFeature() { return qgis->actionSimplifyFeature(); }
QAction *QgisAppInterface::actionDeleteRing() { return qgis->actionDeleteRing(); }
QAction *QgisAppInterface::actionDeletePart() { return qgis->actionDeletePart(); }
QAction *QgisAppInterface::actionNodeTool() { return qgis->actionNodeTool(); }
QAction *QgisAppInterface::actionVertexTool() { return qgis->actionVertexTool(); }

QAction *QgisAppInterface::actionPan() { return qgis->actionPan(); }
QAction *QgisAppInterface::actionPanToSelected() { return qgis->actionPanToSelected(); }
@@ -404,7 +404,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
QAction *actionSimplifyFeature() override;
QAction *actionDeleteRing() override;
QAction *actionDeletePart() override;
QAction *actionNodeTool() override;
QAction *actionVertexTool() override;

//! View menu actions
QAction *actionPan() override;
@@ -1,5 +1,5 @@
/***************************************************************************
qgsselectedfeature.cpp - selected feature of nodetool
qgsselectedfeature.cpp - selected feature of vertextool
---------------------
begin : April 2009
copyright : (C) 2009 by Richard Kostecky
@@ -13,8 +13,8 @@
* *
***************************************************************************/

#include "nodetool/qgsselectedfeature.h"
#include "nodetool/qgsvertexentry.h"
#include "vertextool/qgsselectedfeature.h"
#include "vertextool/qgsvertexentry.h"

#include "qgsfeatureiterator.h"
#include "qgspoint.h"
@@ -1,5 +1,5 @@
/***************************************************************************
qgsselectedfeature.h - selected feature of nodetool
qgsselectedfeature.h - selected feature of vertextool
---------------------
begin : April 2009
copyright : (C) 2009 by Richard Kostecky

0 comments on commit 91a8075

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