Skip to content
Permalink
Browse files

Remove redundant AMS gui components, they are all handled by arcgis R…

…EST unified classes
  • Loading branch information
nyalldawson committed Dec 23, 2020
1 parent 33a607b commit 119205615017f0cd31df42ad3c411000eb1a75b2
@@ -46,9 +46,8 @@ set (AFS_SRCS
)
if (WITH_GUI)
set(AFS_SRCS ${AFS_SRCS}
qgsafsprovidergui.cpp
qgsafssourceselect.cpp
qgsarcgisrestdataitemguiprovider.cpp
qgsarcgisrestprovidergui.cpp
qgsarcgisrestsourceselect.cpp
qgsnewarcgisrestconnection.cpp
)
@@ -31,7 +31,7 @@ class QgsAfsSourceSelect: public QgsArcGisRestSourceSelect
public:
QgsAfsSourceSelect( QWidget *parent, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::None );
protected:
bool connectToService( const QgsOwsConnection &connection ) override;
bool connectToService( const QgsOwsConnection &connection );
void buildQuery( const QgsOwsConnection &connection, const QModelIndex & ) override;


This file was deleted.

This file was deleted.

This file was deleted.

@@ -20,7 +20,7 @@
#include "qgsarcgisportalutils.h"

#ifdef HAVE_GUI
#include "qgsafssourceselect.h"
#include "qgsarcgisrestsourceselect.h"
#endif

#include <QMessageBox>
@@ -54,7 +54,7 @@ QVector<QgsDataItem *> QgsArcGisRestRootItem::createChildren()
#ifdef HAVE_GUI
QWidget *QgsArcGisRestRootItem::paramWidget()
{
QgsAfsSourceSelect *select = new QgsAfsSourceSelect( nullptr, Qt::WindowFlags(), QgsProviderRegistry::WidgetMode::Manager );
QgsArcGisRestSourceSelect *select = new QgsArcGisRestSourceSelect( nullptr, Qt::WindowFlags(), QgsProviderRegistry::WidgetMode::Manager );
connect( select, &QgsArcGisRestSourceSelect::connectionsChanged, this, &QgsArcGisRestRootItem::onConnectionsChanged );
return select;
}
@@ -19,29 +19,29 @@

#include "qgsarcgisrestdataitemguiprovider.h"
#include "qgsafsprovider.h"
#include "qgsafssourceselect.h"
#include "qgsarcgisrestsourceselect.h"


//! Provider for AFS layers source select
class QgsAfsSourceSelectProvider : public QgsSourceSelectProvider
class QgsArcGisRestSourceSelectProvider : public QgsSourceSelectProvider
{
public:

QString providerKey() const override { return QgsAfsProvider::AFS_PROVIDER_KEY; }
QString text() const override { return QObject::tr( "ArcGIS Feature Service" ); }
QString text() const override { return QObject::tr( "ArcGIS REST Server" ); }
int ordering() const override { return QgsSourceSelectProvider::OrderRemoteProvider + 150; }
QIcon icon() const override { return QgsApplication::getThemeIcon( QStringLiteral( "/mActionAddAfsLayer.svg" ) ); }
QgsAbstractDataSourceWidget *createDataSourceWidget( QWidget *parent = nullptr, Qt::WindowFlags fl = Qt::Widget, QgsProviderRegistry::WidgetMode widgetMode = QgsProviderRegistry::WidgetMode::Embedded ) const override
{
return new QgsAfsSourceSelect( parent, fl, widgetMode );
return new QgsArcGisRestSourceSelect( parent, fl, widgetMode );
}
};


class QgsAfsProviderGuiMetadata: public QgsProviderGuiMetadata
class QgsArcGisRestProviderGuiMetadata: public QgsProviderGuiMetadata
{
public:
QgsAfsProviderGuiMetadata()
QgsArcGisRestProviderGuiMetadata()
: QgsProviderGuiMetadata( QgsAfsProvider::AFS_PROVIDER_KEY )
{
}
@@ -56,13 +56,13 @@ class QgsAfsProviderGuiMetadata: public QgsProviderGuiMetadata
QList<QgsSourceSelectProvider *> sourceSelectProviders() override
{
QList<QgsSourceSelectProvider *> providers;
providers << new QgsAfsSourceSelectProvider;
providers << new QgsArcGisRestSourceSelectProvider;
return providers;
}
};


QGISEXTERN QgsProviderGuiMetadata *providerGuiMetadataFactory()
{
return new QgsAfsProviderGuiMetadata();
return new QgsArcGisRestProviderGuiMetadata();
}

0 comments on commit 1192056

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