2 ******************************************************************************
4 * @file opmapgadgetconfiguration.h
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
6 * @addtogroup GCSPlugins GCS Plugins
8 * @addtogroup OPMapPlugin OpenPilot Map Plugin
10 * @brief The OpenPilot Map plugin
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 #ifndef OPMAP_GADGETCONFIGURATION_H
29 #define OPMAP_GADGETCONFIGURATION_H
31 #include <coreplugin/iuavgadgetconfiguration.h>
32 #include <QtCore/QString>
36 class OPMapGadgetConfiguration
: public IUAVGadgetConfiguration
{
37 Q_OBJECT
Q_PROPERTY(QString mapProvider READ mapProvider WRITE setMapProvider
)
38 Q_PROPERTY(int zoommo READ zoom WRITE setZoom
)
39 Q_PROPERTY(double latitude READ latitude WRITE setLatitude
)
40 Q_PROPERTY(double longitude READ longitude WRITE setLongitude
)
41 Q_PROPERTY(bool useOpenGL READ useOpenGL WRITE setUseOpenGL
)
42 Q_PROPERTY(bool showTileGridLines READ showTileGridLines WRITE setShowTileGridLines
)
43 Q_PROPERTY(QString accessMode READ accessMode WRITE setAccessMode
)
44 Q_PROPERTY(bool useMemoryCache READ useMemoryCache WRITE setUseMemoryCache
)
45 Q_PROPERTY(QString cacheLocation READ cacheLocation WRITE setCacheLocation
)
46 Q_PROPERTY(QString uavSymbol READ uavSymbol WRITE setUavSymbol
)
47 Q_PROPERTY(int maxUpdateRate READ maxUpdateRate WRITE setMaxUpdateRate
)
48 Q_PROPERTY(qreal overlayOpacity READ opacity WRITE setOpacity
)
51 explicit OPMapGadgetConfiguration(QString classId
, QSettings
*qSettings
= 0, QObject
*parent
= 0);
53 void saveConfig(QSettings
*settings
) const;
54 IUAVGadgetConfiguration
*clone();
56 QString
mapProvider() const
64 double latitude() const
66 return m_defaultLatitude
;
68 double longitude() const
70 return m_defaultLongitude
;
72 bool useOpenGL() const
76 bool showTileGridLines() const
78 return m_showTileGridLines
;
80 QString
accessMode() const
84 bool useMemoryCache() const
86 return m_useMemoryCache
;
88 QString
cacheLocation() const
90 return m_cacheLocation
;
92 QString
uavSymbol() const
96 int maxUpdateRate() const
98 return m_maxUpdateRate
;
100 qreal
opacity() const
106 void setMapProvider(QString provider
)
108 m_mapProvider
= provider
;
110 void setZoom(int zoom
)
112 m_defaultZoom
= zoom
;
114 void setLatitude(double latitude
)
116 m_defaultLatitude
= latitude
;
118 void setOpacity(qreal value
)
122 void setLongitude(double longitude
)
124 m_defaultLongitude
= longitude
;
126 void setUseOpenGL(bool useOpenGL
)
128 m_useOpenGL
= useOpenGL
;
130 void setShowTileGridLines(bool showTileGridLines
)
132 m_showTileGridLines
= showTileGridLines
;
134 void setAccessMode(QString accessMode
)
136 m_accessMode
= accessMode
;
138 void setUseMemoryCache(bool useMemoryCache
)
140 m_useMemoryCache
= useMemoryCache
;
142 void setCacheLocation(QString cacheLocation
);
143 void setUavSymbol(QString symbol
)
145 m_uavSymbol
= symbol
;
147 void setMaxUpdateRate(int update_rate
)
149 m_maxUpdateRate
= update_rate
;
153 QString m_mapProvider
;
155 double m_defaultLatitude
;
156 double m_defaultLongitude
;
158 bool m_showTileGridLines
;
159 QString m_accessMode
;
160 bool m_useMemoryCache
;
161 QString m_cacheLocation
;
164 QSettings
*m_settings
;
168 #endif // OPMAP_GADGETCONFIGURATION_H