2018-04-05 20:38:23 +02:00
|
|
|
#ifndef COORDINATESYSTEM_H
|
|
|
|
#define COORDINATESYSTEM_H
|
|
|
|
|
2018-04-07 18:42:25 +02:00
|
|
|
#include <QDebug>
|
|
|
|
|
2018-04-05 20:38:23 +02:00
|
|
|
class CoordinateSystem
|
|
|
|
{
|
|
|
|
public:
|
2018-04-05 21:13:48 +02:00
|
|
|
enum AxisOrder {Unknown, XY, YX};
|
|
|
|
|
2018-04-05 20:38:23 +02:00
|
|
|
CoordinateSystem() : _axisOrder(Unknown) {}
|
2018-04-07 18:42:25 +02:00
|
|
|
CoordinateSystem(AxisOrder axisOrder) : _axisOrder(axisOrder) {}
|
2018-04-05 20:38:23 +02:00
|
|
|
CoordinateSystem(int code);
|
|
|
|
|
2020-04-21 23:26:35 +02:00
|
|
|
bool operator==(const CoordinateSystem &other) const
|
|
|
|
{return (_axisOrder == other._axisOrder);}
|
|
|
|
|
2018-05-16 18:52:48 +02:00
|
|
|
bool isNull() const {return (_axisOrder == Unknown);}
|
2018-04-05 20:38:23 +02:00
|
|
|
bool isValid() const {return (_axisOrder != Unknown);}
|
|
|
|
|
|
|
|
AxisOrder axisOrder() const {return _axisOrder;}
|
|
|
|
|
|
|
|
private:
|
|
|
|
AxisOrder _axisOrder;
|
|
|
|
};
|
|
|
|
|
2018-04-07 18:42:25 +02:00
|
|
|
#ifndef QT_NO_DEBUG
|
|
|
|
QDebug operator<<(QDebug dbg, const CoordinateSystem &cs);
|
|
|
|
#endif // QT_NO_DEBUG
|
|
|
|
|
2018-04-05 20:38:23 +02:00
|
|
|
#endif // COORDINATESYSTEM_H
|