Skip to content
Permalink
Browse files

remove SquareCenter use RegularPolygon instead

  • Loading branch information
lbartoletti committed Oct 3, 2017
1 parent 7f4775c commit 79a2fd7841e05e93cc622ed31f1838505384adb9
@@ -581,7 +581,6 @@
<file>themes/default/mActionRectangleCenter.svg</file>
<file>themes/default/mActionRegularPolygonCenterCorner.svg</file>
<file>themes/default/mActionRegularPolygon2Points.svg</file>
<file>themes/default/mActionSquareCenter.svg</file>
<file>themes/default/mActionCircle3Tangents.svg</file>
<file>themes/default/mActionAddGeoPackageLayer.svg</file>
<file>icons/qgis_icon.svg</file>

This file was deleted.

@@ -147,7 +147,6 @@ SET(QGIS_APP_SRCS
qgsmaptoolrectanglecenter.cpp
qgsmaptoolrectangleextent.cpp
qgsmaptoolrectangle3points.cpp
qgsmaptoolsquarecenter.cpp
qgsmaptoolregularpolygon2points.cpp
qgsmaptoolregularpolygoncenterpoint.cpp
qgsmaptoolregularpolygoncentercorner.cpp
@@ -324,7 +323,6 @@ SET (QGIS_APP_MOC_HDRS
qgsmaptoolrectanglecenter.h
qgsmaptoolrectangleextent.h
qgsmaptoolrectangle3points.h
qgsmaptoolsquarecenter.h
qgsmaptoolregularpolygon2points.h
qgsmaptoolregularpolygoncenterpoint.h
qgsmaptoolregularpolygoncentercorner.h
@@ -356,7 +356,6 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
#include "qgsmaptoolrectanglecenter.h"
#include "qgsmaptoolrectangleextent.h"
#include "qgsmaptoolrectangle3points.h"
#include "qgsmaptoolsquarecenter.h"
#include "qgsmaptoolregularpolygon2points.h"
#include "qgsmaptoolregularpolygoncenterpoint.h"
#include "qgsmaptoolregularpolygoncentercorner.h"
@@ -1324,7 +1323,6 @@ QgisApp::~QgisApp()
delete mMapTools.mRectangleCenterPoint;
delete mMapTools.mRectangleExtent;
delete mMapTools.mRectangle3Points;
delete mMapTools.mSquareCenter;
delete mMapTools.mRegularPolygon2Points;
delete mMapTools.mRegularPolygonCenterPoint;
delete mMapTools.mRegularPolygonCenterCorner;
@@ -1803,7 +1801,6 @@ void QgisApp::createActions()
connect( mActionRectangleCenterPoint, &QAction::triggered, this, &QgisApp::rectangleCenterPoint );
connect( mActionRectangleExtent, &QAction::triggered, this, &QgisApp::rectangleExtent );
connect( mActionRectangle3Points, &QAction::triggered, this, &QgisApp::rectangle3Points );
connect( mActionSquareCenter, &QAction::triggered, this, &QgisApp::squareCenter );
connect( mActionRegularPolygon2Points, &QAction::triggered, this, &QgisApp::regularPolygon2Points );
connect( mActionRegularPolygonCenterPoint, &QAction::triggered, this, &QgisApp::regularPolygonCenterPoint );
connect( mActionRegularPolygonCenterCorner, &QAction::triggered, this, &QgisApp::regularPolygonCenterCorner );
@@ -2093,7 +2090,6 @@ void QgisApp::createActionGroups()
mMapToolGroup->addAction( mActionRectangleCenterPoint );
mMapToolGroup->addAction( mActionRectangleExtent );
mMapToolGroup->addAction( mActionRectangle3Points );
mMapToolGroup->addAction( mActionSquareCenter );
mMapToolGroup->addAction( mActionRegularPolygon2Points );
mMapToolGroup->addAction( mActionRegularPolygonCenterPoint );
mMapToolGroup->addAction( mActionRegularPolygonCenterCorner );
@@ -2634,7 +2630,6 @@ void QgisApp::createToolBars()
tbAddRectangle->addAction( mActionRectangleCenterPoint );
tbAddRectangle->addAction( mActionRectangleExtent );
tbAddRectangle->addAction( mActionRectangle3Points );
tbAddRectangle->addAction( mActionSquareCenter );
tbAddRectangle->setDefaultAction( mActionRectangleCenterPoint );
connect( tbAddRectangle, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
mRegularShapeDigitizeToolBar->insertWidget( mActionNodeTool, tbAddRectangle );
@@ -3242,8 +3237,6 @@ void QgisApp::createCanvasTools()
mMapTools.mRectangleExtent->setAction( mActionRectangleExtent );
mMapTools.mRectangle3Points = new QgsMapToolRectangle3Points( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
mMapTools.mRectangle3Points->setAction( mActionRectangle3Points );
mMapTools.mSquareCenter = new QgsMapToolSquareCenter( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
mMapTools.mSquareCenter->setAction( mActionSquareCenter );
mMapTools.mRegularPolygon2Points = new QgsMapToolRegularPolygon2Points( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
mMapTools.mRegularPolygon2Points->setAction( mActionRegularPolygon2Points );
mMapTools.mRegularPolygonCenterPoint = new QgsMapToolRegularPolygonCenterPoint( dynamic_cast<QgsMapToolAddFeature *>( mMapTools.mAddFeature ), mMapCanvas );
@@ -7878,11 +7871,6 @@ void QgisApp::rectangle3Points()
mMapCanvas->setMapTool( mMapTools.mRectangle3Points );
}

void QgisApp::squareCenter()
{
mMapCanvas->setMapTool( mMapTools.mSquareCenter );
}

void QgisApp::regularPolygon2Points()
{
mMapCanvas->setMapTool( mMapTools.mRegularPolygon2Points );
@@ -11302,7 +11290,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
mActionEllipseFoci->setEnabled( false );
mActionRectangleCenterPoint->setEnabled( false );
mActionRectangleExtent->setEnabled( false );
mActionSquareCenter->setEnabled( false );
mActionRegularPolygon2Points->setEnabled( false );
mActionRegularPolygonCenterPoint->setEnabled( false );
mActionRegularPolygonCenterCorner->setEnabled( false );
@@ -11466,8 +11453,6 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer *layer )
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
mActionRectangle3Points->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
mActionSquareCenter->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
mActionRegularPolygon2Points->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
&& ( vlayer->geometryType() == QgsWkbTypes::LineGeometry || vlayer->geometryType() == QgsWkbTypes::PolygonGeometry ) );
mActionRegularPolygonCenterPoint->setEnabled( isEditable && ( canAddFeatures || canChangeGeometry )
@@ -1249,8 +1249,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void rectangleExtent();
//! activates the add rectangle from 3 points tool
void rectangle3Points();
//! activates the add square from center tool
void squareCenter();
//! activates the add regular polygon from 2 points tool
void regularPolygon2Points();
//! activates the add regular polygon from center and a point tool
@@ -1839,7 +1837,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QgsMapTool *mRectangleCenterPoint = nullptr;
QgsMapTool *mRectangleExtent = nullptr;
QgsMapTool *mRectangle3Points = nullptr;
QgsMapTool *mSquareCenter = nullptr;
QgsMapTool *mRegularPolygon2Points = nullptr;
QgsMapTool *mRegularPolygonCenterPoint = nullptr;
QgsMapTool *mRegularPolygonCenterCorner = nullptr;

This file was deleted.

This file was deleted.

@@ -299,7 +299,6 @@
<addaction name="mActionRectangleExtent"/>
<addaction name="mActionRectangleCenterPoint"/>
<addaction name="mActionRectangle3Points"/>
<addaction name="mActionSquareCenter"/>
</widget>
<widget class="QMenu" name="mMenuRegularPolygon">
<property name="title">
@@ -2857,21 +2856,6 @@ Acts on currently active editable layer</string>
<string>Add rectangle from center and a point</string>
</property>
</action>
<action name="mActionSquareCenter">
<property name="checkable">
<bool>true</bool>
</property>
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionSquareCenter.svg</normaloff>:/images/themes/default/mActionSquareCenter.svg</iconset>
</property>
<property name="text">
<string>Add &amp;Square From Center</string>
</property>
<property name="toolTip">
<string>Add square from center</string>
</property>
</action>
<action name="mActionRegularPolygonCenterPoint">
<property name="checkable">
<bool>true</bool>
@@ -2960,8 +2944,8 @@ Acts on currently active editable layer</string>
</property>
<property name="toolTip">
<string>Add regular polygon from center and a corner</string>
</property>
</action>
</property>
</action>
<action name="mActionNew3DMapCanvas">
<property name="text">
<string>New &amp;3D Map View</string>

0 comments on commit 79a2fd7

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