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