mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-28 11:45:40 +08:00
Ref T730, Ref T731 update voice server setup to AfV URLs (formerly UDP ports)
This commit is contained in:
committed by
Mat Sutcliffe
parent
e485824bfc
commit
2123529fd8
@@ -205,7 +205,7 @@
|
|||||||
<string>reload</string>
|
<string>reload</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../blackmisc/blackmisc.qrc">
|
<iconset>
|
||||||
<normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</iconset>
|
<normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -331,7 +331,7 @@
|
|||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item alignment="Qt::AlignLeft|Qt::AlignTop">
|
<item alignment="Qt::AlignTop">
|
||||||
<widget class="BlackGui::Editors::CVoiceSetupForm" name="form_Voice">
|
<widget class="BlackGui::Editors::CVoiceSetupForm" name="form_Voice">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -494,7 +494,7 @@
|
|||||||
<string>refresh</string>
|
<string>refresh</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../blackmisc/blackmisc.qrc">
|
<iconset>
|
||||||
<normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</iconset>
|
<normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</normaloff>:/diagona/icons/diagona/icons/arrow-circle-225.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -511,7 +511,7 @@
|
|||||||
<string>quick mapping wizard</string>
|
<string>quick mapping wizard</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../blackmisc/blackmisc.qrc">
|
<iconset>
|
||||||
<normaloff>:/own/icons/own/swift3D/sw3DGreen-24.png</normaloff>:/own/icons/own/swift3D/sw3DGreen-24.png</iconset>
|
<normaloff>:/own/icons/own/swift3D/sw3DGreen-24.png</normaloff>:/own/icons/own/swift3D/sw3DGreen-24.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -896,6 +896,17 @@
|
|||||||
<header>blackgui/editors/voicesetupform.h</header>
|
<header>blackgui/editors/voicesetupform.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::Components::CServerListSelector</class>
|
||||||
|
<extends>QComboBox</extends>
|
||||||
|
<header>blackgui/components/serverlistselector.h</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::CLoginModeButtons</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>blackgui/loginmodebuttons.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>BlackGui::CTickLabel</class>
|
<class>BlackGui::CTickLabel</class>
|
||||||
<extends>QLabel</extends>
|
<extends>QLabel</extends>
|
||||||
@@ -925,17 +936,6 @@
|
|||||||
<header>blackgui/components/dbairlineicaoselectorcomponent.h</header>
|
<header>blackgui/components/dbairlineicaoselectorcomponent.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>BlackGui::Components::CServerListSelector</class>
|
|
||||||
<extends>QComboBox</extends>
|
|
||||||
<header>blackgui/components/serverlistselector.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
|
||||||
<class>BlackGui::CLoginModeButtons</class>
|
|
||||||
<extends>QFrame</extends>
|
|
||||||
<header>blackgui/loginmodebuttons.h</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>BlackGui::Editors::CPilotForm</class>
|
<class>BlackGui::Editors::CPilotForm</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
@@ -971,8 +971,6 @@
|
|||||||
<tabstop>pb_OverrideCredentialsOtherServers</tabstop>
|
<tabstop>pb_OverrideCredentialsOtherServers</tabstop>
|
||||||
<tabstop>sa_FsdDetails</tabstop>
|
<tabstop>sa_FsdDetails</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="../../blackmisc/blackmisc.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -267,7 +267,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../../blackmisc/blackmisc.qrc">
|
<iconset>
|
||||||
<normaloff>:/diagona/icons/diagona/icons/question-button.png</normaloff>:/diagona/icons/diagona/icons/question-button.png</iconset>
|
<normaloff>:/diagona/icons/diagona/icons/question-button.png</normaloff>:/diagona/icons/diagona/icons/question-button.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -322,7 +322,7 @@
|
|||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Voice</string>
|
<string>Voice</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="vl_VoiceSetup">
|
||||||
<item alignment="Qt::AlignTop">
|
<item alignment="Qt::AlignTop">
|
||||||
<widget class="BlackGui::Editors::CVoiceSetupForm" name="form_Voice">
|
<widget class="BlackGui::Editors::CVoiceSetupForm" name="form_Voice">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
@@ -346,17 +346,17 @@
|
|||||||
<header>blackgui/editors/fsdsetupform.h</header>
|
<header>blackgui/editors/fsdsetupform.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>BlackGui::CEcosystemComboBox</class>
|
|
||||||
<extends>QComboBox</extends>
|
|
||||||
<header>blackgui/ecosystemcombobox.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>BlackGui::Editors::CVoiceSetupForm</class>
|
<class>BlackGui::Editors::CVoiceSetupForm</class>
|
||||||
<extends>QFrame</extends>
|
<extends>QFrame</extends>
|
||||||
<header>blackgui/editors/voicesetupform.h</header>
|
<header>blackgui/editors/voicesetupform.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::CEcosystemComboBox</class>
|
||||||
|
<extends>QComboBox</extends>
|
||||||
|
<header>blackgui/ecosystemcombobox.h</header>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>tw_ServerForm</tabstop>
|
<tabstop>tw_ServerForm</tabstop>
|
||||||
@@ -371,8 +371,6 @@
|
|||||||
<tabstop>le_Password</tabstop>
|
<tabstop>le_Password</tabstop>
|
||||||
<tabstop>tb_Unhide</tabstop>
|
<tabstop>tb_Unhide</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="../../blackmisc/blackmisc.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->cb_Override->setChecked(true);
|
ui->cb_Override->setChecked(true);
|
||||||
QIntValidator *v = new QIntValidator(0, 65535, ui->le_VatsimUdpPort);
|
|
||||||
ui->le_VatsimUdpPort->setValidator(v);
|
|
||||||
this->resetToDefaultValues();
|
this->resetToDefaultValues();
|
||||||
connect(ui->cb_Override, &QCheckBox::toggled, this, &CVoiceSetupForm::enabledToggled, Qt::QueuedConnection);
|
connect(ui->cb_Override, &QCheckBox::toggled, this, &CVoiceSetupForm::enabledToggled, Qt::QueuedConnection);
|
||||||
connect(ui->pb_SetDefaults, &QPushButton::clicked, this, &CVoiceSetupForm::resetToDefaultValues);
|
connect(ui->pb_SetDefaults, &QPushButton::clicked, this, &CVoiceSetupForm::resetToDefaultValues);
|
||||||
@@ -36,7 +34,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
CVoiceSetup CVoiceSetupForm::getValue() const
|
CVoiceSetup CVoiceSetupForm::getValue() const
|
||||||
{
|
{
|
||||||
const CVoiceSetup s = CVoiceSetup(ui->le_VatsimUdpPort->text().toInt());
|
const CVoiceSetup s(ui->le_AfvVoiceServerUrl->text(), ui->le_AfvMapUrl->text());
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -48,7 +46,8 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CVoiceSetupForm::setValue(const CVoiceSetup &setup)
|
void CVoiceSetupForm::setValue(const CVoiceSetup &setup)
|
||||||
{
|
{
|
||||||
ui->le_VatsimUdpPort->setText(QString::number(setup.getVatsimUdpVoicePort()));
|
ui->le_AfvVoiceServerUrl->setText(setup.getAfvVoiceServerUrl());
|
||||||
|
ui->le_AfvMapUrl->setText(setup.getAfvMapUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CVoiceSetupForm::isVoiceSetupEnabled() const
|
bool CVoiceSetupForm::isVoiceSetupEnabled() const
|
||||||
@@ -80,7 +79,8 @@ namespace BlackGui
|
|||||||
void CVoiceSetupForm::setReadOnly(bool readonly)
|
void CVoiceSetupForm::setReadOnly(bool readonly)
|
||||||
{
|
{
|
||||||
ui->pb_SetDefaults->setEnabled(!readonly);
|
ui->pb_SetDefaults->setEnabled(!readonly);
|
||||||
ui->le_VatsimUdpPort->setReadOnly(readonly);
|
ui->le_AfvVoiceServerUrl->setReadOnly(readonly);
|
||||||
|
ui->le_AfvMapUrl->setReadOnly(readonly);
|
||||||
CGuiUtility::checkBoxesReadOnly(this, readonly);
|
CGuiUtility::checkBoxesReadOnly(this, readonly);
|
||||||
if (m_alwaysAllowOverride)
|
if (m_alwaysAllowOverride)
|
||||||
{
|
{
|
||||||
@@ -101,7 +101,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
CStatusMessageList CVoiceSetupForm::validate(bool nested) const
|
CStatusMessageList CVoiceSetupForm::validate(bool nested) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(nested);
|
Q_UNUSED(nested)
|
||||||
const CVoiceSetup val(this->getValue());
|
const CVoiceSetup val(this->getValue());
|
||||||
CStatusMessageList msgs(val.validate());
|
CStatusMessageList msgs(val.validate());
|
||||||
if (this->isReadOnly())
|
if (this->isReadOnly())
|
||||||
@@ -114,7 +114,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CVoiceSetupForm::enabledToggled(bool enabled)
|
void CVoiceSetupForm::enabledToggled(bool enabled)
|
||||||
{
|
{
|
||||||
Q_UNUSED(enabled);
|
Q_UNUSED(enabled)
|
||||||
this->setReadOnly(!enabled);
|
this->setReadOnly(!enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,16 +2,8 @@
|
|||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>CVoiceSetupForm</class>
|
<class>CVoiceSetupForm</class>
|
||||||
<widget class="QFrame" name="CVoiceSetupForm">
|
<widget class="QFrame" name="CVoiceSetupForm">
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>225</width>
|
|
||||||
<height>45</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Frame</string>
|
<string>AfV voice setup</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gl_VoiceSetup" columnstretch="1,1,1">
|
<layout class="QGridLayout" name="gl_VoiceSetup" columnstretch="1,1,1">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
@@ -29,6 +21,13 @@
|
|||||||
<property name="horizontalSpacing">
|
<property name="horizontalSpacing">
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QPushButton" name="pb_SetDefaults">
|
||||||
|
<property name="text">
|
||||||
|
<string>set defaults</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QCheckBox" name="cb_Override">
|
<widget class="QCheckBox" name="cb_Override">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -37,14 +36,14 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="lbl_VatsimUdpPort">
|
<widget class="QLabel" name="lbl_AfvVoiceServerUrl">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Voice UDP Port</string>
|
<string>AfV voice server URL</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1" colspan="2">
|
||||||
<widget class="QLineEdit" name="le_VatsimUdpPort"/>
|
<widget class="QLineEdit" name="le_AfvVoiceServerUrl"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="lbl_VoiceSetup">
|
<widget class="QLabel" name="lbl_VoiceSetup">
|
||||||
@@ -53,19 +52,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="3" column="0">
|
||||||
<widget class="QPushButton" name="pb_SetDefaults">
|
<widget class="QLabel" name="lbl_AfvMapUrl">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>set defaults</string>
|
<string>AfV map URL</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="1" colspan="2">
|
||||||
|
<widget class="QLineEdit" name="le_AfvMapUrl"/>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>cb_Override</tabstop>
|
<tabstop>cb_Override</tabstop>
|
||||||
<tabstop>pb_SetDefaults</tabstop>
|
<tabstop>pb_SetDefaults</tabstop>
|
||||||
<tabstop>le_VatsimUdpPort</tabstop>
|
<tabstop>le_AfvVoiceServerUrl</tabstop>
|
||||||
|
<tabstop>le_AfvMapUrl</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -21,15 +21,16 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
QString CVoiceSetup::convertToQString(bool i18n) const
|
QString CVoiceSetup::convertToQString(bool i18n) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(i18n);
|
Q_UNUSED(i18n)
|
||||||
return QStringLiteral("Port: %1").arg(getVatsimUdpVoicePort());
|
return QStringLiteral("Port: %1").arg(getAfvVoiceServerUrl());
|
||||||
}
|
}
|
||||||
|
|
||||||
CStatusMessageList CVoiceSetup::validate() const
|
CStatusMessageList CVoiceSetup::validate() const
|
||||||
{
|
{
|
||||||
static const CLogCategoryList cats(CLogCategoryList(this).withValidation());
|
static const CLogCategoryList cats(CLogCategoryList(this).withValidation());
|
||||||
CStatusMessageList msgs;
|
CStatusMessageList msgs;
|
||||||
if (this->getVatsimUdpVoicePort() < 1 || this->getVatsimUdpVoicePort() > 65535) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityError, u"Invalid voice port")); }
|
if (this->getAfvVoiceServerUrl().isEmpty()) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityError, u"Invalid voice server url")); }
|
||||||
|
if (this->getAfvMapUrl().isEmpty()) { msgs.push_back(CStatusMessage(CStatusMessage::SeverityError, u"Invalid voice server url")); }
|
||||||
msgs.addCategories(cats);
|
msgs.addCategories(cats);
|
||||||
return msgs;
|
return msgs;
|
||||||
}
|
}
|
||||||
@@ -40,7 +41,8 @@ namespace BlackMisc
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
CVoiceSetup::CVoiceSetup(int vatsimUdpPort) : m_vatismVoiceUdpPort(vatsimUdpPort)
|
CVoiceSetup::CVoiceSetup(const QString &afvVoiceServerUrl, const QString &afvMapUrl) :
|
||||||
|
m_afvVoiceServerUrl(afvVoiceServerUrl), m_afvMapUrl(afvMapUrl)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
CVariant CVoiceSetup::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
CVariant CVoiceSetup::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
|
||||||
@@ -49,7 +51,8 @@ namespace BlackMisc
|
|||||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case IndexVatsimVoiceUdpPort: return CVariant::fromValue(m_vatismVoiceUdpPort);
|
case IndexAfvVoiceServerUrl: return CVariant::fromValue(m_afvVoiceServerUrl);
|
||||||
|
case IndexAfvMapUrl: return CVariant::fromValue(m_afvMapUrl);
|
||||||
default: return CValueObject::propertyByIndex(index);
|
default: return CValueObject::propertyByIndex(index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -60,7 +63,8 @@ namespace BlackMisc
|
|||||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case IndexVatsimVoiceUdpPort: m_vatismVoiceUdpPort = variant.toInt(); break;
|
case IndexAfvVoiceServerUrl: m_afvVoiceServerUrl = variant.toQString(); break;
|
||||||
|
case IndexAfvMapUrl: m_afvMapUrl = variant.toQString(); break;
|
||||||
default:
|
default:
|
||||||
CValueObject::setPropertyByIndex(index, variant);
|
CValueObject::setPropertyByIndex(index, variant);
|
||||||
break;
|
break;
|
||||||
@@ -73,7 +77,8 @@ namespace BlackMisc
|
|||||||
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
const ColumnIndex i = index.frontCasted<ColumnIndex>();
|
||||||
switch (i)
|
switch (i)
|
||||||
{
|
{
|
||||||
case IndexVatsimVoiceUdpPort: return Compare::compare(m_vatismVoiceUdpPort, compareValue.m_vatismVoiceUdpPort);
|
case IndexAfvVoiceServerUrl: return m_afvVoiceServerUrl.compare(compareValue.m_afvVoiceServerUrl, Qt::CaseInsensitive);
|
||||||
|
case IndexAfvMapUrl: return m_afvMapUrl.compare(compareValue.m_afvMapUrl, Qt::CaseInsensitive);
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
BLACK_VERIFY_X(false, Q_FUNC_INFO, qUtf8Printable("No comparison for index " + index.toQString()));
|
BLACK_VERIFY_X(false, Q_FUNC_INFO, qUtf8Printable("No comparison for index " + index.toQString()));
|
||||||
|
|||||||
@@ -32,20 +32,27 @@ namespace BlackMisc
|
|||||||
//! Properties by index
|
//! Properties by index
|
||||||
enum ColumnIndex
|
enum ColumnIndex
|
||||||
{
|
{
|
||||||
IndexVatsimVoiceUdpPort = CPropertyIndex::GlobalIndexCVoiceSetup,
|
IndexAfvVoiceServerUrl = CPropertyIndex::GlobalIndexCVoiceSetup,
|
||||||
|
IndexAfvMapUrl
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Default constructor.
|
//! Default constructor.
|
||||||
CVoiceSetup() {}
|
CVoiceSetup() {}
|
||||||
|
|
||||||
//! Setup with values
|
//! Setup with values
|
||||||
CVoiceSetup(int vatsimUdpPort);
|
CVoiceSetup(const QString &afvVoiceServerUrl, const QString &afvMapUrl);
|
||||||
|
|
||||||
//! The voice UDP port
|
//! AFV voice server URL
|
||||||
void setVatsimUdpVoicePort(int port) { m_vatismVoiceUdpPort = port;}
|
void setAfvVoiceServerUrl(const QString &serverUrl) { m_afvVoiceServerUrl = serverUrl;}
|
||||||
|
|
||||||
//! VATSIM UDP voice port
|
//! AFV voice server URL
|
||||||
int getVatsimUdpVoicePort() const { return m_vatismVoiceUdpPort; }
|
const QString &getAfvVoiceServerUrl() const { return m_afvVoiceServerUrl; }
|
||||||
|
|
||||||
|
//! AFV map URL
|
||||||
|
void setAfvMapUrl(const QString &mapUrl) { m_afvMapUrl = mapUrl;}
|
||||||
|
|
||||||
|
//! AFV map URL
|
||||||
|
const QString &getAfvMapUrl() const { return m_afvMapUrl; }
|
||||||
|
|
||||||
//! \copydoc BlackMisc::Mixin::Index::propertyByIndex
|
//! \copydoc BlackMisc::Mixin::Index::propertyByIndex
|
||||||
CVariant propertyByIndex(const CPropertyIndex &index) const;
|
CVariant propertyByIndex(const CPropertyIndex &index) const;
|
||||||
@@ -66,11 +73,13 @@ namespace BlackMisc
|
|||||||
static const CVoiceSetup &vatsimStandard();
|
static const CVoiceSetup &vatsimStandard();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_vatismVoiceUdpPort = 3292;
|
QString m_afvVoiceServerUrl = "https://voice1.vatsim.uk";
|
||||||
|
QString m_afvMapUrl = "https://afv-map.vatsim.net/";
|
||||||
|
|
||||||
BLACK_METACLASS(
|
BLACK_METACLASS(
|
||||||
CVoiceSetup,
|
CVoiceSetup,
|
||||||
BLACK_METAMEMBER(vatismVoiceUdpPort)
|
BLACK_METAMEMBER(afvVoiceServerUrl),
|
||||||
|
BLACK_METAMEMBER(afvMapUrl)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
Reference in New Issue
Block a user