VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
entityControlPanelWidgetLogic.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2019 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
10 
15 #include <vrvCore/DtUniqueID.h>
18 
19 #include <vrftasks/taskTypes.h>
20 #include <vrfutil/rwAirSpeedType.h>
21 
22 class DtEntityType;
23 class DtSimMessage;
24 class DtSetDataRequest;
25 class DtSimTask;
26 
27 namespace makVrv
28 {
29  class DtDe;
30  class DtSimObjectEntry;
31 }
32 
33 namespace makVrf
34 {
35  class DtEntityControlPanelWidgetInterface;
36 
39 
41  {
42  public:
44 
45  //DTOR
47 
48  public:
49 
51  virtual void init(makVrv::DtUniqueID);
52 
54  virtual void initializeRequestedIndicators();
55 
56  //Simple function to retrieve declination in case magentic heading is in use
57  virtual double getDeclination(const DtVector& geocentricPos);
58 
59  virtual void updateOnDataChanged();
60 
61  virtual bool hasPlan(makVrv::DtUniqueID);
62  virtual void slot_onStateViewUpdated();
63 
64  virtual void requestHeading(double value, bool defaultChangeRate);
65  virtual void requestAltitude(double value, bool defaultChangeRate);
66  virtual void requestSpeed(double value, bool defaultChangeRate, DtAirSpeedType airSpeedType);
67 
68  virtual bool requestedHeadingChanged(DtSimObjectReference, boost::optional<DtReal>& reqHeading) const;
69  virtual bool requestedAltitudeChanged(DtSimObjectReference, boost::optional<DtReal>& reqAltitude) const;
70 
71  virtual void changeTurnDirection(int turnDirection);
72 
73  virtual void changeAirSpeedType(DtAirSpeedType type);
74 
76  virtual void enableUpdateRequestedHeading();
77 
79  virtual void requestStationaryEntitiesHeading();
80 
81  void resetSelectedMapperKey();
82 
83  virtual void slot_onUnitChanged(const makVrv::DtUnicode& type, int newType, int old);
84 
86  virtual void blockSignals(bool);
87  bool signalsBlocked() const;
88 
89  protected:
90  virtual void initialize();
91 
92  virtual bool extractDataBasedOnEntityType(const DtEntityType& entityType, DtString& movementParamsType,
93  double& minSpeed, double& maxSpeed, double& maxOrderedIas, double& maxOrderedMach,
94  double& minAlt, double& maxAlt, bool& enableAlt, double& maxTurn,
95  double& maxClimb, bool& isSupported);
96 
97  virtual void setDataFromMovementParamsType(const DtString& movementParamsType);
98 
99  virtual void sendSetDataRequest(const DtSetDataRequest& request, const std::set<makVrv::DtUniqueID>& idSet);
100  virtual void sendTaskRequest(const DtSimTask& task, const std::set<makVrv::DtUniqueID>& idSet);
101 
102  virtual void clear();
103  virtual void refreshDisplayUnitsLabels();
104  virtual void initializeHeadingUnits();
105  virtual void slot_displayUnitDecimalsChanged(const makVrv::DtUnicode& category, const makVrv::DtUnicode& type);
106 
108  virtual void setAltitudeRange(double minAlt, double maxAlt);
109  virtual void setActualAltitude(double altitude);
110  virtual void setRequestedAltitude(double altitude);
111  virtual void setTerrainHeight(double altitude);
112 
114  virtual void setSpeedRange(double minSpeed, double maxSpeed);
115  virtual void setActualSpeed(const DtVector& velocity);
116  virtual void setActualSpeed(double speed);
117 
118  virtual void setRequestedSpeed(double speed);
119  virtual double requestedSpeed() const;
120  virtual bool requestedSpeedChanged(DtSimObjectReference, boost::optional<DtReal>& reqSpeed) const;
121 
123  virtual double convertNativeToDisplaySpeed(double speed) const;
124  virtual double convertDisplaySpeedToNative(double speed) const;
125 
126  protected:
129 
130  boost::signals2::connection myHasPlanLabelUpdateConnection;
131 
135 
138 
140  double myMaxClimb;
141 
144  double myMaxTurn;
145 
149 
151 
155 
157 
162 
164 
165  //Used only if myIsUsingAirSpeedType is true
171  double myMaxSpeed;
172 
176 
177  double myLastRequestedHeading = 0.;
178  double myLastRequestedAltitude = 0.;
179  double myLastRequestedSpeed = 0.;
180  };
181 }
makVrv::DtSignalConnectionManager myConnectionManager
Definition: entityControlPanelWidgetLogic.h:133
Definition: entityMapperKey.h:19
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
double myMaxOrderedMach
Definition: entityControlPanelWidgetLogic.h:170
DtSetMessageType mySetSpeedTaskType
Definition: entityControlPanelWidgetLogic.h:143
bool myBlockSignals
Definition: entityControlPanelWidgetLogic.h:134
Contains makVrv:DtSelectionManager class.
DtEntityControlPanelWidgetInterface * myInterface
Definition: entityControlPanelWidgetLogic.h:132
makVrv::DtDe & myDe
Definition: entityControlPanelWidgetLogic.h:127
bool myUpdateRequestedAltitude
Definition: entityControlPanelWidgetLogic.h:160
double myMaxTurn
Definition: entityControlPanelWidgetLogic.h:144
bool mySelectedIsDestroyed
Definition: entityControlPanelWidgetLogic.h:136
double myMaxSpeed
Definition: entityControlPanelWidgetLogic.h:171
bool myIsUsingAirSpeedType
Definition: entityControlPanelWidgetLogic.h:167
makVrv::DtUniqueID mySelected
Definition: entityControlPanelWidgetLogic.h:128
DtSimTaskMessageType myAltitudeTaskType
Definition: entityControlPanelWidgetLogic.h:139
Contains the DtSharedDisplayUnitsSettings class declaration.
DtSetDataRequest is an abstract base class from which real setDataRequests can derive. It manages the read/write capability; derived classes need only use and register read/writatble data types for derived information.
Definition: setDataRequest.h:41
boost::signals2::connection myHasPlanLabelUpdateConnection
Definition: entityControlPanelWidgetLogic.h:130
int myTurnDirection
Definition: entityControlPanelWidgetLogic.h:163
bool myUpdateRequestedHeading
flags to update the requested UI from the network
Definition: entityControlPanelWidgetLogic.h:159
bool myUpdateRequestedSpeed
Definition: entityControlPanelWidgetLogic.h:161
File: simMsg.h.
Definition: simMessage.h:35
double myMaxOrderedIas
Definition: entityControlPanelWidgetLogic.h:169
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtSimTaskMessageType myHeadingTaskType
Definition: entityControlPanelWidgetLogic.h:142
#define DT_DLL_VRFGUICOMMONQT
Definition: vrfGuiCommonQt.h:20
Logic of the entity control panel widget: tasks executions, handling selection change, handling data updates and so on.
Definition: entityControlPanelWidgetLogic.h:40
double myMaxOrderedGroundSpeed
Definition: entityControlPanelWidgetLogic.h:168
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
This interface defines the required functions for the entity control panel widget.
Definition: entityControlPanelWidgetInterface.h:38
Redirect to radioMsgTypes.h.
DtAirSpeedType myAirSpeedType
Definition: entityControlPanelWidgetLogic.h:166
DtAirSpeedType
Air Speed Type PDU enums.
Definition: rwAirSpeedType.h:23
Base class to provide boost signal/slot management.
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
double myMaxClimb
Definition: entityControlPanelWidgetLogic.h:140
DtString myPlatformType
Definition: entityControlPanelWidgetLogic.h:156
bool mySelectionIsValid
selection is valid if all selected entity types are of the same movement parameters type and all alt ...
Definition: entityControlPanelWidgetLogic.h:150
Contains makVrv::DtUniqueID type.
bool mySelectionIsSupported
selection is supported if all selected entity types are supported if not, the panel will still displa...
Definition: entityControlPanelWidgetLogic.h:154
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
double myMaxSpeedRange
Definition: entityControlPanelWidgetLogic.h:175
Contains makVrv::DtInputDriverSignaler class.
double myMinSpeedRange
Keep track of current speed range in ms to be used when changing air speed type.
Definition: entityControlPanelWidgetLogic.h:174
makVrf::DtEntityMapperKey mySelectedMapperKey
Definition: entityControlPanelWidgetLogic.h:137

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)