Skip to content

Commit 83b571b

Browse files
committed
Delimited text plugin moved to core
1 parent 94468c5 commit 83b571b

22 files changed

+47
-569
lines changed

doc/plugins/delimited_text/dialog.png

-111 KB
Binary file not shown.
-292 Bytes
Binary file not shown.
-112 KB
Binary file not shown.
-110 KB
Binary file not shown.
-111 KB
Binary file not shown.
-115 KB
Binary file not shown.

doc/plugins/delimited_text/index.html

-70
This file was deleted.
-32.7 KB
Binary file not shown.
-20.9 KB
Binary file not shown.
-549 Bytes
Binary file not shown.

images/images.qrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
<file>themes/default/mActionAddWcsLayer.png</file>
141141
<file>themes/default/mActionAddWfsLayer.png</file>
142142
<file>themes/default/mActionAddWmsLayer.png</file>
143+
<file>themes/default/mActionAddDelimitedTextLayer.png</file>
143144
<file>themes/default/mActionAlignBottom.png</file>
144145
<file>themes/default/mActionAlignHCenter.png</file>
145146
<file>themes/default/mActionAlignLeft.png</file>
@@ -360,7 +361,6 @@
360361
<file>themes/default/plugin.png</file>
361362
<file>themes/default/plugins/coordinate_capture/coordinate_capture.png</file>
362363
<file>themes/default/plugins/copyright_label.png</file>
363-
<file>themes/default/plugins/delimited_text.png</file>
364364
<file>themes/default/plugins/dxf2shp_converter.png</file>
365365
<file>themes/default/plugins/gps_importer.png</file>
366366
<file>themes/default/plugins/gps_importer/create_gpx.png</file>

src/app/qgisapp.cpp

+26
Original file line numberDiff line numberDiff line change
@@ -980,6 +980,7 @@ void QgisApp::createActions()
980980
connect( mActionAddWmsLayer, SIGNAL( triggered() ), this, SLOT( addWmsLayer() ) );
981981
connect( mActionAddWcsLayer, SIGNAL( triggered() ), this, SLOT( addWcsLayer() ) );
982982
connect( mActionAddWfsLayer, SIGNAL( triggered() ), this, SLOT( addWfsLayer() ) );
983+
connect( mActionAddDelimitedText, SIGNAL( triggered()), this, SLOT(addDelimitedTextLayer()));
983984
connect( mActionOpenTable, SIGNAL( triggered() ), this, SLOT( attributeTable() ) );
984985
connect( mActionToggleEditing, SIGNAL( triggered() ), this, SLOT( toggleEditing() ) );
985986
connect( mActionSaveLayerEdits, SIGNAL( triggered() ), this, SLOT( saveActiveLayerEdits() ) );
@@ -2970,6 +2971,31 @@ void QgisApp::addSpatiaLiteLayer()
29702971
delete dbs;
29712972
} // QgisApp::addSpatiaLiteLayer()
29722973

2974+
void QgisApp::addDelimitedTextLayer()
2975+
{
2976+
if ( mMapCanvas && mMapCanvas->isDrawing() )
2977+
{
2978+
return;
2979+
}
2980+
2981+
// show the Delimited text dialog
2982+
QDialog *dts = dynamic_cast<QDialog*>( QgsProviderRegistry::instance()->selectWidget( "delimitedtext", this ) );
2983+
if ( !dts )
2984+
{
2985+
QMessageBox::warning( this, tr( "DelimitedText" ), tr( "Cannot get Delimited Text select dialog from provider." ) );
2986+
return;
2987+
}
2988+
connect( dts, SIGNAL( addVectorLayer( QString, QString, QString ) ),
2989+
this, SLOT( addSelectedVectorLayer( QString, QString, QString ) ) );
2990+
dts->exec();
2991+
delete dts;
2992+
} // QgisApp::addDelimitedTextLayer()
2993+
2994+
void QgisApp::addSelectedVectorLayer( QString uri, QString layerName, QString provider )
2995+
{
2996+
addVectorLayer( uri, layerName, provider );
2997+
} // QgisApp:addSelectedVectorLayer
2998+
29732999
void QgisApp::addMssqlLayer()
29743000
{
29753001
#ifdef HAVE_MSSQL

src/app/qgisapp.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
115115
*/
116116
QgsVectorLayer* addVectorLayer( QString vectorLayerPath, QString baseName, QString providerKey );
117117

118-
/** \brief overloaded vesion of the privat addLayer method that takes a list of
118+
/** \brief overloaded version of the private addLayer method that takes a list of
119119
* file names instead of prompting user with a dialog.
120120
@param enc encoding type for the layer
121121
@param dataSourceType type of ogr datasource
@@ -623,6 +623,10 @@ class QgisApp : public QMainWindow, private Ui::MainWindow
623623
void addDatabaseLayers( QStringList const & layerPathList, QString const & providerKey );
624624
//! Add a SpatiaLite layer to the map
625625
void addSpatiaLiteLayer();
626+
//! Add a Delimited Text layer to the map
627+
void addDelimitedTextLayer();
628+
//! Add a vector layer defined by uri, layer name, data source uri
629+
void addSelectedVectorLayer(QString uri, QString layerName, QString provider );
626630
//#ifdef HAVE_MSSQL
627631
//! Add a MSSQL layer to the map
628632
void addMssqlLayer();

src/plugins/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR})
33
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR})
44

5-
ADD_SUBDIRECTORY(delimited_text)
65
ADD_SUBDIRECTORY(diagram_overlay)
76
ADD_SUBDIRECTORY(interpolation)
87
ADD_SUBDIRECTORY(oracle_raster)

src/plugins/delimited_text/CMakeLists.txt

-39
This file was deleted.

src/plugins/delimited_text/delimitedText.svg

-125
This file was deleted.
-1.08 KB
Binary file not shown.

src/plugins/delimited_text/delimited_text.qrc

-5
This file was deleted.

0 commit comments

Comments
 (0)