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