Skip to content
Permalink
Browse files
Move wfs gui to provider. Remove wfs plugin.
  • Loading branch information
wonder-sk committed Oct 11, 2011
1 parent a561a4a commit d1c05db202df6a90769ac2f1302163a5184c7d0a
@@ -345,14 +345,14 @@
<file>themes/gis/plugins/quick_print.png</file>
<file>themes/gis/plugins/scale_bar.png</file>
<file>themes/gis/plugins/spit.png</file>
<file>themes/gis/plugins/wfs.png</file>
<file>splash/splash.png</file>
<file>north_arrows/default.png</file>
<file>themes/default/locked.png</file>
<file>themes/default/unlocked.png</file>
<file>themes/default/plugins/copyright_label.png</file>
<file>themes/default/plugins/north_arrow.png</file>
<file>themes/default/plugins/scale_bar.png</file>
<file>themes/default/mActionAddWfsLayer.png</file>
</qresource>
<qresource prefix="/images/tips">
<file alias="symbol_levels.png">qgis_tips/symbol_levels.png</file>
File renamed without changes.
Binary file not shown.
@@ -836,6 +836,7 @@ void QgisApp::createActions()
connect( mActionAddPgLayer, SIGNAL( triggered() ), this, SLOT( addDatabaseLayer() ) );
connect( mActionAddSpatiaLiteLayer, SIGNAL( triggered() ), this, SLOT( addSpatiaLiteLayer() ) );
connect( mActionAddWmsLayer, SIGNAL( triggered() ), this, SLOT( addWmsLayer() ) );
connect( mActionAddWfsLayer, SIGNAL( triggered() ), this, SLOT( addWfsLayer() ) );
connect( mActionOpenTable, SIGNAL( triggered() ), this, SLOT( attributeTable() ) );
connect( mActionToggleEditing, SIGNAL( triggered() ), this, SLOT( toggleEditing() ) );
connect( mActionSaveEdits, SIGNAL( triggered() ), this, SLOT( saveEdits() ) );
@@ -1468,6 +1469,7 @@ void QgisApp::setTheme( QString theThemeName )
mActionNewBookmark->setIcon( getThemeIcon( "/mActionNewBookmark.png" ) );
mActionCustomProjection->setIcon( getThemeIcon( "/mActionCustomProjection.png" ) );
mActionAddWmsLayer->setIcon( getThemeIcon( "/mActionAddWmsLayer.png" ) );
mActionAddWfsLayer->setIcon( getThemeIcon( "/mActionAddWfsLayer.png" ) );
mActionAddToOverview->setIcon( getThemeIcon( "/mActionInOverview.png" ) );
mActionAnnotation->setIcon( getThemeIcon( "/mActionAnnotation.png" ) );
mActionFormAnnotation->setIcon( getThemeIcon( "/mActionFormAnnotation.png" ) );
@@ -2427,6 +2429,36 @@ void QgisApp::addWmsLayer()
delete wmss;
}

void QgisApp::addWfsLayer()
{
if ( mMapCanvas && mMapCanvas->isDrawing() )
{
return;
}
// Fudge for now
QgsDebugMsg( "about to addWfsLayer" );

// TODO: QDialog for now, switch to QWidget in future
QDialog *wfss = dynamic_cast<QDialog*>( QgsProviderRegistry::instance()->selectWidget( QString( "WFS" ), this ) );
if ( !wfss )
{
QMessageBox::warning( this, tr( "WFS" ), tr( "Cannot get WFS select dialog from provider." ) );
return;
}
connect( wfss , SIGNAL( addWfsLayer( QString, QString ) ),
this , SLOT( addWfsLayer( QString, QString ) ) );

wfss->exec();
delete wfss;
}

void QgisApp::addWfsLayer( QString uri, QString typeName )
{
// TODO: this should be eventually moved to a more reasonable place
addVectorLayer( uri, typeName, "WFS" );
}


void QgisApp::fileExit()
{
if ( mMapCanvas && mMapCanvas->isDrawing() )
@@ -260,6 +260,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
QAction *actionAddPgLayer() { return mActionAddPgLayer; }
QAction *actionAddSpatiaLiteLayer() { return mActionAddSpatiaLiteLayer; };
QAction *actionAddWmsLayer() { return mActionAddWmsLayer; }
QAction *actionAddWfsLayer() { return mActionAddWfsLayer; }
QAction *actionOpenTable() { return mActionOpenTable; }
QAction *actionToggleEditing() { return mActionToggleEditing; }
QAction *actionSaveEdits() { return mActionSaveEdits; }
@@ -435,6 +436,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
QString const & format,
QString const & crs );

void addWfsLayer( QString uri, QString typeName );

void versionReplyFinished();

protected:
@@ -689,6 +692,8 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
void fileExit();
//! Add a WMS layer to the map
void addWmsLayer();
//! Add a WFS layer to the map
void addWfsLayer();
//! Set map tool to Zoom out
void zoomOut();
//! Set map tool to Zoom in
@@ -26,7 +26,6 @@ ENDIF (POSTGRES_FOUND)

IF (EXPAT_FOUND)
ADD_SUBDIRECTORY(gps_importer)
ADD_SUBDIRECTORY(wfs)
ENDIF (EXPAT_FOUND)

IF (GSL_FOUND)

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

@@ -2,11 +2,20 @@
########################################################
# Files

SET(WFS_SRCS qgswfsprovider.cpp qgswfsdata.cpp)
SET(WFS_SRCS
qgswfsprovider.cpp
qgswfsconnection.cpp
qgswfsdataitems.cpp
qgswfsdata.cpp
qgswfssourceselect.cpp
)

SET (WFS_MOC_HDRS
qgswfsdata.h
qgswfsconnection.h
qgswfsdataitems.h
qgswfsprovider.h
qgswfssourceselect.h
)

#IF(NOT MSVC)
@@ -23,6 +32,8 @@ QT4_WRAP_CPP(WFS_MOC_SRCS ${WFS_MOC_HDRS})
INCLUDE_DIRECTORIES (
../../core
../../core/spatialindex
../../gui
${CMAKE_CURRENT_BINARY_DIR}/../../ui
${GEOS_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}/geos
${EXPAT_INCLUDE_DIR}
@@ -33,6 +44,7 @@ ADD_LIBRARY (wfsprovider MODULE ${WFS_SRCS} ${WFS_MOC_SRCS})
TARGET_LINK_LIBRARIES (wfsprovider
${EXPAT_LIBRARY}
qgis_core
qgis_gui
)


0 comments on commit d1c05db

Please sign in to comment.