Ref T261, improved value classes

This commit is contained in:
Klaus Basan
2018-05-04 22:19:32 +02:00
committed by Roland Winklmeier
parent ab0c34b16a
commit eb815ab987
12 changed files with 158 additions and 21 deletions

View File

@@ -268,6 +268,9 @@ namespace BlackMisc
//! Get center of gravity
void setCG(const PhysicalQuantities::CLength &cg) { m_cg = cg; }
//! CG value available?
bool hasCG() const { return !m_cg.isNull(); }
//! Model type
ModelType getModelType() const { return m_modelType; }

View File

@@ -31,8 +31,9 @@ namespace BlackMisc
namespace FsCommon
{
//! Value object encapsulating information of software distributor.
//! \deprecated vPilot handling will be most likely removed in the future
class BLACKMISC_EXPORT CVPilotModelRule :
public BlackMisc::CValueObject<CVPilotModelRule>,
public CValueObject<CVPilotModelRule>,
public ITimestampBased
{
public:

View File

@@ -31,9 +31,10 @@ namespace BlackMisc
namespace FsCommon
{
//! Value object reading a set of vPilot rules
//! \deprecated vPilot handling will be most likely removed in the future
class BLACKMISC_EXPORT CVPilotModelRuleSet :
public CCollection<CVPilotModelRule>,
public BlackMisc::Mixin::MetaType<CVPilotModelRuleSet>
public Mixin::MetaType<CVPilotModelRuleSet>
{
public:
BLACKMISC_DECLARE_USING_MIXIN_METATYPE(CVPilotModelRuleSet)
@@ -67,7 +68,7 @@ namespace BlackMisc
//! To aircraft models
//! \note slow operation, can take a while
BlackMisc::Simulation::CAircraftModelList toAircraftModels() const;
Simulation::CAircraftModelList toAircraftModels() const;
private:
//! Convert values to upper case

View File

@@ -29,6 +29,7 @@ namespace BlackMisc
CDistributor::registerMetadata();
CDistributorList::registerMetadata();
CDistributorListPreferences::registerMetadata();
qDBusRegisterMetaType<CInterpolationAndRenderingSetupBase::InterpolatorMode>();
CInterpolationAndRenderingSetupPerCallsign::registerMetadata();
CInterpolationAndRenderingSetupGlobal::registerMetadata();
CInterpolationSetupList::registerMetadata();