Some formatting like "this->m_" => "m_"

During Ref T203
This commit is contained in:
Klaus Basan
2017-12-09 19:29:04 +01:00
parent 0dc6b63ba5
commit 6374e5e10a
8 changed files with 117 additions and 120 deletions

View File

@@ -25,7 +25,7 @@ namespace BlackCore
namespace Db
{
//! Read information about data from Database or shared files
//! like when updated and number of entries.
//! such as when updated and number of entries.
//! \see BlackMisc::Db::CDbInfo
class BLACKCORE_EXPORT CInfoDataReader : public CDatabaseReader
{

View File

@@ -129,5 +129,6 @@ namespace BlackMisc
}
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAltitude)
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAltitude::ReferenceDatum)
#endif // guard

View File

@@ -36,7 +36,7 @@ namespace BlackMisc
CAtcStation::CAtcStation(const QString &callsign) : m_callsign(callsign)
{
this->m_callsign.setTypeHint(CCallsign::Atc);
m_callsign.setTypeHint(CCallsign::Atc);
}
CAtcStation::CAtcStation(const CCallsign &callsign, const CUser &controller, const CFrequency &frequency,
@@ -48,21 +48,21 @@ namespace BlackMisc
m_atis(atis), m_metar(metar)
{
// sync callsigns
this->m_callsign.setTypeHint(CCallsign::Atc);
if (!this->m_controller.hasValidCallsign() && !callsign.isEmpty())
m_callsign.setTypeHint(CCallsign::Atc);
if (!m_controller.hasValidCallsign() && !callsign.isEmpty())
{
this->m_controller.setCallsign(m_callsign);
m_controller.setCallsign(m_callsign);
}
}
bool CAtcStation::hasBookingTimes() const
{
return !(this->m_bookedFromUtc.isNull() && this->m_bookedUntilUtc.isNull());
return !(m_bookedFromUtc.isNull() && m_bookedUntilUtc.isNull());
}
bool CAtcStation::hasMetar() const
{
return this->m_metar.hasMessage();
return m_metar.hasMessage();
}
QString CAtcStation::getCallsignSuffix() const
@@ -72,14 +72,14 @@ namespace BlackMisc
void CAtcStation::setCallsign(const CCallsign &callsign)
{
this->m_callsign = callsign;
this->m_controller.setCallsign(callsign);
m_callsign = callsign;
m_controller.setCallsign(callsign);
}
void CAtcStation::setController(const CUser &controller)
{
this->m_controller = controller;
this->m_controller.setCallsign(this->m_callsign);
m_controller = controller;
m_controller.setCallsign(m_callsign);
}
QString CAtcStation::convertToQString(bool i18n) const
@@ -90,28 +90,28 @@ namespace BlackMisc
static const QString untilUtcI18n(QCoreApplication::translate("Aviation", "until(UTC)"));
const QString s = (i18n ? atcI18n : QLatin1String("ATC station")) %
QLatin1Char(' ') % this->m_callsign.toQString(i18n) %
QLatin1Char(' ') % this->m_position.toQString(i18n) %
QLatin1Char(' ') % m_callsign.toQString(i18n) %
QLatin1Char(' ') % m_position.toQString(i18n) %
QLatin1String(" online: ") % boolToYesNo(m_isOnline) %
// controller
(!this->m_controller.isValid() ? QStringLiteral("") :
QStringLiteral(" ") % this->m_controller.toQString(i18n)) %
(!m_controller.isValid() ? QStringLiteral("") :
QStringLiteral(" ") % m_controller.toQString(i18n)) %
// frequency
QLatin1Char(' ') % this->m_frequency.valueRoundedWithUnit(3, i18n) %
QLatin1Char(' ') % m_frequency.valueRoundedWithUnit(3, i18n) %
// ATIS
(!this->hasAtis() ? QStringLiteral("") :
QStringLiteral(" ") % this->m_atis.toQString(i18n)) %
QStringLiteral(" ") % m_atis.toQString(i18n)) %
// METAR
(!this->hasMetar() ? QStringLiteral("") :
QStringLiteral(" ") % this->m_metar.toQString(i18n)) %
QStringLiteral(" ") % m_metar.toQString(i18n)) %
// range
QLatin1Char(' ') % (i18n ? rangeI18n : QLatin1String("range")) %
QLatin1Char(' ') % this->m_range.toQString(i18n) %
QLatin1Char(' ') % m_range.toQString(i18n) %
// distance / bearing
QLatin1Char(' ') % ICoordinateWithRelativePosition::convertToQString(i18n) %
@@ -120,12 +120,12 @@ namespace BlackMisc
QLatin1Char(' ') %
(i18n ? fromUtcI18n : QLatin1String("from(UTC)")) %
QLatin1Char(' ') %
(this->m_bookedFromUtc.isNull() ? QLatin1String("-") : this->m_bookedFromUtc.toString("yy-MM-dd HH:mm")) %
(m_bookedFromUtc.isNull() ? QLatin1String("-") : m_bookedFromUtc.toString("yy-MM-dd HH:mm")) %
QLatin1Char(' ') %
(i18n ? untilUtcI18n : QLatin1String("until(UTC)")) %
QLatin1Char(' ') %
(this->m_bookedUntilUtc.isNull() ? QLatin1String("-") : this->m_bookedUntilUtc.toString("yy-MM-dd HH:mm"));
(m_bookedUntilUtc.isNull() ? QLatin1String("-") : m_bookedUntilUtc.toString("yy-MM-dd HH:mm"));
return s;
@@ -142,15 +142,15 @@ namespace BlackMisc
void CAtcStation::setFrequency(const CFrequency &frequency)
{
this->m_frequency = frequency;
this->m_frequency.setUnit(CFrequencyUnit::MHz());
m_frequency = frequency;
m_frequency.setUnit(CFrequencyUnit::MHz());
}
void CAtcStation::synchronizeControllerData(CAtcStation &otherStation)
{
if (this->m_controller == otherStation.getController()) { return; }
if (m_controller == otherStation.getController()) { return; }
CUser otherController = otherStation.getController();
this->m_controller.synchronizeData(otherController);
m_controller.synchronizeData(otherController);
otherStation.setController(otherController);
}
@@ -238,8 +238,8 @@ namespace BlackMisc
bool CAtcStation::hasValidBookingTimes() const
{
return !this->m_bookedFromUtc.isNull() && this->m_bookedFromUtc.isValid() &&
!this->m_bookedUntilUtc.isNull() && this->m_bookedUntilUtc.isValid();
return !m_bookedFromUtc.isNull() && m_bookedFromUtc.isValid() &&
!m_bookedUntilUtc.isNull() && m_bookedUntilUtc.isValid();
}
void CAtcStation::setBookedFromUntil(const CAtcStation &otherStation)
@@ -252,8 +252,8 @@ namespace BlackMisc
{
if (!this->hasValidBookingTimes()) { return false; }
QDateTime now = QDateTime::currentDateTimeUtc();
if (this->m_bookedFromUtc > now) { return false; }
if (now > this->m_bookedUntilUtc) { return false; }
if (m_bookedFromUtc > now) { return false; }
if (now > m_bookedUntilUtc) { return false; }
return true;
}
@@ -267,13 +267,13 @@ namespace BlackMisc
if (!this->hasValidBookingTimes()) { return CTime(0, nullptr); }
QDateTime now = QDateTime::currentDateTimeUtc();
qint64 diffMs;
if (this->m_bookedFromUtc > now)
if (m_bookedFromUtc > now)
{
// future
diffMs = now.msecsTo(this->m_bookedFromUtc);
diffMs = now.msecsTo(m_bookedFromUtc);
return CTime(diffMs / 1000.0, CTimeUnit::s());
}
else if (this->m_bookedUntilUtc > now)
else if (m_bookedUntilUtc > now)
{
// now
return CTime(0.0, CTimeUnit::s());
@@ -298,17 +298,17 @@ namespace BlackMisc
const CAltitude &CAtcStation::geodeticHeight() const
{
return this->m_position.geodeticHeight();
return m_position.geodeticHeight();
}
QVector3D CAtcStation::normalVector() const
{
return this->m_position.normalVector();
return m_position.normalVector();
}
std::array<double, 3> CAtcStation::normalVectorDouble() const
{
return this->m_position.normalVectorDouble();
return m_position.normalVectorDouble();
}
CVariant CAtcStation::propertyByIndex(const BlackMisc::CPropertyIndex &index) const
@@ -318,33 +318,33 @@ namespace BlackMisc
switch (i)
{
case IndexBookedFrom:
return CVariant::from(this->m_bookedFromUtc);
return CVariant::from(m_bookedFromUtc);
case IndexBookedUntil:
return CVariant::from(this->m_bookedUntilUtc);
return CVariant::from(m_bookedUntilUtc);
case IndexCallsign:
return this->m_callsign.propertyByIndex(index.copyFrontRemoved());
return m_callsign.propertyByIndex(index.copyFrontRemoved());
case IndexController:
return this->m_controller.propertyByIndex(index.copyFrontRemoved());
return m_controller.propertyByIndex(index.copyFrontRemoved());
case IndexFrequency:
return this->m_frequency.propertyByIndex(index.copyFrontRemoved());
return m_frequency.propertyByIndex(index.copyFrontRemoved());
case IndexIsOnline:
return CVariant::from(this->m_isOnline);
return CVariant::from(m_isOnline);
case IndexLatitude:
return this->latitude().propertyByIndex(index.copyFrontRemoved());
case IndexLongitude:
return this->longitude().propertyByIndex(index.copyFrontRemoved());
case IndexPosition:
return this->m_position.propertyByIndex(index.copyFrontRemoved());
return m_position.propertyByIndex(index.copyFrontRemoved());
case IndexRange:
return this->m_range.propertyByIndex(index.copyFrontRemoved());
return m_range.propertyByIndex(index.copyFrontRemoved());
case IndexIsInRange:
return CVariant::fromValue(isInRange());
case IndexAtis:
return this->m_atis.propertyByIndex(index.copyFrontRemoved());
return m_atis.propertyByIndex(index.copyFrontRemoved());
case IndexMetar:
return this->m_metar.propertyByIndex(index.copyFrontRemoved());
return m_metar.propertyByIndex(index.copyFrontRemoved());
case IndexVoiceRoom:
return this->m_voiceRoom.propertyByIndex(index.copyFrontRemoved());
return m_voiceRoom.propertyByIndex(index.copyFrontRemoved());
default:
return (ICoordinateWithRelativePosition::canHandleIndex(index)) ?
ICoordinateWithRelativePosition::propertyByIndex(index) :
@@ -365,31 +365,31 @@ namespace BlackMisc
this->setBookedUntilUtc(variant.value<QDateTime>());
break;
case IndexCallsign:
this->m_callsign.setPropertyByIndex(index.copyFrontRemoved(), variant);
m_callsign.setPropertyByIndex(index.copyFrontRemoved(), variant);
break;
case IndexController:
this->m_controller.setPropertyByIndex(index.copyFrontRemoved(), variant);
m_controller.setPropertyByIndex(index.copyFrontRemoved(), variant);
break;
case IndexFrequency:
this->m_frequency.setPropertyByIndex(index.copyFrontRemoved(), variant);
m_frequency.setPropertyByIndex(index.copyFrontRemoved(), variant);
break;
case IndexIsOnline:
this->setOnline(variant.value<bool>());
break;
case IndexPosition:
this->m_position.setPropertyByIndex(index.copyFrontRemoved(), variant);
m_position.setPropertyByIndex(index.copyFrontRemoved(), variant);
break;
case IndexRange:
this->m_range.setPropertyByIndex(index.copyFrontRemoved(), variant);
m_range.setPropertyByIndex(index.copyFrontRemoved(), variant);
break;
case IndexAtis:
this->m_atis.setPropertyByIndex(index.copyFrontRemoved(), variant);
m_atis.setPropertyByIndex(index.copyFrontRemoved(), variant);
break;
case IndexMetar:
this->m_metar.setPropertyByIndex(index.copyFrontRemoved(), variant);
m_metar.setPropertyByIndex(index.copyFrontRemoved(), variant);
break;
case IndexVoiceRoom:
this->m_voiceRoom.setPropertyByIndex(index.copyFrontRemoved(), variant);
m_voiceRoom.setPropertyByIndex(index.copyFrontRemoved(), variant);
break;
default:
if (ICoordinateWithRelativePosition::canHandleIndex(index))
@@ -415,11 +415,11 @@ namespace BlackMisc
case IndexBookedUntil:
return Compare::compare(this->getBookedUntilUtc(), compareValue.getBookedUntilUtc());
case IndexCallsign:
return this->m_callsign.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getCallsign());
return m_callsign.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getCallsign());
case IndexController:
return this->m_controller.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getController());
return m_controller.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getController());
case IndexFrequency:
return this->m_frequency.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getFrequency());
return m_frequency.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getFrequency());
case IndexIsOnline:
return Compare::compare(this->isOnline(), compareValue.isOnline());
case IndexLatitude:
@@ -427,15 +427,15 @@ namespace BlackMisc
case IndexLongitude:
return this->longitude().comparePropertyByIndex(index.copyFrontRemoved(), compareValue.longitude());
case IndexPosition:
return this->m_position.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getPosition());
return m_position.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getPosition());
case IndexRange:
return this->m_range.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getRange());
return m_range.comparePropertyByIndex(index.copyFrontRemoved(), compareValue.getRange());
case IndexIsInRange:
return Compare::compare(this->isInRange(), compareValue.isInRange());
case IndexAtis:
return this->m_atis.getMessage().compare(compareValue.getAtis().getMessage());
return m_atis.getMessage().compare(compareValue.getAtis().getMessage());
case IndexMetar:
return this->m_metar.getMessage().compare(compareValue.getMetar().getMessage());
return m_metar.getMessage().compare(compareValue.getMetar().getMessage());
case IndexVoiceRoom:
return this->getVoiceRoom().getVoiceRoomUrl().compare(compareValue.getVoiceRoom().getVoiceRoomUrl());
default:

View File

@@ -81,7 +81,7 @@ namespace BlackMisc
bool hasBookingTimes() const;
//! Has ATIS?
bool hasAtis() const { return this->m_atis.hasMessage(); }
bool hasAtis() const { return m_atis.hasMessage(); }
//! Has METAR?
bool hasMetar() const;
@@ -111,31 +111,31 @@ namespace BlackMisc
void setController(const BlackMisc::Network::CUser &controller);
//! Set controller's name
void setControllerRealName(const QString &controllerName) { this->m_controller.setRealName(controllerName); }
void setControllerRealName(const QString &controllerName) { m_controller.setRealName(controllerName); }
//! Set controller's id
void setControllerId(const QString &controllerId) { this->m_controller.setId(controllerId); }
void setControllerId(const QString &controllerId) { m_controller.setId(controllerId); }
//! Has valid realname?
bool hasValidRealName() const { return this->m_controller.hasValidRealName(); }
bool hasValidRealName() const { return m_controller.hasValidRealName(); }
//! Has valid id?
bool hasValidId() const { return this->m_controller.hasValidId(); }
bool hasValidId() const { return m_controller.hasValidId(); }
//! Valid COM frequency
bool hasValidFrequency() const { return BlackMisc::Aviation::CComSystem::isValidCivilAviationFrequency(this->getFrequency()); }
//! Get frequency.
const BlackMisc::PhysicalQuantities::CFrequency &getFrequency() const { return m_frequency; }
const PhysicalQuantities::CFrequency &getFrequency() const { return m_frequency; }
//! Set frequency
void setFrequency(const BlackMisc::PhysicalQuantities::CFrequency &frequency);
//! Get the position of the center of the controller's area of visibility.
const BlackMisc::Geo::CCoordinateGeodetic &getPosition() const { return m_position; }
const Geo::CCoordinateGeodetic &getPosition() const { return m_position; }
//! Set position
void setPosition(const BlackMisc::Geo::CCoordinateGeodetic &position) { this->m_position = position; }
void setPosition(const BlackMisc::Geo::CCoordinateGeodetic &position) { m_position = position; }
//! Synchronize controller data
//! Updates two stations (normally a booked and online ATC station) with complementary data
@@ -147,10 +147,10 @@ namespace BlackMisc
void synchronizeWithBookedStation(CAtcStation &bookedStation);
//! Get the radius of the controller's area of visibility.
const BlackMisc::PhysicalQuantities::CLength &getRange() const { return m_range; }
const PhysicalQuantities::CLength &getRange() const { return m_range; }
//! Set range
void setRange(const BlackMisc::PhysicalQuantities::CLength &range) { this->m_range = range; }
void setRange(const PhysicalQuantities::CLength &range) { m_range = range; }
//! In range? If range and distance to own aircraft are not available false
bool isInRange() const;
@@ -159,19 +159,19 @@ namespace BlackMisc
bool isOnline() const { return m_isOnline; }
//! Set online
void setOnline(bool online) { this->m_isOnline = online; }
void setOnline(bool online) { m_isOnline = online; }
//! Get voice room
const BlackMisc::Audio::CVoiceRoom &getVoiceRoom() const { return this->m_voiceRoom; }
const Audio::CVoiceRoom &getVoiceRoom() const { return m_voiceRoom; }
//! Set voice room
void setVoiceRoom(const BlackMisc::Audio::CVoiceRoom &voiceRoom) { this->m_voiceRoom = voiceRoom; }
void setVoiceRoom(const Audio::CVoiceRoom &voiceRoom) { m_voiceRoom = voiceRoom; }
//! Set voice room URL
void setVoiceRoomUrl(const QString &url) { this->m_voiceRoom.setVoiceRoomUrl(url); }
void setVoiceRoomUrl(const QString &url) { m_voiceRoom.setVoiceRoomUrl(url); }
//! Valid voice room?
bool hasValidVoiceRoom() const { return this->m_voiceRoom.isValid(); }
bool hasValidVoiceRoom() const { return m_voiceRoom.isValid(); }
//! Booked date/time if any.
//! This represents the closest booking within a time frame as there can be multiple bookings.
@@ -185,7 +185,7 @@ namespace BlackMisc
bool hasValidBookingTimes() const;
//! Set booked from
void setBookedFromUtc(const QDateTime &from) { this->m_bookedFromUtc = from; }
void setBookedFromUtc(const QDateTime &from) { m_bookedFromUtc = from; }
//! Transfer booking times
void setBookedFromUntil(const CAtcStation &otherStation);
@@ -200,37 +200,37 @@ namespace BlackMisc
//! negative values mean booking in past,
//! positive values mean booking in future,
//! no booking dates will result in null time
BlackMisc::PhysicalQuantities::CTime bookedWhen() const;
PhysicalQuantities::CTime bookedWhen() const;
//! Get ATIS
const CInformationMessage &getAtis() const { return m_atis; }
//! Set ATIS
void setAtis(const CInformationMessage &atis) { this->m_atis = atis;}
void setAtis(const CInformationMessage &atis) { m_atis = atis;}
//! Set ATIS Message
void setAtisMessage(const QString &atis) { this->m_atis.setMessage(atis); }
void setAtisMessage(const QString &atis) { m_atis.setMessage(atis); }
//! Get METAR
const CInformationMessage &getMetar() const { return m_metar; }
//! Set METAR
void setMetar(const CInformationMessage &metar) { this->m_metar = metar;}
void setMetar(const CInformationMessage &metar) { m_metar = metar;}
//! Set METAR Message
void setMetarMessage(const QString &metar) { this->m_metar.setMessage(metar); }
void setMetarMessage(const QString &metar) { m_metar.setMessage(metar); }
//! Set booked until
void setBookedUntilUtc(const QDateTime &until) { this->m_bookedUntilUtc = until; }
void setBookedUntilUtc(const QDateTime &until) { m_bookedUntilUtc = until; }
//! \copydoc Geo::ICoordinateGeodetic::latitude
virtual BlackMisc::Geo::CLatitude latitude() const override;
virtual Geo::CLatitude latitude() const override;
//! \copydoc Geo::ICoordinateGeodetic::longitude
virtual BlackMisc::Geo::CLongitude longitude() const override;
virtual Geo::CLongitude longitude() const override;
//! \copydoc Geo::ICoordinateGeodetic::geodeticHeight
const BlackMisc::Aviation::CAltitude &geodeticHeight() const override;
const Aviation::CAltitude &geodeticHeight() const override;
//! \copydoc Geo::ICoordinateGeodetic::normalVector
virtual QVector3D normalVector() const override;
@@ -239,7 +239,7 @@ namespace BlackMisc
virtual std::array<double, 3> normalVectorDouble() const override;
//! \copydoc BlackMisc::Mixin::Index::propertyByIndex
CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const;
CVariant propertyByIndex(const CPropertyIndex &index) const;
//! \copydoc BlackMisc::Mixin::Index::setPropertyByIndex
void setPropertyByIndex(const CPropertyIndex &index, const CVariant &variant);
@@ -251,20 +251,20 @@ namespace BlackMisc
QString convertToQString(bool i18n = false) const;
//! \copydoc BlackMisc::Mixin::Icon::toIcon()
BlackMisc::CIcon toIcon() const { return this->m_callsign.toIcon(); }
BlackMisc::CIcon toIcon() const { return m_callsign.toIcon(); }
private:
CCallsign m_callsign;
BlackMisc::Network::CUser m_controller;
BlackMisc::PhysicalQuantities::CFrequency m_frequency;
BlackMisc::Geo::CCoordinateGeodetic m_position;
BlackMisc::PhysicalQuantities::CLength m_range;
bool m_isOnline = false;
QDateTime m_bookedFromUtc;
QDateTime m_bookedUntilUtc;
CCallsign m_callsign;
Network::CUser m_controller;
PhysicalQuantities::CFrequency m_frequency;
Geo::CCoordinateGeodetic m_position;
PhysicalQuantities::CLength m_range;
bool m_isOnline = false;
QDateTime m_bookedFromUtc;
QDateTime m_bookedUntilUtc;
CInformationMessage m_atis { CInformationMessage::ATIS };
CInformationMessage m_metar { CInformationMessage::METAR };
BlackMisc::Audio::CVoiceRoom m_voiceRoom;
Audio::CVoiceRoom m_voiceRoom;
BLACK_METACLASS(
CAtcStation,

View File

@@ -24,7 +24,7 @@ namespace BlackMisc
QString CCallsign::convertToQString(bool i18n) const
{
Q_UNUSED(i18n);
return this->m_callsign;
return m_callsign;
}
QString CCallsign::unifyCallsign(const QString &callsign)
@@ -73,7 +73,7 @@ namespace BlackMisc
bool CCallsign::isSupervisorCallsign() const
{
if (this->getTypeHint() == Aircraft) { return false; }
return this->m_callsign.endsWith("SUP");
return m_callsign.endsWith("SUP");
}
QString CCallsign::getIcaoCode() const
@@ -122,11 +122,11 @@ namespace BlackMisc
QString CCallsign::getAirlineSuffix() const
{
if (this->m_callsign.length() < 3) { return ""; }
if (m_callsign.length() < 3) { return ""; }
if (this->isAtcCallsign()) { return ""; }
thread_local const QRegularExpression regExp("^[A-Z]{3,}");
QRegularExpressionMatch match = regExp.match(this->m_callsign);
QRegularExpressionMatch match = regExp.match(m_callsign);
if (!match.hasMatch()) { return QString(); }
const QString airline = match.captured(0);
@@ -178,13 +178,13 @@ namespace BlackMisc
switch (i)
{
case IndexCallsignString:
this->m_callsign = variant.toQString();
m_callsign = variant.toQString();
break;
case IndexCallsignStringAsSet:
this->m_callsignAsSet = variant.toQString();
m_callsignAsSet = variant.toQString();
break;
case IndexTelephonyDesignator:
this->m_telephonyDesignator = variant.toQString();
m_telephonyDesignator = variant.toQString();
break;
default:
CValueObject::setPropertyByIndex(index, variant);
@@ -193,16 +193,16 @@ namespace BlackMisc
int CCallsign::comparePropertyByIndex(const CPropertyIndex &index, const CCallsign &compareValue) const
{
if (index.isMyself()) { return this->m_callsign.compare(compareValue.m_callsign, Qt::CaseInsensitive); }
if (index.isMyself()) { return m_callsign.compare(compareValue.m_callsign, Qt::CaseInsensitive); }
const ColumnIndex i = index.frontCasted<ColumnIndex>();
switch (i)
{
case IndexCallsignString:
return this->m_callsign.compare(compareValue.m_callsign, Qt::CaseInsensitive);
return m_callsign.compare(compareValue.m_callsign, Qt::CaseInsensitive);
case IndexCallsignStringAsSet:
return this->m_callsignAsSet.compare(compareValue.m_callsignAsSet, Qt::CaseInsensitive);
return m_callsignAsSet.compare(compareValue.m_callsignAsSet, Qt::CaseInsensitive);
case IndexTelephonyDesignator:
return this->m_telephonyDesignator.compare(compareValue.m_telephonyDesignator, Qt::CaseInsensitive);
return m_telephonyDesignator.compare(compareValue.m_telephonyDesignator, Qt::CaseInsensitive);
case IndexSuffix:
return this->getSuffix().compare(compareValue.getSuffix(), Qt::CaseInsensitive);
default:

View File

@@ -36,7 +36,7 @@ namespace BlackMisc
//! Indexes
enum ColumnIndex
{
IndexCallsignString = BlackMisc::CPropertyIndex::GlobalIndexCCallsign,
IndexCallsignString = CPropertyIndex::GlobalIndexCCallsign,
IndexCallsignStringAsSet,
IndexTelephonyDesignator,
IndexSuffix
@@ -69,7 +69,7 @@ namespace BlackMisc
{}
//! Is empty?
bool isEmpty() const { return this->m_callsignAsSet.isEmpty(); }
bool isEmpty() const { return m_callsignAsSet.isEmpty(); }
//! ATC callsign
//! \sa atcCallsignSuffixes()
@@ -86,19 +86,19 @@ namespace BlackMisc
bool isSupervisorCallsign() const;
//! Get callsign (normalized)
const QString &asString() const { return this->m_callsign; }
const QString &asString() const { return m_callsign; }
//! Get callsign.
const QString &getStringAsSet() const { return this->m_callsignAsSet; }
const QString &getStringAsSet() const { return m_callsignAsSet; }
//! Get callsign telephony designator (how callsign is pronounced)
const QString &getTelephonyDesignator() const { return this->m_telephonyDesignator; }
const QString &getTelephonyDesignator() const { return m_telephonyDesignator; }
//! Type hint
TypeHint getTypeHint() const { return m_typeHint; }
//! Type hint
void setTypeHint(TypeHint hint) { this->m_typeHint = hint; }
void setTypeHint(TypeHint hint) { m_typeHint = hint; }
//! Get ICAO code, if this makes sense (EDDF_TWR -> EDDF)
QString getIcaoCode() const;
@@ -181,5 +181,6 @@ namespace BlackMisc
} // namespace
Q_DECLARE_METATYPE(BlackMisc::Aviation::CCallsign)
Q_DECLARE_METATYPE(BlackMisc::Aviation::CCallsign::TypeHint)
#endif // guard

View File

@@ -27,9 +27,7 @@ namespace BlackMisc
{
namespace Network
{
class CRemoteFile;
//! Value object encapsulating a list of servers.
//! Value object encapsulating a list of remote files.
class BLACKMISC_EXPORT CRemoteFileList :
public CSequence<CRemoteFile>,
public BlackMisc::Mixin::MetaType<CRemoteFileList>