refs #289, negative time values supported, required for time offset

This commit is contained in:
Klaus Basan
2014-07-09 19:58:18 +02:00
parent 76cbb5348c
commit af17c2c4e6
5 changed files with 115 additions and 11 deletions

View File

@@ -219,6 +219,18 @@ namespace BlackMisc
return !this->isZeroEpsilonConsidered() && this->m_value < 0;
}
//! Make value always positive
void makePositive()
{
if (this->m_value < 0) { this->m_value *= -1.0; }
}
//! Make value always negative
void makeNegative()
{
if (this->m_value > 0) { this->m_value *= -1.0; }
}
//! \copydoc CValueObject::marshallToDbus
virtual void marshallToDbus(QDBusArgument &argument) const override;