Marble
7 #ifndef MARBLE_TILEID_H
8 #define MARBLE_TILEID_H
10 #include "marble_export.h"
18 class GeoDataCoordinates;
20 class MARBLE_EXPORT TileId
23 TileId(
QString const & mapThemeId,
int zoomLevel,
int tileX,
int tileY );
24 TileId( uint mapThemeIdHash,
int zoomLevel,
int tileX,
int tileY );
27 int zoomLevel()
const;
30 uint mapThemeIdHash()
const;
33 bool operator<( TileId
const& rhs )
const;
35 static TileId fromCoordinates(
const GeoDataCoordinates& coords,
int zoomLevel );
38 uint m_mapThemeIdHash;
44 uint
qHash( TileId
const& );
49 inline int TileId::zoomLevel()
const
54 inline int TileId::x()
const
59 inline int TileId::y()
const
64 inline uint TileId::mapThemeIdHash()
const
66 return m_mapThemeIdHash;
69 inline bool TileId::operator==( TileId
const& rhs )
const
71 return m_zoomLevel == rhs.m_zoomLevel
72 && m_tileX == rhs.m_tileX
73 && m_tileY == rhs.m_tileY
74 && m_mapThemeIdHash == rhs.m_mapThemeIdHash;
77 inline bool TileId::operator<( TileId
const& rhs )
const
79 if (m_zoomLevel < rhs.m_zoomLevel)
81 else if (m_zoomLevel == rhs.m_zoomLevel
82 && m_tileX < rhs.m_tileX)
84 else if (m_zoomLevel == rhs.m_zoomLevel
85 && m_tileX == rhs.m_tileX
86 && m_tileY < rhs.m_tileY)
88 else if (m_zoomLevel == rhs.m_zoomLevel
89 && m_tileX == rhs.m_tileX
90 && m_tileY == rhs.m_tileY
91 && m_mapThemeIdHash < rhs.m_mapThemeIdHash)
96 inline uint
qHash( TileId
const& tid )
98 const quint64 tmp = (( quint64 )( tid.zoomLevel() ) << 36 )
99 + (( quint64 )( tid.x() ) << 18 )
100 + ( quint64 )( tid.y() );
101 return ::qHash( tmp ) ^ tid.mapThemeIdHash();
106 #ifndef QT_NO_DEBUG_STREAM
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
bool operator==(const Qt3DRender::QGraphicsApiFilter &reference, const Qt3DRender::QGraphicsApiFilter &sample)
KCALENDARCORE_EXPORT uint qHash(const KCalendarCore::Period &key)
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 04:09:08 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.