mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Ref T739, style
This commit is contained in:
committed by
Mat Sutcliffe
parent
7e36e67f89
commit
66968ff3a5
@@ -26,6 +26,7 @@ namespace BlackCore
|
||||
|
||||
CActionBind::~CActionBind()
|
||||
{
|
||||
// void
|
||||
}
|
||||
|
||||
void CActionBind::unbind()
|
||||
|
||||
@@ -739,28 +739,6 @@ namespace BlackCore
|
||||
return;
|
||||
Q_UNUSED(url)
|
||||
Q_UNUSED(callsign)
|
||||
|
||||
/**
|
||||
// URL
|
||||
const QString trimmedUrl = url.trimmed();
|
||||
CPropertyIndexVariantMap vm({ CAtcStation::IndexVoiceRoom, CVoiceRoom::IndexUrl }, trimmedUrl);
|
||||
const int changedOnline = this->updateOnlineStation(callsign, vm, true, true);
|
||||
if (changedOnline < 1) { return; }
|
||||
|
||||
Q_ASSERT(changedOnline == 1);
|
||||
const CAtcStation station = m_atcStationsOnline.findFirstByCallsign(callsign);
|
||||
emit this->changedAtcStationOnlineConnectionStatus(station, true); // send when voice room url is available
|
||||
|
||||
vm.addValue(CAtcStation::IndexIsOnline, true); // with voice room ATC is online
|
||||
this->updateBookedStation(callsign, vm);
|
||||
|
||||
// receiving voice room means ATC has voice
|
||||
if (!trimmedUrl.isEmpty())
|
||||
{
|
||||
vm = CPropertyIndexVariantMap(CClient::IndexVoiceCapabilities, CVariant::from(CVoiceCapabilities::fromVoiceCapabilities(CVoiceCapabilities::Voice)));
|
||||
this->updateOrAddClient(callsign, vm, false);
|
||||
}
|
||||
**/
|
||||
}
|
||||
|
||||
void CAirspaceMonitor::onAtisLogoffTimeReceived(const CCallsign &callsign, const QString &zuluTime)
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace BlackCore
|
||||
void CCoreFacade::initPostSetup(QMap<QString, int> ×)
|
||||
{
|
||||
bool c = false;
|
||||
Q_UNUSED(c); // for release version
|
||||
Q_UNUSED(c) // for release version
|
||||
QTime time;
|
||||
time.start();
|
||||
|
||||
|
||||
@@ -164,15 +164,15 @@ namespace BlackCore
|
||||
static void registerMetadata();
|
||||
|
||||
private:
|
||||
bool m_initalized = false; //!< flag if already initialized
|
||||
bool m_shuttingDown = false; //!< flag if shutting down
|
||||
bool m_initalized = false; //!< flag if already initialized
|
||||
bool m_shuttingDown = false; //!< flag if shutting down
|
||||
const CCoreFacadeConfig m_config; //!< used config
|
||||
BlackMisc::CData<Data::TLauncherSetup> m_launcherSetup { this }; //!< updating DBus
|
||||
|
||||
// DBus
|
||||
BlackMisc::CDBusServer *m_dbusServer = nullptr;
|
||||
bool m_initDBusConnection = false;
|
||||
QDBusConnection m_dbusConnection { "default" };
|
||||
bool m_initDBusConnection = false;
|
||||
QDBusConnection m_dbusConnection { "default" };
|
||||
|
||||
// contexts:
|
||||
// There is a reason why we do not use smart pointers here. When the context is deleted
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace BlackCore
|
||||
ContextMode m_ownAircraft;
|
||||
ContextMode m_settings;
|
||||
ContextMode m_simulator;
|
||||
QString m_dbusAddress; //!< for boot strapping
|
||||
QString m_dbusAddress; //!< for boot strapping
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
@@ -53,25 +53,25 @@ namespace BlackCore
|
||||
{}
|
||||
|
||||
//! application mode
|
||||
ContextMode getModeApplication() const { return this->m_application; }
|
||||
ContextMode getModeApplication() const { return m_application; }
|
||||
|
||||
//! audio mode
|
||||
ContextMode getModeAudio() const { return this->m_audio; }
|
||||
ContextMode getModeAudio() const { return m_audio; }
|
||||
|
||||
//! network mode
|
||||
ContextMode getModeNetwork() const { return this->m_network; }
|
||||
ContextMode getModeNetwork() const { return m_network; }
|
||||
|
||||
//! own aircraft
|
||||
ContextMode getModeOwnAircraft() const { return this->m_ownAircraft; }
|
||||
ContextMode getModeOwnAircraft() const { return m_ownAircraft; }
|
||||
|
||||
//! settings mode
|
||||
ContextMode getModeSettings() const { return this->m_settings; }
|
||||
ContextMode getModeSettings() const { return m_settings; }
|
||||
|
||||
//! simulator mode
|
||||
ContextMode getModeSimulator() const { return this->m_simulator; }
|
||||
ContextMode getModeSimulator() const { return m_simulator; }
|
||||
|
||||
//! local settings?
|
||||
bool hasLocalSettings() const { return this->m_settings == Local || this->m_settings == LocalInDBusServer; }
|
||||
bool hasLocalSettings() const { return m_settings == Local || m_settings == LocalInDBusServer; }
|
||||
|
||||
//! requires server (at least one in server)?
|
||||
bool requiresDBusSever() const;
|
||||
@@ -80,10 +80,10 @@ namespace BlackCore
|
||||
bool requiresDBusConnection() const;
|
||||
|
||||
//! DBus address
|
||||
QString getDBusAddress() const { return this->m_dbusAddress; }
|
||||
QString getDBusAddress() const { return m_dbusAddress; }
|
||||
|
||||
//! DBus address?
|
||||
bool hasDBusAddress() const { return !this->m_dbusAddress.isEmpty(); }
|
||||
bool hasDBusAddress() const { return !m_dbusAddress.isEmpty(); }
|
||||
|
||||
//! Any context in given mode
|
||||
bool any(ContextMode mode) const;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <QtGlobal>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Audio;
|
||||
using namespace BlackCore;
|
||||
using namespace BlackCore::Context;
|
||||
|
||||
@@ -41,28 +42,28 @@ namespace BlackGui
|
||||
|
||||
bool c = connect(ui->pb_ShowWinMixer, &QPushButton::pressed, this, &CAudioVolumeComponent::onWindowsMixerRequested);
|
||||
Q_ASSERT(c);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(c)
|
||||
c = connect(ui->hs_Volume, &QSlider::valueChanged, this, &CAudioVolumeComponent::changeOutputVolumeFromSlider);
|
||||
Q_ASSERT(c);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(c)
|
||||
c = connect(ui->sb_Volume, qOverload<int>(&QSpinBox::valueChanged), this, &CAudioVolumeComponent::changeOutputVolumeFromSpinBox);
|
||||
Q_ASSERT(c);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(c)
|
||||
c = connect(ui->pb_Volume100, &QPushButton::clicked, this, &CAudioVolumeComponent::setVolume100);
|
||||
Q_ASSERT(c);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(c)
|
||||
|
||||
c = connect(sGui->getIContextAudio(), &IContextAudio::changedMute, this, &CAudioVolumeComponent::onMuteChanged);
|
||||
Q_ASSERT(c);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(c)
|
||||
connect(sGui->getIContextAudio(), &IContextAudio::changedAudioVolume, this, &CAudioVolumeComponent::onOutputVolumeChanged);
|
||||
Q_ASSERT(c);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(c)
|
||||
|
||||
// to audio audio context
|
||||
c = connect(ui->pb_Mute, &QPushButton::toggled, sGui->getIContextAudio(), &IContextAudio::setMute);
|
||||
Q_ASSERT(c);
|
||||
Q_UNUSED(c);
|
||||
Q_UNUSED(c)
|
||||
|
||||
if (sGui->getIContextAudio()->isUsingImplementingObject())
|
||||
{
|
||||
@@ -147,7 +148,7 @@ namespace BlackGui
|
||||
|
||||
void CAudioVolumeComponent::onWindowsMixerRequested()
|
||||
{
|
||||
Audio::startWindowsMixer();
|
||||
startWindowsMixer();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -38,6 +38,7 @@ using namespace BlackCore;
|
||||
using namespace BlackCore::Context;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Audio;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
namespace BlackGui
|
||||
@@ -117,12 +118,6 @@ namespace BlackGui
|
||||
CGuiUtility::setElidedText(ui->lbl_MapperReady, QStringLiteral("mapper ready"), Qt::ElideRight);
|
||||
CGuiUtility::setElidedText(ui->lbl_Ptt, QStringLiteral("PTT"), Qt::ElideRight);
|
||||
CGuiUtility::setElidedText(ui->lbl_Simulator, QStringLiteral("simulator"), Qt::ElideRight);
|
||||
|
||||
// CGuiUtility::setElidedText(ui->lbl_Audio, QStringLiteral("au"), QStringLiteral("audio"), Qt::ElideRight);
|
||||
// CGuiUtility::setElidedText(ui->lbl_DBus, QStringLiteral("DBus"), {}, Qt::ElideRight);
|
||||
// CGuiUtility::setElidedText(ui->lbl_MapperReady, QStringLiteral("map"), QStringLiteral("mapper ready"), Qt::ElideRight);
|
||||
// CGuiUtility::setElidedText(ui->lbl_Ptt, QStringLiteral("PTT"), QStringLiteral("push to talk"), Qt::ElideRight);
|
||||
// CGuiUtility::setElidedText(ui->lbl_Simulator, QStringLiteral("sim"), QStringLiteral("simulator"), Qt::ElideRight);
|
||||
}
|
||||
|
||||
void CInfoBarStatusComponent::setDBusStatus(bool dbus)
|
||||
@@ -189,7 +184,7 @@ namespace BlackGui
|
||||
|
||||
void CInfoBarStatusComponent::onNetworkConnectionChanged(const CConnectionStatus &from, const CConnectionStatus &to)
|
||||
{
|
||||
Q_UNUSED(from);
|
||||
Q_UNUSED(from)
|
||||
switch (to.getConnectionStatus())
|
||||
{
|
||||
case CConnectionStatus::Disconnected:
|
||||
@@ -233,7 +228,7 @@ namespace BlackGui
|
||||
}
|
||||
else if (actions.size() > 1 && selectedItem == actions.at(1))
|
||||
{
|
||||
Audio::startWindowsMixer();
|
||||
startWindowsMixer();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "blackgui/models/atcstationtreemodel.h"
|
||||
#include "blackgui/models/columnformatters.h"
|
||||
#include "blackgui/models/columns.h"
|
||||
#include "blackmisc/audio/voiceroom.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/compare.h"
|
||||
#include "blackmisc/icon.h"
|
||||
@@ -107,8 +106,8 @@ namespace BlackGui
|
||||
|
||||
void CAtcStationTreeModel::changedAtcStationConnectionStatus(const CAtcStation &station, bool added)
|
||||
{
|
||||
Q_UNUSED(station);
|
||||
Q_UNUSED(added);
|
||||
Q_UNUSED(station)
|
||||
Q_UNUSED(added)
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user