2004-03-22 23:38:26 +00:00
|
|
|
/***************************************************************************
|
2004-10-22 13:16:58 +00:00
|
|
|
qgsgpsplugingui.h
|
|
|
|
Functions:
|
|
|
|
-------------------
|
|
|
|
begin : Jan 21, 2004
|
|
|
|
copyright : (C) 2004 by Tim Sutton
|
|
|
|
email : tim@linfiniti.com
|
|
|
|
/***************************************************************************
|
2004-03-22 23:38:26 +00:00
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
2004-10-22 13:16:58 +00:00
|
|
|
* *
|
2004-03-22 23:38:26 +00:00
|
|
|
***************************************************************************/
|
2004-10-22 13:16:58 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#ifndef QGSGPSPLUGINGUI_H
|
|
|
|
#define QGSGPSPLUGINGUI_H
|
2004-03-22 23:38:26 +00:00
|
|
|
|
2004-06-21 11:49:58 +00:00
|
|
|
#include "../../src/qgsvectorlayer.h"
|
2004-10-22 13:16:58 +00:00
|
|
|
#include "qgsgpspluginguibase.h"
|
2004-10-21 22:24:31 +00:00
|
|
|
#include "qgsbabelformat.h"
|
2005-02-15 15:38:52 +00:00
|
|
|
#include "qgsgpsdevice.h"
|
2004-03-22 23:38:26 +00:00
|
|
|
|
2004-06-14 22:37:38 +00:00
|
|
|
#include <vector>
|
|
|
|
|
2004-06-18 23:11:45 +00:00
|
|
|
#include <qstring.h>
|
|
|
|
|
2004-06-14 22:37:38 +00:00
|
|
|
|
2004-03-22 23:38:26 +00:00
|
|
|
/**
|
|
|
|
@author Tim Sutton
|
|
|
|
*/
|
2004-10-22 13:16:58 +00:00
|
|
|
class QgsGPSPluginGui : public QgsGPSPluginGuiBase
|
2004-03-22 23:38:26 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2004-10-21 22:24:31 +00:00
|
|
|
public:
|
2005-02-15 15:38:52 +00:00
|
|
|
QgsGPSPluginGui(const BabelMap& importers,
|
|
|
|
std::map<QString, QgsGPSDevice*>& devices,
|
2004-10-22 13:16:58 +00:00
|
|
|
std::vector<QgsVectorLayer*> gpxMapLayers, QWidget* parent,
|
|
|
|
const char* name , bool modal , WFlags);
|
|
|
|
~QgsGPSPluginGui();
|
2004-03-22 23:38:26 +00:00
|
|
|
|
2004-10-21 22:24:31 +00:00
|
|
|
public slots:
|
2004-03-22 23:38:26 +00:00
|
|
|
|
2004-10-22 13:16:58 +00:00
|
|
|
void slotOpenDeviceEditor();
|
2004-10-21 22:24:31 +00:00
|
|
|
void slotDevicesUpdated();
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
void pbnSelectInputFile_clicked();
|
|
|
|
void pbnSelectOutputFile_clicked();
|
|
|
|
|
|
|
|
void pbnGPXSelectFile_clicked();
|
|
|
|
|
|
|
|
void pbnIMPInput_clicked();
|
|
|
|
void pbnIMPOutput_clicked();
|
|
|
|
|
|
|
|
void pbnDLOutput_clicked();
|
|
|
|
|
|
|
|
void enableRelevantControls();
|
|
|
|
void pbnCancel_clicked();
|
|
|
|
void pbnOK_clicked();
|
|
|
|
|
|
|
|
void populateDeviceComboBox();
|
|
|
|
void populateULLayerComboBox();
|
|
|
|
void populateIMPBabelFormats();
|
|
|
|
void populatePortComboBoxes();
|
|
|
|
|
2004-03-22 23:38:26 +00:00
|
|
|
signals:
|
2004-10-21 22:24:31 +00:00
|
|
|
void drawRasterLayer(QString);
|
|
|
|
void drawVectorLayer(QString,QString,QString);
|
|
|
|
void loadGPXFile(QString filename, bool showWaypoints, bool showRoutes,
|
|
|
|
bool showTracks);
|
|
|
|
void importGPSFile(QString inputFilename, QgsBabelFormat* importer,
|
|
|
|
bool importWaypoints, bool importRoutes,
|
|
|
|
bool importTracks, QString outputFilename,
|
|
|
|
QString layerName);
|
|
|
|
void downloadFromGPS(QString device, QString port, bool downloadWaypoints,
|
|
|
|
bool downloadRoutes, bool downloadTracks,
|
|
|
|
QString outputFilename, QString layerName);
|
|
|
|
void uploadToGPS(QgsVectorLayer* gpxLayer, QString device, QString port);
|
|
|
|
|
2004-06-14 22:37:38 +00:00
|
|
|
private:
|
2004-10-21 22:24:31 +00:00
|
|
|
|
2004-10-22 13:16:58 +00:00
|
|
|
std::vector<QgsVectorLayer*> mGPXLayers;
|
2004-10-21 22:24:31 +00:00
|
|
|
const BabelMap& mImporters;
|
2005-02-15 15:38:52 +00:00
|
|
|
std::map<QString, QgsGPSDevice*>& mDevices;
|
2004-10-22 13:16:58 +00:00
|
|
|
QString mBabelFilter;
|
|
|
|
QString mImpFormat;
|
2004-03-22 23:38:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|