mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-26 19:19:16 +02:00
Added support for ENC maps
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
#include <QList>
|
||||
#include <QVector>
|
||||
#include <QDebug>
|
||||
#include "common/rectc.h"
|
||||
|
||||
class Polygon
|
||||
@ -55,8 +56,19 @@ private:
|
||||
return rect;
|
||||
}
|
||||
|
||||
friend QDebug operator<<(QDebug dbg, const Polygon &poly);
|
||||
|
||||
QList<QVector<Coordinates> > _paths;
|
||||
RectC _boundingRect;
|
||||
};
|
||||
|
||||
|
||||
#ifndef QT_NO_DEBUG
|
||||
inline QDebug operator<<(QDebug dbg, const Polygon &poly)
|
||||
{
|
||||
dbg.nospace() << "Polygon(" << poly._paths << ")";
|
||||
return dbg.space();
|
||||
}
|
||||
#endif // QT_NO_DEBUG
|
||||
|
||||
#endif // POLYGON_H
|
||||
|
@ -113,6 +113,16 @@ double Util::niceNum(double x, bool round)
|
||||
return nf * pow(10.0, expv);
|
||||
}
|
||||
|
||||
int Util::log2i(unsigned val)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
while (val >>= 1)
|
||||
ret++;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
QString Util::file2name(const QString &path)
|
||||
{
|
||||
QFileInfo fi(displayName(path));
|
||||
|
@ -5,8 +5,12 @@
|
||||
|
||||
class QTemporaryDir;
|
||||
|
||||
#define ARRAY_SIZE(array) \
|
||||
(sizeof(array) / sizeof(array[0]))
|
||||
|
||||
namespace Util
|
||||
{
|
||||
int log2i(unsigned val);
|
||||
int str2int(const char *str, int len);
|
||||
double niceNum(double x, bool round);
|
||||
QString file2name(const QString &path);
|
||||
|
Reference in New Issue
Block a user