mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
refs #768, allow to access view and filter of components
(required in wizard)
This commit is contained in:
@@ -48,6 +48,11 @@ namespace BlackGui
|
||||
CDbAircraftIcaoComponent::~CDbAircraftIcaoComponent()
|
||||
{ }
|
||||
|
||||
BlackGui::Views::CAircraftIcaoCodeView *CDbAircraftIcaoComponent::view() const
|
||||
{
|
||||
return ui->tvp_AircraftIcao;
|
||||
}
|
||||
|
||||
void CDbAircraftIcaoComponent::filter(const CAircraftIcaoCode &icao)
|
||||
{
|
||||
ui->filter_AircraftIcao->filter(icao);
|
||||
@@ -67,6 +72,5 @@ namespace BlackGui
|
||||
if (!sGui) { return; }
|
||||
sGui->getWebDataServices()->triggerReloadFromDb(CEntityFlags::AircraftIcaoEntity, QDateTime());
|
||||
}
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -22,12 +22,11 @@
|
||||
#include <QScopedPointer>
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace BlackMisc { namespace Aviation { class CAircraftIcaoCode; } }
|
||||
namespace Ui { class CDbAircraftIcaoComponent; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Views { class CAircraftIcaoCodeView; }
|
||||
namespace Components
|
||||
{
|
||||
/**
|
||||
@@ -47,6 +46,9 @@ namespace BlackGui
|
||||
//! Destructor
|
||||
~CDbAircraftIcaoComponent();
|
||||
|
||||
//! Get the view
|
||||
BlackGui::Views::CAircraftIcaoCodeView *view() const;
|
||||
|
||||
public slots:
|
||||
//! Filter by ICAO as default
|
||||
void filter(const BlackMisc::Aviation::CAircraftIcaoCode &icao);
|
||||
|
||||
@@ -46,6 +46,11 @@ namespace BlackGui
|
||||
CDbAirlineIcaoComponent::~CDbAirlineIcaoComponent()
|
||||
{ }
|
||||
|
||||
BlackGui::Views::CAirlineIcaoCodeView *CDbAirlineIcaoComponent::view() const
|
||||
{
|
||||
return ui->tvp_AirlineIcao;
|
||||
}
|
||||
|
||||
void CDbAirlineIcaoComponent::ps_icaoRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
Q_UNUSED(count);
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
class QWidget;
|
||||
|
||||
namespace Ui { class CDbAirlineIcaoComponent; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Views { class CAirlineIcaoCodeView; }
|
||||
namespace Components
|
||||
{
|
||||
/**
|
||||
@@ -46,6 +46,9 @@ namespace BlackGui
|
||||
//! Destructor
|
||||
~CDbAirlineIcaoComponent();
|
||||
|
||||
//! Get the view
|
||||
BlackGui::Views::CAirlineIcaoCodeView *view() const;
|
||||
|
||||
private slots:
|
||||
//! ICAO codes have been read
|
||||
void ps_icaoRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
@@ -43,6 +43,11 @@ namespace BlackGui
|
||||
CDbDistributorComponent::~CDbDistributorComponent()
|
||||
{ }
|
||||
|
||||
CDistributorView *CDbDistributorComponent::view() const
|
||||
{
|
||||
return ui->tvp_Distributors;
|
||||
}
|
||||
|
||||
void CDbDistributorComponent::ps_distributorsRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
Q_UNUSED(count);
|
||||
|
||||
@@ -16,17 +16,15 @@
|
||||
#include "blackgui/components/enablefordockwidgetinfoarea.h"
|
||||
#include "blackgui/enableforviewbasedindicator.h"
|
||||
#include "blackmisc/network/entityflags.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace Ui { class CDbDistributorComponent; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Views { class CDistributorView; }
|
||||
namespace Components
|
||||
{
|
||||
/**
|
||||
@@ -46,6 +44,9 @@ namespace BlackGui
|
||||
//! Destructor
|
||||
~CDbDistributorComponent();
|
||||
|
||||
//! Get the view
|
||||
BlackGui::Views::CDistributorView *view() const;
|
||||
|
||||
private slots:
|
||||
//! Distributors have been read
|
||||
void ps_distributorsRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
@@ -44,11 +44,21 @@ namespace BlackGui
|
||||
CDbLiveryComponent::~CDbLiveryComponent()
|
||||
{ }
|
||||
|
||||
CLiveryView *CDbLiveryComponent::view()
|
||||
{
|
||||
return ui->tvp_Liveries;
|
||||
}
|
||||
|
||||
void CDbLiveryComponent::filter(const BlackMisc::Aviation::CLivery &livery)
|
||||
{
|
||||
ui->filter_Livery->filter(livery);
|
||||
}
|
||||
|
||||
void CDbLiveryComponent::filterByAirline(const BlackMisc::Aviation::CAirlineIcaoCode &icao)
|
||||
{
|
||||
ui->filter_Livery->filter(icao);
|
||||
}
|
||||
|
||||
void CDbLiveryComponent::ps_liveriesRead(CEntityFlags::Entity entity, CEntityFlags::ReadState readState, int count)
|
||||
{
|
||||
Q_UNUSED(count);
|
||||
@@ -63,7 +73,6 @@ namespace BlackGui
|
||||
if (!sGui) { return; }
|
||||
sGui->getWebDataServices()->triggerReloadFromDb(CEntityFlags::LiveryEntity);
|
||||
}
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "blackgui/components/enablefordockwidgetinfoarea.h"
|
||||
#include "blackgui/enableforviewbasedindicator.h"
|
||||
#include "blackmisc/network/entityflags.h"
|
||||
#include "blackmisc/aviation/airlineicaocode.h"
|
||||
|
||||
#include <QFrame>
|
||||
#include <QObject>
|
||||
@@ -25,9 +26,9 @@ class QWidget;
|
||||
|
||||
namespace BlackMisc { namespace Aviation { class CLivery; } }
|
||||
namespace Ui { class CDbLiveryComponent; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Views { class CLiveryView; }
|
||||
namespace Components
|
||||
{
|
||||
/*!
|
||||
@@ -47,10 +48,16 @@ namespace BlackGui
|
||||
//! Destructor
|
||||
virtual ~CDbLiveryComponent();
|
||||
|
||||
//! The livery view
|
||||
BlackGui::Views::CLiveryView *view();
|
||||
|
||||
public slots:
|
||||
//! Filter by livery as default
|
||||
//! Filter by livery
|
||||
void filter(const BlackMisc::Aviation::CLivery &livery);
|
||||
|
||||
//! Filter by airline ICAO
|
||||
void filterByAirline(const BlackMisc::Aviation::CAirlineIcaoCode &icao);
|
||||
|
||||
private slots:
|
||||
//! Liveries codes have been read
|
||||
void ps_liveriesRead(BlackMisc::Network::CEntityFlags::Entity entity, BlackMisc::Network::CEntityFlags::ReadState readState, int count);
|
||||
|
||||
Reference in New Issue
Block a user