Skip to content

Commit 7bb797f

Browse files
committedJul 18, 2017
Renamed QgsSourceSelectDialog to QgsArcGisServiceSourceSelect
1 parent bc516cf commit 7bb797f

14 files changed

+147
-61
lines changed
 

‎python/gui/gui_auto.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
%Include qgsoptionswidgetfactory.sip
159159
%Include qgsorderbydialog.sip
160160
%Include qgsowssourceselect.sip
161-
%Include qgssourceselectdialog.sip
161+
%Include qgsarcgisservicesourceselect.sip
162162
%Include qgspanelwidget.sip
163163
%Include qgspanelwidgetstack.sip
164164
%Include qgspasswordlineedit.sip
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/gui/qgsarcgisservicesourceselect.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
12+
13+
class QgsArcGisServiceSourceSelect : QDialog, protected Ui::QgsArcGisServiceSourceSelectBase
14+
{
15+
%Docstring
16+
Generic class listing layers available from a remote service.
17+
%End
18+
19+
%TypeHeaderCode
20+
#include "qgsarcgisservicesourceselect.h"
21+
%End
22+
public:
23+
enum ServiceType { MapService, FeatureService };
24+
25+
QgsArcGisServiceSourceSelect( const QString &serviceName, ServiceType serviceType, QWidget *parent, Qt::WindowFlags fl );
26+
%Docstring
27+
Constructor
28+
%End
29+
30+
~QgsArcGisServiceSourceSelect();
31+
void setCurrentExtentAndCrs( const QgsRectangle &canvasExtent, const QgsCoordinateReferenceSystem &canvasCrs );
32+
%Docstring
33+
Sets the current extent and CRS. Used to select an appropriate CRS and possibly to retrieve data only in the current extent
34+
%End
35+
36+
signals:
37+
void addLayer( QString uri, QString typeName );
38+
%Docstring
39+
Emitted when a layer is added from the dialog
40+
%End
41+
void connectionsChanged();
42+
%Docstring
43+
Emitted when the connections for the service were changed
44+
%End
45+
46+
protected:
47+
48+
virtual bool connectToService( const QgsOwsConnection &connection ) = 0;
49+
%Docstring
50+
To be implemented in the child class. Called when a new connection is initiated.
51+
:rtype: bool
52+
%End
53+
virtual void buildQuery( const QgsOwsConnection &, const QModelIndex & );
54+
%Docstring
55+
May be implemented in child classes for services which support customized queries.
56+
%End
57+
virtual QString getLayerURI( const QgsOwsConnection &connection,
58+
const QString &layerTitle,
59+
const QString &layerName,
60+
const QString &crs = QString(),
61+
const QString &filter = QString(),
62+
const QgsRectangle &bBox = QgsRectangle() ) const = 0;
63+
%Docstring
64+
To be implemented in the child class. Constructs an URI for the specified service layer.
65+
:rtype: str
66+
%End
67+
void populateImageEncodings( const QStringList &availableEncodings );
68+
%Docstring
69+
Updates the UI for the list of available image encodings from the specified list.
70+
%End
71+
QString getSelectedImageEncoding() const;
72+
%Docstring
73+
Returns the selected image encoding.
74+
:rtype: str
75+
%End
76+
77+
};
78+
79+
80+
/************************************************************************
81+
* This file has been generated automatically from *
82+
* *
83+
* src/gui/qgsarcgisservicesourceselect.h *
84+
* *
85+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
86+
************************************************************************/

‎src/app/qgisapp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Q_GUI_EXPORT extern int qt_defaultDpiX();
247247
#include "qgsshortcutsmanager.h"
248248
#include "qgssinglebandgrayrenderer.h"
249249
#include "qgssnappingwidget.h"
250-
#include "qgssourceselectdialog.h"
250+
#include "qgsarcgisservicesourceselect.h"
251251
#include "qgsstatisticalsummarydockwidget.h"
252252
#include "qgsstatusbar.h"
253253
#include "qgsstatusbarcoordinateswidget.h"

‎src/gui/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ SET(QGIS_GUI_SRCS
302302
qgsoptionsdialogbase.cpp
303303
qgsorderbydialog.cpp
304304
qgsowssourceselect.cpp
305-
qgssourceselectdialog.cpp
305+
qgsarcgisservicesourceselect.cpp
306306
qgspanelwidget.cpp
307307
qgspanelwidgetstack.cpp
308308
qgspasswordlineedit.cpp
@@ -458,7 +458,7 @@ SET(QGIS_GUI_MOC_HDRS
458458
qgsoptionswidgetfactory.h
459459
qgsorderbydialog.h
460460
qgsowssourceselect.h
461-
qgssourceselectdialog.h
461+
qgsarcgisservicesourceselect.h
462462
qgspanelwidget.h
463463
qgspanelwidgetstack.h
464464
qgspasswordlineedit.h
@@ -499,11 +499,11 @@ SET(QGIS_GUI_MOC_HDRS
499499
qgsvariableeditorwidget.h
500500
qgsfiledownloader.h
501501
qgsdatasourcemanagerdialog.h
502+
qgssourceselect.h
502503

503504
ogr/qgsopenvectorlayerdialog.h
504505
ogr/qgsnewogrconnection.h
505506
ogr/qgsvectorlayersaveasdialog.h
506-
qgssourceselect.h
507507

508508
raster/qgsmultibandcolorrendererwidget.h
509509
raster/qgspalettedrendererwidget.h
@@ -706,14 +706,13 @@ SET(QGIS_GUI_HDRS
706706
qgsvertexmarker.h
707707
qgsfiledownloader.h
708708
qgsdatasourcemanagerdialog.h
709+
qgssourceselect.h
709710

710711
ogr/qgsopenvectorlayerdialog.h
711712
ogr/qgsogrhelperfunctions.h
712713
ogr/qgsnewogrconnection.h
713714
ogr/qgsvectorlayersaveasdialog.h
714715

715-
qgssourceselect.h
716-
717716
attributetable/qgsfeaturemodel.h
718717

719718
auth/qgsauthauthoritieseditor.h
@@ -801,6 +800,7 @@ SET(QGIS_GUI_UI_HDRS
801800
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsmessagelogviewer.h
802801
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsmessageviewer.h
803802
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsowssourceselectbase.h
803+
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsarcgisservicesourceselectbase.h
804804
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsprojectionselectorbase.h
805805
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsquerybuilderbase.h
806806
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgssqlcomposerdialogbase.h

‎src/gui/qgssourceselectdialog.cpp renamed to ‎src/gui/qgsarcgisservicesourceselect.cpp

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
qgssourceselectdialog.cpp
2+
qgsarcgisservicesourceselect.cpp
33
-------------------------
44
begin : Nov 26, 2015
55
copyright : (C) 2015 by Sandro Mani
@@ -15,7 +15,7 @@
1515
* *
1616
***************************************************************************/
1717

18-
#include "qgssourceselectdialog.h"
18+
#include "qgsarcgisservicesourceselect.h"
1919
#include "qgsowsconnection.h"
2020
#include "qgsnewhttpconnection.h"
2121
#include "qgsprojectionselectiondialog.h"
@@ -49,7 +49,7 @@ class QgsSourceSelectItemDelegate : public QItemDelegate
4949
};
5050

5151

52-
QgsSourceSelectDialog::QgsSourceSelectDialog( const QString &serviceName, ServiceType serviceType, QWidget *parent, Qt::WindowFlags fl )
52+
QgsArcGisServiceSourceSelect::QgsArcGisServiceSourceSelect( const QString &serviceName, ServiceType serviceType, QWidget *parent, Qt::WindowFlags fl )
5353
: QDialog( parent, fl ),
5454
mServiceName( serviceName ),
5555
mServiceType( serviceType ),
@@ -61,22 +61,22 @@ QgsSourceSelectDialog::QgsSourceSelectDialog( const QString &serviceName, Servic
6161

6262
mAddButton = buttonBox->addButton( tr( "&Add" ), QDialogButtonBox::ActionRole );
6363
mAddButton->setEnabled( false );
64-
connect( mAddButton, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::addButtonClicked );
64+
connect( mAddButton, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::addButtonClicked );
6565

6666
if ( mServiceType == FeatureService )
6767
{
6868
mBuildQueryButton = buttonBox->addButton( tr( "&Build query" ), QDialogButtonBox::ActionRole );
6969
mBuildQueryButton->setDisabled( true );
70-
connect( mBuildQueryButton, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::buildQueryButtonClicked );
70+
connect( mBuildQueryButton, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::buildQueryButtonClicked );
7171
}
7272

7373
connect( buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
74-
connect( btnNew, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::addEntryToServerList );
75-
connect( btnEdit, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::modifyEntryOfServerList );
76-
connect( btnDelete, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::deleteEntryOfServerList );
77-
connect( btnConnect, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::connectToServer );
78-
connect( btnChangeSpatialRefSys, &QAbstractButton::clicked, this, &QgsSourceSelectDialog::changeCrs );
79-
connect( lineFilter, &QLineEdit::textChanged, this, &QgsSourceSelectDialog::filterChanged );
74+
connect( btnNew, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::addEntryToServerList );
75+
connect( btnEdit, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::modifyEntryOfServerList );
76+
connect( btnDelete, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::deleteEntryOfServerList );
77+
connect( btnConnect, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::connectToServer );
78+
connect( btnChangeSpatialRefSys, &QAbstractButton::clicked, this, &QgsArcGisServiceSourceSelect::changeCrs );
79+
connect( lineFilter, &QLineEdit::textChanged, this, &QgsArcGisServiceSourceSelect::filterChanged );
8080
populateConnectionList();
8181
mProjectionSelector = new QgsProjectionSelectionDialog( this );
8282
mProjectionSelector->setMessage( QString() );
@@ -108,11 +108,11 @@ QgsSourceSelectDialog::QgsSourceSelectDialog( const QString &serviceName, Servic
108108
mModelProxy->setSortCaseSensitivity( Qt::CaseInsensitive );
109109
treeView->setModel( mModelProxy );
110110

111-
connect( treeView, &QAbstractItemView::doubleClicked, this, &QgsSourceSelectDialog::treeWidgetItemDoubleClicked );
112-
connect( treeView->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &QgsSourceSelectDialog::treeWidgetCurrentRowChanged );
111+
connect( treeView, &QAbstractItemView::doubleClicked, this, &QgsArcGisServiceSourceSelect::treeWidgetItemDoubleClicked );
112+
connect( treeView->selectionModel(), &QItemSelectionModel::currentRowChanged, this, &QgsArcGisServiceSourceSelect::treeWidgetCurrentRowChanged );
113113
}
114114

115-
QgsSourceSelectDialog::~QgsSourceSelectDialog()
115+
QgsArcGisServiceSourceSelect::~QgsArcGisServiceSourceSelect()
116116
{
117117
QgsSettings settings;
118118
settings.setValue( QStringLiteral( "Windows/SourceSelectDialog/geometry" ), saveGeometry() );
@@ -123,13 +123,13 @@ QgsSourceSelectDialog::~QgsSourceSelectDialog()
123123
delete mModelProxy;
124124
}
125125

126-
void QgsSourceSelectDialog::setCurrentExtentAndCrs( const QgsRectangle &canvasExtent, const QgsCoordinateReferenceSystem &canvasCrs )
126+
void QgsArcGisServiceSourceSelect::setCurrentExtentAndCrs( const QgsRectangle &canvasExtent, const QgsCoordinateReferenceSystem &canvasCrs )
127127
{
128128
mCanvasExtent = canvasExtent;
129129
mCanvasCrs = canvasCrs;
130130
}
131131

132-
void QgsSourceSelectDialog::populateImageEncodings( const QStringList &availableEncodings )
132+
void QgsArcGisServiceSourceSelect::populateImageEncodings( const QStringList &availableEncodings )
133133
{
134134
QLayoutItem *item = nullptr;
135135
while ( ( item = gbImageEncoding->layout()->takeAt( 0 ) ) != nullptr )
@@ -162,12 +162,12 @@ void QgsSourceSelectDialog::populateImageEncodings( const QStringList &available
162162
}
163163
}
164164

165-
QString QgsSourceSelectDialog::getSelectedImageEncoding() const
165+
QString QgsArcGisServiceSourceSelect::getSelectedImageEncoding() const
166166
{
167167
return mImageEncodingGroup ? mImageEncodingGroup->checkedButton()->text() : QString();
168168
}
169169

170-
void QgsSourceSelectDialog::populateConnectionList()
170+
void QgsArcGisServiceSourceSelect::populateConnectionList()
171171
{
172172
QStringList conns = QgsOwsConnection::connectionList( mServiceName );
173173
cmbConnections->clear();
@@ -190,7 +190,7 @@ void QgsSourceSelectDialog::populateConnectionList()
190190
}
191191
}
192192

193-
QString QgsSourceSelectDialog::getPreferredCrs( const QSet<QString> &crsSet ) const
193+
QString QgsArcGisServiceSourceSelect::getPreferredCrs( const QSet<QString> &crsSet ) const
194194
{
195195
if ( crsSet.size() < 1 )
196196
{
@@ -221,7 +221,7 @@ QString QgsSourceSelectDialog::getPreferredCrs( const QSet<QString> &crsSet ) co
221221
return *( crsSet.constBegin() );
222222
}
223223

224-
void QgsSourceSelectDialog::addEntryToServerList()
224+
void QgsArcGisServiceSourceSelect::addEntryToServerList()
225225
{
226226

227227
QgsNewHttpConnection nc( 0, QStringLiteral( "qgis/connections-%1/" ).arg( mServiceName.toLower() ) );
@@ -234,7 +234,7 @@ void QgsSourceSelectDialog::addEntryToServerList()
234234
}
235235
}
236236

237-
void QgsSourceSelectDialog::modifyEntryOfServerList()
237+
void QgsArcGisServiceSourceSelect::modifyEntryOfServerList()
238238
{
239239
QgsNewHttpConnection nc( 0, QStringLiteral( "qgis/connections-%1/" ).arg( mServiceName.toLower() ), cmbConnections->currentText() );
240240
nc.setWindowTitle( tr( "Modify %1 connection" ).arg( mServiceName ) );
@@ -246,7 +246,7 @@ void QgsSourceSelectDialog::modifyEntryOfServerList()
246246
}
247247
}
248248

249-
void QgsSourceSelectDialog::deleteEntryOfServerList()
249+
void QgsArcGisServiceSourceSelect::deleteEntryOfServerList()
250250
{
251251
QString msg = tr( "Are you sure you want to remove the %1 connection and all associated settings?" )
252252
.arg( cmbConnections->currentText() );
@@ -264,7 +264,7 @@ void QgsSourceSelectDialog::deleteEntryOfServerList()
264264
}
265265
}
266266

267-
void QgsSourceSelectDialog::connectToServer()
267+
void QgsArcGisServiceSourceSelect::connectToServer()
268268
{
269269
bool haveLayers = false;
270270
btnConnect->setEnabled( false );
@@ -308,7 +308,7 @@ void QgsSourceSelectDialog::connectToServer()
308308
btnChangeSpatialRefSys->setEnabled( haveLayers );
309309
}
310310

311-
void QgsSourceSelectDialog::addButtonClicked()
311+
void QgsArcGisServiceSourceSelect::addButtonClicked()
312312
{
313313
if ( treeView->selectionModel()->selectedRows().isEmpty() )
314314
{
@@ -368,7 +368,7 @@ void QgsSourceSelectDialog::addButtonClicked()
368368
accept();
369369
}
370370

371-
void QgsSourceSelectDialog::changeCrs()
371+
void QgsArcGisServiceSourceSelect::changeCrs()
372372
{
373373
if ( mProjectionSelector->exec() )
374374
{
@@ -377,7 +377,7 @@ void QgsSourceSelectDialog::changeCrs()
377377
}
378378
}
379379

380-
void QgsSourceSelectDialog::changeCrsFilter()
380+
void QgsArcGisServiceSourceSelect::changeCrsFilter()
381381
{
382382
QgsDebugMsg( "changeCRSFilter called" );
383383
//evaluate currently selected typename and set the CRS filter in mProjectionSelector
@@ -411,20 +411,20 @@ void QgsSourceSelectDialog::changeCrsFilter()
411411
}
412412
}
413413

414-
void QgsSourceSelectDialog::on_cmbConnections_activated( int index )
414+
void QgsArcGisServiceSourceSelect::on_cmbConnections_activated( int index )
415415
{
416416
Q_UNUSED( index );
417417
QgsOwsConnection::setSelectedConnection( mServiceName, cmbConnections->currentText() );
418418
}
419419

420-
void QgsSourceSelectDialog::treeWidgetItemDoubleClicked( const QModelIndex &index )
420+
void QgsArcGisServiceSourceSelect::treeWidgetItemDoubleClicked( const QModelIndex &index )
421421
{
422422
QgsDebugMsg( "double-click called" );
423423
QgsOwsConnection connection( mServiceName, cmbConnections->currentText() );
424424
buildQuery( connection, index );
425425
}
426426

427-
void QgsSourceSelectDialog::treeWidgetCurrentRowChanged( const QModelIndex &current, const QModelIndex &previous )
427+
void QgsArcGisServiceSourceSelect::treeWidgetCurrentRowChanged( const QModelIndex &current, const QModelIndex &previous )
428428
{
429429
Q_UNUSED( previous )
430430
QgsDebugMsg( "treeWidget_currentRowChanged called" );
@@ -436,14 +436,14 @@ void QgsSourceSelectDialog::treeWidgetCurrentRowChanged( const QModelIndex &curr
436436
mAddButton->setEnabled( current.isValid() );
437437
}
438438

439-
void QgsSourceSelectDialog::buildQueryButtonClicked()
439+
void QgsArcGisServiceSourceSelect::buildQueryButtonClicked()
440440
{
441441
QgsDebugMsg( "mBuildQueryButton click called" );
442442
QgsOwsConnection connection( mServiceName, cmbConnections->currentText() );
443443
buildQuery( connection, treeView->selectionModel()->currentIndex() );
444444
}
445445

446-
void QgsSourceSelectDialog::filterChanged( const QString &text )
446+
void QgsArcGisServiceSourceSelect::filterChanged( const QString &text )
447447
{
448448
QgsDebugMsg( "FeatureType filter changed to :" + text );
449449
QRegExp::PatternSyntax mySyntax = QRegExp::PatternSyntax( QRegExp::RegExp );
@@ -465,7 +465,7 @@ QSize QgsSourceSelectItemDelegate::sizeHint( const QStyleOptionViewItem &option,
465465
return size;
466466
}
467467

468-
void QgsSourceSelectDialog::on_buttonBox_helpRequested() const
468+
void QgsArcGisServiceSourceSelect::on_buttonBox_helpRequested() const
469469
{
470470
QgsContextHelp::run( metaObject()->className() );
471471
}

‎src/gui/qgssourceselectdialog.h renamed to ‎src/gui/qgsarcgisservicesourceselect.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/***************************************************************************
2-
qgssourceselectdialog.h
2+
qgsarcgisservicesourceselect.h
33
---------------------
44
begin : Nov 26, 2015
55
copyright : (C) 2015 by Sandro Mani
@@ -13,10 +13,10 @@
1313
* *
1414
***************************************************************************/
1515

16-
#ifndef QGSSOURCESELECTDIALOG_H
17-
#define QGSSOURCESELECTDIALOG_H
16+
#ifndef QGSARCGISSERVICESOURCESELECTDIALOG_H
17+
#define QGSARCGISSERVICESOURCESELECTDIALOG_H
1818

19-
#include "ui_qgssourceselectdialogbase.h"
19+
#include "ui_qgsarcgisservicesourceselectbase.h"
2020
#include "qgsrectangle.h"
2121
#include "qgscoordinatereferencesystem.h"
2222

@@ -30,7 +30,7 @@ class QgsOwsConnection;
3030
/** \ingroup gui
3131
* Generic class listing layers available from a remote service.
3232
*/
33-
class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSourceSelectBase
33+
class GUI_EXPORT QgsArcGisServiceSourceSelect : public QDialog, protected Ui::QgsArcGisServiceSourceSelectBase
3434
{
3535
Q_OBJECT
3636

@@ -39,9 +39,9 @@ class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSource
3939
enum ServiceType { MapService, FeatureService };
4040

4141
//! Constructor
42-
QgsSourceSelectDialog( const QString &serviceName, ServiceType serviceType, QWidget *parent, Qt::WindowFlags fl );
42+
QgsArcGisServiceSourceSelect( const QString &serviceName, ServiceType serviceType, QWidget *parent, Qt::WindowFlags fl );
4343

44-
~QgsSourceSelectDialog();
44+
~QgsArcGisServiceSourceSelect();
4545
//! Sets the current extent and CRS. Used to select an appropriate CRS and possibly to retrieve data only in the current extent
4646
void setCurrentExtentAndCrs( const QgsRectangle &canvasExtent, const QgsCoordinateReferenceSystem &canvasCrs );
4747

@@ -108,4 +108,4 @@ class GUI_EXPORT QgsSourceSelectDialog : public QDialog, protected Ui::QgsSource
108108
};
109109

110110

111-
#endif // QGSSOURCESELECTDIALOG_H
111+
#endif // QGSARCGISSERVICESOURCESELECTDIALOG_H

‎src/gui/qgsdatasourcemanagerdialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "qgssettings.h"
2424
#include "qgsproviderregistry.h"
2525
#include "qgsopenvectorlayerdialog.h"
26-
#include "qgssourceselectdialog.h"
26+
#include "qgsarcgisservicesourceselect.h"
2727
#include "qgsmapcanvas.h"
2828

2929

@@ -121,9 +121,9 @@ QgsDataSourceManagerDialog::QgsDataSourceManagerDialog( QgsMapCanvas *mapCanvas,
121121

122122
addRasterProviderDialog( QStringLiteral( "arcgismapserver" ), tr( "ArcGIS Map Server" ), QStringLiteral( "/mActionAddAmsLayer.svg" ) );
123123

124-
QgsSourceSelectDialog *afss = dynamic_cast<QgsSourceSelectDialog *>( providerDialog( QStringLiteral( "arcgisfeatureserver" ),
125-
tr( "ArcGIS Feature Server" ),
126-
QStringLiteral( "/mActionAddAfsLayer.svg" ) ) );
124+
QgsArcGisServiceSourceSelect *afss = dynamic_cast<QgsArcGisServiceSourceSelect *>( providerDialog( QStringLiteral( "arcgisfeatureserver" ),
125+
tr( "ArcGIS Feature Server" ),
126+
QStringLiteral( "/mActionAddAfsLayer.svg" ) ) );
127127
if ( afss && mMapCanvas )
128128
{
129129
afss->setCurrentExtentAndCrs( mMapCanvas->extent(), mMapCanvas->mapSettings().destinationCrs() );

‎src/providers/arcgisrest/qgsafsdataitems.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ QList<QAction *> QgsAfsRootItem::actions()
6060
QWidget *QgsAfsRootItem::paramWidget()
6161
{
6262
QgsAfsSourceSelect *select = new QgsAfsSourceSelect( 0, 0, QgsProviderRegistry::WidgetMode::Manager );
63-
connect( select, &QgsSourceSelectDialog::connectionsChanged, this, &QgsAfsRootItem::connectionsChanged );
63+
connect( select, &QgsArcGisServiceSourceSelect::connectionsChanged, this, &QgsAfsRootItem::connectionsChanged );
6464
return select;
6565
}
6666

‎src/providers/arcgisrest/qgsafssourceselect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828

2929
QgsAfsSourceSelect::QgsAfsSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode )
30-
: QgsSourceSelectDialog( QStringLiteral( "ArcGisFeatureServer" ), QgsSourceSelectDialog::FeatureService, parent, fl )
30+
: QgsArcGisServiceSourceSelect( QStringLiteral( "ArcGisFeatureServer" ), QgsArcGisServiceSourceSelect::FeatureService, parent, fl )
3131
{
3232
if ( widgetMode == QgsProviderRegistry::WidgetMode::Embedded || widgetMode == QgsProviderRegistry::WidgetMode::Manager )
3333
{

‎src/providers/arcgisrest/qgsafssourceselect.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
#include "qgsguiutils.h"
2222
#include "qgsproviderregistry.h"
23-
#include "qgssourceselectdialog.h"
23+
#include "qgsarcgisservicesourceselect.h"
2424

2525
class QCheckBox;
2626

27-
class QgsAfsSourceSelect: public QgsSourceSelectDialog
27+
class QgsAfsSourceSelect: public QgsArcGisServiceSourceSelect
2828
{
2929
Q_OBJECT
3030

‎src/providers/arcgisrest/qgsamsdataitems.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ QList<QAction *> QgsAmsRootItem::actions()
5959
QWidget *QgsAmsRootItem::paramWidget()
6060
{
6161
QgsAmsSourceSelect *select = new QgsAmsSourceSelect( 0, 0, QgsProviderRegistry::WidgetMode::Manager );
62-
connect( select, &QgsSourceSelectDialog::connectionsChanged, this, &QgsAmsRootItem::connectionsChanged );
62+
connect( select, &QgsArcGisServiceSourceSelect::connectionsChanged, this, &QgsAmsRootItem::connectionsChanged );
6363
return select;
6464
}
6565

‎src/providers/arcgisrest/qgsamssourceselect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
QgsAmsSourceSelect::QgsAmsSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode widgetMode )
29-
: QgsSourceSelectDialog( QStringLiteral( "ArcGisMapServer" ), QgsSourceSelectDialog::MapService, parent, fl )
29+
: QgsArcGisServiceSourceSelect( QStringLiteral( "ArcGisMapServer" ), QgsArcGisServiceSourceSelect::MapService, parent, fl )
3030
{
3131
if ( widgetMode == QgsProviderRegistry::WidgetMode::Embedded || widgetMode == QgsProviderRegistry::WidgetMode::Manager )
3232
{

‎src/providers/arcgisrest/qgsamssourceselect.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
#ifndef QGSAMSSOURCESELECT_H
1919
#define QGSAMSSOURCESELECT_H
2020

21-
#include "qgssourceselectdialog.h"
21+
#include "qgsarcgisservicesourceselect.h"
2222
#include "qgsproviderregistry.h"
2323

2424
class QCheckBox;
2525

26-
class QgsAmsSourceSelect: public QgsSourceSelectDialog
26+
class QgsAmsSourceSelect: public QgsArcGisServiceSourceSelect
2727
{
2828
Q_OBJECT
2929

‎src/ui/qgssourceselectdialogbase.ui renamed to ‎src/ui/qgsarcgisservicesourceselectbase.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<ui version="4.0">
3-
<class>QgsSourceSelectBase</class>
4-
<widget class="QDialog" name="QgsSourceSelectBase">
3+
<class>QgsArcGisServiceSourceSelectBase</class>
4+
<widget class="QDialog" name="QgsArcGisServiceSourceSelectBase">
55
<property name="geometry">
66
<rect>
77
<x>0</x>

0 commit comments

Comments
 (0)
Please sign in to comment.