Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
enable XYZ connections export/import
  • Loading branch information
alexbruy committed Apr 14, 2020
1 parent 079dae3 commit b5ecf09
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/providers/wms/qgsxyzsourceselect.cpp
Expand Up @@ -17,10 +17,12 @@

#include "qgshelp.h"
#include "qgsgui.h"
#include "qgsmanageconnectionsdialog.h"
#include "qgsxyzsourceselect.h"
#include "qgsxyzconnection.h"
#include "qgsxyzconnectiondialog.h"

#include <QFileDialog>
#include <QMessageBox>

QgsXyzSourceSelect::QgsXyzSourceSelect( QWidget *parent, Qt::WindowFlags fl, QgsProviderRegistry::WidgetMode theWidgetMode )
Expand Down Expand Up @@ -80,10 +82,22 @@ void QgsXyzSourceSelect::btnDelete_clicked()

void QgsXyzSourceSelect::btnSave_clicked()
{
QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Export, QgsManageConnectionsDialog::XyzTiles );
dlg.exec();
}

void QgsXyzSourceSelect::btnLoad_clicked()
{
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load Connections" ), QDir::homePath(),
tr( "XML files (*.xml *.XML)" ) );
if ( fileName.isEmpty() )
{
return;
}

QgsManageConnectionsDialog dlg( this, QgsManageConnectionsDialog::Import, QgsManageConnectionsDialog::XyzTiles, fileName );
dlg.exec();
populateConnectionList();
}

void QgsXyzSourceSelect::addButtonClicked()
Expand Down

0 comments on commit b5ecf09

Please sign in to comment.