Issue #77 Move QPair typedefs to their corresponding value type headers

This commit is contained in:
Mat Sutcliffe
2020-08-28 18:01:48 +01:00
parent 0e33a6991f
commit 515dc7fef1
7 changed files with 15 additions and 44 deletions

View File

@@ -19,6 +19,7 @@
#include <QMetaType>
#include <QString>
#include <QPair>
namespace BlackMisc
{
@@ -114,9 +115,12 @@ namespace BlackMisc
//! Normalize: 0≤ degrees <360
static double normalizeDegrees360(double degrees, int roundDigits = -1);
};
using CAnglePair = QPair<CAngle, CAngle>; //!< Pair of angle
} // ns
} // ns
Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CAngle)
Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CAnglePair)
#endif // guard

View File

@@ -13,6 +13,7 @@
#include "blackmisc/blackmiscexport.h"
#include "blackmisc/pq/physicalquantity.h"
#include <QPair>
namespace BlackMisc
{
@@ -37,9 +38,12 @@ namespace BlackMisc
//! \copydoc CPhysicalQuantity(const QString &unitString)
CLength(const QString &unitString) : CPhysicalQuantity(unitString) {}
};
using CLengthPair = QPair<CLength, CLength>; //!< Pair of length
} // ns
} // ns
Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CLength)
Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CLengthPair)
#endif // guard

View File

@@ -13,6 +13,7 @@
#include "blackmisc/blackmiscexport.h"
#include "blackmisc/pq/physicalquantity.h"
#include <QPair>
namespace BlackMisc
{
@@ -34,9 +35,11 @@ namespace BlackMisc
CSpeed(const QString &unitString) : CPhysicalQuantity(unitString) {}
};
using CSpeedPair = QPair<CSpeed, CSpeed>; //!< Pair of speeds
} // ns
} // ns
Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CSpeed)
Q_DECLARE_METATYPE(BlackMisc::PhysicalQuantities::CSpeedPair)
#endif // guard