Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qabstractgeotilecache_p.h
Go to the documentation of this file.
1
// Copyright (C) 2015 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
#
ifndef
QABSTRACTGEOTILECACHE_P_H
5
#
define
QABSTRACTGEOTILECACHE_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
<
QtLocation
/
private
/
qlocationglobal_p
.
h
>
19
20
#
include
<
QtCore
/
QSharedPointer
>
21
#
include
<
QtCore
/
QObject
>
22
#
include
<
QtCore
/
QString
>
23
#
include
<
QtGui
/
QImage
>
24
25
#
include
"qgeotilespec_p.h"
26
27
28
QT_BEGIN_NAMESPACE
29
30
class
QGeoMappingManager;
31
class
QGeoMappingManagerEngine;
32
33
class
QGeoTile;
34
class
QAbstractGeoTileCache;
35
36
class
QThread;
37
38
/* This is also used in the mapgeometry */
39
struct
QGeoTileTexture
40
{
41
QGeoTileSpec
spec
;
42
QImage
image
;
43
bool
textureBound
=
false
;
44
};
45
46
class
Q_LOCATION_EXPORT
QAbstractGeoTileCache
:
public
QObject
47
{
48
Q_OBJECT
49
public
:
50
enum
CostStrategy {
51
Unitary,
52
ByteSize
53
};
54
55
enum
CacheArea {
56
DiskCache = 0x01,
57
MemoryCache = 0x02,
58
AllCaches = 0xFF
59
};
60
Q_DECLARE_FLAGS(CacheAreas, CacheArea)
61
62
virtual
~QAbstractGeoTileCache();
63
64
virtual
void
setMaxDiskUsage(
int
diskUsage);
65
virtual
int
maxDiskUsage()
const
;
66
virtual
int
diskUsage()
const
;
67
68
virtual
void
setMaxMemoryUsage(
int
memoryUsage);
69
virtual
int
maxMemoryUsage()
const
;
70
virtual
int
memoryUsage()
const
;
71
72
virtual
void
setMinTextureUsage(
int
textureUsage) = 0;
73
virtual
void
setExtraTextureUsage(
int
textureUsage) = 0;
74
virtual
int
maxTextureUsage()
const
= 0;
75
virtual
int
minTextureUsage()
const
= 0;
76
virtual
int
textureUsage()
const
= 0;
77
virtual
void
clearAll() = 0;
78
virtual
void
setCostStrategyDisk(CostStrategy costStrategy) = 0;
79
virtual
CostStrategy costStrategyDisk()
const
= 0;
80
virtual
void
setCostStrategyMemory(CostStrategy costStrategy) = 0;
81
virtual
CostStrategy costStrategyMemory()
const
= 0;
82
virtual
void
setCostStrategyTexture(CostStrategy costStrategy) = 0;
83
virtual
CostStrategy costStrategyTexture()
const
= 0;
84
85
virtual
QSharedPointer<QGeoTileTexture> get(
const
QGeoTileSpec &spec) = 0;
86
87
virtual
void
insert(
const
QGeoTileSpec &spec,
88
const
QByteArray &bytes,
89
const
QString &format,
90
QAbstractGeoTileCache::CacheAreas areas = QAbstractGeoTileCache::AllCaches) = 0;
91
virtual
void
handleError(
const
QGeoTileSpec &spec,
const
QString &errorString);
92
virtual
void
init() = 0;
93
94
static
QString baseCacheDirectory();
95
static
QString baseLocationCacheDirectory();
96
97
protected
:
98
QAbstractGeoTileCache(QObject *parent =
nullptr
);
99
virtual
void
printStats() = 0;
100
101
friend
class
QGeoTiledMappingManagerEngine;
102
};
103
104
Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractGeoTileCache::CacheAreas)
105
106
QT_END_NAMESPACE
107
108
#
endif
// QABSTRACTGEOTILECACHE_P_H
QAbstractGeoTileCache
Definition
qabstractgeotilecache_p.h:47
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QGeoTileTexture
Definition
qabstractgeotilecache_p.h:40
QGeoTileTexture::textureBound
bool textureBound
Definition
qabstractgeotilecache_p.h:43
QGeoTileTexture::image
QImage image
Definition
qabstractgeotilecache_p.h:42
QGeoTileTexture::spec
QGeoTileSpec spec
Definition
qabstractgeotilecache_p.h:41
qtlocation
src
location
maps
qabstractgeotilecache_p.h
Generated on
for Qt by
1.18.0