Skip to content
Permalink
Browse files

Merge pull request #4769 from boundlessgeo/unified-button-movetogui-2

Move all app/ogr and datasource manager dialog to GUI
  • Loading branch information
elpaso committed Jul 12, 2017
2 parents 6067d51 + b6e2579 commit f66c19b9d335a88121ccb820e080e98e2560b833
@@ -61,7 +61,6 @@ SET(QGIS_APP_SRCS
qgsversioninfo.cpp
qgswelcomepageitemsmodel.cpp
qgswelcomepage.cpp
qgsdatasourcemanagerdialog.cpp

qgsmaptooladdfeature.cpp
qgsmaptooladdpart.cpp
@@ -161,11 +160,6 @@ SET(QGIS_APP_SRCS
locator/qgsinbuiltlocatorfilters.cpp
locator/qgslocatoroptionswidget.cpp

ogr/qgsogrhelperfunctions.cpp
ogr/qgsopenvectorlayerdialog.cpp
ogr/qgsnewogrconnection.cpp
ogr/qgsvectorlayersaveasdialog.cpp

gps/qgsgpsinformationwidget.cpp
gps/qgsgpsmarker.cpp

@@ -250,7 +244,6 @@ SET (QGIS_APP_MOC_HDRS
qgsversioninfo.h
qgswelcomepageitemsmodel.h
qgswelcomepage.h
qgsdatasourcemanagerdialog.h

qgsmaptooladdfeature.h
qgsmaptoolannotation.h
@@ -344,10 +337,6 @@ SET (QGIS_APP_MOC_HDRS
locator/qgsinbuiltlocatorfilters.h
locator/qgslocatoroptionswidget.h

ogr/qgsopenvectorlayerdialog.h
ogr/qgsnewogrconnection.h
ogr/qgsvectorlayersaveasdialog.h

gps/qgsgpsinformationwidget.h

openstreetmap/qgsosmdownloaddialog.h
@@ -515,6 +504,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/gui/symbology-ng
${CMAKE_SOURCE_DIR}/src/gui/attributetable
${CMAKE_SOURCE_DIR}/src/gui/auth
${CMAKE_SOURCE_DIR}/src/gui/ogr
${CMAKE_SOURCE_DIR}/src/gui/raster
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets/core
@@ -560,6 +550,7 @@ INCLUDE_DIRECTORIES(
../gui/symbology-ng
../gui/attributetable
../gui/auth
../gui/ogr
../gui/raster
../gui/editorwidgets
../gui/editorwidgets/core
@@ -568,7 +559,6 @@ INCLUDE_DIRECTORIES(
../plugins
../python
gps
ogr
openstreetmap
dwg
dwg/libdxfrw
@@ -162,6 +162,12 @@ SET(QGIS_GUI_SRCS
locator/qgslocatorfilter.cpp
locator/qgslocatorwidget.cpp

ogr/qgsopenvectorlayerdialog.cpp
ogr/qgsogrhelperfunctions.cpp
ogr/qgsnewogrconnection.cpp
ogr/qgsopenvectorlayerdialog.cpp
ogr/qgsvectorlayersaveasdialog.cpp

qgisinterface.cpp
qgsactionmenu.cpp
qgsadvanceddigitizingcanvasitem.cpp
@@ -325,6 +331,7 @@ SET(QGIS_GUI_SRCS
qgsvariableeditorwidget.cpp
qgsvertexmarker.cpp
qgsfiledownloader.cpp
qgsdatasourcemanagerdialog.cpp
)

SET(QGIS_GUI_MOC_HDRS
@@ -476,6 +483,11 @@ SET(QGIS_GUI_MOC_HDRS
qgsuserinputdockwidget.h
qgsvariableeditorwidget.h
qgsfiledownloader.h
qgsdatasourcemanagerdialog.h

ogr/qgsopenvectorlayerdialog.h
ogr/qgsnewogrconnection.h
ogr/qgsvectorlayersaveasdialog.h

raster/qgsmultibandcolorrendererwidget.h
raster/qgspalettedrendererwidget.h
@@ -666,6 +678,13 @@ SET(QGIS_GUI_HDRS
qgsbrowserdockwidget_p.h
qgsvertexmarker.h
qgsfiledownloader.h
qgsdatasourcemanagerdialog.h

ogr/qgsopenvectorlayerdialog.h
ogr/qgsogrhelperfunctions.h
ogr/qgsnewogrconnection.h
ogr/qgsvectorlayersaveasdialog.h


attributetable/qgsfeaturemodel.h

@@ -756,6 +775,7 @@ SET(QGIS_GUI_UI_HDRS
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgssqlcomposerdialogbase.h
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgssublayersdialogbase.h
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgstablewidgetuibase.h
${CMAKE_CURRENT_BINARY_DIR}/../ui/ui_qgsopenvectorlayerdialogbase.h
)

IF(ENABLE_MODELTEST)
@@ -775,6 +795,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/src/gui/layertree
${CMAKE_SOURCE_DIR}/src/gui/layout
${CMAKE_SOURCE_DIR}/src/gui/effects
${CMAKE_SOURCE_DIR}/src/gui/ogr
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/annotations
${CMAKE_SOURCE_DIR}/src/core/auth
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -489,5 +489,3 @@ void QgsOpenVectorLayerDialog::on_cmbConnections_currentIndexChanged( const QStr
setSelectedConnection();
}
//********************end auto connected slots *****************/


File renamed without changes.
File renamed without changes.
@@ -23,14 +23,14 @@
#include "qgshelp.h"
#include "qgsfields.h"
#include "qgsvectorfilewriter.h"
#include "qgis_app.h"
#include "qgis_gui.h"

class QgsVectorLayer;

/**
* Class to select destination file, type and CRS for ogr layers
*/
class APP_EXPORT QgsVectorLayerSaveAsDialog : public QDialog, private Ui::QgsVectorLayerSaveAsDialogBase
class GUI_EXPORT QgsVectorLayerSaveAsDialog : public QDialog, private Ui::QgsVectorLayerSaveAsDialogBase
{
Q_OBJECT

File renamed without changes.
@@ -23,6 +23,7 @@
#include "qgsguiutils.h"
#include "qgsmimedatautils.h"
#include "qgshelp.h"
#include "qgis_gui.h"

class QgsBrowserDockWidget;
class QgsRasterLayer;
@@ -33,11 +34,25 @@ namespace Ui
class QgsDataSourceManagerDialog;
}

class QgsDataSourceManagerDialog : public QgsOptionsDialogBase
/** \ingroup gui
* The QgsDataSourceManagerDialog class embeds the browser panel and all
* the provider dialogs.
* The dialog does not handle layer addition directly but emits signals that
* need to be forwarded to the QGIS application to be handled.
* \since QGIS 3.0
* @note not available in Python bindings
*/
class GUI_EXPORT QgsDataSourceManagerDialog : public QgsOptionsDialogBase
{
Q_OBJECT

public:

/** QgsDataSourceManagerDialog constructor
* @param mapCanvas the map canvas
* @param parent the object
* @param fl window flags
*/
explicit QgsDataSourceManagerDialog( QgsMapCanvas *mapCanvas, QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
~QgsDataSourceManagerDialog();

@@ -53,25 +68,35 @@ class QgsDataSourceManagerDialog : public QgsOptionsDialogBase
//! Sync current page with the leftbar list
void setCurrentPage( int index );

//! For signal forwarding to QgisApp
//! A raster layer was added: for signal forwarding to QgisApp
void rasterLayerAdded( QString const &uri, QString const &baseName, QString const &providerKey );
//! A vector layer was added: for signal forwarding to QgisApp
void vectorLayerAdded( const QString &vectorLayerPath, const QString &baseName, const QString &providerKey );
//! One or more vector layer were added: for signal forwarding to QgisApp
void vectorLayersAdded( const QStringList &layerQStringList, const QString &enc, const QString &dataSourceType );
//! Reset current page to previously selected page
void setPreviousPage();

signals:
//! For signal forwarding to QgisApp
//! Emitted when a raster layer was selected for addition: for signal forwarding to QgisApp
void addRasterLayer( QString const &uri, QString const &baseName, QString const &providerKey );
//! Emitted when the user wants to select a raster layer: for signal forwarding to QgisApp
void addRasterLayer( );
//! Emitted when a vector layer was selected for addition: for signal forwarding to QgisApp
void addVectorLayer( const QString &vectorLayerPath, const QString &baseName, const QString &providerKey );
//! Replace the selected layer by a vector layer defined by uri, layer name, data source uri
void replaceSelectedVectorLayer( const QString &oldId, const QString &uri, const QString &layerName, const QString &provider );
//! Emitted when a WFS layer was selected for addition: for signal forwarding to QgisApp
void addWfsLayer( const QString &uri, const QString &typeName );
//! Emitted when a AFS layer was selected for addition: for signal forwarding to QgisApp
void addAfsLayer( const QString &uri, const QString &typeName );
//! Emitted when a one or more layer were selected for addition: for signal forwarding to QgisApp
void addVectorLayers( const QStringList &layerQStringList, const QString &enc, const QString &dataSourceType );
//! Emitted when the dialog is busy: for signal forwarding to QgisApp
void showProgress( int progress, int totalSteps );
//! Emitted when a status message needs to be shown: for signal forwarding to QgisApp
void showStatusMessage( const QString &message );
//! Emitted when a DB layer was selected for addition: for signal forwarding to QgisApp
void addDatabaseLayers( QStringList const &layerPathList, QString const &providerKey );
//! Emitted when a file needs to be opened
void openFile( const QString & );

0 comments on commit f66c19b

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