mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Network setup not yet used, disabled
This commit is contained in:
@@ -8,9 +8,10 @@
|
||||
*/
|
||||
|
||||
#include "networksettings.h"
|
||||
#include "blackmisc/stringutils.h"
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QStringBuilder>
|
||||
#include "blackmisc/stringutils.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -21,33 +22,32 @@ namespace BlackMisc
|
||||
QString CNetworkSettings::convertToQString(bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
return QStringLiteral("dyn.offset: ") % boolToYesNo(this->isUsingDynamicOffsetTimes());
|
||||
return QStringLiteral("NOT USED");
|
||||
}
|
||||
|
||||
CVariant CNetworkSettings::propertyByIndex(const CPropertyIndex &index) const
|
||||
{
|
||||
if (index.isMyself()) { return CVariant::from(*this); }
|
||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexDynamicOffsetTime: return CVariant::fromValue(m_dynamicOffsetTimes);
|
||||
default: break;
|
||||
}
|
||||
// const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
// switch (i)
|
||||
// {
|
||||
// case IndexDynamicOffsetTime: return CVariant::fromValue(m_dynamicOffsetTimes);
|
||||
// default: break;
|
||||
// }
|
||||
return CValueObject::propertyByIndex(index);
|
||||
}
|
||||
|
||||
void CNetworkSettings::setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant)
|
||||
{
|
||||
if (index.isMyself()) { (*this) = variant.to<CNetworkSettings>(); return; }
|
||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
switch (i)
|
||||
{
|
||||
case IndexDynamicOffsetTime: this->setDynamicOffsetTimes(variant.toBool()); break;
|
||||
default: break;
|
||||
}
|
||||
// const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||
// switch (i)
|
||||
// {
|
||||
// case IndexDynamicOffsetTime: this->setDynamicOffsetTimes(variant.toBool()); break;
|
||||
// default: break;
|
||||
// }
|
||||
CValueObject::setPropertyByIndex(index, variant);
|
||||
}
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -29,6 +29,7 @@ namespace BlackMisc
|
||||
namespace Settings
|
||||
{
|
||||
//! Network settings
|
||||
//! \remark CURRENTLY a STUB not used
|
||||
class BLACKMISC_EXPORT CNetworkSettings : public CValueObject<CNetworkSettings>
|
||||
{
|
||||
public:
|
||||
@@ -41,12 +42,6 @@ namespace BlackMisc
|
||||
//! Constructor
|
||||
CNetworkSettings() {}
|
||||
|
||||
//! Dynamic offset values?
|
||||
bool isUsingDynamicOffsetTimes() const { return m_dynamicOffsetTimes; }
|
||||
|
||||
//! Dynamic offset values?
|
||||
void setDynamicOffsetTimes(bool dynamic) { m_dynamicOffsetTimes = dynamic; }
|
||||
|
||||
//! \copydoc BlackMisc::Mixin::String::toQString
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
@@ -57,11 +52,11 @@ namespace BlackMisc
|
||||
void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant);
|
||||
|
||||
private:
|
||||
bool m_dynamicOffsetTimes = false;
|
||||
bool m_dummy = false;
|
||||
|
||||
BLACK_METACLASS(
|
||||
CNetworkSettings,
|
||||
BLACK_METAMEMBER(dynamicOffsetTimes)
|
||||
BLACK_METAMEMBER(dummy)
|
||||
);
|
||||
};
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user