mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-22 10:20:47 +01:00
Code cleanup
This commit is contained in:
parent
48404ea43b
commit
ba49497608
@ -26,31 +26,6 @@ using namespace IMG;
|
|||||||
#define AREA(rect) \
|
#define AREA(rect) \
|
||||||
(rect.size().width() * rect.size().height())
|
(rect.size().width() * rect.size().height())
|
||||||
|
|
||||||
struct Sector
|
|
||||||
{
|
|
||||||
Sector(Light::Color color, quint32 start, quint32 end)
|
|
||||||
: color(color), start(start), end(end) {}
|
|
||||||
|
|
||||||
bool operator==(const Sector &other) const
|
|
||||||
{
|
|
||||||
return (color == other.color && start == other.start && end == other.end);
|
|
||||||
}
|
|
||||||
bool operator<(const Sector &other) const
|
|
||||||
{
|
|
||||||
if (color == other.color) {
|
|
||||||
if (start == other.start)
|
|
||||||
return end < other.end;
|
|
||||||
else
|
|
||||||
return start < other.start;
|
|
||||||
} else
|
|
||||||
return color < other.color;
|
|
||||||
}
|
|
||||||
|
|
||||||
Light::Color color;
|
|
||||||
quint32 start;
|
|
||||||
quint32 end;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const QColor textColor(Qt::black);
|
static const QColor textColor(Qt::black);
|
||||||
static const QColor haloColor(Qt::white);
|
static const QColor haloColor(Qt::white);
|
||||||
static const QColor shieldColor(Qt::white);
|
static const QColor shieldColor(Qt::white);
|
||||||
|
@ -51,6 +51,32 @@ private:
|
|||||||
double &ele;
|
double &ele;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct Sector
|
||||||
|
{
|
||||||
|
Sector(Light::Color color, quint32 start, quint32 end)
|
||||||
|
: color(color), start(start), end(end) {}
|
||||||
|
|
||||||
|
bool operator==(const Sector &other) const
|
||||||
|
{
|
||||||
|
return (color == other.color && start == other.start
|
||||||
|
&& end == other.end);
|
||||||
|
}
|
||||||
|
bool operator<(const Sector &other) const
|
||||||
|
{
|
||||||
|
if (color == other.color) {
|
||||||
|
if (start == other.start)
|
||||||
|
return end < other.end;
|
||||||
|
else
|
||||||
|
return start < other.start;
|
||||||
|
} else
|
||||||
|
return color < other.color;
|
||||||
|
}
|
||||||
|
|
||||||
|
Light::Color color;
|
||||||
|
quint32 start;
|
||||||
|
quint32 end;
|
||||||
|
};
|
||||||
|
|
||||||
void fetchData(QList<MapData::Poly> &polygons, QList<MapData::Poly> &lines,
|
void fetchData(QList<MapData::Poly> &polygons, QList<MapData::Poly> &lines,
|
||||||
QList<MapData::Point> &points);
|
QList<MapData::Point> &points);
|
||||||
QPointF ll2xy(const Coordinates &c) const
|
QPointF ll2xy(const Coordinates &c) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user