libosmscout 1.1.1
Loading...
Searching...
No Matches
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
24
26
27#include <osmscoutclient/DBThread.h>
28
30
31#include <QThread>
32
33#include <memory>
34
35namespace osmscout {
36
41{
42 Q_OBJECT
43public:
44 using ElevationPoints = std::vector<osmscout::ElevationPoint>;
45
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
58public slots:
59 void onElevationProfileRequest(std::shared_ptr<OverlayWay> way,
60 int requestId,
61 osmscout::BreakerRef breaker);
62
63signals:
64 void error(int requestId);
65
67 void loadingFinished(int requestId);
68
69public:
70 ElevationModule(QThread *thread,DBThreadRef dbThread);
71
72 ~ElevationModule() override;
73
74private:
75 QThread *thread;
76 DBThreadRef dbThread;
77};
78}
79
80#endif // OSMSCOUT_CLIENT_QT_ELEVATIONMODULE_H
#define OSMSCOUT_CLIENT_QT_API
Definition ClientQtImportExport.h:45
std::vector< osmscout::ContoursData > LoadContours(const osmscout::GeoBox &box)
DataLoader(const std::list< DBInstanceRef > &databases)
void elevationProfileAppend(ElevationModule::ElevationPoints points, int requestId)
void error(int requestId)
std::vector< osmscout::ElevationPoint > ElevationPoints
Definition ElevationModule.h:44
ElevationModule(QThread *thread, DBThreadRef dbThread)
void loadingFinished(int requestId)
void onElevationProfileRequest(std::shared_ptr< OverlayWay > way, int requestId, osmscout::BreakerRef breaker)
Definition Area.h:39
std::shared_ptr< Breaker > BreakerRef
Definition Breaker.h:64