/usr/include/KF5/KGeoMap/kgeomap/tileindex.h is in libkf5kgeomap-dev 17.12.3-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | /** ===========================================================
* @file
*
* This file is a part of KDE project
*
*
* @date 2009-12-01
* @brief Tile index used in the tiling classes
*
* @author Copyright (C) 2009-2011 by Michael G. Hansen
* <a href="mailto:mike at mghansen dot de">mike at mghansen dot de</a>
* @author Copyright (C) 2010-2015 by Gilles Caulier
* <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software Foundation;
* either version 2, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* ============================================================ */
#ifndef KGEOMAP_TILEINDEX_H
#define KGEOMAP_TILEINDEX_H
// Qt includes
#include <QtCore/QBitArray>
#include <QtCore/QObject>
#include <QtCore/QPoint>
#include <QtCore/QDebug>
// local includes
#include "geocoordinates.h"
#include "types.h"
#include "libkgeomap_export.h"
namespace KGeoMap
{
class KGEOMAP_EXPORT TileIndex
{
public:
enum Constants
{
MaxLevel = 9,
MaxIndexCount = MaxLevel+1,
Tiling = 10,
MaxLinearIndex = Tiling*Tiling
};
enum CornerPosition
{
CornerNW = 1,
CornerSW = 2,
CornerNE = 3,
CornerSE = 4
};
public:
TileIndex();
virtual ~TileIndex();
int indexCount() const;
int level() const;
int linearIndex(const int getLevel) const;
int at(const int getLevel) const;
int lastIndex() const;
int indexLat(const int getLevel) const;
int indexLon(const int getLevel) const;
void clear();
void appendLinearIndex(const int newIndex);
QPoint latLonIndex(const int getLevel) const;
void latLonIndex(const int getLevel, int* const latIndex, int* const lonIndex) const;
void appendLatLonIndex(const int latIndex, const int lonIndex);
QIntList toIntList() const;
GeoCoordinates toCoordinates() const;
GeoCoordinates toCoordinates(const CornerPosition ofCorner) const;
TileIndex mid(const int first, const int len) const;
void oneUp();
static TileIndex fromCoordinates(const KGeoMap::GeoCoordinates& coordinate, const int getLevel);
static TileIndex fromIntList(const QIntList& intList);
static bool indicesEqual(const TileIndex& a, const TileIndex& b, const int upToLevel);
static QList<QIntList> listToIntListList(const QList<TileIndex>& tileIndexList);
public:
typedef QList<TileIndex> List;
private:
int m_indicesCount;
int m_indices[MaxIndexCount];
};
} // namespace KGeoMap
KGEOMAP_EXPORT QDebug operator<<(QDebug debugOut, const KGeoMap::TileIndex& tileIndex);
Q_DECLARE_TYPEINFO(KGeoMap::TileIndex, Q_MOVABLE_TYPE);
#endif // KGEOMAP_TILEINDEX_H
|