dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
configuration.h
Go to the documentation of this file.
1 
13 /*
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 * for more details.
23 *
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, see <http://www.gnu.org/licenses/>
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/tlmaps.h"
36 #include "../core/accessmode.h"
37 #include "../core/cache.h"
38 #include "../core/corecommon.h"
39 
40 namespace mapcontrol
41 {
42 
48 class TLMAPWIDGET_EXPORT Configuration
49 {
50 public:
51  Configuration();
63  QString EmptyTileText;
75  QPen ScalePen;
88 
94  Qt::MouseButton DragButton;
95 
101  void SetAccessMode(core::AccessMode::Types const& type);
107  core::AccessMode::Types AccessMode();
108 
114  void SetLanguage(core::LanguageType::Types const& type);
120  core::LanguageType::Types Language();
121 
128  void SetUseMemoryCache(bool const& value);
135 
142 
150 
156  void SetCacheLocation(QString const& dir)
157  {
159 
160  }
161 
169 
177  void ExportMapDataToDB(QString const& sourceDB, QString const& destDB)const{core::PureImageCache::ExportMapDataToDB(sourceDB,destDB);}
184 
185 
186 };
187 }
188 #endif // CONFIGURATION_H
QPen SelectionPen
Used to draw selection box.
Definition: configuration.h:81
static Cache * Instance()
Definition: cache.cpp:34
Qt::MouseButton DragButton
Button used for dragging.
Definition: configuration.h:94
static TLMaps * Instance()
Definition: tlmaps.cpp:40
QString CacheLocation()
Returns the location for the SQLite Database used for caching and the geocoding cache files...
void SetCacheLocation(QString const &dir)
Sets the location for the SQLite Database used for caching and the geocoding cache files...
void SetTileMemorySize(int const &value)
Sets the size of the memory for tiles.
void DeleteTilesOlderThan(int const &days)
Deletes tiles in DataBase older than "days" days.
QBrush EmptytileBrush
Used to draw empty map tiles.
Definition: configuration.h:57
void deleteOlderTiles(int const &days)
bool UseMemoryCache()
Return if memory caching is in use.
KiberTileCache TilesInMemory
Definition: memorycache.h:43
A class that centralizes most of the mapcontrol configurations.
Definition: configuration.h:48
double TileMemoryUsed() const
Returns the currently used memory for tiles.
QPen ScalePen
Used to Draw the maps scale.
Definition: configuration.h:75
QString EmptyTileText
Used for empty tiles text.
Definition: configuration.h:63
void ExportMapDataToDB(QString const &sourceDB, QString const &destDB) const
Exports tiles from one DB to another. Only new tiles are added.
QString CacheLocation()
Definition: cache.cpp:49
void setMemoryCacheCapacity(const int &value)
void setCacheLocation(const QString &value)
Definition: cache.cpp:41
QPen EmptyTileBorders
Used to draw empty tile borders.
Definition: configuration.h:69
PureImageCache ImageCache
Definition: cache.h:41
static bool ExportMapDataToDB(QString sourceFile, QString destFile)
bool UseMemoryCache()
Definition: tlmaps.h:70