Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arcgis services description #58454

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/core/providers/arcgis/qgsarcgisrestutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1949,3 +1949,20 @@ Qgis::ArcGisRestServiceType QgsArcGisRestUtils::serviceTypeFromString( const QSt
return Qgis::ArcGisRestServiceType::Unknown;
}

QString QgsArcGisRestUtils::typeToString( Qgis::ArcGisRestServiceType type )
{
switch ( type )
{
case Qgis::ArcGisRestServiceType::FeatureServer:
return QStringLiteral( "Feature Service" );
case Qgis::ArcGisRestServiceType::MapServer:
return QStringLiteral( "Map Service" );
case Qgis::ArcGisRestServiceType::ImageServer:
return QStringLiteral( "Image Service" );
case Qgis::ArcGisRestServiceType::GlobeServer:
case Qgis::ArcGisRestServiceType::GPServer:
case Qgis::ArcGisRestServiceType::GeocodeServer:
case Qgis::ArcGisRestServiceType::Unknown:
return QString();
}
}
2 changes: 2 additions & 0 deletions src/core/providers/arcgis/qgsarcgisrestutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ class CORE_EXPORT QgsArcGisRestUtils

public:

static QString typeToString( Qgis::ArcGisRestServiceType type );

/**
* Converts an ESRI REST field \a type to a QVariant type.
*/
Expand Down
2 changes: 2 additions & 0 deletions src/providers/arcgisrest/qgsarcgisrestdataitems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ QgsArcGisFeatureServiceItem::QgsArcGisFeatureServiceItem( QgsDataItem *parent, c
mIconName = QStringLiteral( "mIconDbSchema.svg" );
mCapabilities |= Qgis::BrowserItemCapability::Collapse;
setToolTip( path );
mName = mName + " (" + QgsArcGisRestUtils::typeToString( Qgis::ArcGisRestServiceType::FeatureServer ) + ")";
}

void QgsArcGisFeatureServiceItem::setSupportedFormats( const QString &formats )
Expand Down Expand Up @@ -530,6 +531,7 @@ QgsArcGisMapServiceItem::QgsArcGisMapServiceItem( QgsDataItem *parent, const QSt
mIconName = QStringLiteral( "mIconDbSchema.svg" );
mCapabilities |= Qgis::BrowserItemCapability::Collapse;
setToolTip( path );
mName = mName + " (" + QgsArcGisRestUtils::typeToString( mServiceType ) + ")";
}

QVector<QgsDataItem *> QgsArcGisMapServiceItem::createChildren()
Expand Down
Loading