tile_source.h
Go to the documentation of this file.
1 // *****************************************************************************
2 //
3 // Copyright (c) 2015, Southwest Research Institute® (SwRI®)
4 // All rights reserved.
5 //
6 // Redistribution and use in source and binary forms, with or without
7 // modification, are permitted provided that the following conditions are met:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of Southwest Research Institute® (SwRI®) nor the
14 // names of its contributors may be used to endorse or promote products
15 // derived from this software without specific prior written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 // ARE DISCLAIMED. IN NO EVENT SHALL Southwest Research Institute® BE LIABLE
21 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
27 // DAMAGE.
28 //
29 // *****************************************************************************
30 
31 #ifndef TILE_MAP_TILE_SOURCE_H
32 #define TILE_MAP_TILE_SOURCE_H
33 
34 #include <QObject>
35 #include <QString>
36 
37 namespace tile_map
38 {
47  class TileSource : public QObject
48  {
49  Q_OBJECT
50  public:
51  virtual ~TileSource() {};
52 
53  virtual const QString& GetBaseUrl() const;
54 
55  virtual void SetBaseUrl(const QString& base_url);
56 
57  virtual bool IsCustom() const;
58 
59  virtual bool IsReady() const { return is_ready_; };
60 
61  virtual void SetCustom(bool is_custom);
62 
63  virtual int32_t GetMaxZoom() const;
64 
65  virtual void SetMaxZoom(int32_t max_zoom);
66 
67  virtual int32_t GetMinZoom() const;
68 
69  virtual void SetMinZoom(int32_t min_zoom);
70 
71  virtual const QString& GetName() const;
72 
73  virtual void SetName(const QString& name);
74 
83  virtual size_t GenerateTileHash(int32_t level, int64_t x, int64_t y) = 0;
84 
93  virtual QString GenerateTileUrl(int32_t level, int64_t x, int64_t y) = 0;
94 
99  virtual QString GetType() const = 0;
100 
101  Q_SIGNALS:
102  void ErrorMessage(const std::string& error_msg) const;
103  void InfoMessage(const std::string& info_msg) const;
104 
105  protected:
107  is_custom_(false),
108  is_ready_(true),
109  max_zoom_(20),
110  min_zoom_(0)
111  {};
112 
113  QString base_url_;
115  bool is_ready_;
116  int32_t max_zoom_;
117  int32_t min_zoom_;
118  QString name_;
119  };
120 }
121 
122 #endif //TILE_MAP_TILE_SOURCE_H
string name
virtual void SetMinZoom(int32_t min_zoom)
Definition: tile_source.cpp:70
virtual void SetBaseUrl(const QString &base_url)
Definition: tile_source.cpp:40
TFSIMD_FORCE_INLINE const tfScalar & y() const
virtual void SetMaxZoom(int32_t max_zoom)
Definition: tile_source.cpp:60
void InfoMessage(const std::string &info_msg) const
void ErrorMessage(const std::string &error_msg) const
virtual void SetCustom(bool is_custom)
Definition: tile_source.cpp:50
virtual QString GetType() const =0
TFSIMD_FORCE_INLINE const tfScalar & x() const
virtual const QString & GetBaseUrl() const
Definition: tile_source.cpp:35
virtual size_t GenerateTileHash(int32_t level, int64_t x, int64_t y)=0
virtual bool IsReady() const
Definition: tile_source.h:59
virtual void SetName(const QString &name)
Definition: tile_source.cpp:80
virtual bool IsCustom() const
Definition: tile_source.cpp:45
virtual ~TileSource()
Definition: tile_source.h:51
virtual const QString & GetName() const
Definition: tile_source.cpp:75
virtual QString GenerateTileUrl(int32_t level, int64_t x, int64_t y)=0
virtual int32_t GetMaxZoom() const
Definition: tile_source.cpp:55
virtual int32_t GetMinZoom() const
Definition: tile_source.cpp:65


tile_map
Author(s): Marc Alban
autogenerated on Fri Mar 19 2021 02:44:47