mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 17:30:12 +08:00
Ref T261, setup support for isNull
This commit is contained in:
committed by
Roland Winklmeier
parent
46f509c367
commit
9c7134ff56
@@ -322,5 +322,11 @@ namespace BlackMisc
|
|||||||
}
|
}
|
||||||
CInterpolationAndRenderingSetupBase::setPropertyByIndex(index, variant);
|
CInterpolationAndRenderingSetupBase::setPropertyByIndex(index, variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const CInterpolationAndRenderingSetupPerCallsign &CInterpolationAndRenderingSetupPerCallsign::null()
|
||||||
|
{
|
||||||
|
static const CInterpolationAndRenderingSetupPerCallsign null;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -219,12 +219,18 @@ namespace BlackMisc
|
|||||||
//! Set callsign
|
//! Set callsign
|
||||||
void setCallsign(const Aviation::CCallsign &callsign) { m_callsign = callsign; }
|
void setCallsign(const Aviation::CCallsign &callsign) { m_callsign = callsign; }
|
||||||
|
|
||||||
|
//! NULL?
|
||||||
|
bool isNull() const { return m_callsign.isEmpty(); }
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Mixin::Index::propertyByIndex
|
//! \copydoc BlackMisc::Mixin::Index::propertyByIndex
|
||||||
CVariant propertyByIndex(const CPropertyIndex &index) const;
|
CVariant propertyByIndex(const CPropertyIndex &index) const;
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
|
||||||
void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant);
|
void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant);
|
||||||
|
|
||||||
|
//! NULL object
|
||||||
|
static const CInterpolationAndRenderingSetupPerCallsign &null();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Aviation::CCallsign m_callsign;
|
Aviation::CCallsign m_callsign;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ namespace BlackMisc
|
|||||||
CInterpolationAndRenderingSetupPerCallsign IInterpolationSetupProvider::getInterpolationSetupPerCallsignOrDefault(const CCallsign &callsign) const
|
CInterpolationAndRenderingSetupPerCallsign IInterpolationSetupProvider::getInterpolationSetupPerCallsignOrDefault(const CCallsign &callsign) const
|
||||||
{
|
{
|
||||||
QReadLocker l(&m_lockSetup);
|
QReadLocker l(&m_lockSetup);
|
||||||
return m_setups.contains(callsign) ? m_setups.value(callsign) : CInterpolationAndRenderingSetupPerCallsign(callsign, m_globalSetup);
|
if (!m_setups.contains(callsign)) { return CInterpolationAndRenderingSetupPerCallsign(callsign, m_globalSetup); }
|
||||||
|
return m_setups.value(callsign);
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterpolationSetupList IInterpolationSetupProvider::getInterpolationSetupsPerCallsign() const
|
CInterpolationSetupList IInterpolationSetupProvider::getInterpolationSetupsPerCallsign() const
|
||||||
|
|||||||
Reference in New Issue
Block a user