map2d_widget
configuration.h
Go to the documentation of this file.
1 
12 /*
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.
17 *
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
21 * for more details.
22 *
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
26 */
27 
28 #ifndef CONFIGURATION_H
29 #define CONFIGURATION_H
30 
31 #include <QBrush>
32 #include <QPen>
33 #include <QString>
34 #include <QFont>
35 #include "../core/opmaps.h"
36 #include "../core/accessmode.h"
37 #include "../core/cache.h"
38 namespace mapcontrol
39 {
40 
47 {
48 public:
49  Configuration();
61  QString EmptyTileText;
73  QPen ScalePen;
86 
92  Qt::MouseButton DragButton;
93 
99  void SetAccessMode(core::AccessMode::Types const& type);
106 
112  void SetLanguage(core::LanguageType::Types const& type);
119 
126  void SetUseMemoryCache(bool const& value);
133 
140 
148 
154  void SetCacheLocation(QString const& dir)
155  {
157 
158  }
159 
167 
175  void ExportMapDataToDB(QString const& sourceDB, QString const& destDB)const{core::PureImageCache::ExportMapDataToDB(sourceDB,destDB);}
182 
183 
184 };
185 }
186 #endif // CONFIGURATION_H
QString CacheLocation()
Definition: cache.cpp:48
bool UseMemoryCache()
Definition: opmaps.h:65
QPen EmptyTileBorders
Used to draw empty tile borders.
Definition: configuration.h:67
double TileMemoryUsed() const
Returns the currently used memory for tiles.
Definition: configuration.h:139
PureImageCache ImageCache
Definition: cache.h:40
Configuration()
Definition: configuration.cpp:30
QFont MissingDataFont
Definition: configuration.h:85
core::AccessMode::Types AccessMode()
Returns the access mode for the map (cache only, server and cache...)
Definition: configuration.cpp:44
QString EmptyTileText
Used for empty tiles text.
Definition: configuration.h:61
void DeleteTilesOlderThan(int const &days)
Deletes tiles in DataBase older than "days" days.
Definition: configuration.h:166
bool UseMemoryCache()
Return if memory caching is in use.
Definition: configuration.h:132
QPen ScalePen
Used to Draw the maps scale.
Definition: configuration.h:73
Types
Definition: languagetype.h:42
QString CacheLocation()
Returns the location for the SQLite Database used for caching and the geocoding cache files...
Definition: configuration.h:181
void ExportMapDataToDB(QString const &sourceDB, QString const &destDB) const
Exports tiles from one DB to another. Only new tiles are added.
Definition: configuration.h:175
QBrush EmptytileBrush
Used to draw empty map tiles.
Definition: configuration.h:55
double MemoryCacheSize()
Definition: kibertilecache.h:44
KiberTileCache TilesInMemory
Definition: memorycache.h:43
A class that centralizes most of the mapcontrol configurations.
Definition: configuration.h:46
void setCacheLocation(const QString &value)
Definition: cache.cpp:40
QPen SelectionPen
Used to draw selection box.
Definition: configuration.h:79
static Cache * Instance()
Definition: cache.cpp:33
void setMemoryCacheCapacity(const int &value)
Definition: kibertilecache.cpp:38
Types
Definition: accessmode.h:41
Qt::MouseButton DragButton
Button used for dragging.
Definition: configuration.h:92
void deleteOlderTiles(int const &days)
Definition: pureimagecache.cpp:257
void SetLanguage(core::LanguageType::Types const &type)
Sets the language used for geocaching.
Definition: configuration.cpp:48
void SetUseMemoryCache(bool const &value)
Used to allow disallow use of memory caching.
Definition: configuration.cpp:56
void SetCacheLocation(QString const &dir)
Sets the location for the SQLite Database used for caching and the geocoding cache files...
Definition: configuration.h:154
static OPMaps * Instance()
Definition: opmaps.cpp:33
void SetTileMemorySize(int const &value)
Sets the size of the memory for tiles.
Definition: configuration.h:147
void SetAccessMode(core::AccessMode::Types const &type)
Sets the access mode for the map (cache only, server and cache...)
Definition: configuration.cpp:40
Definition: core.h:60
static bool ExportMapDataToDB(QString sourceFile, QString destFile)
Definition: pureimagecache.cpp:299
core::LanguageType::Types Language()
Returns the language used for geocaching.
Definition: configuration.cpp:52