18
18
***************************************************************************/
19
19
/* $Id$ */
20
20
21
-
22
21
//
23
22
// QT4 includes make sure to use the new <CamelCase> style!
24
23
//
@@ -494,10 +493,13 @@ QgisApp::~QgisApp()
494
493
delete mMapTools .mReshapeFeatures ;
495
494
delete mMapTools .mSplitFeatures ;
496
495
delete mMapTools .mSelect ;
497
- // these three tools to be deprecated - use node tool rather
498
- // delete mMapTools.mVertexAdd;
499
- // delete mMapTools.mVertexMove;
500
- // delete mMapTools.mVertexDelete;
496
+
497
+ #if 0 //these three tools to be deprecated - use node tool rather
498
+ delete mMapTools.mVertexAdd;
499
+ delete mMapTools.mVertexMove;
500
+ delete mMapTools.mVertexDelete;
501
+ #endif
502
+
501
503
delete mMapTools .mAddRing ;
502
504
delete mMapTools .mSimplifyFeature ;
503
505
delete mMapTools .mDeleteRing ;
@@ -711,8 +713,7 @@ void QgisApp::createActions()
711
713
connect ( mActionDeleteSelected , SIGNAL ( triggered () ), this , SLOT ( deleteSelected () ) );
712
714
mActionDeleteSelected ->setEnabled ( false );
713
715
714
- // these three tools to be deprecated - use node tool rather
715
- #if 0
716
+ #if 0 //these three tools to be deprecated - use node tool rather
716
717
mActionAddVertex = new QAction( getThemeIcon( "mActionAddVertex.png" ), tr( "Add Vertex" ), this );
717
718
shortcuts->registerAction( mActionAddVertex );
718
719
mActionAddVertex->setStatusTip( tr( "Add Vertex" ) );
@@ -1155,15 +1156,14 @@ void QgisApp::createActionGroups()
1155
1156
mActionSplitFeatures ->setCheckable ( true );
1156
1157
mMapToolGroup ->addAction ( mActionSplitFeatures );
1157
1158
mMapToolGroup ->addAction ( mActionDeleteSelected );
1158
- // these three tools are deprecated - use node tool rather
1159
- /* *
1159
+ #if 0 //these three tools are deprecated - use node tool rather
1160
1160
mActionAddVertex->setCheckable( true );
1161
1161
mMapToolGroup->addAction( mActionAddVertex );
1162
1162
mActionDeleteVertex->setCheckable( true );
1163
1163
mMapToolGroup->addAction( mActionDeleteVertex );
1164
1164
mActionMoveVertex->setCheckable( true );
1165
1165
mMapToolGroup->addAction( mActionMoveVertex );
1166
- */
1166
+ # endif
1167
1167
mActionAddRing ->setCheckable ( true );
1168
1168
mMapToolGroup ->addAction ( mActionAddRing );
1169
1169
mActionAddIsland ->setCheckable ( true );
@@ -1260,10 +1260,11 @@ void QgisApp::createMenus()
1260
1260
mEditMenu ->addAction ( mActionCapturePolygon );
1261
1261
mEditMenu ->addAction ( mActionMoveFeature );
1262
1262
mEditMenu ->addAction ( mActionDeleteSelected );
1263
- // these three tools are deprecated - use node tool rather
1264
- // mEditMenu->addAction( mActionAddVertex );
1265
- // mEditMenu->addAction( mActionMoveVertex );
1266
- // mEditMenu->addAction( mActionDeleteVertex );
1263
+ #if 0 //these three tools are deprecated - use node tool rather
1264
+ mEditMenu->addAction( mActionAddVertex );
1265
+ mEditMenu->addAction( mActionMoveVertex );
1266
+ mEditMenu->addAction( mActionDeleteVertex );
1267
+ #endif
1267
1268
1268
1269
mActionEditSeparator2 = mEditMenu ->addSeparator ();
1269
1270
@@ -1473,10 +1474,11 @@ void QgisApp::createToolBars()
1473
1474
mDigitizeToolBar ->addAction ( mActionCapturePolygon );
1474
1475
mDigitizeToolBar ->addAction ( mActionMoveFeature );
1475
1476
mDigitizeToolBar ->addAction ( mActionNodeTool );
1476
- // these three tools are deprecated - use node tool rather
1477
- // mDigitizeToolBar->addAction( mActionMoveVertex );
1478
- // mDigitizeToolBar->addAction( mActionAddVertex );
1479
- // mDigitizeToolBar->addAction( mActionDeleteVertex );
1477
+ #if 0 //these three tools are deprecated - use node tool rather
1478
+ mDigitizeToolBar->addAction( mActionMoveVertex );
1479
+ mDigitizeToolBar->addAction( mActionAddVertex );
1480
+ mDigitizeToolBar->addAction( mActionDeleteVertex );
1481
+ #endif
1480
1482
mDigitizeToolBar ->addAction ( mActionDeleteSelected );
1481
1483
mDigitizeToolBar ->addAction ( mActionCutFeatures );
1482
1484
mDigitizeToolBar ->addAction ( mActionCopyFeatures );
@@ -1743,10 +1745,11 @@ void QgisApp::setTheme( QString theThemeName )
1743
1745
mActionReshapeFeatures ->setIcon ( getThemeIcon ( " /mActionReshape.png" ) );
1744
1746
mActionSplitFeatures ->setIcon ( getThemeIcon ( " /mActionSplitFeatures.png" ) );
1745
1747
mActionDeleteSelected ->setIcon ( getThemeIcon ( " /mActionDeleteSelected.png" ) );
1746
- // these three icons to be deprecated
1747
- // mActionAddVertex->setIcon( getThemeIcon( "/mActionAddVertex.png" ) );
1748
- // mActionMoveVertex->setIcon( getThemeIcon( "/mActionMoveVertex.png" ) );
1749
- // mActionDeleteVertex->setIcon( getThemeIcon( "/mActionDeleteVertex.png" ) );
1748
+ #if 0 //these three icons to be deprecated
1749
+ mActionAddVertex->setIcon( getThemeIcon( "/mActionAddVertex.png" ) );
1750
+ mActionMoveVertex->setIcon( getThemeIcon( "/mActionMoveVertex.png" ) );
1751
+ mActionDeleteVertex->setIcon( getThemeIcon( "/mActionDeleteVertex.png" ) );
1752
+ #endif
1750
1753
mActionNodeTool ->setIcon ( getThemeIcon ( " /mActionNodeTool.png" ) );
1751
1754
mActionSimplifyFeature ->setIcon ( getThemeIcon ( " /mActionSimplify.png" ) );
1752
1755
mActionUndo ->setIcon ( getThemeIcon ( " /mActionUndo.png" ) );
@@ -1892,13 +1895,14 @@ void QgisApp::createCanvas()
1892
1895
mMapTools .mSplitFeatures ->setAction ( mActionSplitFeatures );
1893
1896
mMapTools .mSelect = new QgsMapToolSelect ( mMapCanvas );
1894
1897
mMapTools .mSelect ->setAction ( mActionSelect );
1895
- // these three tools to be deprecated - use node tool rather
1896
- // mMapTools.mVertexAdd = new QgsMapToolAddVertex( mMapCanvas );
1897
- // mMapTools.mVertexAdd->setAction( mActionAddVertex );
1898
- // mMapTools.mVertexMove = new QgsMapToolMoveVertex( mMapCanvas );
1899
- // mMapTools.mVertexMove->setAction( mActionMoveVertex );
1900
- // mMapTools.mVertexDelete = new QgsMapToolDeleteVertex( mMapCanvas );
1901
- // mMapTools.mVertexDelete->setAction( mActionDeleteVertex );
1898
+ #if 0 //these three tools to be deprecated - use node tool rather
1899
+ mMapTools.mVertexAdd = new QgsMapToolAddVertex( mMapCanvas );
1900
+ mMapTools.mVertexAdd->setAction( mActionAddVertex );
1901
+ mMapTools.mVertexMove = new QgsMapToolMoveVertex( mMapCanvas );
1902
+ mMapTools.mVertexMove->setAction( mActionMoveVertex );
1903
+ mMapTools.mVertexDelete = new QgsMapToolDeleteVertex( mMapCanvas );
1904
+ mMapTools.mVertexDelete->setAction( mActionDeleteVertex );
1905
+ #endif
1902
1906
mMapTools .mAddRing = new QgsMapToolAddRing ( mMapCanvas );
1903
1907
mMapTools .mAddRing ->setAction ( mActionAddRing );
1904
1908
mMapTools .mAddIsland = new QgsMapToolAddIsland ( mMapCanvas );
@@ -4411,9 +4415,9 @@ void QgisApp::removeAllLayers()
4411
4415
QgsProject::instance ()->dirty ( true );
4412
4416
} // remove all layers
4413
4417
4414
- #ifdef HAVE_QWT
4415
4418
void QgisApp::showGpsTool ()
4416
4419
{
4420
+ #ifdef HAVE_QWT
4417
4421
if ( !mpGpsWidget )
4418
4422
{
4419
4423
mpGpsWidget = new QgsGPSInformationWidget ( mMapCanvas );
@@ -4432,8 +4436,8 @@ void QgisApp::showGpsTool()
4432
4436
{
4433
4437
mpGpsDock->toggleViewAction ();
4434
4438
}
4435
- }
4436
4439
#endif
4440
+ }
4437
4441
4438
4442
void QgisApp::zoomToLayerExtent ()
4439
4443
{
@@ -5364,7 +5368,7 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
5364
5368
mActionCapturePolygon ->setEnabled ( false );
5365
5369
mActionCaptureLine ->setVisible ( false );
5366
5370
mActionCapturePolygon ->setVisible ( false );
5367
- #if 0 //these three tools to be deprecated - use node tool rather
5371
+ #if 0 //these three tools to be deprecated - use node tool rather
5368
5372
mActionAddVertex->setEnabled( false );
5369
5373
mActionDeleteVertex->setEnabled( false );
5370
5374
mActionMoveVertex->setEnabled( false );
@@ -5457,10 +5461,11 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
5457
5461
// are add/delete/move vertex supported?
5458
5462
if ( vlayer->isEditable () && dprovider->capabilities () & QgsVectorDataProvider::ChangeGeometries )
5459
5463
{
5460
- // these three tools to be deprecated - use node tool rather
5461
- // mActionAddVertex->setEnabled( true );
5462
- // mActionMoveVertex->setEnabled( true );
5463
- // mActionDeleteVertex->setEnabled( true );
5464
+ #if 0 // these three tools to be deprecated - use node tool rather
5465
+ mActionAddVertex->setEnabled( true );
5466
+ mActionMoveVertex->setEnabled( true );
5467
+ mActionDeleteVertex->setEnabled( true );
5468
+ #endif
5464
5469
if ( vlayer->geometryType () == QGis::Polygon )
5465
5470
{
5466
5471
mActionAddRing ->setEnabled ( true );
@@ -5471,9 +5476,11 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
5471
5476
}
5472
5477
else
5473
5478
{
5474
- // mActionAddVertex->setEnabled( false );
5475
- // mActionMoveVertex->setEnabled( false );
5476
- // mActionDeleteVertex->setEnabled( false );
5479
+ #if 0
5480
+ mActionAddVertex->setEnabled( false );
5481
+ mActionMoveVertex->setEnabled( false );
5482
+ mActionDeleteVertex->setEnabled( false );
5483
+ #endif
5477
5484
}
5478
5485
return ;
5479
5486
}
@@ -5493,10 +5500,11 @@ void QgisApp::activateDeactivateLayerRelatedActions( QgsMapLayer* layer )
5493
5500
mActionDeleteSelected ->setEnabled ( false );
5494
5501
mActionAddRing ->setEnabled ( false );
5495
5502
mActionAddIsland ->setEnabled ( false );
5496
- // these three tools to be deprecated - use node tool rather
5497
- // mActionAddVertex->setEnabled( false );
5498
- // mActionDeleteVertex->setEnabled( false );
5499
- // mActionMoveVertex->setEnabled( false );
5503
+ #if 0 //these three tools to be deprecated - use node tool rather
5504
+ mActionAddVertex->setEnabled( false );
5505
+ mActionDeleteVertex->setEnabled( false );
5506
+ mActionMoveVertex->setEnabled( false );
5507
+ #endif
5500
5508
mActionNodeTool ->setEnabled ( false );
5501
5509
mActionMoveFeature ->setEnabled ( false );
5502
5510
mActionCopyFeatures ->setEnabled ( false );
0 commit comments