|
|
@ -32,8 +32,8 @@ const qreal FactMetaData::UnitConsts_s::milesToMeters = 1609.344; |
|
|
|
const qreal FactMetaData::UnitConsts_s::feetToMeters = 0.3048; |
|
|
|
const qreal FactMetaData::UnitConsts_s::feetToMeters = 0.3048; |
|
|
|
const qreal FactMetaData::UnitConsts_s::inchesToCentimeters = 2.54; |
|
|
|
const qreal FactMetaData::UnitConsts_s::inchesToCentimeters = 2.54; |
|
|
|
|
|
|
|
|
|
|
|
const QString FactMetaData::defaultCategory = tr("Other"); |
|
|
|
static const char* kDefaultCategory = QT_TRANSLATE_NOOP("FactMetaData", "Other"); |
|
|
|
const QString FactMetaData::defaultGroup = tr("Misc"); |
|
|
|
static const char* kDefaultGroup = QT_TRANSLATE_NOOP("FactMetaData", "Misc"); |
|
|
|
|
|
|
|
|
|
|
|
// Built in translations for all Facts
|
|
|
|
// Built in translations for all Facts
|
|
|
|
const FactMetaData::BuiltInTranslation_s FactMetaData::_rgBuiltInTranslations[] = { |
|
|
|
const FactMetaData::BuiltInTranslation_s FactMetaData::_rgBuiltInTranslations[] = { |
|
|
@ -84,8 +84,6 @@ FactMetaData::FactMetaData(QObject* parent) |
|
|
|
, _decimalPlaces (unknownDecimalPlaces) |
|
|
|
, _decimalPlaces (unknownDecimalPlaces) |
|
|
|
, _rawDefaultValue (0) |
|
|
|
, _rawDefaultValue (0) |
|
|
|
, _defaultValueAvailable(false) |
|
|
|
, _defaultValueAvailable(false) |
|
|
|
, _category (defaultCategory) |
|
|
|
|
|
|
|
, _group (defaultGroup) |
|
|
|
|
|
|
|
, _rawMax (_maxForType()) |
|
|
|
, _rawMax (_maxForType()) |
|
|
|
, _maxIsDefaultForType (true) |
|
|
|
, _maxIsDefaultForType (true) |
|
|
|
, _rawMin (_minForType()) |
|
|
|
, _rawMin (_minForType()) |
|
|
@ -97,7 +95,8 @@ FactMetaData::FactMetaData(QObject* parent) |
|
|
|
, _hasControl (true) |
|
|
|
, _hasControl (true) |
|
|
|
, _readOnly (false) |
|
|
|
, _readOnly (false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
_category = kDefaultCategory; |
|
|
|
|
|
|
|
_group = kDefaultGroup; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FactMetaData::FactMetaData(ValueType_t type, QObject* parent) |
|
|
|
FactMetaData::FactMetaData(ValueType_t type, QObject* parent) |
|
|
@ -106,8 +105,6 @@ FactMetaData::FactMetaData(ValueType_t type, QObject* parent) |
|
|
|
, _decimalPlaces (unknownDecimalPlaces) |
|
|
|
, _decimalPlaces (unknownDecimalPlaces) |
|
|
|
, _rawDefaultValue (0) |
|
|
|
, _rawDefaultValue (0) |
|
|
|
, _defaultValueAvailable(false) |
|
|
|
, _defaultValueAvailable(false) |
|
|
|
, _category (defaultCategory) |
|
|
|
|
|
|
|
, _group (defaultGroup) |
|
|
|
|
|
|
|
, _rawMax (_maxForType()) |
|
|
|
, _rawMax (_maxForType()) |
|
|
|
, _maxIsDefaultForType (true) |
|
|
|
, _maxIsDefaultForType (true) |
|
|
|
, _rawMin (_minForType()) |
|
|
|
, _rawMin (_minForType()) |
|
|
@ -119,7 +116,8 @@ FactMetaData::FactMetaData(ValueType_t type, QObject* parent) |
|
|
|
, _hasControl (true) |
|
|
|
, _hasControl (true) |
|
|
|
, _readOnly (false) |
|
|
|
, _readOnly (false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
_category = kDefaultCategory; |
|
|
|
|
|
|
|
_group = kDefaultGroup; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
FactMetaData::FactMetaData(const FactMetaData& other, QObject* parent) |
|
|
|
FactMetaData::FactMetaData(const FactMetaData& other, QObject* parent) |
|
|
@ -134,8 +132,6 @@ FactMetaData::FactMetaData(ValueType_t type, const QString name, QObject* parent |
|
|
|
, _decimalPlaces (unknownDecimalPlaces) |
|
|
|
, _decimalPlaces (unknownDecimalPlaces) |
|
|
|
, _rawDefaultValue (0) |
|
|
|
, _rawDefaultValue (0) |
|
|
|
, _defaultValueAvailable(false) |
|
|
|
, _defaultValueAvailable(false) |
|
|
|
, _category (defaultCategory) |
|
|
|
|
|
|
|
, _group (defaultGroup) |
|
|
|
|
|
|
|
, _rawMax (_maxForType()) |
|
|
|
, _rawMax (_maxForType()) |
|
|
|
, _maxIsDefaultForType (true) |
|
|
|
, _maxIsDefaultForType (true) |
|
|
|
, _rawMin (_minForType()) |
|
|
|
, _rawMin (_minForType()) |
|
|
@ -148,7 +144,8 @@ FactMetaData::FactMetaData(ValueType_t type, const QString name, QObject* parent |
|
|
|
, _hasControl (true) |
|
|
|
, _hasControl (true) |
|
|
|
, _readOnly (false) |
|
|
|
, _readOnly (false) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
_category = kDefaultCategory; |
|
|
|
|
|
|
|
_group = kDefaultGroup; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const FactMetaData& FactMetaData::operator=(const FactMetaData& other) |
|
|
|
const FactMetaData& FactMetaData::operator=(const FactMetaData& other) |
|
|
@ -181,6 +178,16 @@ const FactMetaData& FactMetaData::operator=(const FactMetaData& other) |
|
|
|
return *this; |
|
|
|
return *this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const QString FactMetaData::defaultCategory() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return QString(kDefaultCategory); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const QString FactMetaData::defaultGroup() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return QString(kDefaultGroup); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QVariant FactMetaData::rawDefaultValue(void) const |
|
|
|
QVariant FactMetaData::rawDefaultValue(void) const |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (_defaultValueAvailable) { |
|
|
|
if (_defaultValueAvailable) { |
|
|
|