Ref T739, style

This commit is contained in:
Klaus Basan
2019-10-05 00:04:35 +02:00
committed by Mat Sutcliffe
parent 7e36e67f89
commit 66968ff3a5
8 changed files with 30 additions and 56 deletions

View File

@@ -26,6 +26,7 @@ namespace BlackCore
CActionBind::~CActionBind() CActionBind::~CActionBind()
{ {
// void
} }
void CActionBind::unbind() void CActionBind::unbind()

View File

@@ -739,28 +739,6 @@ namespace BlackCore
return; return;
Q_UNUSED(url) Q_UNUSED(url)
Q_UNUSED(callsign) 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) void CAirspaceMonitor::onAtisLogoffTimeReceived(const CCallsign &callsign, const QString &zuluTime)

View File

@@ -177,7 +177,7 @@ namespace BlackCore
void CCoreFacade::initPostSetup(QMap<QString, int> &times) void CCoreFacade::initPostSetup(QMap<QString, int> &times)
{ {
bool c = false; bool c = false;
Q_UNUSED(c); // for release version Q_UNUSED(c) // for release version
QTime time; QTime time;
time.start(); time.start();

View File

@@ -164,15 +164,15 @@ namespace BlackCore
static void registerMetadata(); static void registerMetadata();
private: private:
bool m_initalized = false; //!< flag if already initialized bool m_initalized = false; //!< flag if already initialized
bool m_shuttingDown = false; //!< flag if shutting down bool m_shuttingDown = false; //!< flag if shutting down
const CCoreFacadeConfig m_config; //!< used config const CCoreFacadeConfig m_config; //!< used config
BlackMisc::CData<Data::TLauncherSetup> m_launcherSetup { this }; //!< updating DBus BlackMisc::CData<Data::TLauncherSetup> m_launcherSetup { this }; //!< updating DBus
// DBus // DBus
BlackMisc::CDBusServer *m_dbusServer = nullptr; BlackMisc::CDBusServer *m_dbusServer = nullptr;
bool m_initDBusConnection = false; bool m_initDBusConnection = false;
QDBusConnection m_dbusConnection { "default" }; QDBusConnection m_dbusConnection { "default" };
// contexts: // contexts:
// There is a reason why we do not use smart pointers here. When the context is deleted // There is a reason why we do not use smart pointers here. When the context is deleted

View File

@@ -37,7 +37,7 @@ namespace BlackCore
ContextMode m_ownAircraft; ContextMode m_ownAircraft;
ContextMode m_settings; ContextMode m_settings;
ContextMode m_simulator; ContextMode m_simulator;
QString m_dbusAddress; //!< for boot strapping QString m_dbusAddress; //!< for boot strapping
public: public:
//! Constructor //! Constructor
@@ -53,25 +53,25 @@ namespace BlackCore
{} {}
//! application mode //! application mode
ContextMode getModeApplication() const { return this->m_application; } ContextMode getModeApplication() const { return m_application; }
//! audio mode //! audio mode
ContextMode getModeAudio() const { return this->m_audio; } ContextMode getModeAudio() const { return m_audio; }
//! network mode //! network mode
ContextMode getModeNetwork() const { return this->m_network; } ContextMode getModeNetwork() const { return m_network; }
//! own aircraft //! own aircraft
ContextMode getModeOwnAircraft() const { return this->m_ownAircraft; } ContextMode getModeOwnAircraft() const { return m_ownAircraft; }
//! settings mode //! settings mode
ContextMode getModeSettings() const { return this->m_settings; } ContextMode getModeSettings() const { return m_settings; }
//! simulator mode //! simulator mode
ContextMode getModeSimulator() const { return this->m_simulator; } ContextMode getModeSimulator() const { return m_simulator; }
//! local settings? //! 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)? //! requires server (at least one in server)?
bool requiresDBusSever() const; bool requiresDBusSever() const;
@@ -80,10 +80,10 @@ namespace BlackCore
bool requiresDBusConnection() const; bool requiresDBusConnection() const;
//! DBus address //! DBus address
QString getDBusAddress() const { return this->m_dbusAddress; } QString getDBusAddress() const { return m_dbusAddress; }
//! DBus address? //! DBus address?
bool hasDBusAddress() const { return !this->m_dbusAddress.isEmpty(); } bool hasDBusAddress() const { return !m_dbusAddress.isEmpty(); }
//! Any context in given mode //! Any context in given mode
bool any(ContextMode mode) const; bool any(ContextMode mode) const;

View File

@@ -21,6 +21,7 @@
#include <QtGlobal> #include <QtGlobal>
using namespace BlackMisc; using namespace BlackMisc;
using namespace BlackMisc::Audio;
using namespace BlackCore; using namespace BlackCore;
using namespace BlackCore::Context; using namespace BlackCore::Context;
@@ -41,28 +42,28 @@ namespace BlackGui
bool c = connect(ui->pb_ShowWinMixer, &QPushButton::pressed, this, &CAudioVolumeComponent::onWindowsMixerRequested); bool c = connect(ui->pb_ShowWinMixer, &QPushButton::pressed, this, &CAudioVolumeComponent::onWindowsMixerRequested);
Q_ASSERT(c); Q_ASSERT(c);
Q_UNUSED(c); Q_UNUSED(c)
c = connect(ui->hs_Volume, &QSlider::valueChanged, this, &CAudioVolumeComponent::changeOutputVolumeFromSlider); c = connect(ui->hs_Volume, &QSlider::valueChanged, this, &CAudioVolumeComponent::changeOutputVolumeFromSlider);
Q_ASSERT(c); Q_ASSERT(c);
Q_UNUSED(c); Q_UNUSED(c)
c = connect(ui->sb_Volume, qOverload<int>(&QSpinBox::valueChanged), this, &CAudioVolumeComponent::changeOutputVolumeFromSpinBox); c = connect(ui->sb_Volume, qOverload<int>(&QSpinBox::valueChanged), this, &CAudioVolumeComponent::changeOutputVolumeFromSpinBox);
Q_ASSERT(c); Q_ASSERT(c);
Q_UNUSED(c); Q_UNUSED(c)
c = connect(ui->pb_Volume100, &QPushButton::clicked, this, &CAudioVolumeComponent::setVolume100); c = connect(ui->pb_Volume100, &QPushButton::clicked, this, &CAudioVolumeComponent::setVolume100);
Q_ASSERT(c); Q_ASSERT(c);
Q_UNUSED(c); Q_UNUSED(c)
c = connect(sGui->getIContextAudio(), &IContextAudio::changedMute, this, &CAudioVolumeComponent::onMuteChanged); c = connect(sGui->getIContextAudio(), &IContextAudio::changedMute, this, &CAudioVolumeComponent::onMuteChanged);
Q_ASSERT(c); Q_ASSERT(c);
Q_UNUSED(c); Q_UNUSED(c)
connect(sGui->getIContextAudio(), &IContextAudio::changedAudioVolume, this, &CAudioVolumeComponent::onOutputVolumeChanged); connect(sGui->getIContextAudio(), &IContextAudio::changedAudioVolume, this, &CAudioVolumeComponent::onOutputVolumeChanged);
Q_ASSERT(c); Q_ASSERT(c);
Q_UNUSED(c); Q_UNUSED(c)
// to audio audio context // to audio audio context
c = connect(ui->pb_Mute, &QPushButton::toggled, sGui->getIContextAudio(), &IContextAudio::setMute); c = connect(ui->pb_Mute, &QPushButton::toggled, sGui->getIContextAudio(), &IContextAudio::setMute);
Q_ASSERT(c); Q_ASSERT(c);
Q_UNUSED(c); Q_UNUSED(c)
if (sGui->getIContextAudio()->isUsingImplementingObject()) if (sGui->getIContextAudio()->isUsingImplementingObject())
{ {
@@ -147,7 +148,7 @@ namespace BlackGui
void CAudioVolumeComponent::onWindowsMixerRequested() void CAudioVolumeComponent::onWindowsMixerRequested()
{ {
Audio::startWindowsMixer(); startWindowsMixer();
} }
} // namespace } // namespace

View File

@@ -38,6 +38,7 @@ using namespace BlackCore;
using namespace BlackCore::Context; using namespace BlackCore::Context;
using namespace BlackGui; using namespace BlackGui;
using namespace BlackMisc; using namespace BlackMisc;
using namespace BlackMisc::Audio;
using namespace BlackMisc::Network; using namespace BlackMisc::Network;
namespace BlackGui namespace BlackGui
@@ -117,12 +118,6 @@ namespace BlackGui
CGuiUtility::setElidedText(ui->lbl_MapperReady, QStringLiteral("mapper ready"), Qt::ElideRight); CGuiUtility::setElidedText(ui->lbl_MapperReady, QStringLiteral("mapper ready"), Qt::ElideRight);
CGuiUtility::setElidedText(ui->lbl_Ptt, QStringLiteral("PTT"), Qt::ElideRight); CGuiUtility::setElidedText(ui->lbl_Ptt, QStringLiteral("PTT"), Qt::ElideRight);
CGuiUtility::setElidedText(ui->lbl_Simulator, QStringLiteral("simulator"), 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) void CInfoBarStatusComponent::setDBusStatus(bool dbus)
@@ -189,7 +184,7 @@ namespace BlackGui
void CInfoBarStatusComponent::onNetworkConnectionChanged(const CConnectionStatus &from, const CConnectionStatus &to) void CInfoBarStatusComponent::onNetworkConnectionChanged(const CConnectionStatus &from, const CConnectionStatus &to)
{ {
Q_UNUSED(from); Q_UNUSED(from)
switch (to.getConnectionStatus()) switch (to.getConnectionStatus())
{ {
case CConnectionStatus::Disconnected: case CConnectionStatus::Disconnected:
@@ -233,7 +228,7 @@ namespace BlackGui
} }
else if (actions.size() > 1 && selectedItem == actions.at(1)) else if (actions.size() > 1 && selectedItem == actions.at(1))
{ {
Audio::startWindowsMixer(); startWindowsMixer();
} }
} }
} }

View File

@@ -9,7 +9,6 @@
#include "blackgui/models/atcstationtreemodel.h" #include "blackgui/models/atcstationtreemodel.h"
#include "blackgui/models/columnformatters.h" #include "blackgui/models/columnformatters.h"
#include "blackgui/models/columns.h" #include "blackgui/models/columns.h"
#include "blackmisc/audio/voiceroom.h"
#include "blackmisc/aviation/callsign.h" #include "blackmisc/aviation/callsign.h"
#include "blackmisc/compare.h" #include "blackmisc/compare.h"
#include "blackmisc/icon.h" #include "blackmisc/icon.h"
@@ -107,8 +106,8 @@ namespace BlackGui
void CAtcStationTreeModel::changedAtcStationConnectionStatus(const CAtcStation &station, bool added) void CAtcStationTreeModel::changedAtcStationConnectionStatus(const CAtcStation &station, bool added)
{ {
Q_UNUSED(station); Q_UNUSED(station)
Q_UNUSED(added); Q_UNUSED(added)
} }
} // namespace } // namespace
} // namespace } // namespace