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/qgsmaplayerregistry.h"
#include "../../src/qgsmaplayer.h"
#include "../../src/qgsvectorlayer.h"
#include "../../src/qgsrasterlayer.h"
#include "plugin.h"
@ -130,7 +131,9 @@ void Plugin::help()
// Slot called when the buffer menu item is activated
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);
//listen for when the layer has been made so we can draw it
connect(myPluginGui, SIGNAL(drawRasterLayer(QString)), this, SLOT(drawRasterLayer(QString)));

View File

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

View File

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