Skip to content

Commit

Permalink
Delimited text plugin moved to core
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrook committed May 14, 2013
1 parent 94468c5 commit 83b571b
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 569 deletions.
Binary file removed doc/plugins/delimited_text/dialog.png
Binary file not shown.
Binary file removed doc/plugins/delimited_text/ellipsis.png
Binary file not shown.
Binary file removed doc/plugins/delimited_text/file_selected.png
Binary file not shown.
Binary file removed doc/plugins/delimited_text/file_selected1.png
Binary file not shown.
Binary file removed doc/plugins/delimited_text/file_selected2.png
Binary file not shown.
Binary file removed doc/plugins/delimited_text/file_selected3.png
Binary file not shown.
70 changes: 0 additions & 70 deletions doc/plugins/delimited_text/index.html

This file was deleted.

Binary file removed doc/plugins/delimited_text/layer_added.png
Binary file not shown.
Binary file removed doc/plugins/delimited_text/plugin_manager.png
Binary file not shown.
Binary file removed doc/plugins/delimited_text/toolbar_icon.png
Binary file not shown.
2 changes: 1 addition & 1 deletion images/images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
<file>themes/default/mActionAddWcsLayer.png</file>
<file>themes/default/mActionAddWfsLayer.png</file>
<file>themes/default/mActionAddWmsLayer.png</file>
<file>themes/default/mActionAddDelimitedTextLayer.png</file>
<file>themes/default/mActionAlignBottom.png</file>
<file>themes/default/mActionAlignHCenter.png</file>
<file>themes/default/mActionAlignLeft.png</file>
Expand Down Expand Up @@ -360,7 +361,6 @@
<file>themes/default/plugin.png</file>
<file>themes/default/plugins/coordinate_capture/coordinate_capture.png</file>
<file>themes/default/plugins/copyright_label.png</file>
<file>themes/default/plugins/delimited_text.png</file>
<file>themes/default/plugins/dxf2shp_converter.png</file>
<file>themes/default/plugins/gps_importer.png</file>
<file>themes/default/plugins/gps_importer/create_gpx.png</file>
Expand Down
26 changes: 26 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,7 @@ void QgisApp::createActions()
connect( mActionAddWmsLayer, SIGNAL( triggered() ), this, SLOT( addWmsLayer() ) );
connect( mActionAddWcsLayer, SIGNAL( triggered() ), this, SLOT( addWcsLayer() ) );
connect( mActionAddWfsLayer, SIGNAL( triggered() ), this, SLOT( addWfsLayer() ) );
connect( mActionAddDelimitedText, SIGNAL( triggered()), this, SLOT(addDelimitedTextLayer()));
connect( mActionOpenTable, SIGNAL( triggered() ), this, SLOT( attributeTable() ) );
connect( mActionToggleEditing, SIGNAL( triggered() ), this, SLOT( toggleEditing() ) );
connect( mActionSaveLayerEdits, SIGNAL( triggered() ), this, SLOT( saveActiveLayerEdits() ) );
Expand Down Expand Up @@ -2970,6 +2971,31 @@ void QgisApp::addSpatiaLiteLayer()
delete dbs;
} // QgisApp::addSpatiaLiteLayer()

void QgisApp::addDelimitedTextLayer()
{
if ( mMapCanvas && mMapCanvas->isDrawing() )
{
return;
}

// show the Delimited text dialog
QDialog *dts = dynamic_cast<QDialog*>( QgsProviderRegistry::instance()->selectWidget( "delimitedtext", this ) );
if ( !dts )
{
QMessageBox::warning( this, tr( "DelimitedText" ), tr( "Cannot get Delimited Text select dialog from provider." ) );
return;
}
connect( dts, SIGNAL( addVectorLayer( QString, QString, QString ) ),
this, SLOT( addSelectedVectorLayer( QString, QString, QString ) ) );
dts->exec();
delete dts;
} // QgisApp::addDelimitedTextLayer()

void QgisApp::addSelectedVectorLayer( QString uri, QString layerName, QString provider )
{
addVectorLayer( uri, layerName, provider );
} // QgisApp:addSelectedVectorLayer

void QgisApp::addMssqlLayer()
{
#ifdef HAVE_MSSQL
Expand Down
6 changes: 5 additions & 1 deletion src/app/qgisapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
*/
QgsVectorLayer* addVectorLayer( QString vectorLayerPath, QString baseName, QString providerKey );

/** \brief overloaded vesion of the privat addLayer method that takes a list of
/** \brief overloaded version of the private addLayer method that takes a list of
* file names instead of prompting user with a dialog.
@param enc encoding type for the layer
@param dataSourceType type of ogr datasource
Expand Down Expand Up @@ -623,6 +623,10 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
void addDatabaseLayers( QStringList const & layerPathList, QString const & providerKey );
//! Add a SpatiaLite layer to the map
void addSpatiaLiteLayer();
//! Add a Delimited Text layer to the map
void addDelimitedTextLayer();
//! Add a vector layer defined by uri, layer name, data source uri
void addSelectedVectorLayer(QString uri, QString layerName, QString provider );
//#ifdef HAVE_MSSQL
//! Add a MSSQL layer to the map
void addMssqlLayer();
Expand Down
1 change: 0 additions & 1 deletion src/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR})
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR})

ADD_SUBDIRECTORY(delimited_text)
ADD_SUBDIRECTORY(diagram_overlay)
ADD_SUBDIRECTORY(interpolation)
ADD_SUBDIRECTORY(oracle_raster)
Expand Down
39 changes: 0 additions & 39 deletions src/plugins/delimited_text/CMakeLists.txt

This file was deleted.

125 changes: 0 additions & 125 deletions src/plugins/delimited_text/delimitedText.svg

This file was deleted.

Binary file removed src/plugins/delimited_text/delimited_text.png
Binary file not shown.
5 changes: 0 additions & 5 deletions src/plugins/delimited_text/delimited_text.qrc

This file was deleted.

Loading

0 comments on commit 83b571b

Please sign in to comment.