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