map2d_widget
src
core
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;}
71
int
RetryLoadTile
;
72
diagnostics
GetDiagnostics
();
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
debugheader.h
core::OPMaps
Definition:
opmaps.h:48
core::OPMaps::UseMemoryCache
bool UseMemoryCache()
Definition:
opmaps.h:65
core::MapType::Types
Types
Definition:
maptype.h:39
core
Definition:
accessmode.h:35
core::TileCacheQueue
Definition:
tilecachequeue.h:42
cacheitemqueue.h
core::OPMaps::GetImageFrom
QByteArray GetImageFrom(const MapType::Types &type, const core::Point &pos, const int &zoom)
timeout for map connections
Definition:
opmaps.cpp:56
diagnostics
Definition:
diagnostics.h:30
memorycache.h
core::LanguageType::Types
Types
Definition:
languagetype.h:42
core::Point
Definition:
point.h:35
core::UrlFactory
Definition:
urlfactory.h:48
diagnostics.h
tilecachequeue.h
cache.h
core::OPMaps::GetDiagnostics
diagnostics GetDiagnostics()
Definition:
opmaps.cpp:277
rawtile.h
core::OPMaps::setLanguage
void setLanguage(const LanguageType::Types &language)
Definition:
opmaps.h:67
core::OPMaps::ImportFromGMDB
bool ImportFromGMDB(const QString &file)
Definition:
opmaps.cpp:272
core::OPMaps::setUseMemoryCache
void setUseMemoryCache(const bool &value)
Definition:
opmaps.h:66
pureimagecache.h
core::AccessMode::Types
Types
Definition:
accessmode.h:41
urlfactory.h
core::OPMaps::GetLanguage
LanguageType::Types GetLanguage()
Definition:
opmaps.h:68
core::MemoryCache
Definition:
memorycache.h:38
core::OPMaps::GetAccessMode
AccessMode::Types GetAccessMode() const
Definition:
opmaps.h:69
core::OPMaps::Instance
static OPMaps * Instance()
Definition:
opmaps.cpp:33
alllayersoftype.h
core::OPMaps::setAccessMode
void setAccessMode(const AccessMode::Types &mode)
Definition:
opmaps.h:70
core::OPMaps::~OPMaps
~OPMaps()
Definition:
opmaps.cpp:49
core::AllLayersOfType
Definition:
alllayersoftype.h:35
languagetype.h
accessmode.h
core::OPMaps::ExportToGMDB
bool ExportToGMDB(const QString &file)
Definition:
opmaps.cpp:268
core::OPMaps::RetryLoadTile
int RetryLoadTile
Definition:
opmaps.h:71
Generated by
1.8.13