10#include "marble_export.h"
18class GeoDataCoordinates;
20class 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;
44uint
qHash( TileId
const& );
49inline int TileId::zoomLevel()
const
54inline int TileId::x()
const
59inline int TileId::y()
const
64inline uint TileId::mapThemeIdHash()
const
66 return m_mapThemeIdHash;
69inline 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;
77inline 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)
96inline 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
KTEXTEDITOR_EXPORT size_t qHash(KTextEditor::Cursor cursor, size_t seed=0) noexcept
Binds a QML item to a specific geodetic location in screen coordinates.
QDebug operator<<(QDebug dbg, const PerceptualColor::LchaDouble &value)
bool operator==(const QGraphicsApiFilter &reference, const QGraphicsApiFilter &sample)