Skip to content

Commit 79a2fd7

Browse files
committedOct 3, 2017
remove SquareCenter use RegularPolygon instead
1 parent 7f4775c commit 79a2fd7

File tree

8 files changed

+2
-256
lines changed

8 files changed

+2
-256
lines changed
 

‎images/images.qrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,6 @@
581581
<file>themes/default/mActionRectangleCenter.svg</file>
582582
<file>themes/default/mActionRegularPolygonCenterCorner.svg</file>
583583
<file>themes/default/mActionRegularPolygon2Points.svg</file>
584-
<file>themes/default/mActionSquareCenter.svg</file>
585584
<file>themes/default/mActionCircle3Tangents.svg</file>
586585
<file>themes/default/mActionAddGeoPackageLayer.svg</file>
587586
<file>icons/qgis_icon.svg</file>

‎images/themes/default/mActionSquareCenter.svg

Lines changed: 0 additions & 109 deletions
This file was deleted.

‎src/app/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ SET(QGIS_APP_SRCS
147147
qgsmaptoolrectanglecenter.cpp
148148
qgsmaptoolrectangleextent.cpp
149149
qgsmaptoolrectangle3points.cpp
150-
qgsmaptoolsquarecenter.cpp
151150
qgsmaptoolregularpolygon2points.cpp
152151
qgsmaptoolregularpolygoncenterpoint.cpp
153152
qgsmaptoolregularpolygoncentercorner.cpp
@@ -324,7 +323,6 @@ SET (QGIS_APP_MOC_HDRS
324323
qgsmaptoolrectanglecenter.h
325324
qgsmaptoolrectangleextent.h
326325
qgsmaptoolrectangle3points.h
327-
qgsmaptoolsquarecenter.h
328326
qgsmaptoolregularpolygon2points.h
329327
qgsmaptoolregularpolygoncenterpoint.h
330328
qgsmaptoolregularpolygoncentercorner.h

‎src/app/qgisapp.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
356356
#include "qgsmaptoolrectanglecenter.h"
357357
#include "qgsmaptoolrectangleextent.h"
358358
#include "qgsmaptoolrectangle3points.h"
359-
#include "qgsmaptoolsquarecenter.h"
360359
#include "qgsmaptoolregularpolygon2points.h"
361360
#include "qgsmaptoolregularpolygoncenterpoint.h"
362361
#include "qgsmaptoolregularpolygoncentercorner.h"
@@ -1324,7 +1323,6 @@ QgisApp::~QgisApp()
13241323
delete mMapTools.mRectangleCenterPoint;
13251324
delete mMapTools.mRectangleExtent;
13261325
delete mMapTools.mRectangle3Points;
1327-
delete mMapTools.mSquareCenter;
13281326
delete mMapTools.mRegularPolygon2Points;
13291327
delete mMapTools.mRegularPolygonCenterPoint;
13301328
delete mMapTools.mRegularPolygonCenterCorner;
@@ -1803,7 +1801,6 @@ void QgisApp::createActions()
18031801
connect( mActionRectangleCenterPoint, &QAction::triggered, this, &QgisApp::rectangleCenterPoint );
18041802
connect( mActionRectangleExtent, &QAction::triggered, this, &QgisApp::rectangleExtent );
18051803
connect( mActionRectangle3Points, &QAction::triggered, this, &QgisApp::rectangle3Points );
1806-
connect( mActionSquareCenter, &QAction::triggered, this, &QgisApp::squareCenter );
18071804
connect( mActionRegularPolygon2Points, &QAction::triggered, this, &QgisApp::regularPolygon2Points );
18081805
connect( mActionRegularPolygonCenterPoint, &QAction::triggered, this, &QgisApp::regularPolygonCenterPoint );
18091806
connect( mActionRegularPolygonCenterCorner, &QAction::triggered, this, &QgisApp::regularPolygonCenterCorner );
@@ -2093,7 +2090,6 @@ void QgisApp::createActionGroups()
20932090
mMapToolGroup->addAction( mActionRectangleCenterPoint );
20942091
mMapToolGroup->addAction( mActionRectangleExtent );
20952092
mMapToolGroup->addAction( mActionRectangle3Points );
2096-
mMapToolGroup->addAction( mActionSquareCenter );
20972093
mMapToolGroup->addAction( mActionRegularPolygon2Points );
20982094
mMapToolGroup->addAction( mActionRegularPolygonCenterPoint );
20992095
mMapToolGroup->addAction( mActionRegularPolygonCenterCorner );
@@ -2634,7 +2630,6 @@ void QgisApp::createToolBars()
26342630
tbAddRectangle->addAction( mActionRectangleCenterPoint );
26352631
tbAddRectangle->addAction( mActionRectangleExtent );
26362632
tbAddRectangle->addAction( mActionRectangle3Points );
2637-
tbAddRectangle->addAction( mActionSquareCenter );
26382633
tbAddRectangle->setDefaultAction( mActionRectangleCenterPoint );
26392634
connect( tbAddRectangle, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
26402635
mRegularShapeDigitizeToolBar->insertWidget( mActionNodeTool, tbAddRectangle );
@@ -3242,8 +3237,6 @@ void QgisApp::createCanvasTools()
32423237
mMapTools.mRectangleExtent->setAction( mActionRectangleExtent );
32433238
mMapTools.mRectangle3Points = new QgsMapToolRectangle3Points( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
32443239
mMapTools.mRectangle3Points->setAction( mActionRectangle3Points );
3245-
mMapTools.mSquareCenter = new QgsMapToolSquareCenter( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
3246-
mMapTools.mSquareCenter->setAction( mActionSquareCenter );
32473240
mMapTools.mRegularPolygon2Points = new QgsMapToolRegularPolygon2Points( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
32483241
mMapTools.mRegularPolygon2Points->setAction( mActionRegularPolygon2Points );
32493242
mMapTools.mRegularPolygonCenterPoint = new QgsMapToolRegularPolygonCenterPoint( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
@@ -7878,11 +7871,6 @@ void QgisApp::rectangle3Points()
78787871
mMapCanvas->setMapTool( mMapTools.mRectangle3Points );
78797872
}
78807873

7881-
void QgisApp::squareCenter()
7882-
{
7883-
mMapCanvas->setMapTool( mMapTools.mSquareCenter );
7884-
}
7885-
78867874
void QgisApp::regularPolygon2Points()
78877875
{
78887876
mMapCanvas->setMapTool( mMapTools.mRegularPolygon2Points );
@@ -11302,7 +11290,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
1130211290
mActionEllipseFoci->setEnabled( false );
1130311291
mActionRectangleCenterPoint->setEnabled( false );
1130411292
mActionRectangleExtent->setEnabled( false );
11305-
mActionSquareCenter->setEnabled( false );
1130611293
mActionRegularPolygon2Points->setEnabled( false );
1130711294
mActionRegularPolygonCenterPoint->setEnabled( false );
1130811295
mActionRegularPolygonCenterCorner->setEnabled( false );
@@ -11466,8 +11453,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
1146611453
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
1146711454
mActionRectangle3Points->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
1146811455
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
11469-
mActionSquareCenter->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
11470-
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
1147111456
mActionRegularPolygon2Points->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
1147211457
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
1147311458
mActionRegularPolygonCenterPoint->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )

‎src/app/qgisapp.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,8 +1249,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
12491249
void rectangleExtent();
12501250
//! activates the add rectangle from 3 points tool
12511251
void rectangle3Points();
1252-
//! activates the add square from center tool
1253-
void squareCenter();
12541252
//! activates the add regular polygon from 2 points tool
12551253
void regularPolygon2Points();
12561254
//! activates the add regular polygon from center and a point tool
@@ -1839,7 +1837,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
18391837
QgsMapTool *mRectangleCenterPoint = nullptr;
18401838
QgsMapTool *mRectangleExtent = nullptr;
18411839
QgsMapTool *mRectangle3Points = nullptr;
1842-
QgsMapTool *mSquareCenter = nullptr;
18431840
QgsMapTool *mRegularPolygon2Points = nullptr;
18441841
QgsMapTool *mRegularPolygonCenterPoint = nullptr;
18451842
QgsMapTool *mRegularPolygonCenterCorner = nullptr;

‎src/app/qgsmaptoolsquarecenter.cpp

Lines changed: 0 additions & 75 deletions
This file was deleted.

‎src/app/qgsmaptoolsquarecenter.h

Lines changed: 0 additions & 33 deletions
This file was deleted.

‎src/ui/qgisapp.ui

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@
299299
<addaction name="mActionRectangleExtent"/>
300300
<addaction name="mActionRectangleCenterPoint"/>
301301
<addaction name="mActionRectangle3Points"/>
302-
<addaction name="mActionSquareCenter"/>
303302
</widget>
304303
<widget class="QMenu" name="mMenuRegularPolygon">
305304
<property name="title">
@@ -2857,21 +2856,6 @@ Acts on currently active editable layer</string>
28572856
<string>Add rectangle from center and a point</string>
28582857
</property>
28592858
</action>
2860-
<action name="mActionSquareCenter">
2861-
<property name="checkable">
2862-
<bool>true</bool>
2863-
</property>
2864-
<property name="icon">
2865-
<iconset resource="../../images/images.qrc">
2866-
<normaloff>:/images/themes/default/mActionSquareCenter.svg</normaloff>:/images/themes/default/mActionSquareCenter.svg</iconset>
2867-
</property>
2868-
<property name="text">
2869-
<string>Add &amp;Square From Center</string>
2870-
</property>
2871-
<property name="toolTip">
2872-
<string>Add square from center</string>
2873-
</property>
2874-
</action>
28752859
<action name="mActionRegularPolygonCenterPoint">
28762860
<property name="checkable">
28772861
<bool>true</bool>
@@ -2960,8 +2944,8 @@ Acts on currently active editable layer</string>
29602944
</property>
29612945
<property name="toolTip">
29622946
<string>Add regular polygon from center and a corner</string>
2963-
</property>
2964-
</action>
2947+
</property>
2948+
</action>
29652949
<action name="mActionNew3DMapCanvas">
29662950
<property name="text">
29672951
<string>New &amp;3D Map View</string>

0 commit comments

Comments
 (0)
Please sign in to comment.