mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-22 13:15:39 +08:00
Formatting
This commit is contained in:
@@ -66,9 +66,7 @@ namespace BlackCore
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/*!
|
//! Constructor
|
||||||
* Constructor
|
|
||||||
*/
|
|
||||||
INetwork(
|
INetwork(
|
||||||
BlackMisc::Network::IClientProvider *clientProvider,
|
BlackMisc::Network::IClientProvider *clientProvider,
|
||||||
BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider,
|
BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider,
|
||||||
@@ -78,30 +76,22 @@ namespace BlackCore
|
|||||||
BlackMisc::Simulation::COwnAircraftAware(ownAircraftProvider) {}
|
BlackMisc::Simulation::COwnAircraftAware(ownAircraftProvider) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
//! Destructor
|
||||||
* Destructor.
|
|
||||||
*/
|
|
||||||
virtual ~INetwork() {}
|
virtual ~INetwork() {}
|
||||||
|
|
||||||
/*!
|
//! Underlying library info.
|
||||||
* Underlying library info.
|
|
||||||
*/
|
|
||||||
virtual const QString &getLibraryInfo(bool detailed) const = 0;
|
virtual const QString &getLibraryInfo(bool detailed) const = 0;
|
||||||
|
|
||||||
/*!
|
//! Flags for capabilities bitfield
|
||||||
* Flags for capabilities bitfield.
|
// enum Capability
|
||||||
*/
|
// {
|
||||||
enum
|
// AcceptsAtisResponses = 1 << 0,
|
||||||
{
|
// SupportsInterimPosUpdates = 1 << 1,
|
||||||
AcceptsAtisResponses = 1 << 0,
|
// SupportsIcaoCodes = 1 << 2,
|
||||||
SupportsInterimPosUpdates = 1 << 1,
|
// SupportsAircraftConfigs = 1 << 3
|
||||||
SupportsIcaoCodes = 1 << 2,
|
// };
|
||||||
SupportsAircraftConfigs = 1 << 3
|
|
||||||
};
|
|
||||||
|
|
||||||
/*!
|
//! Login modes
|
||||||
* Login modes
|
|
||||||
*/
|
|
||||||
enum LoginMode
|
enum LoginMode
|
||||||
{
|
{
|
||||||
LoginNormal = 0, //!< Normal login
|
LoginNormal = 0, //!< Normal login
|
||||||
@@ -109,9 +99,7 @@ namespace BlackCore
|
|||||||
LoginStealth //!< Login stealth mode
|
LoginStealth //!< Login stealth mode
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
//! Status of the connection.
|
||||||
* Status of the connection.
|
|
||||||
*/
|
|
||||||
enum ConnectionStatus
|
enum ConnectionStatus
|
||||||
{
|
{
|
||||||
Disconnected = 0, //!< Not connected
|
Disconnected = 0, //!< Not connected
|
||||||
@@ -124,9 +112,7 @@ namespace BlackCore
|
|||||||
};
|
};
|
||||||
Q_ENUM(ConnectionStatus)
|
Q_ENUM(ConnectionStatus)
|
||||||
|
|
||||||
/*!
|
//! Convert a ConnectionStatus to a string.
|
||||||
* Convert a ConnectionStatus to a string.
|
|
||||||
*/
|
|
||||||
static QString connectionStatusToString(ConnectionStatus status)
|
static QString connectionStatusToString(ConnectionStatus status)
|
||||||
{
|
{
|
||||||
const int index = staticMetaObject.indexOfEnumerator("ConnectionStatus");
|
const int index = staticMetaObject.indexOfEnumerator("ConnectionStatus");
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
#include "blackcore/blackcoreexport.h"
|
#include "blackcore/blackcoreexport.h"
|
||||||
#include "blackmisc/pq/length.h"
|
#include "blackmisc/pq/length.h"
|
||||||
#include "blackmisc/weather/weathergrid.h"
|
#include "blackmisc/weather/weathergrid.h"
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
namespace BlackCore
|
namespace BlackCore
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace BlackGui
|
|||||||
explicit CSettingsVatsimReadersComponent(QWidget *parent = nullptr);
|
explicit CSettingsVatsimReadersComponent(QWidget *parent = nullptr);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
~CSettingsVatsimReadersComponent();
|
virtual ~CSettingsVatsimReadersComponent();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ps_settingsChanged();
|
void ps_settingsChanged();
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ namespace BlackGui
|
|||||||
Q_ASSERT_X(CInputManager::instance(), Q_FUNC_INFO, "Missing input manager");
|
Q_ASSERT_X(CInputManager::instance(), Q_FUNC_INFO, "Missing input manager");
|
||||||
if (this->hasTarget())
|
if (this->hasTarget())
|
||||||
{
|
{
|
||||||
CInputManager::instance()->unbind(this->m_index);
|
CInputManager::instance()->unbind(m_index);
|
||||||
}
|
}
|
||||||
this->reset();
|
this->reset();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
//! \file
|
//! \file
|
||||||
|
|
||||||
#ifndef BLACKGUI_COUNTRYLISTMODEL_H
|
#ifndef BLACKGUI_MODELS_COUNTRYLISTMODEL_H
|
||||||
#define BLACKGUI_COUNTRYLISTMODEL_H
|
#define BLACKGUI_MODELS_COUNTRYLISTMODEL_H
|
||||||
|
|
||||||
#include "blackgui/blackguiexport.h"
|
#include "blackgui/blackguiexport.h"
|
||||||
#include "blackgui/models/listmodeldbobjects.h"
|
#include "blackgui/models/listmodeldbobjects.h"
|
||||||
|
|||||||
@@ -21,5 +21,5 @@ namespace BlackGui
|
|||||||
this->standardInit(new CCountryListModel(this));
|
this->standardInit(new CCountryListModel(this));
|
||||||
this->setMenu(MenuDefaultDbViews);
|
this->setMenu(MenuDefaultDbViews);
|
||||||
}
|
}
|
||||||
}
|
} // ns
|
||||||
} // namespace
|
} // ns
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
//! \file
|
//! \file
|
||||||
|
|
||||||
#ifndef BLACKGUI_COUNTRYVIEW_H
|
#ifndef BLACKGUI_VIEWS_COUNTRYVIEW_H
|
||||||
#define BLACKGUI_COUNTRYVIEW_H
|
#define BLACKGUI_VIEWS_COUNTRYVIEW_H
|
||||||
|
|
||||||
#include "blackgui/blackguiexport.h"
|
#include "blackgui/blackguiexport.h"
|
||||||
#include "blackgui/models/countrylistmodel.h"
|
#include "blackgui/models/countrylistmodel.h"
|
||||||
@@ -20,7 +20,6 @@
|
|||||||
class QWidget;
|
class QWidget;
|
||||||
|
|
||||||
namespace BlackMisc { class CCountry; }
|
namespace BlackMisc { class CCountry; }
|
||||||
|
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
{
|
{
|
||||||
namespace Views
|
namespace Views
|
||||||
@@ -32,6 +31,6 @@ namespace BlackGui
|
|||||||
//! Constructor
|
//! Constructor
|
||||||
explicit CCountryView(QWidget *parent = nullptr);
|
explicit CCountryView(QWidget *parent = nullptr);
|
||||||
};
|
};
|
||||||
}
|
} // ns
|
||||||
}
|
} // ns
|
||||||
#endif // guard
|
#endif // guard
|
||||||
|
|||||||
@@ -32,9 +32,9 @@ namespace BlackMisc
|
|||||||
//! Value object for a list of ATC stations.
|
//! Value object for a list of ATC stations.
|
||||||
class BLACKMISC_EXPORT CAtcStationList :
|
class BLACKMISC_EXPORT CAtcStationList :
|
||||||
public CSequence<CAtcStation>,
|
public CSequence<CAtcStation>,
|
||||||
public BlackMisc::Aviation::ICallsignObjectList<CAtcStation, CAtcStationList>,
|
public Aviation::ICallsignObjectList<CAtcStation, CAtcStationList>,
|
||||||
public BlackMisc::Geo::IGeoObjectWithRelativePositionList<CAtcStation, CAtcStationList>,
|
public Geo::IGeoObjectWithRelativePositionList<CAtcStation, CAtcStationList>,
|
||||||
public BlackMisc::Mixin::MetaType<CAtcStationList>
|
public Mixin::MetaType<CAtcStationList>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BLACKMISC_DECLARE_USING_MIXIN_METATYPE(CAtcStationList)
|
BLACKMISC_DECLARE_USING_MIXIN_METATYPE(CAtcStationList)
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
CONTAINER r;
|
CONTAINER r;
|
||||||
if (suffix.isEmpty()) { return r; }
|
if (suffix.isEmpty()) { return r; }
|
||||||
QString sfxUpper(suffix.trimmed().toUpper());
|
const QString sfxUpper(suffix.trimmed().toUpper());
|
||||||
r = this->container().findBy([ = ](const OBJ & csObj)
|
r = this->container().findBy([ = ](const OBJ & csObj)
|
||||||
{
|
{
|
||||||
return (csObj.getCallsign().getSuffix() == sfxUpper);
|
return (csObj.getCallsign().getSuffix() == sfxUpper);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ namespace BlackMisc
|
|||||||
|
|
||||||
CConnectionGuard::~CConnectionGuard()
|
CConnectionGuard::~CConnectionGuard()
|
||||||
{
|
{
|
||||||
disconnectAll();
|
this->disconnectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CConnectionGuard::disconnectAll()
|
int CConnectionGuard::disconnectAll()
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include <QMutexLocker>
|
#include <QMutexLocker>
|
||||||
|
|
||||||
using namespace BlackMisc;
|
using namespace BlackMisc;
|
||||||
|
using namespace BlackMisc::Aviation;
|
||||||
|
|
||||||
namespace BlackSimPlugin
|
namespace BlackSimPlugin
|
||||||
{
|
{
|
||||||
@@ -31,7 +32,7 @@ namespace BlackSimPlugin
|
|||||||
return cats;
|
return cats;
|
||||||
}
|
}
|
||||||
|
|
||||||
CDirectPlayPeer::CDirectPlayPeer(QObject *owner, const BlackMisc::Aviation::CCallsign &callsign)
|
CDirectPlayPeer::CDirectPlayPeer(QObject *owner, const CCallsign &callsign)
|
||||||
: CContinuousWorker(owner, "peer_" + callsign.toQString()),
|
: CContinuousWorker(owner, "peer_" + callsign.toQString()),
|
||||||
m_callsign(callsign),
|
m_callsign(callsign),
|
||||||
m_mutexHostList(QMutex::Recursive),
|
m_mutexHostList(QMutex::Recursive),
|
||||||
@@ -103,7 +104,7 @@ namespace BlackSimPlugin
|
|||||||
// Proceeed only, if the sender is our local player
|
// Proceeed only, if the sender is our local player
|
||||||
if (pReceiveMsg->dpnidSender == m_playerUser)
|
if (pReceiveMsg->dpnidSender == m_playerUser)
|
||||||
{
|
{
|
||||||
QByteArray messageData = QByteArray((char *)pReceiveMsg->pReceiveData, pReceiveMsg->dwReceiveDataSize);
|
const QByteArray messageData = QByteArray((char *)pReceiveMsg->pReceiveData, pReceiveMsg->dwReceiveDataSize);
|
||||||
emit customPacketReceived(messageData);
|
emit customPacketReceived(messageData);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ namespace BlackSimPlugin
|
|||||||
//! Creates a new DirectPlay device address
|
//! Creates a new DirectPlay device address
|
||||||
HRESULT createHostAddress();
|
HRESULT createHostAddress();
|
||||||
|
|
||||||
BlackMisc::Aviation::CCallsign m_callsign; //!< Peer callsign
|
const BlackMisc::Aviation::CCallsign m_callsign; //!< Peer callsign
|
||||||
|
|
||||||
IDirectPlay8Peer *m_directPlayPeer = nullptr; //!< DirectPlay peer address
|
IDirectPlay8Peer *m_directPlayPeer = nullptr; //!< DirectPlay peer address
|
||||||
IDirectPlay8Address *m_deviceAddress = nullptr; //!< DirectPlay device address
|
IDirectPlay8Address *m_deviceAddress = nullptr; //!< DirectPlay device address
|
||||||
|
|||||||
Reference in New Issue
Block a user