libosmscout
1.1.1
Toggle main menu visibility
Loading...
Searching...
No Matches
libosmscout-client-qt
include
osmscoutclientqt
ElevationModule.h
Go to the documentation of this file.
1
#ifndef OSMSCOUT_CLIENT_QT_ELEVATIONMODULE_H
2
#define OSMSCOUT_CLIENT_QT_ELEVATIONMODULE_H
3
4
/*
5
OSMScout - a Qt backend for libosmscout and libosmscout-map
6
Copyright (C) 2021 Lukas Karas
7
8
This library is free software; you can redistribute it and/or
9
modify it under the terms of the GNU Lesser General Public
10
License as published by the Free Software Foundation; either
11
version 2.1 of the License, or (at your option) any later version.
12
13
This library is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
Lesser General Public License for more details.
17
18
You should have received a copy of the GNU Lesser General Public
19
License along with this library; if not, write to the Free Software
20
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
*/
22
23
#include <
osmscoutclientqt/ClientQtImportExport.h
>
24
25
#include <
osmscout/elevation/ElevationService.h
>
26
27
#include <osmscoutclient/DBThread.h>
28
29
#include <
osmscoutclientqt/OverlayObject.h
>
30
31
#include <QThread>
32
33
#include <memory>
34
35
namespace
osmscout
{
36
40
class
OSMSCOUT_CLIENT_QT_API
ElevationModule
:
public
QObject
41
{
42
Q_OBJECT
43
public
:
44
using
ElevationPoints
= std::vector<osmscout::ElevationPoint>;
45
46
class
DataLoader
47
{
48
private
:
49
std::vector<osmscout::DatabaseRef> database;
50
std::vector<osmscout::TypeInfoSet> contourTypes;
51
std::vector<osmscout::EleFeatureValueReader> reader;
52
public
:
53
explicit
DataLoader
(
const
std::list<DBInstanceRef> &databases);
54
55
std::vector<osmscout::ContoursData>
LoadContours
(
const
osmscout::GeoBox &box);
56
};
57
58
public
slots:
59
void
onElevationProfileRequest
(std::shared_ptr<OverlayWay> way,
60
int
requestId,
61
osmscout::BreakerRef
breaker);
62
63
signals:
64
void
error
(
int
requestId);
65
66
void
elevationProfileAppend
(
ElevationModule::ElevationPoints
points,
int
requestId);
67
void
loadingFinished
(
int
requestId);
68
69
public
:
70
ElevationModule
(QThread *thread,DBThreadRef dbThread);
71
72
~ElevationModule
()
override
;
73
74
private
:
75
QThread *thread;
76
DBThreadRef dbThread;
77
};
78
}
79
80
#endif
// OSMSCOUT_CLIENT_QT_ELEVATIONMODULE_H
ClientQtImportExport.h
OSMSCOUT_CLIENT_QT_API
#define OSMSCOUT_CLIENT_QT_API
Definition
ClientQtImportExport.h:45
ElevationService.h
OverlayObject.h
osmscout::ElevationModule::DataLoader::LoadContours
std::vector< osmscout::ContoursData > LoadContours(const osmscout::GeoBox &box)
osmscout::ElevationModule::DataLoader::DataLoader
DataLoader(const std::list< DBInstanceRef > &databases)
osmscout::ElevationModule::elevationProfileAppend
void elevationProfileAppend(ElevationModule::ElevationPoints points, int requestId)
osmscout::ElevationModule::error
void error(int requestId)
osmscout::ElevationModule::ElevationPoints
std::vector< osmscout::ElevationPoint > ElevationPoints
Definition
ElevationModule.h:44
osmscout::ElevationModule::ElevationModule
ElevationModule(QThread *thread, DBThreadRef dbThread)
osmscout::ElevationModule::loadingFinished
void loadingFinished(int requestId)
osmscout::ElevationModule::onElevationProfileRequest
void onElevationProfileRequest(std::shared_ptr< OverlayWay > way, int requestId, osmscout::BreakerRef breaker)
osmscout::ElevationModule::~ElevationModule
~ElevationModule() override
osmscout
Definition
Area.h:39
osmscout::BreakerRef
std::shared_ptr< Breaker > BreakerRef
Definition
Breaker.h:64
Generated by
1.17.0