mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 13:55:36 +08:00
Formatting
This commit is contained in:
@@ -27,44 +27,26 @@ namespace BlackMisc
|
|||||||
class CAudioDeviceList : public CSequence<CAudioDevice>
|
class CAudioDeviceList : public CSequence<CAudioDevice>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/*!
|
//! Default constructor.
|
||||||
* \brief Default constructor.
|
|
||||||
*/
|
|
||||||
CAudioDeviceList();
|
CAudioDeviceList();
|
||||||
|
|
||||||
/*!
|
//! Construct from a base class object.
|
||||||
* \brief Construct from a base class object.
|
|
||||||
* \param other
|
|
||||||
*/
|
|
||||||
CAudioDeviceList(const CSequence &other);
|
CAudioDeviceList(const CSequence &other);
|
||||||
|
|
||||||
//! \copydoc CValueObject::toQVariant
|
//! \copydoc CValueObject::toQVariant
|
||||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||||
|
|
||||||
/*!
|
//! Get output devices in that list
|
||||||
* \brief Get output devices in that list
|
|
||||||
* \return
|
|
||||||
*/
|
|
||||||
CAudioDeviceList getOutputDevices() const;
|
CAudioDeviceList getOutputDevices() const;
|
||||||
|
|
||||||
/*!
|
//! Get output devices in that list
|
||||||
* \brief Get output devices in that list
|
|
||||||
* \return
|
|
||||||
*/
|
|
||||||
CAudioDeviceList getInputDevices() const;
|
CAudioDeviceList getInputDevices() const;
|
||||||
|
|
||||||
/*!
|
//! Count (as of type)
|
||||||
* \brief Count (as of type)
|
|
||||||
* \param type
|
|
||||||
* \return
|
|
||||||
*/
|
|
||||||
int count(CAudioDevice::DeviceType type) const;
|
int count(CAudioDevice::DeviceType type) const;
|
||||||
|
|
||||||
/*!
|
//! Register metadata
|
||||||
* \brief Register metadata
|
|
||||||
*/
|
|
||||||
static void registerMetadata();
|
static void registerMetadata();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace
|
} //namespace
|
||||||
|
|||||||
@@ -26,16 +26,16 @@ namespace BlackMisc
|
|||||||
//! \brief Default constructor.
|
//! \brief Default constructor.
|
||||||
CAircraftModel() {}
|
CAircraftModel() {}
|
||||||
|
|
||||||
//! \brief Constructor.
|
//! Constructor.
|
||||||
CAircraftModel(const QString &model, bool queriedString) : m_modelString(model), m_queriedModelStringFlag(queriedString) {}
|
CAircraftModel(const QString &model, bool isQueriedString) : m_modelString(model), m_queriedModelStringFlag(isQueriedString) {}
|
||||||
|
|
||||||
//! \copydoc CValueObject::toQVariant
|
//! \copydoc CValueObject::toQVariant
|
||||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||||
|
|
||||||
//! \brief Equal operator ==
|
//! Equal operator ==
|
||||||
bool operator ==(const CAircraftModel &other) const;
|
bool operator ==(const CAircraftModel &other) const;
|
||||||
|
|
||||||
//! \brief Unequal operator !=
|
//! Unequal operator !=
|
||||||
bool operator !=(const CAircraftModel &other) const;
|
bool operator !=(const CAircraftModel &other) const;
|
||||||
|
|
||||||
//! \copydoc CValueObject::getValueHash
|
//! \copydoc CValueObject::getValueHash
|
||||||
@@ -68,7 +68,7 @@ namespace BlackMisc
|
|||||||
//! Matches model string?
|
//! Matches model string?
|
||||||
bool matchesModelString(const QString &modelString, Qt::CaseSensitivity sensitivity) const;
|
bool matchesModelString(const QString &modelString, Qt::CaseSensitivity sensitivity) const;
|
||||||
|
|
||||||
//! \brief Register metadata
|
//! Register metadata
|
||||||
static void registerMetadata();
|
static void registerMetadata();
|
||||||
|
|
||||||
//! \copydoc TupleConverter<>::jsonMembers()
|
//! \copydoc TupleConverter<>::jsonMembers()
|
||||||
@@ -96,7 +96,7 @@ namespace BlackMisc
|
|||||||
private:
|
private:
|
||||||
BLACK_ENABLE_TUPLE_CONVERSION(CAircraftModel)
|
BLACK_ENABLE_TUPLE_CONVERSION(CAircraftModel)
|
||||||
QString m_modelString;
|
QString m_modelString;
|
||||||
bool m_queriedModelStringFlag; //!< model string is queried from network
|
bool m_queriedModelStringFlag; //!< model string is queried from network?
|
||||||
};
|
};
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace BlackMisc
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
/*!
|
/*!
|
||||||
* \brief Properties by index
|
* Properties by index
|
||||||
*/
|
*/
|
||||||
enum ColumnIndex : uint
|
enum ColumnIndex : uint
|
||||||
{
|
{
|
||||||
@@ -43,7 +43,7 @@ namespace BlackMisc
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief The Capabilities enum
|
* The Capabilities enum
|
||||||
*/
|
*/
|
||||||
enum Capabilities
|
enum Capabilities
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace BlackMisc
|
|||||||
class CClientList : public CSequence<CClient>
|
class CClientList : public CSequence<CClient>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! \brief Default constructor.
|
//! Default constructor.
|
||||||
CClientList();
|
CClientList();
|
||||||
|
|
||||||
//! Construct from a base class object.
|
//! Construct from a base class object.
|
||||||
|
|||||||
@@ -27,23 +27,16 @@ namespace BlackMisc
|
|||||||
class CServerList : public CSequence<CServer>
|
class CServerList : public CSequence<CServer>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/*!
|
//! Default constructor.
|
||||||
* \brief Empty constructor.
|
|
||||||
*/
|
|
||||||
CServerList();
|
CServerList();
|
||||||
|
|
||||||
/*!
|
//! Construct from a base class object.
|
||||||
* \brief Construct from a base class object.
|
|
||||||
* \param other
|
|
||||||
*/
|
|
||||||
CServerList(const CSequence<CServer> &other);
|
CServerList(const CSequence<CServer> &other);
|
||||||
|
|
||||||
//! \copydoc CValueObject::toQVariant
|
//! \copydoc CValueObject::toQVariant
|
||||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||||
|
|
||||||
/*!
|
//! Register metadata
|
||||||
* \brief Register metadata
|
|
||||||
*/
|
|
||||||
static void registerMetadata();
|
static void registerMetadata();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -24,14 +24,14 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! \brief Default constructor.
|
//! Default constructor.
|
||||||
CVoiceRoom() : m_connected(false), m_audioPlaying(false) {}
|
CVoiceRoom() : m_connected(false), m_audioPlaying(false) {}
|
||||||
|
|
||||||
//! \brief Constructor.
|
//! Constructor.
|
||||||
CVoiceRoom(const QString &hostname, const QString &channel) :
|
CVoiceRoom(const QString &hostname, const QString &channel) :
|
||||||
m_hostname(hostname), m_channel(channel), m_connected(false), m_audioPlaying(false) {}
|
m_hostname(hostname), m_channel(channel), m_connected(false), m_audioPlaying(false) {}
|
||||||
|
|
||||||
//! \brief Constructor.
|
//! Constructor.
|
||||||
CVoiceRoom(const QString &serverUrl, bool connected = false);
|
CVoiceRoom(const QString &serverUrl, bool connected = false);
|
||||||
|
|
||||||
//! \copydoc CValueObject::toQVariant
|
//! \copydoc CValueObject::toQVariant
|
||||||
@@ -40,47 +40,47 @@ namespace BlackMisc
|
|||||||
return QVariant::fromValue(*this);
|
return QVariant::fromValue(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \brief Get the host name
|
//! Get the host name
|
||||||
const QString &getHostName() const { return m_hostname; }
|
const QString &getHostName() const { return m_hostname; }
|
||||||
|
|
||||||
//! \brief Get the voice room channel
|
//! Get the voice room channel
|
||||||
const QString &getChannel() const { return m_channel; }
|
const QString &getChannel() const { return m_channel; }
|
||||||
|
|
||||||
//! \brief Set the host name
|
//! Set the host name
|
||||||
void setHostName(const QString &hostName) { m_hostname = hostName; }
|
void setHostName(const QString &hostName) { m_hostname = hostName; }
|
||||||
|
|
||||||
//! \brief Set the voice channel
|
//! Set the voice channel
|
||||||
void setChannel(const QString &channel) { m_channel = channel; }
|
void setChannel(const QString &channel) { m_channel = channel; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Server URL
|
* Server URL
|
||||||
* \param noProtocol either with (pseudo) protocol prefix or without
|
* \param noProtocol either with (pseudo) protocol prefix or without
|
||||||
* \return
|
* \return
|
||||||
*/
|
*/
|
||||||
QString getVoiceRoomUrl(bool noProtocol = true) const;
|
QString getVoiceRoomUrl(bool noProtocol = true) const;
|
||||||
|
|
||||||
//! \brief Valid voice room object?
|
//! Valid voice room object?
|
||||||
bool isValid() const { return !this->m_hostname.isEmpty() && !this->m_channel.isEmpty(); }
|
bool isValid() const { return !this->m_hostname.isEmpty() && !this->m_channel.isEmpty(); }
|
||||||
|
|
||||||
//! \brief Is connected?
|
//! Is connected?
|
||||||
bool isConnected() const { return this->isValid() && this->m_connected; }
|
bool isConnected() const { return this->isValid() && this->m_connected; }
|
||||||
|
|
||||||
//! \brief Set connection status
|
//! Set connection status
|
||||||
void setConnected(bool isConnected) { this->m_connected = isConnected; }
|
void setConnected(bool isConnected) { this->m_connected = isConnected; }
|
||||||
|
|
||||||
//! \brief Is audio playing in this room?
|
//! Is audio playing in this room?
|
||||||
bool isAudioPlaying() const { return this->m_audioPlaying; }
|
bool isAudioPlaying() const { return this->m_audioPlaying; }
|
||||||
|
|
||||||
//! \brief Set audio playing
|
//! Set audio playing
|
||||||
void setAudioPlaying(bool playing) { this->m_audioPlaying = playing; }
|
void setAudioPlaying(bool playing) { this->m_audioPlaying = playing; }
|
||||||
|
|
||||||
//! \brief Is ATIS voice channel
|
//! Is ATIS voice channel
|
||||||
bool isAtis() const;
|
bool isAtis() const;
|
||||||
|
|
||||||
//! \brief Equal operator ==
|
//! Equal operator ==
|
||||||
bool operator ==(const CVoiceRoom &other) const;
|
bool operator ==(const CVoiceRoom &other) const;
|
||||||
|
|
||||||
//! \brief Unequal operator !=
|
//! Unequal operator !=
|
||||||
bool operator !=(const CVoiceRoom &other) const;
|
bool operator !=(const CVoiceRoom &other) const;
|
||||||
|
|
||||||
//! \copydoc CValueObject::getValueHash
|
//! \copydoc CValueObject::getValueHash
|
||||||
@@ -92,17 +92,17 @@ namespace BlackMisc
|
|||||||
//! \copydoc CValueObject::fromJson
|
//! \copydoc CValueObject::fromJson
|
||||||
void fromJson(const QJsonObject &json) override;
|
void fromJson(const QJsonObject &json) override;
|
||||||
|
|
||||||
//! \brief Register metadata
|
//! Register metadata
|
||||||
static void registerMetadata();
|
static void registerMetadata();
|
||||||
|
|
||||||
//! \copydoc TupleConverter<>::jsonMembers()
|
//! \copydoc TupleConverter<>::jsonMembers()
|
||||||
static const QStringList &jsonMembers();
|
static const QStringList &jsonMembers();
|
||||||
|
|
||||||
//! \brief Protocol prefix "vvl"
|
//! Protocol prefix "vvl"
|
||||||
static const QString &protocol() { static QString p("vvl"); return p; }
|
static const QString &protocol() { static QString p("vvl"); return p; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Protocol
|
* Protocol
|
||||||
* \return with protocol prefix or without
|
* \return with protocol prefix or without
|
||||||
*/
|
*/
|
||||||
static const QString &protocolComplete() { static QString p("vvl://"); return p; }
|
static const QString &protocolComplete() { static QString p("vvl://"); return p; }
|
||||||
|
|||||||
Reference in New Issue
Block a user