Cleaned up some code in the (broken) GPS upload section

git-svn-id: http://svn.osgeo.org/qgis/trunk@1648 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
larsl 2004-06-21 11:49:58 +00:00
parent 0a96c5bf45
commit 8284cb0617
3 changed files with 9 additions and 7 deletions

View File

@ -25,6 +25,7 @@ email : tim@linfiniti.com
#include "../../src/qgisapp.h" #include "../../src/qgisapp.h"
#include "../../src/qgsmaplayerregistry.h" #include "../../src/qgsmaplayerregistry.h"
#include "../../src/qgsmaplayer.h" #include "../../src/qgsmaplayer.h"
#include "../../src/qgsvectorlayer.h"
#include "../../src/qgsrasterlayer.h" #include "../../src/qgsrasterlayer.h"
#include "plugin.h" #include "plugin.h"
@ -130,7 +131,9 @@ void Plugin::help()
// Slot called when the buffer menu item is activated // Slot called when the buffer menu item is activated
void Plugin::run() void Plugin::run()
{ {
std::vector<QgsMapLayer*> gpxLayers; // find all GPX layers
std::vector<QgsVectorLayer*> gpxLayers;
PluginGui *myPluginGui=new PluginGui(gpxLayers, qgisMainWindowPointer, "GPS Tools", true, 0); PluginGui *myPluginGui=new PluginGui(gpxLayers, qgisMainWindowPointer, "GPS Tools", true, 0);
//listen for when the layer has been made so we can draw it //listen for when the layer has been made so we can draw it
connect(myPluginGui, SIGNAL(drawRasterLayer(QString)), this, SLOT(drawRasterLayer(QString))); connect(myPluginGui, SIGNAL(drawRasterLayer(QString)), this, SLOT(drawRasterLayer(QString)));

View File

@ -41,7 +41,7 @@ PluginGui::PluginGui() : PluginGuiBase()
populateIMPBabelFormats(); populateIMPBabelFormats();
tabWidget->removePage(tabWidget->page(2)); tabWidget->removePage(tabWidget->page(2));
} }
PluginGui::PluginGui( std::vector<QgsMapLayer*> gpxMapLayers, PluginGui::PluginGui( std::vector<QgsVectorLayer*> gpxMapLayers,
QWidget* parent , const char* name , bool modal , QWidget* parent , const char* name , bool modal ,
WFlags fl ) WFlags fl )
: PluginGuiBase( parent, name, modal, fl ), gpxLayers(gpxMapLayers) : PluginGuiBase( parent, name, modal, fl ), gpxLayers(gpxMapLayers)

View File

@ -12,15 +12,14 @@
#ifndef PLUGINGUI_H #ifndef PLUGINGUI_H
#define PLUGINGUI_H #define PLUGINGUI_H
#include <pluginguibase.h> #include "../../src/qgsvectorlayer.h"
#include "pluginguibase.h"
#include <vector> #include <vector>
#include <qstring.h> #include <qstring.h>
class QgsMapLayer;
/** /**
@author Tim Sutton @author Tim Sutton
*/ */
@ -29,7 +28,7 @@ class PluginGui : public PluginGuiBase
Q_OBJECT Q_OBJECT
public: public:
PluginGui(); PluginGui();
PluginGui( std::vector<QgsMapLayer*> gpxMapLayers, QWidget* parent , PluginGui( std::vector<QgsVectorLayer*> gpxMapLayers, QWidget* parent ,
const char* name , bool modal , WFlags ); const char* name , bool modal , WFlags );
~PluginGui(); ~PluginGui();
@ -69,7 +68,7 @@ private:
bool hasTracks; bool hasTracks;
}; };
std::vector<QgsMapLayer*> gpxLayers; std::vector<QgsVectorLayer*> gpxLayers;
std::map<QString, BabelFormatInfo> babelFormats; std::map<QString, BabelFormatInfo> babelFormats;
std::string babelFilter; std::string babelFilter;
std::string impFormat; std::string impFormat;