Skip to content
Permalink
Browse files

Remove Add ArcGIS map service button

after it's merged with feature service

(cherry picked from commit 82797ac)
  • Loading branch information
DelazJ authored and nyalldawson committed Feb 9, 2021
1 parent 7172689 commit 3a952a6981c53771b112180b7bc22198cb68b065
@@ -591,11 +591,7 @@ Returns the native Add Point Cloud Layer action.

virtual QAction *actionAddAfsLayer() = 0;
%Docstring
Returns the native Add ArcGIS FeatureServer action.
%End
virtual QAction *actionAddAmsLayer() = 0;
%Docstring
Returns the native Add ArcGIS MapServer action.
Returns the native Add ArcGIS REST Server action.
%End
virtual QAction *actionCopyLayerStyle() = 0;
virtual QAction *actionPasteLayerStyle() = 0;
@@ -2790,7 +2790,6 @@ void QgisApp::createActions()
connect( mActionAddWcsLayer, &QAction::triggered, this, [ = ] { dataSourceManager( QStringLiteral( "wcs" ) ); } );
connect( mActionAddWfsLayer, &QAction::triggered, this, [ = ] { dataSourceManager( QStringLiteral( "WFS" ) ); } );
connect( mActionAddAfsLayer, &QAction::triggered, this, [ = ] { dataSourceManager( QStringLiteral( "arcgisfeatureserver" ) ); } );
connect( mActionAddAmsLayer, &QAction::triggered, this, [ = ] { dataSourceManager( QStringLiteral( "arcgismapserver" ) ); } );
connect( mActionAddDelimitedText, &QAction::triggered, this, [ = ] { dataSourceManager( QStringLiteral( "delimitedtext" ) ); } );
connect( mActionAddVirtualLayer, &QAction::triggered, this, [ = ] { dataSourceManager( QStringLiteral( "virtual" ) ); } );
connect( mActionOpenTable, &QAction::triggered, this, [ = ]
@@ -3519,48 +3518,6 @@ void QgisApp::createToolBars()
newLayerAction->setObjectName( QStringLiteral( "ActionNewLayer" ) );
connect( bt, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );

// map service tool button
bt = new QToolButton();
bt->setPopupMode( QToolButton::MenuButtonPopup );
bt->addAction( mActionAddWmsLayer );
bt->addAction( mActionAddAmsLayer );
QAction *defMapServiceAction = mActionAddWmsLayer;
switch ( settings.value( QStringLiteral( "UI/defaultMapService" ), 0 ).toInt() )
{
case 0:
defMapServiceAction = mActionAddWmsLayer;
break;
case 1:
defMapServiceAction = mActionAddAmsLayer;
break;
}
bt->setDefaultAction( defMapServiceAction );
QAction *mapServiceAction = mLayerToolBar->insertWidget( mActionAddWmsLayer, bt );
mLayerToolBar->removeAction( mActionAddWmsLayer );
mapServiceAction->setObjectName( QStringLiteral( "ActionMapService" ) );
connect( bt, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );

// feature service tool button
bt = new QToolButton();
bt->setPopupMode( QToolButton::MenuButtonPopup );
bt->addAction( mActionAddWfsLayer );
bt->addAction( mActionAddAfsLayer );
QAction *defFeatureServiceAction = mActionAddWfsLayer;
switch ( settings.value( QStringLiteral( "UI/defaultFeatureService" ), 0 ).toInt() )
{
case 0:
defFeatureServiceAction = mActionAddWfsLayer;
break;
case 1:
defFeatureServiceAction = mActionAddAfsLayer;
break;
}
bt->setDefaultAction( defFeatureServiceAction );
QAction *featureServiceAction = mLayerToolBar->insertWidget( mActionAddWfsLayer, bt );
mLayerToolBar->removeAction( mActionAddWfsLayer );
featureServiceAction->setObjectName( QStringLiteral( "ActionFeatureService" ) );
connect( bt, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );

// add db layer button
bt = new QToolButton();
bt->setPopupMode( QToolButton::MenuButtonPopup );
@@ -3595,7 +3552,7 @@ void QgisApp::createToolBars()
}
if ( defAddDbLayerAction )
bt->setDefaultAction( defAddDbLayerAction );
QAction *addDbLayerAction = mLayerToolBar->insertWidget( mapServiceAction, bt );
QAction *addDbLayerAction = mLayerToolBar->insertWidget( mActionAddWmsLayer, bt );
addDbLayerAction->setObjectName( QStringLiteral( "ActionAddDbLayer" ) );
connect( bt, &QToolButton::triggered, this, &QgisApp::toolButtonActionTriggered );

@@ -4156,7 +4113,6 @@ void QgisApp::setTheme( const QString &themeName )
mActionAddWcsLayer->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddWcsLayer.svg" ) ) );
mActionAddWfsLayer->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddWfsLayer.svg" ) ) );
mActionAddAfsLayer->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddAfsLayer.svg" ) ) );
mActionAddAmsLayer->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddAmsLayer.svg" ) ) );
mActionAddToOverview->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionInOverview.svg" ) ) );
mActionAnnotation->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionAnnotation.svg" ) ) );
mActionFormAnnotation->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionFormAnnotation.svg" ) ) );
settings.setValue( QStringLiteral( "UI/defaultAddDbLayerAction" ), 3 );
else if ( mActionAddHanaLayer && action == mActionAddHanaLayer )
settings.setValue( QStringLiteral( "UI/defaultAddDbLayerAction" ), 4 );
else if ( action == mActionAddWfsLayer )
settings.setValue( QStringLiteral( "UI/defaultFeatureService" ), 0 );
else if ( action == mActionAddAfsLayer )
settings.setValue( QStringLiteral( "UI/defaultFeatureService" ), 1 );
else if ( action == mActionAddWmsLayer )
settings.setValue( QStringLiteral( "UI/defaultMapService" ), 0 );
else if ( action == mActionAddAmsLayer )
settings.setValue( QStringLiteral( "UI/defaultMapService" ), 1 );
else if ( action == mActionMoveFeature )
settings.setValue( QStringLiteral( "UI/defaultMoveTool" ), 0 );
else if ( action == mActionMoveFeatureCopy )
@@ -554,7 +554,6 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionAddWcsLayer() { return mActionAddWcsLayer; }
QAction *actionAddWfsLayer() { return mActionAddWfsLayer; }
QAction *actionAddAfsLayer() { return mActionAddAfsLayer; }
QAction *actionAddAmsLayer() { return mActionAddAmsLayer; }
QAction *actionCopyLayerStyle() { return mActionCopyStyle; }
QAction *actionPasteLayerStyle() { return mActionPasteStyle; }
QAction *actionOpenTable() { return mActionOpenTable; }
@@ -736,7 +736,6 @@ QAction *QgisAppInterface::actionAddXyzLayer() { return qgis->actionAddXyzLayer(
QAction *QgisAppInterface::actionAddVectorTileLayer() { return qgis->actionAddVectorTileLayer(); }
QAction *QgisAppInterface::actionAddPointCloudLayer() { return qgis->actionAddPointCloudLayer(); }
QAction *QgisAppInterface::actionAddAfsLayer() { return qgis->actionAddAfsLayer(); }
QAction *QgisAppInterface::actionAddAmsLayer() { return qgis->actionAddAmsLayer(); }
QAction *QgisAppInterface::actionCopyLayerStyle() { return qgis->actionCopyLayerStyle(); }
QAction *QgisAppInterface::actionPasteLayerStyle() { return qgis->actionPasteLayerStyle(); }
QAction *QgisAppInterface::actionOpenTable() { return qgis->actionOpenTable(); }
@@ -250,7 +250,6 @@ class APP_EXPORT QgisAppInterface : public QgisInterface
QAction *actionAddVectorTileLayer() override;
QAction *actionAddPointCloudLayer() override;
QAction *actionAddAfsLayer() override;
QAction *actionAddAmsLayer() override;
QAction *actionCopyLayerStyle() override;
QAction *actionPasteLayerStyle() override;
QAction *actionOpenTable() override;
@@ -531,10 +531,8 @@ class GUI_EXPORT QgisInterface : public QObject
*/
virtual QAction *actionAddPointCloudLayer() = 0;

//! Returns the native Add ArcGIS FeatureServer action.
//! Returns the native Add ArcGIS REST Server action.
virtual QAction *actionAddAfsLayer() = 0;
//! Returns the native Add ArcGIS MapServer action.
virtual QAction *actionAddAmsLayer() = 0;
virtual QAction *actionCopyLayerStyle() = 0;
virtual QAction *actionPasteLayerStyle() = 0;
virtual QAction *actionOpenTable() = 0;
@@ -194,7 +194,6 @@
<addaction name="mActionAddVirtualLayer"/>
<addaction name="mActionAddWmsLayer"/>
<addaction name="mActionAddXyzLayer"/>
<addaction name="mActionAddAmsLayer"/>
<addaction name="mActionAddLayerSeparator"/>
<addaction name="mActionAddWcsLayer"/>
<addaction name="mActionAddWfsLayer"/>
@@ -2893,28 +2892,16 @@ Acts on the currently active layer only.</string>
<string>Modify the Attributes of all Selected Features Simultaneously</string>
</property>
</action>
<action name="mActionAddAmsLayer">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionAddAmsLayer.svg</normaloff>:/images/themes/default/mActionAddAmsLayer.svg</iconset>
</property>
<property name="text">
<string>Add Arc&amp;GIS Map Service Layer…</string>
</property>
<property name="toolTip">
<string>Add ArcGIS Map Service Layer</string>
</property>
</action>
<action name="mActionAddAfsLayer">
<property name="icon">
<iconset resource="../../images/images.qrc">
<normaloff>:/images/themes/default/mActionAddAfsLayer.svg</normaloff>:/images/themes/default/mActionAddAfsLayer.svg</iconset>
</property>
<property name="text">
<string>Add Ar&amp;cGIS Feature Service Layer…</string>
<string>Add Ar&amp;cGIS REST Server Layer…</string>
</property>
<property name="toolTip">
<string>Add ArcGIS Feature Service Layer</string>
<string>Add ArcGIS REST Server Layer</string>
</property>
</action>
<action name="mActionSelectByForm">

0 comments on commit 3a952a6

Please sign in to comment.