dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
tlmaps.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 #ifndef OPMaps_H
28 #define OPMaps_H
29 
30 
31 #include "debugheader.h"
32 #include "memorycache.h"
33 #include "rawtile.h"
34 #include "cache.h"
35 #include "accessmode.h"
36 #include "languagetype.h"
37 #include "cacheitemqueue.h"
38 #include "tilecachequeue.h"
39 #include "pureimagecache.h"
40 #include "alllayersoftype.h"
41 #include "urlfactory.h"
42 #include "diagnostics.h"
43 
44 #include "../internals/pureprojection.h"
45 #include "../internals/projections/lks94projection.h"
46 #include "../internals/projections/mercatorprojection.h"
47 #include "../internals/projections/mercatorprojectionyandex.h"
48 #include "../internals/projections/platecarreeprojection.h"
49 #include "../internals/projections/platecarreeprojectionpergo.h"
50 
51 namespace core {
52  class TLMaps: public MemoryCache,public AllLayersOfType,public UrlFactory
53  {
54 
55 
56  public:
57 
58  ~TLMaps();
59 
60  static TLMaps* Instance();
61  bool ImportFromGMDB(const QString &file);
62  bool ExportToGMDB(const QString &file);
66 
67 
68  QByteArray GetImageFromServer(const MapType::Types &type,const core::Point &pos,const int &zoom);
69  QByteArray GetImageFromFile(const MapType::Types &type,const core::Point &pos,const int &zoom, double hScale, double vScale, QString userImageFileName, internals::PureProjection *projection);
70  bool UseMemoryCache(){return useMemoryCache;}//TODO
71  void setUseMemoryCache(const bool& value){useMemoryCache=value;}
72  void setLanguage(const LanguageType::Types& language);
73  LanguageType::Types GetLanguage(){return Language;}//TODO
74  AccessMode::Types GetAccessMode()const{return accessmode;}
75  void setAccessMode(const AccessMode::Types& mode){accessmode=mode;}
79  LanguageType::Types Language;
80  AccessMode::Types accessmode;
81  // PureImageCache ImageCacheLocal;//TODO Criar acesso Get Set
83  TLMaps();
85 
86  TLMaps& operator=(TLMaps const&){ return *this; }
89  QMutex errorvars;
91  quint8 lastZoom;
94  QImage imScaled;
96  };
97 
98 }
99 #endif // OPMaps_H
LanguageType::Types GetLanguage()
Definition: tlmaps.h:73
bool ExportToGMDB(const QString &file)
Definition: tlmaps.cpp:532
LanguageType::Types Language
Definition: tlmaps.h:79
static TLMaps * Instance()
Definition: tlmaps.cpp:40
AccessMode::Types accessmode
Definition: tlmaps.h:80
QByteArray GetImageFromFile(const MapType::Types &type, const core::Point &pos, const int &zoom, double hScale, double vScale, QString userImageFileName, internals::PureProjection *projection)
OPMaps::GetImageFromFile.
Definition: tlmaps.cpp:73
int quadCoordRight
Definition: tlmaps.h:92
bool useMemoryCache
Definition: tlmaps.h:78
int leastCommonZoom
Definition: tlmaps.h:95
quint8 lastZoom
Definition: tlmaps.h:91
void setAccessMode(const AccessMode::Types &mode)
Definition: tlmaps.h:75
QMutex errorvars
Definition: tlmaps.h:89
TLMaps(const TLMaps &)
Definition: tlmaps.h:84
int quadCoordBottom
Definition: tlmaps.h:93
Parse log file
TileCacheQueue TileDBcacheQueue
Definition: tlmaps.h:82
QByteArray GetImageFromServer(const MapType::Types &type, const core::Point &pos, const int &zoom)
timeout for map connections
Definition: tlmaps.cpp:305
int RetryLoadTile
Definition: tlmaps.h:76
AccessMode::Types GetAccessMode() const
Definition: tlmaps.h:74
bool ImportFromGMDB(const QString &file)
Definition: tlmaps.cpp:536
diagnostics GetDiagnostics()
Definition: tlmaps.cpp:541
QImage imScaled
Definition: tlmaps.h:94
diagnostics diag
Definition: tlmaps.h:88
static TLMaps * m_pInstance
Definition: tlmaps.h:87
TLMaps & operator=(TLMaps const &)
Definition: tlmaps.h:86
void setUseMemoryCache(const bool &value)
Definition: tlmaps.h:71
void setLanguage(const LanguageType::Types &language)
Definition: tlmaps.cpp:290
bool UseMemoryCache()
Definition: tlmaps.h:70
QMutex settingsProtect
Definition: tlmaps.h:90