16
16
* (at your option) any later version. *
18
18
***************************************************************************/
19
/* $Id: qgsgpsplugin.h 5802 2006-09-10 02:08:13Z g_j_m $ */
20
20
#ifndef QGSGPSPLUGIN_H
21
21
#define QGSGPSPLUGIN_H
22
22
#include "qgsbabelformat.h"
23
23
#include "qgsgpsdevice.h"
24
#include "../qgisplugin.h"
24
#include "qgisplugin.h"
28
27
class QgsVectorLayer;
30
30
/** A plugin with various GPS tools.
32
class QgsGPSPlugin:public QObject, public QgisPlugin
32
class QgsGPSPlugin: public QObject, public QgisPlugin
36
/** Constructor for a plugin. The QgisApp and QgisIface pointers
37
are passed by QGIS when it attempts to instantiate the plugin.
38
@param qgis Pointer to the QgisApp object
39
@param qI Pointer to the QgisIface object.
41
QgsGPSPlugin(QgisApp * , QgisIface * );
44
virtual ~QgsGPSPlugin();
48
virtual void initGui();
49
//! Show the dialog box
51
//! Create a new GPX layer
53
//! Add a vector layer given vectorLayerPath, baseName, providerKey
54
void drawVectorLayer(QString,QString,QString);
57
//! show the help document
61
void loadGPXFile(QString filename, bool loadWaypoints, bool loadRoutes,
63
void importGPSFile(QString inputFilename, QgsBabelFormat* importer,
64
bool importWaypoints, bool importRoutes,
65
bool importTracks, QString outputFilename,
67
void downloadFromGPS(QString device, QString port,
68
bool downloadWaypoints, bool downloadRoutes,
69
bool downloadTracks, QString outputFilename,
71
void uploadToGPS(QgsVectorLayer* gpxLayer, QString device,
80
//! Initializes all variables needed to run GPSBabel.
83
//! Pointer to our menu
84
QgisApp *mMainWindowPointer;
85
//! Pointer to the QGIS interface object
86
QgisIface *mQGisInterface;
87
//! Pointer to the QAction object used in the menu and toolbar
88
QAction *mQActionPointer;
89
//! Pointer to the QAction used for creating a new GPX layer
90
QAction *mCreateGPXAction;
91
//! The path to the GPSBabel program
93
//! Importers for external GPS data file formats
94
std::map<QString, QgsBabelFormat*> mImporters;
95
//! Upload/downloaders for GPS devices
96
std::map<QString, QgsGPSDevice*> mDevices;
36
/** Constructor for a plugin. The QgisInterface pointer
37
is passed by QGIS when it attempts to instantiate the plugin.
38
@param qI Pointer to the QgisInterface object.
40
QgsGPSPlugin( QgisInterface * );
43
virtual ~QgsGPSPlugin();
47
virtual void initGui();
48
//! Show the dialog box
50
//! Create a new GPX layer
52
//! Add a vector layer given vectorLayerPath, baseName, providerKey
53
void drawVectorLayer( QString, QString, QString );
56
//! show the help document
58
//! update the plugins theme when the app tells us its theme is changed
59
void setCurrentTheme( QString theThemeName );
62
void loadGPXFile( QString fileName, bool loadWaypoints, bool loadRoutes,
64
void importGPSFile( QString inputFileName, QgsBabelFormat* importer,
65
bool importWaypoints, bool importRoutes,
66
bool importTracks, QString outputFileName,
68
void convertGPSFile( QString inputFileName,
70
QString outputFileName,
72
void downloadFromGPS( QString device, QString port,
73
bool downloadWaypoints, bool downloadRoutes,
74
bool downloadTracks, QString outputFileName,
76
void uploadToGPS( QgsVectorLayer* gpxLayer, QString device,
85
//! Initializes all variables needed to run GPSBabel.
88
//! Pointer to the QGIS interface object
89
QgisInterface *mQGisInterface;
90
//! Pointer to the QAction object used in the menu and toolbar
91
QAction *mQActionPointer;
92
//! Pointer to the QAction used for creating a new GPX layer
93
QAction *mCreateGPXAction;
94
//! The path to the GPSBabel program
96
//! Importers for external GPS data file formats
97
std::map<QString, QgsBabelFormat*> mImporters;
98
//! Upload/downloaders for GPS devices
99
std::map<QString, QgsGPSDevice*> mDevices;