map2d_widget
opmaps.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 #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 "point.h"
45 
46 
47 namespace core {
48  class OPMaps: public MemoryCache,public AllLayersOfType,public UrlFactory
49  {
50 
51 
52  public:
53 
54  ~OPMaps();
55 
56  static OPMaps* Instance();
57  bool ImportFromGMDB(const QString &file);
58  bool ExportToGMDB(const QString &file);
62 
63 
64  QByteArray GetImageFrom(const MapType::Types &type,const core::Point &pos,const int &zoom);
65  bool UseMemoryCache(){return useMemoryCache;}//TODO
66  void setUseMemoryCache(const bool& value){useMemoryCache=value;}
67  void setLanguage(const LanguageType::Types& language){Language=language;}//TODO
68  LanguageType::Types GetLanguage(){return Language;}//TODO
69  AccessMode::Types GetAccessMode()const{return accessmode;}
70  void setAccessMode(const AccessMode::Types& mode){accessmode=mode;}
73 
74  private:
75  bool useMemoryCache;
76  LanguageType::Types Language;
77  AccessMode::Types accessmode;
78  // PureImageCache ImageCacheLocal;//TODO Criar acesso Get Set
79  TileCacheQueue TileDBcacheQueue;
80  OPMaps();
81  OPMaps(OPMaps const&){}
82  OPMaps& operator=(OPMaps const&){ return *this; }
83  static OPMaps* m_pInstance;
84  diagnostics diag;
85  QMutex errorvars;
86  protected:
87  // MemoryCache TilesInMemory;
88 
89 
90 
91  };
92 
93 }
94 #endif // OPMaps_H
Definition: opmaps.h:48
bool UseMemoryCache()
Definition: opmaps.h:65
Types
Definition: maptype.h:39
Definition: tilecachequeue.h:42
QByteArray GetImageFrom(const MapType::Types &type, const core::Point &pos, const int &zoom)
timeout for map connections
Definition: opmaps.cpp:56
Definition: diagnostics.h:30
AccessMode::Types GetAccessMode() const
Definition: opmaps.h:69
Types
Definition: languagetype.h:42
Definition: point.h:35
Definition: urlfactory.h:48
diagnostics GetDiagnostics()
Definition: opmaps.cpp:277
void setLanguage(const LanguageType::Types &language)
Definition: opmaps.h:67
bool ImportFromGMDB(const QString &file)
Definition: opmaps.cpp:272
void setUseMemoryCache(const bool &value)
Definition: opmaps.h:66
Types
Definition: accessmode.h:41
LanguageType::Types GetLanguage()
Definition: opmaps.h:68
Definition: memorycache.h:38
static OPMaps * Instance()
Definition: opmaps.cpp:33
void setAccessMode(const AccessMode::Types &mode)
Definition: opmaps.h:70
~OPMaps()
Definition: opmaps.cpp:49
Definition: alllayersoftype.h:35
bool ExportToGMDB(const QString &file)
Definition: opmaps.cpp:268
int RetryLoadTile
Definition: opmaps.h:71