1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-27 11:39:16 +02:00

Added support for WMS multi-layer maps

This commit is contained in:
2018-04-02 19:59:52 +02:00
parent 60cc869ade
commit e845e216bd
4 changed files with 96 additions and 37 deletions

View File

@ -8,6 +8,15 @@ void RangeF::resize(qreal size)
_max += adj;
}
RangeF RangeF::operator|(const RangeF &r) const
{
if (isNull())
return r;
if (r.isNull())
return *this;
return RangeF(qMax(this->_min, r._min), qMin(this->_max, r._max));
}
#ifndef QT_NO_DEBUG
QDebug operator<<(QDebug dbg, const Range &range)
{

View File

@ -29,10 +29,14 @@ public:
RangeF() {_min = 0; _max = 0;}
RangeF(qreal min, qreal max) {_min = min, _max = max;}
RangeF operator|(const RangeF &r) const;
RangeF &operator|=(const RangeF &r) {*this = *this | r; return *this;}
qreal min() const {return _min;}
qreal max() const {return _max;}
qreal size() const {return (_max - _min);}
bool isNull() const {return _min == 0 && _max == 0;}
bool isValid() const {return size() >= 0;}
void setMin(qreal min) {_min = min;}