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 
9 
14 #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 DtEntityControlPanelWidgetLogic::getDeclination(const DtVector& geocentricPos);
58 
59  virtual void updateOnDataChanged();
60 
61  virtual void requestHeading(double value, bool defaultChangeRate);
62  virtual void requestAltitude(double value, bool defaultChangeRate);
63  virtual void requestSpeed(double value, bool defaultChangeRate, DtAirSpeedType airSpeedType);
64 
65  virtual bool requestedHeadingChanged(const makVrv::DtStateView<DtVrfObjectDataState>*, boost::optional<DtReal>& reqHeading) const;
66  virtual bool requestedAltitudeChanged(const makVrv::DtStateView<DtVrfObjectDataState>*, boost::optional<DtReal>& reqAltitude) const;
67 
68  virtual void changeTurnDirection(int turnDirection);
69 
70  virtual void changeAirSpeedType(DtAirSpeedType type);
71 
73  virtual void enableUpdateRequestedHeading();
74 
76  virtual void requestStationaryEntitiesHeading();
77 
78  void resetSelectedMapperKey();
79 
80  virtual void slot_onUnitChanged(const makVrv::DtUnicode& type, int newType, int old);
81 
83  virtual void blockSignals(bool);
84  bool signalsBlocked() const;
85 
86  protected:
87  virtual void initialize();
88 
89  virtual bool extractDataBasedOnEntityType(const DtEntityType& entityType, DtString& movementParamsType,
90  double& minSpeed, double& maxSpeed, double& maxOrderedIas, double& maxOrderedMach,
91  double& minAlt, double& maxAlt, bool& enableAlt, double& maxTurn,
92  double& maxClimb, bool& isSupported);
93 
94  virtual void setDataFromMovementParamsType(const DtString& movementParamsType);
95 
96  virtual void sendSetDataRequest(const DtSetDataRequest& request, const std::set<makVrv::DtUniqueID>& idSet);
97  virtual void sendTaskRequest(const DtSimTask& task, const std::set<makVrv::DtUniqueID>& idSet);
98 
99  virtual void clear();
100  virtual void refreshDisplayUnitsLabels();
101  virtual void initializeHeadingUnits();
102  virtual void slot_displayUnitDecimalsChanged(const makVrv::DtUnicode& category, const makVrv::DtUnicode& type);
103 
105  virtual void setAltitudeRange(double minAlt, double maxAlt);
106  virtual void setActualAltitude(double altitude);
107  virtual void setRequestedAltitude(double altitude);
108  virtual void setTerrainHeight(double altitude);
109 
111  virtual void setSpeedRange(double minSpeed, double maxSpeed);
112  virtual void setActualSpeed(const DtVector& velocity);
113  virtual void setActualSpeed(double speed);
114 
115  virtual void setRequestedSpeed(double speed);
116  virtual double requestedSpeed() const;
117  virtual bool requestedSpeedChanged(const makVrv::DtStateView<DtVrfObjectDataState>*, boost::optional<DtReal>& reqSpeed) const;
118 
120  virtual double convertNativeToDisplaySpeed(double speed) const;
121  virtual double convertDisplaySpeedToNative(double speed) const;
122 
123  protected:
126 
130 
133 
135  double myMaxClimb;
136 
139  double myMaxTurn;
140 
144 
146 
150 
152 
157 
159 
160  //Used only if myIsUsingAirSpeedType is true
166  double myMaxSpeed;
167 
171 
172  double myLastRequestedHeading = 0.;
173  double myLastRequestedAltitude = 0.;
174  double myLastRequestedSpeed = 0.;
175  };
176 }
makVrv::DtSignalConnectionManager myConnectionManager
Definition: entityControlPanelWidgetLogic.h:128
Definition: entityMapperKey.h:23
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:165
DtSetMessageType mySetSpeedTaskType
Definition: entityControlPanelWidgetLogic.h:138
bool myBlockSignals
Definition: entityControlPanelWidgetLogic.h:129
Contains makVrv:DtSelectionManager class.
DtEntityControlPanelWidgetInterface * myInterface
Definition: entityControlPanelWidgetLogic.h:127
makVrv::DtDe & myDe
Definition: entityControlPanelWidgetLogic.h:124
bool myUpdateRequestedAltitude
Definition: entityControlPanelWidgetLogic.h:155
double myMaxTurn
Definition: entityControlPanelWidgetLogic.h:139
bool mySelectedIsDestroyed
Definition: entityControlPanelWidgetLogic.h:131
double myMaxSpeed
Definition: entityControlPanelWidgetLogic.h:166
bool myIsUsingAirSpeedType
Definition: entityControlPanelWidgetLogic.h:162
makVrv::DtUniqueID mySelected
Definition: entityControlPanelWidgetLogic.h:125
DtSimTaskMessageType myAltitudeTaskType
Definition: entityControlPanelWidgetLogic.h:134
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
int myTurnDirection
Definition: entityControlPanelWidgetLogic.h:158
bool myUpdateRequestedHeading
flags to update the requested UI from the network
Definition: entityControlPanelWidgetLogic.h:154
bool myUpdateRequestedSpeed
Definition: entityControlPanelWidgetLogic.h:156
File: simMsg.h.
Definition: simMessage.h:35
double myMaxOrderedIas
Definition: entityControlPanelWidgetLogic.h:164
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
DtSimTaskMessageType myHeadingTaskType
Definition: entityControlPanelWidgetLogic.h:137
#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:163
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:161
DtAirSpeedType
Air Speed Type PDU enums.
Definition: rwAirSpeedType.h:24
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:135
DtString myPlatformType
Definition: entityControlPanelWidgetLogic.h:151
bool mySelectionIsValid
selection is valid if all selected entity types are of the same movement parameters type and all alt ...
Definition: entityControlPanelWidgetLogic.h:145
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:149
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:72
double myMaxSpeedRange
Definition: entityControlPanelWidgetLogic.h:170
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:169
makVrf::DtEntityMapperKey mySelectedMapperKey
Definition: entityControlPanelWidgetLogic.h:132

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)