mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 01:35:45 +08:00
Formatting, renaming
This commit is contained in:
committed by
Roland Winklmeier
parent
cf6a555824
commit
dd587207fe
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013x VATSIM Community / authors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKCORE_CONTEXTAUDIO_IMPL_H
|
||||
#define BLACKCORE_CONTEXTAUDIO_IMPL_H
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* Copyright (C) 2013x VATSIM Community / authors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKCORE_CONTEXTVOICE_PROXY_H
|
||||
#define BLACKCORE_CONTEXTVOICE_PROXY_H
|
||||
|
||||
@@ -173,6 +173,9 @@ namespace BlackCore
|
||||
return this->m_network->isConnected();
|
||||
}
|
||||
|
||||
/*
|
||||
* Pending connection
|
||||
*/
|
||||
bool CContextNetwork::isPendingConnection() const
|
||||
{
|
||||
// if underlying class says pending, we believe it. But not all states (e.g. disconnecting) are covered
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKCORE_CONTEXTOWNAIRCRAFT_IMPL_H
|
||||
#define BLACKCORE_CONTEXTOWNAIRCRAFT_IMPL_H
|
||||
@@ -61,6 +67,17 @@ namespace BlackCore
|
||||
//! \copydoc IContextOwnAircraft::enableAutomaticVoiceRoomResolution
|
||||
virtual void enableAutomaticVoiceRoomResolution(bool enable) override;
|
||||
|
||||
//! \addtogroup commandline
|
||||
//! @{
|
||||
//! <pre>
|
||||
//! .x .xpdr code set transponder code CContextOwnAircraft
|
||||
//! .com1 .com2 frequency set COM1/2 frequency CContextOwnAircraft
|
||||
//! .selcal code set SELCAL code CContextOwnAircraft
|
||||
//! </pre>
|
||||
//! @}
|
||||
//! \copydoc IContextOwnAircraft::parseCommandLine
|
||||
virtual bool parseCommandLine(const QString &commandLine) override;
|
||||
|
||||
protected:
|
||||
//! Constructor, with link to runtime
|
||||
CContextOwnAircraft(CRuntimeConfig::ContextMode, CRuntime *runtime);
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKCORE_OWNAIRCRAFT_PROXY_H
|
||||
#define BLACKCORE_OWNAIRCRAFT_PROXY_H
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ namespace BlackCore
|
||||
this->unloadSimulatorPlugin(); // old plugin unloaded
|
||||
m_simulator = newSimulator;
|
||||
|
||||
connect(m_simulator, &ISimulator::statusChanged, this, &CContextSimulator::ps_setConnectionStatus);
|
||||
connect(m_simulator, &ISimulator::statusChanged, this, &CContextSimulator::ps_onConnectionStatusChanged);
|
||||
connect(m_simulator, &ISimulator::aircraftModelChanged, this, &IContextSimulator::ownAircraftModelChanged);
|
||||
connect(CLogHandler::instance(), &CLogHandler::localMessageLogged, m_simulator, &ISimulator::displayStatusMessage);
|
||||
connect(CLogHandler::instance(), &CLogHandler::remoteMessageLogged, m_simulator, &ISimulator::displayStatusMessage);
|
||||
@@ -288,7 +288,7 @@ namespace BlackCore
|
||||
this->m_simulator->updateOwnSimulatorCockpit(ownAircraft);
|
||||
}
|
||||
|
||||
void CContextSimulator::ps_setConnectionStatus(ISimulator::Status status)
|
||||
void CContextSimulator::ps_onConnectionStatusChanged(ISimulator::Status status)
|
||||
{
|
||||
if (status == ISimulator::Connected)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / contributors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKCORE_CONTEXTSIMULATOR_IMPL_H
|
||||
#define BLACKCORE_CONTEXTSIMULATOR_IMPL_H
|
||||
@@ -115,8 +121,8 @@ namespace BlackCore
|
||||
//! \remarks set by runtime, only to be used locally (not via DBus)
|
||||
void ps_updateCockpitFromContext(const BlackMisc::Aviation::CAircraft &ownAircraft, const QString &originator);
|
||||
|
||||
//! Set new connection status
|
||||
void ps_setConnectionStatus(ISimulator::Status status);
|
||||
//! Handle new connection status
|
||||
void ps_onConnectionStatusChanged(ISimulator::Status status);
|
||||
|
||||
//! Status message received
|
||||
void ps_statusMessageReceived(const BlackMisc::CStatusMessage &statusMessage);
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
/* Copyright (C) 2013 VATSIM Community / authors
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKCORE_CONTEXTSIMULATOR_PROXY_H
|
||||
#define BLACKCORE_CONTEXTSIMULATOR_PROXY_H
|
||||
|
||||
@@ -280,10 +280,10 @@ namespace BlackGui
|
||||
Q_UNUSED(connected);
|
||||
}
|
||||
|
||||
const QString CCockpitComComponent::cockpitOriginator()
|
||||
const QString &CCockpitComComponent::cockpitOriginator()
|
||||
{
|
||||
// string is generated once, the timestamp allows to use multiple
|
||||
// components (as long as they are not generated in the same ms)
|
||||
// components (as long as they are not generated at the same ms)
|
||||
static const QString o = QString("COCKPITCOMCOMPONENT:").append(QString::number(QDateTime::currentMSecsSinceEpoch()));
|
||||
return o;
|
||||
}
|
||||
|
||||
@@ -61,12 +61,18 @@ namespace BlackGui
|
||||
//! Cockpit values have been changed in GUI
|
||||
void ps_guiChangedCockpitValues();
|
||||
|
||||
//! SELCAL changed in GUI
|
||||
void ps_guiChangedSelcal();
|
||||
|
||||
//! Update cockpit from context
|
||||
void ps_updateCockpitFromContext(const BlackMisc::Aviation::CAircraft &ownAircraft, const QString &originator);
|
||||
|
||||
//! Cockpit values have been changed in GUI
|
||||
void ps_testSelcal();
|
||||
|
||||
//! SELCAL was changed
|
||||
void ps_onChangedSelcal(const BlackMisc::Aviation::CSelcal &selcal, const QString &originator);
|
||||
|
||||
//! Update voice room related information
|
||||
void ps_onChangedVoiceRoomStatus(const BlackMisc::Audio::CVoiceRoomList &selectedVoiceRooms, bool connected);
|
||||
|
||||
@@ -90,8 +96,7 @@ namespace BlackGui
|
||||
void updateFrequencyDisplaysFromComSystems(const BlackMisc::Aviation::CComSystem &com1, const BlackMisc::Aviation::CComSystem &com2);
|
||||
|
||||
//! Identifies sender of cockpit updates
|
||||
// TODO: Check if to be migrated to COriginator
|
||||
static const QString cockpitOriginator();
|
||||
static const QString &cockpitOriginator();
|
||||
|
||||
QScopedPointer<Ui::CCockpitMainComponent> ui;
|
||||
};
|
||||
|
||||
@@ -225,7 +225,7 @@ namespace BlackGui
|
||||
return messages;
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::sendFlightPlan()
|
||||
void CFlightPlanComponent::ps_sendFlightPlan()
|
||||
{
|
||||
CFlightPlan flightPlan;
|
||||
CStatusMessageList messages = this->validateAndInitializeFlightPlan(flightPlan);
|
||||
@@ -249,13 +249,13 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::validateFlightPlan()
|
||||
void CFlightPlanComponent::ps_validateFlightPlan()
|
||||
{
|
||||
CFlightPlan flightPlan;
|
||||
CStatusMessageList messages = this->validateAndInitializeFlightPlan(flightPlan);
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::resetFlightPlan()
|
||||
void CFlightPlanComponent::ps_resetFlightPlan()
|
||||
{
|
||||
if (this->getIContextNetwork())
|
||||
{
|
||||
@@ -275,7 +275,9 @@ namespace BlackGui
|
||||
this->ui->le_TakeOffTimePlanned->setText(QDateTime::currentDateTimeUtc().addSecs(30 * 60).toString("hh:mm"));
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::loadFlightPlanFromNetwork()
|
||||
void CFlightPlanComponent::ps_setSelcalInOwnAircraft()
|
||||
{
|
||||
void CFlightPlanComponent::ps_loadFlightPlanFromNetwork()
|
||||
{
|
||||
if (!this->getIContextNetwork())
|
||||
{
|
||||
@@ -301,7 +303,7 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::buildRemarkString()
|
||||
void CFlightPlanComponent::ps_buildRemarksString()
|
||||
{
|
||||
QString rem;
|
||||
QString v = this->ui->cb_VoiceCapabilities->currentText().toUpper();
|
||||
@@ -374,13 +376,13 @@ namespace BlackGui
|
||||
this->ui->pte_RemarksGenerated->setPlainText(rem);
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::copyRemarks()
|
||||
void CFlightPlanComponent::ps_copyRemarks()
|
||||
{
|
||||
this->ui->pte_Remarks->setPlainText(this->ui->pte_RemarksGenerated->toPlainText());
|
||||
CLogMessage(this).info("Copied remarks");
|
||||
}
|
||||
|
||||
void CFlightPlanComponent::currentTabGenerator()
|
||||
void CFlightPlanComponent::ps_currentTabGenerator()
|
||||
{
|
||||
this->setCurrentWidget(this->ui->tb_RemarksGenerator);
|
||||
}
|
||||
|
||||
@@ -65,25 +65,28 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Send flightplan
|
||||
void sendFlightPlan();
|
||||
void ps_sendFlightPlan();
|
||||
|
||||
//! Reset Flightplan
|
||||
void resetFlightPlan();
|
||||
void ps_resetFlightPlan();
|
||||
|
||||
//! Set SELCAL in own aircrafr
|
||||
void ps_setSelcalInOwnAircraft();
|
||||
|
||||
//! Load Flightplan
|
||||
void loadFlightPlanFromNetwork();
|
||||
void ps_loadFlightPlanFromNetwork();
|
||||
|
||||
//! Validate Flightplan
|
||||
void validateFlightPlan();
|
||||
void ps_validateFlightPlan();
|
||||
|
||||
//! Remark
|
||||
void buildRemarkString();
|
||||
void ps_buildRemarksString();
|
||||
|
||||
//! Copy over
|
||||
void copyRemarks();
|
||||
void ps_copyRemarks();
|
||||
|
||||
//! Show generator tab page
|
||||
void currentTabGenerator();
|
||||
void ps_currentTabGenerator();
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace BlackGui
|
||||
* Constructor
|
||||
*/
|
||||
CInfoWindowComponent::CInfoWindowComponent(QWidget *parent) :
|
||||
QWizardPage(parent), ui(new Ui::InfoWindow), m_hideTimer(nullptr)
|
||||
QWizardPage(parent), ui(new Ui::InfoWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->hide();
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace BlackGui
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::InfoWindow> ui; //!< user interface
|
||||
QTimer *m_hideTimer;
|
||||
QTimer *m_hideTimer = nullptr;
|
||||
|
||||
//! Init the window
|
||||
void initWindow();
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace BlackGui
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CTransponderCodeSpinBox(QWidget *parent = nullptr);
|
||||
|
||||
//! \copydoc QDoubleSpinBox::textFromValue
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace BlackGui
|
||||
//! Helper method with template free signature
|
||||
//! \param variant contains the container
|
||||
//! \param sort
|
||||
//! \param resize
|
||||
//! \param performResizing
|
||||
virtual int performUpdateContainer(const QVariant &variant, bool sort, bool performResizing) = 0;
|
||||
|
||||
//! Skip resizing because of size?
|
||||
@@ -116,7 +116,7 @@ namespace BlackGui
|
||||
int m_resizeCount = 0; //!< flag / counter, how many resize activities
|
||||
int m_skipResizeThreshold = 40; //!< when to skip resize (rows count)
|
||||
int m_resizeAutoNthTime = 1; //!< with ResizeAuto, resize every n-th time
|
||||
bool m_forceStretchLastColumnWhenResized = false; //! a small table might (few columns) might to fail stretching, force again
|
||||
bool m_forceStretchLastColumnWhenResized = false; //!< a small table might (few columns) might to fail stretching, force again
|
||||
|
||||
protected slots:
|
||||
//! Helper method with template free signature serving as callback from threaded worker
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#ifndef BLACKMISC_AVIOCOMSYSTEM_H
|
||||
#define BLACKMISC_AVIOCOMSYSTEM_H
|
||||
|
||||
#include "blackmisc/aviomodulator.h"
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -62,13 +63,13 @@ namespace BlackMisc
|
||||
//! Is active frequency within 8.3383kHz channel?
|
||||
bool isActiveFrequencyWithin8_33kHzChannel(const BlackMisc::PhysicalQuantities::CFrequency &comFrequency) const
|
||||
{
|
||||
return CComSystem::isWithinChannelSpacing(this->getFrequencyActive(), comFrequency, ChannelSpacing8_33KHz);
|
||||
return isWithinChannelSpacing(this->getFrequencyActive(), comFrequency, ChannelSpacing8_33KHz);
|
||||
}
|
||||
|
||||
//! Is active frequency within 25kHz channel?
|
||||
bool isActiveFrequencyWithin25kHzChannel(const BlackMisc::PhysicalQuantities::CFrequency &comFrequency) const
|
||||
{
|
||||
return CComSystem::isWithinChannelSpacing(this->getFrequencyActive(), comFrequency, ChannelSpacing25KHz);
|
||||
return isWithinChannelSpacing(this->getFrequencyActive(), comFrequency, ChannelSpacing25KHz);
|
||||
}
|
||||
|
||||
//! Set UNICOM frequency as active
|
||||
|
||||
@@ -112,8 +112,7 @@ namespace BlackSimPlugin
|
||||
|
||||
bool CSimulatorFsx::disconnectFrom()
|
||||
{
|
||||
if (!m_isConnected)
|
||||
return true;
|
||||
if (!m_isConnected) { return true; }
|
||||
|
||||
emit statusChanged(Disconnected);
|
||||
if (m_hSimConnect)
|
||||
@@ -142,7 +141,6 @@ namespace BlackSimPlugin
|
||||
return false;
|
||||
}
|
||||
SimConnect_Close(m_hSimConnect);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user