mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
refs #469, renamed flags
* db to entity flags as it also features entities not from DB * Flag enums singular (discussed with MS / slack)
This commit is contained in:
committed by
Mathew Sutcliffe
parent
24432a56c7
commit
2cfd3540b8
@@ -46,7 +46,7 @@ namespace BlackGui
|
||||
int c = getAircraftIcaoCodesCount();
|
||||
if (c > 0)
|
||||
{
|
||||
ps_icaoRead(CDbFlags::AircraftIcaoEntity, CDbFlags::ReadFinished, c);
|
||||
ps_icaoRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadFinished, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,10 +55,10 @@ namespace BlackGui
|
||||
this->ui->filter_AircraftIcao->filter(icao);
|
||||
}
|
||||
|
||||
void CDbAircraftIcaoComponent::ps_icaoRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CDbAircraftIcaoComponent::ps_icaoRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
Q_UNUSED(count);
|
||||
if (entity.testFlag(CDbFlags::AircraftIcaoEntity) && readState == CDbFlags::ReadFinished)
|
||||
if (entity.testFlag(CEntityFlags::AircraftIcaoEntity) && readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
this->ui->tvp_AircraftIcao->updateContainerMaybeAsync(this->getAircraftIcaoCodes());
|
||||
}
|
||||
@@ -67,7 +67,7 @@ namespace BlackGui
|
||||
void CDbAircraftIcaoComponent::ps_reload()
|
||||
{
|
||||
if (!hasProvider()) { return; }
|
||||
triggerRead(CDbFlags::AircraftIcaoEntity);
|
||||
triggerRead(CEntityFlags::AircraftIcaoEntity);
|
||||
}
|
||||
|
||||
} // ns
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! ICAO codes have been read
|
||||
void ps_icaoRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_icaoRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Reload models
|
||||
void ps_reload();
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace BlackGui
|
||||
int c = this->getAircraftIcaoCodesCount();
|
||||
if (c > 0)
|
||||
{
|
||||
this->ps_codesRead(CDbFlags::AircraftIcaoEntity, CDbFlags::ReadFinished, c);
|
||||
this->ps_codesRead(CEntityFlags::AircraftIcaoEntity, CEntityFlags::ReadFinished, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,10 +141,10 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CDbAircraftIcaoSelectorComponent::ps_codesRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CDbAircraftIcaoSelectorComponent::ps_codesRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
if (!hasProvider()) { return; }
|
||||
if (entity.testFlag(CDbFlags::AircraftIcaoEntity) && readState == CDbFlags::ReadFinished)
|
||||
if (entity.testFlag(CEntityFlags::AircraftIcaoEntity) && readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Distributors have been read
|
||||
void ps_codesRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_codesRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Data have been changed
|
||||
void ps_dataChanged();
|
||||
|
||||
@@ -47,14 +47,14 @@ namespace BlackGui
|
||||
int c = this->getAirlineIcaoCodesCount();
|
||||
if (c > 0)
|
||||
{
|
||||
this->ps_icaoRead(CDbFlags::AirlineIcaoEntity, CDbFlags::ReadFinished, c);
|
||||
this->ps_icaoRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadFinished, c);
|
||||
}
|
||||
}
|
||||
|
||||
void CDbAirlineIcaoComponent::ps_icaoRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CDbAirlineIcaoComponent::ps_icaoRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
Q_UNUSED(count);
|
||||
if (entity.testFlag(CDbFlags::AirlineIcaoEntity) && readState == CDbFlags::ReadFinished)
|
||||
if (entity.testFlag(CEntityFlags::AirlineIcaoEntity) && readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
this->ui->tvp_AirlineIcao->updateContainerMaybeAsync(this->getAirlineIcaoCodes());
|
||||
}
|
||||
@@ -63,7 +63,7 @@ namespace BlackGui
|
||||
void CDbAirlineIcaoComponent::ps_reload()
|
||||
{
|
||||
if (!hasProvider()) { return; }
|
||||
triggerRead(CDbFlags::AirlineIcaoEntity);
|
||||
triggerRead(CEntityFlags::AirlineIcaoEntity);
|
||||
}
|
||||
|
||||
} // ns
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! ICAO codes have been read
|
||||
void ps_icaoRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_icaoRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Reload models
|
||||
void ps_reload();
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace BlackGui
|
||||
int c = this->getAirlineIcaoCodesCount();
|
||||
if (c > 0)
|
||||
{
|
||||
this->ps_codesRead(CDbFlags::AirlineIcaoEntity, CDbFlags::ReadFinished, c);
|
||||
this->ps_codesRead(CEntityFlags::AirlineIcaoEntity, CEntityFlags::ReadFinished, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,10 +143,10 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CDbAirlineIcaoSelectorComponent::ps_codesRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CDbAirlineIcaoSelectorComponent::ps_codesRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
if (!hasProvider()) { return; }
|
||||
if (entity.testFlag(CDbFlags::AirlineIcaoEntity) && readState == CDbFlags::ReadFinished)
|
||||
if (entity.testFlag(CEntityFlags::AirlineIcaoEntity) && readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Distributors have been read
|
||||
void ps_codesRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_codesRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Data have been changed
|
||||
void ps_dataChanged();
|
||||
|
||||
@@ -47,14 +47,14 @@ namespace BlackGui
|
||||
int c = getCountriesCount();
|
||||
if (c > 0)
|
||||
{
|
||||
ps_countriesRead(CDbFlags::CountryEntity, CDbFlags::ReadFinished, c);
|
||||
ps_countriesRead(CEntityFlags::CountryEntity, CEntityFlags::ReadFinished, c);
|
||||
}
|
||||
}
|
||||
|
||||
void CDbCountryComponent::ps_countriesRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CDbCountryComponent::ps_countriesRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
Q_UNUSED(count);
|
||||
if (entity.testFlag(CDbFlags::CountryEntity) && readState == CDbFlags::ReadFinished)
|
||||
if (entity.testFlag(CEntityFlags::CountryEntity) && readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
this->ui->tvp_Countries->updateContainerMaybeAsync(this->getCountries());
|
||||
}
|
||||
@@ -63,7 +63,7 @@ namespace BlackGui
|
||||
void CDbCountryComponent::ps_reload()
|
||||
{
|
||||
if (!hasProvider()) { return; }
|
||||
triggerRead(CDbFlags::CountryEntity);
|
||||
triggerRead(CEntityFlags::CountryEntity);
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Countries have been read
|
||||
void ps_countriesRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_countriesRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Reload models
|
||||
void ps_reload();
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace BlackGui
|
||||
int c = this->getCountriesCount();
|
||||
if (c > 0)
|
||||
{
|
||||
this->ps_CountriesRead(CDbFlags::CountryEntity, CDbFlags::ReadFinished, c);
|
||||
this->ps_CountriesRead(CEntityFlags::CountryEntity, CEntityFlags::ReadFinished, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,10 +147,10 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CDbCountrySelectorComponent::ps_CountriesRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CDbCountrySelectorComponent::ps_CountriesRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
if (!hasProvider()) { return; }
|
||||
if (entity.testFlag(CDbFlags::DistributorEntity) && readState == CDbFlags::ReadFinished)
|
||||
if (entity.testFlag(CEntityFlags::DistributorEntity) && readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Countries have been read
|
||||
void ps_CountriesRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_CountriesRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Data have been changed
|
||||
void ps_dataChanged();
|
||||
|
||||
@@ -43,14 +43,14 @@ namespace BlackGui
|
||||
int c = getDistributorsCount();
|
||||
if (c > 0)
|
||||
{
|
||||
ps_distributorsRead(CDbFlags::DistributorEntity, CDbFlags::ReadFinished, c);
|
||||
ps_distributorsRead(CEntityFlags::DistributorEntity, CEntityFlags::ReadFinished, c);
|
||||
}
|
||||
}
|
||||
|
||||
void CDbDistributorComponent::ps_distributorsRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CDbDistributorComponent::ps_distributorsRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
Q_UNUSED(count);
|
||||
if (entity.testFlag(CDbFlags::DistributorEntity) && readState == CDbFlags::ReadFinished)
|
||||
if (entity.testFlag(CEntityFlags::DistributorEntity) && readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
this->ui->tvp_Distributors->updateContainer(this->getDistributors());
|
||||
}
|
||||
@@ -59,7 +59,7 @@ namespace BlackGui
|
||||
void CDbDistributorComponent::ps_reload()
|
||||
{
|
||||
if (!hasProvider()) { return; }
|
||||
triggerRead(CDbFlags::DistributorEntity);
|
||||
triggerRead(CEntityFlags::DistributorEntity);
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Distributors have been read
|
||||
void ps_distributorsRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_distributorsRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Reload models
|
||||
void ps_reload();
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace BlackGui
|
||||
int c = getDistributorsCount();
|
||||
if (c > 0)
|
||||
{
|
||||
ps_distributorsRead(CDbFlags::DistributorEntity, CDbFlags::ReadFinished, c);
|
||||
ps_distributorsRead(CEntityFlags::DistributorEntity, CEntityFlags::ReadFinished, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,10 +146,10 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CDbDistributorSelectorComponent::ps_distributorsRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CDbDistributorSelectorComponent::ps_distributorsRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
if (!hasProvider()) { return; }
|
||||
if (entity.testFlag(CDbFlags::DistributorEntity) && readState == CDbFlags::ReadFinished)
|
||||
if (entity.testFlag(CEntityFlags::DistributorEntity) && readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Distributors have been read
|
||||
void ps_distributorsRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_distributorsRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Data have been changed
|
||||
void ps_dataChanged();
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace BlackGui
|
||||
int c = getLiveriesCount();
|
||||
if (c > 0)
|
||||
{
|
||||
ps_liveriesRead(CDbFlags::LiveryEntity, CDbFlags::ReadFinished, c);
|
||||
ps_liveriesRead(CEntityFlags::LiveryEntity, CEntityFlags::ReadFinished, c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,10 +55,10 @@ namespace BlackGui
|
||||
this->ui->filter_Livery->filter(livery);
|
||||
}
|
||||
|
||||
void CDbLiveryComponent::ps_liveriesRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CDbLiveryComponent::ps_liveriesRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
Q_UNUSED(count);
|
||||
if (entity.testFlag(CDbFlags::LiveryEntity) && readState == CDbFlags::ReadFinished)
|
||||
if (entity.testFlag(CEntityFlags::LiveryEntity) && readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
this->ui->tvp_Liveries->updateContainerMaybeAsync(this->getLiveries());
|
||||
}
|
||||
@@ -67,7 +67,7 @@ namespace BlackGui
|
||||
void CDbLiveryComponent::ps_reload()
|
||||
{
|
||||
if (!hasProvider()) { return; }
|
||||
triggerRead(CDbFlags::LiveryEntity);
|
||||
triggerRead(CEntityFlags::LiveryEntity);
|
||||
}
|
||||
|
||||
} // ns
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Liveries codes have been read
|
||||
void ps_liveriesRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_liveriesRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Reload models
|
||||
void ps_reload();
|
||||
|
||||
@@ -51,14 +51,14 @@ namespace BlackGui
|
||||
int c = getModelsCount();
|
||||
if (c > 0)
|
||||
{
|
||||
ps_modelsRead(CDbFlags::ModelEntity, CDbFlags::ReadFinished, c);
|
||||
ps_modelsRead(CEntityFlags::ModelEntity, CEntityFlags::ReadFinished, c);
|
||||
}
|
||||
}
|
||||
|
||||
void CDbModelComponent::ps_modelsRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CDbModelComponent::ps_modelsRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
Q_UNUSED(count);
|
||||
if (entity.testFlag(CDbFlags::ModelEntity) && readState == CDbFlags::ReadFinished)
|
||||
if (entity.testFlag(CEntityFlags::ModelEntity) && readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
this->ui->tvp_AircraftModel->updateContainer(this->getModels());
|
||||
}
|
||||
@@ -67,7 +67,7 @@ namespace BlackGui
|
||||
void CDbModelComponent::ps_reload()
|
||||
{
|
||||
if (!hasProvider()) { return; }
|
||||
triggerRead(CDbFlags::ModelEntity);
|
||||
triggerRead(CEntityFlags::ModelEntity);
|
||||
}
|
||||
|
||||
void CDbModelComponent::ps_onStyleSheetChanged()
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Models have been read
|
||||
void ps_modelsRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_modelsRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Reload models
|
||||
void ps_reload();
|
||||
|
||||
@@ -60,9 +60,9 @@ namespace BlackGui
|
||||
);
|
||||
}
|
||||
|
||||
void CInfoBarWebReadersStatusComponent::ps_dataRead(CDbFlags::Entity entity, CDbFlags::ReadState readState, int count)
|
||||
void CInfoBarWebReadersStatusComponent::ps_dataRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
if (readState == CDbFlags::ReadFinished)
|
||||
if (readState == CEntityFlags::ReadFinished)
|
||||
{
|
||||
bool swift = CWebReaderFlags::isFromSwiftDb(entity);
|
||||
if (swift && count > 0)
|
||||
@@ -88,7 +88,7 @@ namespace BlackGui
|
||||
this->ui->led_DataReady->setOn(allData);
|
||||
}
|
||||
|
||||
void CInfoBarWebReadersStatusComponent::setLedReadStates(const QList<CLedWidget *> &leds, CDbFlags::ReadState readState)
|
||||
void CInfoBarWebReadersStatusComponent::setLedReadStates(const QList<CLedWidget *> &leds, CEntityFlags::ReadState readState)
|
||||
{
|
||||
for (CLedWidget *led : leds)
|
||||
{
|
||||
@@ -96,33 +96,33 @@ namespace BlackGui
|
||||
}
|
||||
}
|
||||
|
||||
void CInfoBarWebReadersStatusComponent::setLedReadState(CLedWidget *led, CDbFlags::ReadState readState)
|
||||
void CInfoBarWebReadersStatusComponent::setLedReadState(CLedWidget *led, CEntityFlags::ReadState readState)
|
||||
{
|
||||
Q_ASSERT_X(led, Q_FUNC_INFO, "no LED");
|
||||
int blinkTime = 2.5 * 1000;
|
||||
switch (readState)
|
||||
{
|
||||
case CDbFlags::ReadFinished:
|
||||
case CEntityFlags::ReadFinished:
|
||||
led->setOn(true, blinkTime);
|
||||
break;
|
||||
case CDbFlags::StartRead:
|
||||
case CEntityFlags::StartRead:
|
||||
led->setOn(true);
|
||||
break;
|
||||
case CDbFlags::ReadFailed:
|
||||
case CEntityFlags::ReadFailed:
|
||||
led->setTriState(2 * blinkTime);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QList<CLedWidget *> CInfoBarWebReadersStatusComponent::entityToLeds(CDbFlags::Entity entity) const
|
||||
QList<CLedWidget *> CInfoBarWebReadersStatusComponent::entityToLeds(CEntityFlags::Entity entity) const
|
||||
{
|
||||
QList<CLedWidget *> leds;
|
||||
if (entity.testFlag(CDbFlags::CountryEntity)) { leds << ui->led_Countries; }
|
||||
if (entity.testFlag(CDbFlags::DistributorEntity)) { leds << ui->led_Distributors; }
|
||||
if (entity.testFlag(CDbFlags::AircraftIcaoEntity)) { leds << ui->led_IcaoAircraft; }
|
||||
if (entity.testFlag(CDbFlags::AirlineIcaoEntity)) { leds << ui->led_IcaoAirline; }
|
||||
if (entity.testFlag(CDbFlags::LiveryEntity)) { leds << ui->led_Liveries; }
|
||||
if (entity.testFlag(CDbFlags::ModelEntity)) { leds << ui->led_Models; }
|
||||
if (entity.testFlag(CEntityFlags::CountryEntity)) { leds << ui->led_Countries; }
|
||||
if (entity.testFlag(CEntityFlags::DistributorEntity)) { leds << ui->led_Distributors; }
|
||||
if (entity.testFlag(CEntityFlags::AircraftIcaoEntity)) { leds << ui->led_IcaoAircraft; }
|
||||
if (entity.testFlag(CEntityFlags::AirlineIcaoEntity)) { leds << ui->led_IcaoAirline; }
|
||||
if (entity.testFlag(CEntityFlags::LiveryEntity)) { leds << ui->led_Liveries; }
|
||||
if (entity.testFlag(CEntityFlags::ModelEntity)) { leds << ui->led_Models; }
|
||||
return leds;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace BlackGui
|
||||
|
||||
private slots:
|
||||
//! Data have been read
|
||||
void ps_dataRead(BlackMisc::Network::CDbFlags::Entity entity, BlackMisc::Network::CDbFlags::ReadState readState, int count);
|
||||
void ps_dataRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
//! Check server status
|
||||
void ps_checkServerAndData();
|
||||
@@ -56,13 +56,13 @@ namespace BlackGui
|
||||
QTimer m_timer { this };
|
||||
|
||||
//! Set LED states
|
||||
void setLedReadStates(const QList<CLedWidget *> &leds, BlackMisc::Network::CDbFlags::ReadState readState);
|
||||
void setLedReadStates(const QList<CLedWidget *> &leds, BlackMisc::Network::CEntityFlags::ReadState readState);
|
||||
|
||||
//! Set the LED read state
|
||||
void setLedReadState(CLedWidget *led, BlackMisc::Network::CDbFlags::ReadState readState);
|
||||
void setLedReadState(CLedWidget *led, BlackMisc::Network::CEntityFlags::ReadState readState);
|
||||
|
||||
//! Maps entity to its id
|
||||
QList<CLedWidget *> entityToLeds(BlackMisc::Network::CDbFlags::Entity entity) const;
|
||||
QList<CLedWidget *> entityToLeds(BlackMisc::Network::CEntityFlags::Entity entity) const;
|
||||
|
||||
//! All data read
|
||||
bool hasAllData() const;
|
||||
|
||||
Reference in New Issue
Block a user