refs #681, removed old FSD settings (we use server based FSD setup now)

This commit is contained in:
Klaus Basan
2016-06-27 03:52:54 +02:00
parent c133ad04c7
commit 5c4e4e978e
4 changed files with 14 additions and 71 deletions

View File

@@ -22,19 +22,6 @@ namespace BlackCore
{
namespace Network
{
//! Name of text codec to use with text in FSD protocol
struct WireTextCodec : public BlackMisc::CSettingTrait<QString>
{
//! \copydoc BlackMisc::CSettingTrait::key
static const char *key() { return "network/wiretextcodec"; }
//! \copydoc BlackMisc::CSettingTrait::defaultValue
static const QString &defaultValue() { static const QString dv("latin1"); return dv; }
//! \copydoc BlackMisc::CSettingTrait::isValid
static bool isValid(const QString &value) { return QTextCodec::codecForName(qPrintable(value)); }
};
//! Virtual air traffic servers
struct TrafficServers : public BlackMisc::CSettingTrait<BlackMisc::Network::CServerList>
{
@@ -66,17 +53,6 @@ namespace BlackCore
//! \copydoc BlackMisc::CSettingTrait::defaultValue
static const QString &defaultValue() { static const QString dv("session"); return dv; }
};
//! Interim positions enabled
struct InterimPositionsEnabled : public BlackMisc::CSettingTrait<bool>
{
//! \copydoc BlackMisc::CSettingTrait::key
static const char *key() { return "network/interimpositions"; }
//! \copydoc BlackMisc::CSettingTrait::defaultValue
static bool defaultValue() { return true; }
};
} // ns
} // ns
} // ns

View File

@@ -25,20 +25,8 @@ namespace BlackGui
ui(new Ui::CSettingsNetworkComponent)
{
ui->setupUi(this);
connect(this->ui->cb_FastPositionUpdates, &QCheckBox::released, this, &CSettingsNetworkComponent::ps_guiValuesChanged);
this->ui->cb_FastPositionUpdates->setChecked(m_interimPositionsEnabled.get());
}
CSettingsNetworkComponent::~CSettingsNetworkComponent() { }
void CSettingsNetworkComponent::ps_guiValuesChanged()
{
QObject *sender = QObject::sender();
if (sender == ui->cb_FastPositionUpdates)
{
bool enabled = this->ui->cb_FastPositionUpdates->isChecked();
m_interimPositionsEnabled.set(enabled);
}
}
} // ns
} // ns

View File

@@ -27,7 +27,6 @@ namespace BlackGui
{
namespace Components
{
//! General settings for network
class BLACKGUI_EXPORT CSettingsNetworkComponent :
public QFrame
@@ -41,15 +40,9 @@ namespace BlackGui
//! Destructor
~CSettingsNetworkComponent();
private:
//! GUI values have been changed
void ps_guiValuesChanged();
private:
QScopedPointer<Ui::CSettingsNetworkComponent> ui;
BlackMisc::CSetting<BlackCore::Settings::Network::InterimPositionsEnabled> m_interimPositionsEnabled { this };
};
} // ns
} // ns

View File

@@ -20,34 +20,7 @@
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QCheckBox" name="cb_FastPositionUpdates">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lbl_FastPositionUpdates">
<property name="text">
<string>Enable fast position updates</string>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="vs_NetworkSettings">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" colspan="2">
<item row="0" column="0" colspan="2">
<widget class="QGroupBox" name="gb_Services">
<property name="title">
<string>Services</string>
@@ -72,6 +45,19 @@
</layout>
</widget>
</item>
<item row="1" column="0">
<spacer name="vs_NetworkSettings">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<customwidgets>