mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Renamed QgsSourceSelectDialog to QgsArcGisServiceSourceSelect
This commit is contained in:
parent
bc516cf82a
commit
7bb797f8a9
@ -158,7 +158,7 @@
|
||||
%Include qgsoptionswidgetfactory.sip
|
||||
%Include qgsorderbydialog.sip
|
||||
%Include qgsowssourceselect.sip
|
||||
%Include qgssourceselectdialog.sip
|
||||
%Include qgsarcgisservicesourceselect.sip
|
||||
%Include qgspanelwidget.sip
|
||||
%Include qgspanelwidgetstack.sip
|
||||
%Include qgspasswordlineedit.sip
|
||||
|
86
python/gui/qgsarcgisservicesourceselect.sip
Normal file
86
python/gui/qgsarcgisservicesourceselect.sip
Normal file
@ -0,0 +1,86 @@
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/gui/qgsarcgisservicesourceselect.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsArcGisServiceSourceSelect : QDialog, protected Ui::QgsArcGisServiceSourceSelectBase
|
||||
{
|
||||
%Docstring
|
||||
Generic class listing layers available from a remote service.
|
||||
%End
|
||||
|
||||
%TypeHeaderCode
|
||||
#include "qgsarcgisservicesourceselect.h"
|
||||
%End
|
||||
public:
|
||||
enum ServiceType { MapService, FeatureService };
|
||||
|
||||
QgsArcGisServiceSourceSelect( const QString &serviceName, ServiceType serviceType, QWidget *parent, Qt::WindowFlags fl );
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
|
||||
~QgsArcGisServiceSourceSelect();
|
||||
void setCurrentExtentAndCrs( const QgsRectangle &canvasExtent, const QgsCoordinateReferenceSystem &canvasCrs );
|
||||
%Docstring
|
||||
Sets the current extent and CRS. Used to select an appropriate CRS and possibly to retrieve data only in the current extent
|
||||
%End
|
||||
|
||||
signals:
|
||||
void addLayer( QString uri, QString typeName );
|
||||
%Docstring
|
||||
Emitted when a layer is added from the dialog
|
||||
%End
|
||||
void connectionsChanged();
|
||||
%Docstring
|
||||
Emitted when the connections for the service were changed
|
||||
%End
|
||||
|
||||
protected:
|
||||
|
||||
virtual bool connectToService( const QgsOwsConnection &connection ) = 0;
|
||||
%Docstring
|
||||
To be implemented in the child class. Called when a new connection is initiated.
|
||||
:rtype: bool
|
||||
%End
|
||||
virtual void buildQuery( const QgsOwsConnection &, const QModelIndex & );
|
||||
%Docstring
|
||||
May be implemented in child classes for services which support customized queries.
|
||||
%End
|
||||
virtual QString getLayerURI( const QgsOwsConnection &connection,
|
||||
const QString &layerTitle,
|
||||
const QString &layerName,
|
||||
const QString &crs = QString(),
|
||||
const QString &filter = QString(),
|
||||
const QgsRectangle &bBox = QgsRectangle() ) const = 0;
|
||||
%Docstring
|
||||
To be implemented in the child class. Constructs an URI for the specified service layer.
|
||||
:rtype: str
|
||||
%End
|
||||
void populateImageEncodings( const QStringList &availableEncodings );
|
||||
%Docstring
|
||||
Updates the UI for the list of available image encodings from the specified list.
|
||||
%End
|
||||
QString getSelectedImageEncoding() const;
|
||||
%Docstring
|
||||
Returns the selected image encoding.
|
||||
:rtype: str
|
||||
%End
|
||||
|
||||
};
|
||||
|
||||
|
||||
/************************************************************************
|
||||
* This file has been generated automatically from *
|
||||
* *
|
||||
* src/gui/qgsarcgisservicesourceselect.h *
|
||||
* *
|
||||
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||
************************************************************************/
|
@ -247,7 +247,7 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
|
||||
#include "qgsshortcutsmanager.h"
|
||||
#include "qgssinglebandgrayrenderer.h"
|
||||
#include "qgssnappingwidget.h"
|
||||
#include "qgssourceselectdialog.h"
|
||||
#include "qgsarcgisservicesourceselect.h"
|
||||
#include "qgsstatisticalsummarydockwidget.h"
|
||||
#include "qgsstatusbar.h"
|
||||
#include "qgsstatusbarcoordinateswidget.h"
|
||||
|
@ -302,7 +302,7 @@ SET(QGIS_GUI_SRCS
|
||||
qgsoptionsdialogbase.cpp
|
||||
qgsorderbydialog.cpp
|
||||
qgsowssourceselect.cpp
|
||||
qgssourceselectdialog.cpp
|
||||
qgsarcgisservicesourceselect.cpp
|
||||
qgspanelwidget.cpp
|
||||
qgspanelwidgetstack.cpp
|
||||
qgspasswordlineedit.cpp
|
||||
@ -458,7 +458,7 @@ SET(QGIS_GUI_MOC_HDRS
|
||||
qgsoptionswidgetfactory.h
|
||||
qgsorderbydialog.h
|
||||
qgsowssourceselect.h
|
||||
qgssourceselectdialog.h
|
||||
qgsarcgisservicesourceselect.h
|
||||
qgspanelwidget.h
|
||||
qgspanelwidgetstack.h
|
||||
qgspasswordlineedit.h
|
||||
@ -499,11 +499,11 @@ SET(QGIS_GUI_MOC_HDRS
|
||||
qgsvariableeditorwidget.h
|
||||
qgsfiledownloader.h
|
||||
qgsdatasourcemanagerdialog.h
|
||||
qgssourceselect.h
|
||||
|
||||
ogr/qgsopenvectorlayerdialog.h
|
||||
ogr/qgsnewogrconnection.h
|
||||
ogr/qgsvectorlayersaveasdialog.h
|
||||
qgssourceselect.h
|
||||
|
||||
raster/qgsmultibandcolorrendererwidget.h
|
||||
raster/qgspalettedrendererwidget.h
|
||||
@ -706,14 +706,13 @@ SET(QGIS_GUI_HDRS
|
||||
qgsvertexmarker.h
|
||||
qgsfiledownloader.h
|
||||
qgsdatasourcemanagerdialog.h
|
||||
qgssourceselect.h
|
||||
|
||||
ogr/qgsopenvectorlayerdialog.h
|
||||
ogr/qgsogrhelperfunctions.h
|
||||
ogr/qgsnewogrconnection.h
|
||||
ogr/qgsvectorlayersaveasdialog.h
|
||||
|
||||
qgssourceselect.h
|
||||
|
||||
attributetable/qgsfeaturemodel.h
|
||||
|
||||
auth/qgsauthauthoritieseditor.h
|
||||
@ -801,6 +800,7 @@ SET(QGIS_GUI_UI_HDRS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsmessagelogviewer.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsmessageviewer.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsowssourceselectbase.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsarcgisservicesourceselectbase.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsprojectionselectorbase.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsquerybuilderbase.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgssqlcomposerdialogbase.h
|
||||
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
qgssourceselectdialog.cpp
|
||||
qgsarcgisservicesourceselect.cpp
|
||||
-------------------------
|
||||
begin : Nov 26, 2015
|
||||
copyright : (C) 2015 by Sandro Mani
|
||||
@ -15,7 +15,7 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "qgssourceselectdialog.h"
|
||||
#include "qgsarcgisservicesourceselect.h"
|
||||
#include "qgsowsconnection.h"
|
||||
#include "qgsnewhttpconnection.h"
|
||||
#include "qgsprojectionselectiondialog.h"
|
||||
@ -49,7 +49,7 @@ class QgsSourceSelectItemDelegate : public QItemDelegate
|
||||
};
|
||||
|
||||
|
||||
QgsSourceSelectDialog::QgsSourceSelectDialog( const QString &serviceName, ServiceType serviceType, QWidget *parent, Qt::WindowFlags fl )
|
||||
QgsArcGisServiceSourceSelect::QgsArcGisServiceSourceSelect( const QString &serviceName, ServiceType serviceType, QWidget *parent, Qt::WindowFlags fl )
|
||||
: QDialog( parent, fl ),
|
||||
mServiceName( serviceName ),
|
||||
mServiceType( serviceType ),
|
||||
@ -61,22 +61,22 @@ QgsSourceSelectDialog::QgsSourceSelectDialog( const QString &serviceName, Servic
|
||||
|
||||
mAddButton = buttonBox->addButton( tr( "&Add" ), QDialogButtonBox::ActionRole );
|
||||
mAddButton->setEnabled( false );
|
||||
connect( mAddButton, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::addButtonClicked );
|
||||
connect( mAddButton, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::addButtonClicked );
|
||||
|
||||
if ( mServiceType == FeatureService )
|
||||
{
|
||||
mBuildQueryButton = buttonBox->addButton( tr( "&Build query" ), QDialogButtonBox::ActionRole );
|
||||
mBuildQueryButton->setDisabled( true );
|
||||
connect( mBuildQueryButton, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::buildQueryButtonClicked );
|
||||
connect( mBuildQueryButton, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::buildQueryButtonClicked );
|
||||
}
|
||||
|
||||
connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
|
||||
connect( btnNew, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::addEntryToServerList );
|
||||
connect( btnEdit, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::modifyEntryOfServerList );
|
||||
connect( btnDelete, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::deleteEntryOfServerList );
|
||||
connect( btnConnect, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::connectToServer );
|
||||
connect( btnChangeSpatialRefSys, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::changeCrs );
|
||||
connect( lineFilter, &QLineEdit::textChanged, this, &QgsSourceSelectDialog::filterChanged );
|
||||
connect( btnNew, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::addEntryToServerList );
|
||||
connect( btnEdit, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::modifyEntryOfServerList );
|
||||
connect( btnDelete, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::deleteEntryOfServerList );
|
||||
connect( btnConnect, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::connectToServer );
|
||||
connect( btnChangeSpatialRefSys, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::changeCrs );
|
||||
connect( lineFilter, &QLineEdit::textChanged, this, &QgsArcGisServiceSourceSelect::filterChanged );
|
||||
populateConnectionList();
|
||||
mProjectionSelector = new QgsProjectionSelectionDialog( this );
|
||||
mProjectionSelector->setMessage( QString() );
|
||||
@ -108,11 +108,11 @@ QgsSourceSelectDialog::QgsSourceSelectDialog( const QString &serviceName, Servic
|
||||
mModelProxy->setSortCaseSensitivity( Qt::CaseInsensitive );
|
||||
treeView->setModel( mModelProxy );
|
||||
|
||||
connect( treeView, &QAbstractItemView::doubleClicked, this, &QgsSourceSelectDialog::treeWidgetItemDoubleClicked );
|
||||
connect( treeView->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &QgsSourceSelectDialog::treeWidgetCurrentRowChanged );
|
||||
connect( treeView, &QAbstractItemView::doubleClicked, this, &QgsArcGisServiceSourceSelect::treeWidgetItemDoubleClicked );
|
||||
connect( treeView->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &QgsArcGisServiceSourceSelect::treeWidgetCurrentRowChanged );
|
||||
}
|
||||
|
||||
QgsSourceSelectDialog::~QgsSourceSelectDialog()
|
||||
QgsArcGisServiceSourceSelect::~QgsArcGisServiceSourceSelect()
|
||||
{
|
||||
QgsSettings settings;
|
||||
settings.setValue( QStringLiteral( "Windows/SourceSelectDialog/geometry" ), saveGeometry() );
|
||||
@ -123,13 +123,13 @@ QgsSourceSelectDialog::~QgsSourceSelectDialog()
|
||||
delete mModelProxy;
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::setCurrentExtentAndCrs( const QgsRectangle &canvasExtent, const QgsCoordinateReferenceSystem &canvasCrs )
|
||||
void QgsArcGisServiceSourceSelect::setCurrentExtentAndCrs( const QgsRectangle &canvasExtent, const QgsCoordinateReferenceSystem &canvasCrs )
|
||||
{
|
||||
mCanvasExtent = canvasExtent;
|
||||
mCanvasCrs = canvasCrs;
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::populateImageEncodings( const QStringList &availableEncodings )
|
||||
void QgsArcGisServiceSourceSelect::populateImageEncodings( const QStringList &availableEncodings )
|
||||
{
|
||||
QLayoutItem *item = nullptr;
|
||||
while ( ( item = gbImageEncoding->layout()->takeAt( 0 ) ) != nullptr )
|
||||
@ -162,12 +162,12 @@ void QgsSourceSelectDialog::populateImageEncodings( const QStringList &available
|
||||
}
|
||||
}
|
||||
|
||||
QString QgsSourceSelectDialog::getSelectedImageEncoding() const
|
||||
QString QgsArcGisServiceSourceSelect::getSelectedImageEncoding() const
|
||||
{
|
||||
return mImageEncodingGroup ? mImageEncodingGroup->checkedButton()->text() : QString();
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::populateConnectionList()
|
||||
void QgsArcGisServiceSourceSelect::populateConnectionList()
|
||||
{
|
||||
QStringList conns = QgsOwsConnection::connectionList( mServiceName );
|
||||
cmbConnections->clear();
|
||||
@ -190,7 +190,7 @@ void QgsSourceSelectDialog::populateConnectionList()
|
||||
}
|
||||
}
|
||||
|
||||
QString QgsSourceSelectDialog::getPreferredCrs( const QSet<QString> &crsSet ) const
|
||||
QString QgsArcGisServiceSourceSelect::getPreferredCrs( const QSet<QString> &crsSet ) const
|
||||
{
|
||||
if ( crsSet.size() < 1 )
|
||||
{
|
||||
@ -221,7 +221,7 @@ QString QgsSourceSelectDialog::getPreferredCrs( const QSet<QString> &crsSet ) co
|
||||
return *( crsSet.constBegin() );
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::addEntryToServerList()
|
||||
void QgsArcGisServiceSourceSelect::addEntryToServerList()
|
||||
{
|
||||
|
||||
QgsNewHttpConnection nc( 0, QStringLiteral( "qgis/connections-%1/" ).arg( mServiceName.toLower() ) );
|
||||
@ -234,7 +234,7 @@ void QgsSourceSelectDialog::addEntryToServerList()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::modifyEntryOfServerList()
|
||||
void QgsArcGisServiceSourceSelect::modifyEntryOfServerList()
|
||||
{
|
||||
QgsNewHttpConnection nc( 0, QStringLiteral( "qgis/connections-%1/" ).arg( mServiceName.toLower() ), cmbConnections->currentText() );
|
||||
nc.setWindowTitle( tr( "Modify %1 connection" ).arg( mServiceName ) );
|
||||
@ -246,7 +246,7 @@ void QgsSourceSelectDialog::modifyEntryOfServerList()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::deleteEntryOfServerList()
|
||||
void QgsArcGisServiceSourceSelect::deleteEntryOfServerList()
|
||||
{
|
||||
QString msg = tr( "Are you sure you want to remove the %1 connection and all associated settings?" )
|
||||
.arg( cmbConnections->currentText() );
|
||||
@ -264,7 +264,7 @@ void QgsSourceSelectDialog::deleteEntryOfServerList()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::connectToServer()
|
||||
void QgsArcGisServiceSourceSelect::connectToServer()
|
||||
{
|
||||
bool haveLayers = false;
|
||||
btnConnect->setEnabled( false );
|
||||
@ -308,7 +308,7 @@ void QgsSourceSelectDialog::connectToServer()
|
||||
btnChangeSpatialRefSys->setEnabled( haveLayers );
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::addButtonClicked()
|
||||
void QgsArcGisServiceSourceSelect::addButtonClicked()
|
||||
{
|
||||
if ( treeView->selectionModel()->selectedRows().isEmpty() )
|
||||
{
|
||||
@ -368,7 +368,7 @@ void QgsSourceSelectDialog::addButtonClicked()
|
||||
accept();
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::changeCrs()
|
||||
void QgsArcGisServiceSourceSelect::changeCrs()
|
||||
{
|
||||
if ( mProjectionSelector->exec() )
|
||||
{
|
||||
@ -377,7 +377,7 @@ void QgsSourceSelectDialog::changeCrs()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::changeCrsFilter()
|
||||
void QgsArcGisServiceSourceSelect::changeCrsFilter()
|
||||
{
|
||||
QgsDebugMsg( "changeCRSFilter called" );
|
||||
//evaluate currently selected typename and set the CRS filter in mProjectionSelector
|
||||
@ -411,20 +411,20 @@ void QgsSourceSelectDialog::changeCrsFilter()
|
||||
}
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::on_cmbConnections_activated( int index )
|
||||
void QgsArcGisServiceSourceSelect::on_cmbConnections_activated( int index )
|
||||
{
|
||||
Q_UNUSED( index );
|
||||
QgsOwsConnection::setSelectedConnection( mServiceName, cmbConnections->currentText() );
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::treeWidgetItemDoubleClicked( const QModelIndex &index )
|
||||
void QgsArcGisServiceSourceSelect::treeWidgetItemDoubleClicked( const QModelIndex &index )
|
||||
{
|
||||
QgsDebugMsg( "double-click called" );
|
||||
QgsOwsConnection connection( mServiceName, cmbConnections->currentText() );
|
||||
buildQuery( connection, index );
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::treeWidgetCurrentRowChanged( const QModelIndex ¤t, const QModelIndex &previous )
|
||||
void QgsArcGisServiceSourceSelect::treeWidgetCurrentRowChanged( const QModelIndex ¤t, const QModelIndex &previous )
|
||||
{
|
||||
Q_UNUSED( previous )
|
||||
QgsDebugMsg( "treeWidget_currentRowChanged called" );
|
||||
@ -436,14 +436,14 @@ void QgsSourceSelectDialog::treeWidgetCurrentRowChanged( const QModelIndex &curr
|
||||
mAddButton->setEnabled( current.isValid() );
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::buildQueryButtonClicked()
|
||||
void QgsArcGisServiceSourceSelect::buildQueryButtonClicked()
|
||||
{
|
||||
QgsDebugMsg( "mBuildQueryButton click called" );
|
||||
QgsOwsConnection connection( mServiceName, cmbConnections->currentText() );
|
||||
buildQuery( connection, treeView->selectionModel()->currentIndex() );
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::filterChanged( const QString &text )
|
||||
void QgsArcGisServiceSourceSelect::filterChanged( const QString &text )
|
||||
{
|
||||
QgsDebugMsg( "FeatureType filter changed to :" + text );
|
||||
QRegExp::PatternSyntax mySyntax = QRegExp::PatternSyntax( QRegExp::RegExp );
|
||||
@ -465,7 +465,7 @@ QSize QgsSourceSelectItemDelegate::sizeHint( const QStyleOptionViewItem &option,
|
||||
return size;
|
||||
}
|
||||
|
||||
void QgsSourceSelectDialog::on_buttonBox_helpRequested() const
|
||||
void QgsArcGisServiceSourceSelect::on_buttonBox_helpRequested() const
|
||||
{
|
||||
QgsContextHelp::run( metaObject()->className() );
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
qgssourceselectdialog.h
|
||||
qgsarcgisservicesourceselect.h
|
||||
---------------------
|
||||
begin : Nov 26, 2015
|
||||
copyright : (C) 2015 by Sandro Mani
|
||||
@ -13,10 +13,10 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef QGSSOURCESELECTDIALOG_H
|
||||
#define QGSSOURCESELECTDIALOG_H
|
||||
#ifndef QGSARCGISSERVICESOURCESELECTDIALOG_H
|
||||
#define QGSARCGISSERVICESOURCESELECTDIALOG_H
|
||||
|
||||
#include "ui_qgssourceselectdialogbase.h"
|
||||
#include "ui_qgsarcgisservicesourceselectbase.h"
|
||||
#include "qgsrectangle.h"
|
||||
#include "qgscoordinatereferencesystem.h"
|
||||
|
||||
@ -30,7 +30,7 @@ class QgsOwsConnection;
|
||||
/** \ingroup gui
|
||||
* Generic class listing layers available from a remote service.
|
||||
*/
|
||||
class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSourceSelectBase
|
||||
class GUI_EXPORT QgsArcGisServiceSourceSelect : public QDialog, protected Ui::QgsArcGisServiceSourceSelectBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@ -39,9 +39,9 @@ class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSource
|
||||
enum ServiceType { MapService, FeatureService };
|
||||
|
||||
//! Constructor
|
||||
QgsSourceSelectDialog( const QString &serviceName, ServiceType serviceType, QWidget *parent, Qt::WindowFlags fl );
|
||||
QgsArcGisServiceSourceSelect( const QString &serviceName, ServiceType serviceType, QWidget *parent, Qt::WindowFlags fl );
|
||||
|
||||
~QgsSourceSelectDialog();
|
||||
~QgsArcGisServiceSourceSelect();
|
||||
//! Sets the current extent and CRS. Used to select an appropriate CRS and possibly to retrieve data only in the current extent
|
||||
void setCurrentExtentAndCrs( const QgsRectangle &canvasExtent, const QgsCoordinateReferenceSystem &canvasCrs );
|
||||
|
||||
@ -108,4 +108,4 @@ class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSource
|
||||
};
|
||||
|
||||
|
||||
#endif // QGSSOURCESELECTDIALOG_H
|
||||
#endif // QGSARCGISSERVICESOURCESELECTDIALOG_H
|
@ -23,7 +23,7 @@
|
||||
#include "qgssettings.h"
|
||||
#include "qgsproviderregistry.h"
|
||||
#include "qgsopenvectorlayerdialog.h"
|
||||
#include "qgssourceselectdialog.h"
|
||||
#include "qgsarcgisservicesourceselect.h"
|
||||
#include "qgsmapcanvas.h"
|
||||
|
||||
|
||||
@ -121,9 +121,9 @@ QgsDataSourceManagerDialog::QgsDataSourceManagerDialog( QgsMapCanvas *mapCanvas,
|
||||
|
||||
addRasterProviderDialog( QStringLiteral( "arcgismapserver" ), tr( "ArcGIS Map Server" ), QStringLiteral( "/mActionAddAmsLayer.svg" ) );
|
||||
|
||||
QgsSourceSelectDialog *afss = dynamic_cast<QgsSourceSelectDialog *>( providerDialog( QStringLiteral( "arcgisfeatureserver" ),
|
||||
tr( "ArcGIS Feature Server" ),
|
||||
QStringLiteral( "/mActionAddAfsLayer.svg" ) ) );
|
||||
QgsArcGisServiceSourceSelect *afss = dynamic_cast<QgsArcGisServiceSourceSelect *>( providerDialog( QStringLiteral( "arcgisfeatureserver" ),
|
||||
tr( "ArcGIS Feature Server" ),
|
||||
QStringLiteral( "/mActionAddAfsLayer.svg" ) ) );
|
||||
if ( afss && mMapCanvas )
|
||||
{
|
||||
afss->setCurrentExtentAndCrs( mMapCanvas->extent(), mMapCanvas->mapSettings().destinationCrs() );
|
||||
|
@ -60,7 +60,7 @@ QList<QAction *> QgsAfsRootItem::actions()
|
||||
QWidget *QgsAfsRootItem::paramWidget()
|
||||
{
|
||||
QgsAfsSourceSelect *select = new QgsAfsSourceSelect( 0, 0, QgsProviderRegistry::WidgetMode::Manager );
|
||||
connect( select, &QgsSourceSelectDialog::connectionsChanged, this, &QgsAfsRootItem::connectionsChanged );
|
||||
connect( select, &QgsArcGisServiceSourceSelect::connectionsChanged, this, &QgsAfsRootItem::connectionsChanged );
|
||||
return select;
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
QgsAfsSourceSelect::QgsAfsSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode )
|
||||
: QgsSourceSelectDialog( QStringLiteral( "ArcGisFeatureServer" ), QgsSourceSelectDialog::FeatureService, parent, fl )
|
||||
: QgsArcGisServiceSourceSelect( QStringLiteral( "ArcGisFeatureServer" ), QgsArcGisServiceSourceSelect::FeatureService, parent, fl )
|
||||
{
|
||||
if ( widgetMode == QgsProviderRegistry::WidgetMode::Embedded || widgetMode == QgsProviderRegistry::WidgetMode::Manager )
|
||||
{
|
||||
|
@ -20,11 +20,11 @@
|
||||
|
||||
#include "qgsguiutils.h"
|
||||
#include "qgsproviderregistry.h"
|
||||
#include "qgssourceselectdialog.h"
|
||||
#include "qgsarcgisservicesourceselect.h"
|
||||
|
||||
class QCheckBox;
|
||||
|
||||
class QgsAfsSourceSelect: public QgsSourceSelectDialog
|
||||
class QgsAfsSourceSelect: public QgsArcGisServiceSourceSelect
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -59,7 +59,7 @@ QList<QAction *> QgsAmsRootItem::actions()
|
||||
QWidget *QgsAmsRootItem::paramWidget()
|
||||
{
|
||||
QgsAmsSourceSelect *select = new QgsAmsSourceSelect( 0, 0, QgsProviderRegistry::WidgetMode::Manager );
|
||||
connect( select, &QgsSourceSelectDialog::connectionsChanged, this, &QgsAmsRootItem::connectionsChanged );
|
||||
connect( select, &QgsArcGisServiceSourceSelect::connectionsChanged, this, &QgsAmsRootItem::connectionsChanged );
|
||||
return select;
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
|
||||
QgsAmsSourceSelect::QgsAmsSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode )
|
||||
: QgsSourceSelectDialog( QStringLiteral( "ArcGisMapServer" ), QgsSourceSelectDialog::MapService, parent, fl )
|
||||
: QgsArcGisServiceSourceSelect( QStringLiteral( "ArcGisMapServer" ), QgsArcGisServiceSourceSelect::MapService, parent, fl )
|
||||
{
|
||||
if ( widgetMode == QgsProviderRegistry::WidgetMode::Embedded || widgetMode == QgsProviderRegistry::WidgetMode::Manager )
|
||||
{
|
||||
|
@ -18,12 +18,12 @@
|
||||
#ifndef QGSAMSSOURCESELECT_H
|
||||
#define QGSAMSSOURCESELECT_H
|
||||
|
||||
#include "qgssourceselectdialog.h"
|
||||
#include "qgsarcgisservicesourceselect.h"
|
||||
#include "qgsproviderregistry.h"
|
||||
|
||||
class QCheckBox;
|
||||
|
||||
class QgsAmsSourceSelect: public QgsSourceSelectDialog
|
||||
class QgsAmsSourceSelect: public QgsArcGisServiceSourceSelect
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QgsSourceSelectBase</class>
|
||||
<widget class="QDialog" name="QgsSourceSelectBase">
|
||||
<class>QgsArcGisServiceSourceSelectBase</class>
|
||||
<widget class="QDialog" name="QgsArcGisServiceSourceSelectBase">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
Loading…
x
Reference in New Issue
Block a user