Marble

TextureTile.h
1 /*
2 Copyright 2010 Jens-Michael Hoffmann <[email protected]>
3 
4 Copyright 2012 Ander Pijoan <[email protected]>
5 
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10 
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15 
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #ifndef MARBLE_TEXTURETILE_H
21 #define MARBLE_TEXTURETILE_H
22 
23 #include <QImage>
24 
25 #include "Tile.h"
26 
27 namespace Marble
28 {
29 class Blending;
30 class TileId;
31 
57 class TextureTile : public Tile
58 {
59  public:
60  TextureTile(TileId const & tileId, QImage const & image, const Blending * blending );
61  ~TextureTile() override;
62 
67  QImage const * image() const;
68 
75  Blending const * blending() const;
76 
77  int byteCount() const;
78 
79  private:
80  Q_DISABLE_COPY( TextureTile )
81 
82  QImage const m_image;
83  Blending const * const m_blending;
84 
85 };
86 
87 inline QImage const * TextureTile::image() const
88 {
89  return &m_image;
90 }
91 
92 inline Blending const * TextureTile::blending() const
93 {
94  return m_blending;
95 }
96 
97 inline int TextureTile::byteCount() const
98 {
99 #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
100  return m_image.sizeInBytes();
101 #else
102  return m_image.byteCount();
103 #endif
104 }
105 
106 }
107 
108 #endif // MARBLE_TEXTURETILE_H
A class that resembles an image tile (extends Tile).
Definition: TextureTile.h:57
Blending const * blending() const
Returns the kind of blending used for the texture tile.
Definition: TextureTile.h:92
Binds a QML item to a specific geodetic location in screen coordinates.
QImage const * image() const
Returns the QImage that describes the look of the Tile.
Definition: TextureTile.h:87
qsizetype sizeInBytes() const const
int byteCount() const const
A class that resembles a tile (then it is extended to TextureTile or Vectortile). ...
Definition: Tile.h:53
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Oct 24 2020 23:25:26 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.