mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Ref T659, UI changed for modelstring/livery and checkboxes to decide if those are sent
This commit is contained in:
committed by
Mat Sutcliffe
parent
4761f5f356
commit
eb4c8eed35
@@ -34,6 +34,20 @@ namespace BlackGui
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! GUI aircraft values, formatted
|
||||
struct CGuiAircraftValues
|
||||
{
|
||||
BlackMisc::Aviation::CCallsign ownCallsign; //!< own aircraft callsign
|
||||
BlackMisc::Aviation::CAircraftIcaoCode ownAircraftIcao; //!< ICAO aircraft
|
||||
BlackMisc::Aviation::CAirlineIcaoCode ownAirlineIcao; //!< ICAO airline
|
||||
QString ownAircraftCombinedType; //!< own aircraft combined type
|
||||
QString ownAircraftSimulatorModelString; //!< own aircraft model string
|
||||
QString ownAircraftModelStringSend; //!< send model string
|
||||
QString ownLiverySend; //!< send livery
|
||||
bool useModelString = true; //!< use model string
|
||||
bool useLivery = true; //!< use livery
|
||||
};
|
||||
|
||||
//! Constructor
|
||||
explicit COwnAircraftComponent(QWidget *parent = nullptr);
|
||||
|
||||
@@ -46,32 +60,24 @@ namespace BlackGui
|
||||
//! Set a user
|
||||
void setUser(const BlackMisc::Network::CUser &user);
|
||||
|
||||
//! Own model and ICAO data for GUI and own aircraft
|
||||
void setOwnModelAndIcaoValues(const BlackMisc::Simulation::CAircraftModel &ownModel = {});
|
||||
|
||||
//! Values from GUI
|
||||
BlackMisc::Aviation::CCallsign getCallsignFromGui() const;
|
||||
|
||||
//! Own model and ICAO data for GUI and own aircraft
|
||||
void setOwnModelAndIcaoValues(const BlackMisc::Simulation::CAircraftModel &ownModel = {});
|
||||
|
||||
//! Update own ICAO values (own aircraft from what is set in the GUI)
|
||||
//! \return changed?
|
||||
bool updateOwnAircaftIcaoValuesFromGuiValues();
|
||||
|
||||
//! Values from GUI
|
||||
CGuiAircraftValues getAircraftValuesFromGui() const;
|
||||
|
||||
signals:
|
||||
//! Changed values
|
||||
void aircraftDataChanged();
|
||||
|
||||
private:
|
||||
//! GUI aircraft values, formatted
|
||||
struct CGuiAircraftValues
|
||||
{
|
||||
BlackMisc::Aviation::CCallsign ownCallsign;
|
||||
BlackMisc::Aviation::CAircraftIcaoCode ownAircraftIcao;
|
||||
BlackMisc::Aviation::CAirlineIcaoCode ownAirlineIcao;
|
||||
QString ownAircraftCombinedType;
|
||||
QString ownAircraftSimulatorModelString;
|
||||
QString ownAircraftModelStringSend;
|
||||
QString ownLivery;
|
||||
};
|
||||
|
||||
//! Launch mapping wizard
|
||||
void mappingWizard();
|
||||
@@ -88,9 +94,6 @@ namespace BlackGui
|
||||
//! Status has changed
|
||||
void onSimulatorStatusChanged(int status);
|
||||
|
||||
//! Values from GUI
|
||||
CGuiAircraftValues getAircraftValuesFromGui() const;
|
||||
|
||||
//! Set ICAO values
|
||||
//! \return changed values?
|
||||
bool setGuiIcaoValues(const BlackMisc::Simulation::CAircraftModel &model, bool onlyIfEmpty);
|
||||
@@ -107,6 +110,9 @@ namespace BlackGui
|
||||
//! Has contexts?
|
||||
bool hasValidContexts() const;
|
||||
|
||||
//! Clear livery
|
||||
void clearLivery();
|
||||
|
||||
//! Get a prefill model
|
||||
BlackMisc::Simulation::CAircraftModel getPrefillModel() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user