~ubuntu-branches/ubuntu/quantal/qgis/quantal

« back to all changes in this revision

Viewing changes to plugins/gps_importer/qgsbabelformat.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Halasz
  • Date: 2004-12-21 09:46:27 UTC
  • Revision ID: james.westby@ubuntu.com-20041221094627-r9lb6mlz2o3yp8gn
Tags: upstream-0.6.0
ImportĀ upstreamĀ versionĀ 0.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
  qgsbabelformat.h - import/export formats for GPSBabel
 
3
   -------------------
 
4
  begin                : Oct 20, 2004
 
5
  copyright            : (C) 2004 by Lars Luthman
 
6
  email                : larsl@users.sourceforge.net
 
7
 
 
8
/***************************************************************************
 
9
 *                                                                         *
 
10
 *   This program is free software; you can redistribute it and/or modify  *
 
11
 *   it under the terms of the GNU General Public License as published by  *
 
12
 *   the Free Software Foundation; either version 2 of the License, or     *
 
13
 *   (at your option) any later version.                                   *
 
14
 *                                                                         *
 
15
 ***************************************************************************/
 
16
/*  $Id: qgsbabelformat.h,v 1.2 2004/10/22 13:16:58 larsl Exp $ */
 
17
 
 
18
#ifndef QGSBABELFORMAT_H
 
19
#define QGSBABELFORMAT_H
 
20
 
 
21
#include <map>
 
22
 
 
23
#include <qstring.h>
 
24
#include <qstringlist.h>
 
25
 
 
26
 
 
27
class QgsBabelFormat {
 
28
public:
 
29
  QgsBabelFormat();
 
30
  virtual ~QgsBabelFormat() { }
 
31
  
 
32
  const QString& name() const;
 
33
  virtual QStringList importCommand(const QString& babel,
 
34
                                    const QString& featuretype,
 
35
                                    const QString& input,
 
36
                                    const QString& output) const;
 
37
  virtual QStringList exportCommand(const QString& babel,
 
38
                                    const QString& featuretype,
 
39
                                    const QString& input,
 
40
                                    const QString& output) const;
 
41
  
 
42
  bool supportsImport() const;
 
43
  bool supportsExport() const;
 
44
  bool supportsWaypoints() const;
 
45
  bool supportsRoutes() const;
 
46
  bool supportsTracks() const;
 
47
  
 
48
protected:
 
49
  
 
50
  bool mSupportsImport, mSupportsExport, mSupportsWaypoints;
 
51
  bool mSupportsRoutes, mSupportsTracks;
 
52
};
 
53
 
 
54
 
 
55
 
 
56
class QgsSimpleBabelFormat : public QgsBabelFormat {
 
57
public:
 
58
  QgsSimpleBabelFormat(const QString& format, bool hasWaypoints, 
 
59
                       bool hasRoutes, bool hasTracks);
 
60
  QStringList importCommand(const QString& babel, 
 
61
                            const QString& featuretype,
 
62
                            const QString& input,
 
63
                            const QString& output) const;
 
64
protected:
 
65
  QString mFormat;
 
66
};
 
67
 
 
68
 
 
69
 
 
70
class QgsBabelCommand : public QgsBabelFormat {
 
71
public:
 
72
  QgsBabelCommand(const QString& importCmd, const QString& exportCmd);
 
73
  QStringList importCommand(const QString& babel,
 
74
                            const QString& featuretype,
 
75
                            const QString& input,
 
76
                            const QString& output) const;
 
77
  QStringList exportCommand(const QString& babel,
 
78
                            const QString& featuretype,
 
79
                            const QString& input,
 
80
                            const QString& output) const;
 
81
protected:
 
82
  QStringList mImportCmd;
 
83
  QStringList mExportCmd;
 
84
};
 
85
 
 
86
 
 
87
typedef std::map<QString, QgsBabelFormat*> BabelMap;
 
88
 
 
89
 
 
90
#endif