mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
refs #681, removed old FSD settings (we use server based FSD setup now)
This commit is contained in:
@@ -22,19 +22,6 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
namespace Network
|
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
|
//! Virtual air traffic servers
|
||||||
struct TrafficServers : public BlackMisc::CSettingTrait<BlackMisc::Network::CServerList>
|
struct TrafficServers : public BlackMisc::CSettingTrait<BlackMisc::Network::CServerList>
|
||||||
{
|
{
|
||||||
@@ -66,17 +53,6 @@ namespace BlackCore
|
|||||||
//! \copydoc BlackMisc::CSettingTrait::defaultValue
|
//! \copydoc BlackMisc::CSettingTrait::defaultValue
|
||||||
static const QString &defaultValue() { static const QString dv("session"); return dv; }
|
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
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -25,20 +25,8 @@ namespace BlackGui
|
|||||||
ui(new Ui::CSettingsNetworkComponent)
|
ui(new Ui::CSettingsNetworkComponent)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
connect(this->ui->cb_FastPositionUpdates, &QCheckBox::released, this, &CSettingsNetworkComponent::ps_guiValuesChanged);
|
|
||||||
this->ui->cb_FastPositionUpdates->setChecked(m_interimPositionsEnabled.get());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CSettingsNetworkComponent::~CSettingsNetworkComponent() { }
|
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
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
namespace Components
|
namespace Components
|
||||||
{
|
{
|
||||||
|
|
||||||
//! General settings for network
|
//! General settings for network
|
||||||
class BLACKGUI_EXPORT CSettingsNetworkComponent :
|
class BLACKGUI_EXPORT CSettingsNetworkComponent :
|
||||||
public QFrame
|
public QFrame
|
||||||
@@ -41,15 +40,9 @@ namespace BlackGui
|
|||||||
//! Destructor
|
//! Destructor
|
||||||
~CSettingsNetworkComponent();
|
~CSettingsNetworkComponent();
|
||||||
|
|
||||||
private:
|
|
||||||
//! GUI values have been changed
|
|
||||||
void ps_guiValuesChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<Ui::CSettingsNetworkComponent> ui;
|
QScopedPointer<Ui::CSettingsNetworkComponent> ui;
|
||||||
BlackMisc::CSetting<BlackCore::Settings::Network::InterimPositionsEnabled> m_interimPositionsEnabled { this };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|
||||||
|
|||||||
@@ -20,34 +20,7 @@
|
|||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="1">
|
<item row="0" column="0" colspan="2">
|
||||||
<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">
|
|
||||||
<widget class="QGroupBox" name="gb_Services">
|
<widget class="QGroupBox" name="gb_Services">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Services</string>
|
<string>Services</string>
|
||||||
@@ -72,6 +45,19 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
|||||||
Reference in New Issue
Block a user