Skip to content
Permalink
Browse files

- Rename Regular Shape Digitize Toolbar to Advanced Shape Digitize

Toolbar
- Homogenize this toolbar like the others
- Not enabled by default
  • Loading branch information
lbartoletti committed Feb 20, 2018
1 parent b47eb87 commit 55aa0b5be56089e869295885d87f861993e649d6
@@ -191,6 +191,7 @@ Advanced digitizing dock widget
virtual QToolBar *mapNavToolToolBar() = 0;
virtual QToolBar *digitizeToolBar() = 0;
virtual QToolBar *advancedDigitizeToolBar() = 0;
virtual QToolBar *advancedShapeDigitizeToolBar() = 0;
virtual QToolBar *attributesToolBar() = 0;
virtual QToolBar *pluginToolBar() = 0;
virtual QToolBar *helpToolBar() = 0;
@@ -2394,6 +2394,7 @@ void QgisApp::createToolBars()
<< mLayerToolBar
<< mDigitizeToolBar
<< mAdvancedDigitizeToolBar
<< mAdvancedShapeDigitizeToolBar
<< mMapNavToolBar
<< mAttributesToolBar
<< mPluginToolBar
@@ -2680,16 +2681,16 @@ void QgisApp::createToolBars()
}

//circular string digitize tool button
QToolButton *tbAddCircularString = new QToolButton( mRegularShapeDigitizeToolBar );
QToolButton *tbAddCircularString = new QToolButton( mAdvancedShapeDigitizeToolBar );
tbAddCircularString->setPopupMode( QToolButton::MenuButtonPopup );
tbAddCircularString->addAction( mActionCircularStringCurvePoint );
tbAddCircularString->addAction( mActionCircularStringRadius );
tbAddCircularString->setDefaultAction( mActionCircularStringCurvePoint );
connect( tbAddCircularString, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddCircularString );
mAdvancedShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddCircularString );

//circle digitize tool button
QToolButton *tbAddCircle = new QToolButton( mRegularShapeDigitizeToolBar );
QToolButton *tbAddCircle = new QToolButton( mAdvancedShapeDigitizeToolBar );
tbAddCircle->setPopupMode( QToolButton::MenuButtonPopup );
tbAddCircle->addAction( mActionCircle2Points );
tbAddCircle->addAction( mActionCircle3Points );
@@ -2698,38 +2699,38 @@ void QgisApp::createToolBars()
tbAddCircle->addAction( mActionCircleCenterPoint );
tbAddCircle->setDefaultAction( mActionCircle2Points );
connect( tbAddCircle, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddCircle );
mAdvancedShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddCircle );

//ellipse digitize tool button
QToolButton *tbAddEllipse = new QToolButton( mRegularShapeDigitizeToolBar );
QToolButton *tbAddEllipse = new QToolButton( mAdvancedShapeDigitizeToolBar );
tbAddEllipse->setPopupMode( QToolButton::MenuButtonPopup );
tbAddEllipse->addAction( mActionEllipseCenter2Points );
tbAddEllipse->addAction( mActionEllipseCenterPoint );
tbAddEllipse->addAction( mActionEllipseExtent );
tbAddEllipse->addAction( mActionEllipseFoci );
tbAddEllipse->setDefaultAction( mActionEllipseCenter2Points );
connect( tbAddEllipse, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddEllipse );
mAdvancedShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddEllipse );

//Rectangle digitize tool button
QToolButton *tbAddRectangle = new QToolButton( mRegularShapeDigitizeToolBar );
QToolButton *tbAddRectangle = new QToolButton( mAdvancedShapeDigitizeToolBar );
tbAddRectangle->setPopupMode( QToolButton::MenuButtonPopup );
tbAddRectangle->addAction( mActionRectangleCenterPoint );
tbAddRectangle->addAction( mActionRectangleExtent );
tbAddRectangle->addAction( mActionRectangle3Points );
tbAddRectangle->setDefaultAction( mActionRectangleCenterPoint );
connect( tbAddRectangle, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddRectangle );
mAdvancedShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddRectangle );

//Regular polygon digitize tool button
QToolButton *tbAddRegularPolygon = new QToolButton( mRegularShapeDigitizeToolBar );
QToolButton *tbAddRegularPolygon = new QToolButton( mAdvancedShapeDigitizeToolBar );
tbAddRegularPolygon->setPopupMode( QToolButton::MenuButtonPopup );
tbAddRegularPolygon->addAction( mActionRegularPolygon2Points );
tbAddRegularPolygon->addAction( mActionRegularPolygonCenterPoint );
tbAddRegularPolygon->addAction( mActionRegularPolygonCenterCorner );
tbAddRegularPolygon->setDefaultAction( mActionRegularPolygon2Points );
connect( tbAddRegularPolygon, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );
mRegularShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddRegularPolygon );
mAdvancedShapeDigitizeToolBar->insertWidget( mActionVertexTool, tbAddRegularPolygon );

// move feature tool button
QToolButton *moveFeatureButton = new QToolButton( mDigitizeToolBar );
@@ -2914,6 +2915,7 @@ void QgisApp::createStatusBar()
QList< QWidget *> actionObjects;
actionObjects << menuBar()
<< mAdvancedDigitizeToolBar
<< mAdvancedShapeDigitizeToolBar
<< mFileToolBar
<< mDataSourceManagerToolBar
<< mLayerToolBar
@@ -584,6 +584,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QToolBar *mapNavToolToolBar() { return mMapNavToolBar; }
QToolBar *digitizeToolBar() { return mDigitizeToolBar; }
QToolBar *advancedDigitizeToolBar() { return mAdvancedDigitizeToolBar; }
QToolBar *advancedShapeDigitizeToolBar() { return mAdvancedShapeDigitizeToolBar; }
QToolBar *attributesToolBar() { return mAttributesToolBar; }
QToolBar *pluginToolBar() { return mPluginToolBar; }
QToolBar *helpToolBar() { return mHelpToolBar; }
@@ -572,6 +572,7 @@ QToolBar *QgisAppInterface::layerToolBar() { return qgis->layerToolBar(); }
QToolBar *QgisAppInterface::mapNavToolToolBar() { return qgis->mapNavToolToolBar(); }
QToolBar *QgisAppInterface::digitizeToolBar() { return qgis->digitizeToolBar(); }
QToolBar *QgisAppInterface::advancedDigitizeToolBar() { return qgis->advancedDigitizeToolBar(); }
QToolBar *QgisAppInterface::advancedShapeDigitizeToolBar() { return qgis->advancedShapeDigitizeToolBar(); }
QToolBar *QgisAppInterface::attributesToolBar() { return qgis->attributesToolBar(); }
QToolBar *QgisAppInterface::pluginToolBar() { return qgis->pluginToolBar(); }
QToolBar *QgisAppInterface::helpToolBar() { return qgis->helpToolBar(); }
@@ -371,6 +371,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
QToolBar *mapNavToolToolBar() override;
QToolBar *digitizeToolBar() override;
QToolBar *advancedDigitizeToolBar() override;
QToolBar *advancedShapeDigitizeToolBar() override;
QToolBar *attributesToolBar() override;
QToolBar *pluginToolBar() override;
QToolBar *helpToolBar() override;

0 comments on commit 55aa0b5

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