mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
* set infobar status correctly when GUI connects after the core has been started * more detailed information in information statusbar * allow to obtain currently connected server in network context * made many network vatlib slots normal member functions * fixed rendered aircraft flag setting in FSX driver
This commit is contained in:
committed by
Mathew Sutcliffe
parent
1d89862080
commit
3c15f2ad89
@@ -20,6 +20,10 @@ namespace BlackMisc
|
||||
namespace Aviation
|
||||
{
|
||||
|
||||
CAircraftIcao::CAircraftIcao(const QString &icao, const QString &airline)
|
||||
: m_aircraftDesignator(icao.trimmed().toUpper()), m_airlineDesignator(airline.trimmed().toUpper())
|
||||
{}
|
||||
|
||||
QString CAircraftIcao::convertToQString(bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
@@ -41,6 +45,12 @@ namespace BlackMisc
|
||||
return (this->hasAircraftDesignator() && this->getAircraftDesignator() != "ZZZZ");
|
||||
}
|
||||
|
||||
QString CAircraftIcao::getEngineType() const
|
||||
{
|
||||
if (this->m_aircraftCombinedType.length() != 3) return "";
|
||||
return this->m_aircraftCombinedType.right(1);
|
||||
}
|
||||
|
||||
QString CAircraftIcao::asString() const
|
||||
{
|
||||
if (this->m_aircraftDesignator.isEmpty()) { return ""; }
|
||||
|
||||
@@ -42,14 +42,10 @@ namespace BlackMisc
|
||||
//! Constructor.
|
||||
explicit CAircraftIcao(const QString &icao) : m_aircraftDesignator(icao.trimmed().toUpper()) {}
|
||||
|
||||
/*!
|
||||
* Constructor.
|
||||
* \param icao "B737"
|
||||
* \param airline "DLH"
|
||||
*/
|
||||
CAircraftIcao(const QString &icao, const QString &airline)
|
||||
: m_aircraftDesignator(icao.trimmed().toUpper()), m_airlineDesignator(airline.trimmed().toUpper())
|
||||
{}
|
||||
//! Constructor.
|
||||
//! \param icao "B737"
|
||||
//! \param airline "DLH"
|
||||
CAircraftIcao(const QString &icao, const QString &airline);
|
||||
|
||||
/*!
|
||||
* Constructor.
|
||||
@@ -115,16 +111,10 @@ namespace BlackMisc
|
||||
bool hasAircraftCombinedType() const { return this->getAircraftCombinedType().length() == 3; }
|
||||
|
||||
//! Get engine type, e.g. "J"
|
||||
QString getEngineType() const
|
||||
{
|
||||
if (this->m_aircraftCombinedType.length() != 3) return "";
|
||||
return this->m_aircraftCombinedType.right(1);
|
||||
}
|
||||
QString getEngineType() const;
|
||||
|
||||
/*!
|
||||
* \brief As string for GUI representation by index
|
||||
* \remarks Different from toQString()
|
||||
*/
|
||||
//! As string for GUI representation by index
|
||||
//! \remarks Different from toQString()
|
||||
QString asString() const;
|
||||
|
||||
//! Set type
|
||||
@@ -175,7 +165,7 @@ BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAircraftIcao, (
|
||||
o.m_airlineDesignator,
|
||||
o.m_livery,
|
||||
o.m_aircraftColor
|
||||
))
|
||||
))
|
||||
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace BlackMisc
|
||||
CServer() : m_port(-1), m_isAcceptingConnections(true) {}
|
||||
|
||||
//! Constructor.
|
||||
CServer(const QString &name, const QString &description, const QString &address, qint32 port, const CUser &user, bool isAcceptingConnections = true)
|
||||
CServer(const QString &name, const QString &description, const QString &address, int port, const CUser &user, bool isAcceptingConnections = true)
|
||||
: m_name(name), m_description(description), m_address(address), m_port(port), m_user(user), m_isAcceptingConnections(isAcceptingConnections) {}
|
||||
|
||||
//! Get address.
|
||||
|
||||
Reference in New Issue
Block a user