VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfGlobalPlansManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #if !defined(Q_MOC_RUN)
15 #include <vrfutil/rwUUID.h>
16 #include <vrvCore/DtEntityState.h>
17 #include <vrvCore/DtStateView.h>
20 #include <vlpi/simulationAddress.h>
21 #endif
22 #include <boost/signals2.hpp>
23 
24 #include <QtCore/QObject>
25 
26 namespace makVrv
27 {
28  class DtDe;
29 }
30 
31 class QWidget;
32 class QMimeData;
33 class DtSimMessage;
34 class DtSimulationAddress;
35 class DtPlan;
36 class DtSimStatement;
37 class DtIfPlan;
38 class DtRwTriggersList;
39 class DtSimBlock;
40 
41 namespace makVrf
42 {
43  class DtGlobalPlansDialogInterface;
44  class DtEditGlobalPlanWidget;
45  class DtVrfBackendState;
46 
48  {
49  Q_OBJECT
50 
51  public:
52  typedef std::pair<DtUUID, DtSimulationAddress> EditingPlan;
53  typedef std::map<DtEditGlobalPlanWidget*, EditingPlan> EditingPlans;
54 
56  {
61  bool isLaunched;
63  int ordinal;
65  };
66 
67  typedef std::map<makVrv::DtUniqueID, GlobalPlanWithState> GlobalPlanInformation;
68  typedef std::map<std::string, GlobalPlanInformation> GlobalPlans;
69 
70  public:
73 
75  virtual ~DtVrfGlobalPlansManager();
76 
78  static DtVrfGlobalPlansManager& instance(makVrv::DtDe& de);
79 
81  virtual void show(QWidget* parent);
82 
83  virtual DtEditGlobalPlanWidget* editGlobalPlan(const DtUUID& plan, const DtSimulationAddress& simulationAddress, QWidget* parent);
84 
85  virtual void deleteGlobalPlan(const DtUUID& plan, const DtSimulationAddress& simulationAddress);
86 
88  virtual void launchGlobalPlan(const DtUUID& u);
89  virtual void launchGlobalPlan(const makVrv::DtUniqueID& u);
90 
92  virtual bool isGlobalPlan(makVrv::DtUniqueID) const;
93 
95  virtual DtSimulationAddress simulationAddressFor(makVrv::DtUniqueID) const;
96 
97  virtual void requestGlobalPlans();
98 
99  const GlobalPlans& globalPlans() const { return myGlobalPlans; };
100 
101  virtual void globalPlanAdded(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* p);
102  virtual void globalPlanRemoved(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* p);
103 
104  virtual DtString planName(const DtUUID&) const;
105 
106  virtual DtUUID uuidForPlan(makVrv::DtUniqueID) const;
107 
108  virtual bool isQuickLaunch(const DtUUID&) const;
109  virtual int ordinal(const DtUUID&) const;
110  virtual bool showOnQuickLaunchToolbar(const DtUUID&) const;
111  virtual bool isLaunched(const DtUUID&) const;
112  virtual DtString quickLaunchIcon(const DtUUID&) const;
113  virtual int nextOrdinal() const;
114 
115  virtual QMimeData* mimeDataForPlan(const DtPlan& plan) const;
116  virtual QMimeData* mimeDataForStatement(const DtPlan& plan, const DtSimStatement& statement) const;
117  virtual QMimeData* mimeDataFromPlanMessage(DtIfPlan&) const;
118 
119  virtual void addTriggersFromBlock(const DtPlan& plan, const DtSimBlock*, DtRwTriggersList&, std::set<DtUUID>& visited) const;
120  virtual void addTriggersFromStatement(const DtPlan& plan, const DtSimStatement*, DtRwTriggersList&, std::set<DtUUID>& visited) const;
121 
122  public:
123 
124  boost::signals2::signal<void (DtEditGlobalPlanWidget*, DtUUID, DtSimulationAddress)> signal_globalPlanEditorCreated;
125  boost::signals2::signal<void (DtEditGlobalPlanWidget*, DtUUID, DtSimulationAddress)> signal_globalPlanEditorDeleted;
126  boost::signals2::signal<void ()> signal_clearGlobalPlans;
127  boost::signals2::signal<void (DtUUID, DtSimulationAddress)> signal_globalPlanAdded;
128  boost::signals2::signal<void (const GlobalPlanInformation&,
129  const std::string&)> signal_receivedGlobalPlans;
130 
131  protected:
133  virtual void sessionStatusChanged(bool);
134 
135  virtual void scenarioRewound();
136  virtual void scenarioClosed();
137 
138  virtual void processGlobalPlansResponseCallback(DtSimMessage*);
139 
140  virtual void connectSignals(QWidget*);
141  virtual void disconnectSignals(QWidget*);
142 
143  virtual DtGlobalPlansDialogInterface* createGlobalPlansDialog(QWidget*);
144  virtual DtEditGlobalPlanWidget* createGlobalPlanEditDialog(QWidget*, const DtUUID& p, const DtSimulationAddress& a);
145 
146  virtual void clearGlobalPlans();
147 
148  protected slots:
149  virtual void onGlobalPlanDialogDestroyed();
150 
151  protected:
152 
153  typedef std::map<DtEditGlobalPlanWidget*, GlobalPlanInformation> GlobalPlanInformationMap;
154 
161  };
162 }
class DtIfPlan:
Definition: ifPlan.h:61
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
boost::signals2::signal< void(DtUUID, DtSimulationAddress)> signal_globalPlanAdded
Definition: vrfGlobalPlansManager.h:127
EditingPlans myEditors
Definition: vrfGlobalPlansManager.h:157
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
boost::signals2::signal< void(DtEditGlobalPlanWidget *, DtUUID, DtSimulationAddress)> signal_globalPlanEditorDeleted
Definition: vrfGlobalPlansManager.h:125
#define DT_DLL_VRFGUICOREQT
Definition: vrfGuiCoreQt.h:26
bool isQuickLaunch
Definition: vrfGlobalPlansManager.h:59
Definition: vrfGlobalPlansManager.h:47
makVrv::DtDe & myDe
Definition: vrfGlobalPlansManager.h:155
Definition: globalPlansDialogInterface.h:27
Contains makVrv::DtStateView class.
DtString name
Definition: vrfGlobalPlansManager.h:58
std::map< DtEditGlobalPlanWidget *, EditingPlan > EditingPlans
Definition: vrfGlobalPlansManager.h:53
bool showOnQuickLaunchToolbar
Definition: vrfGlobalPlansManager.h:60
Contains the DtUUID class declaration.
DtUUID uuid
Definition: vrfGlobalPlansManager.h:57
bool myRequestingPlans
Definition: vrfGlobalPlansManager.h:160
std::map< makVrv::DtUniqueID, GlobalPlanWithState > GlobalPlanInformation
Definition: vrfGlobalPlansManager.h:67
boost::signals2::signal< void(DtEditGlobalPlanWidget *, DtUUID, DtSimulationAddress)> signal_globalPlanEditorCreated
Definition: vrfGlobalPlansManager.h:124
bool isLaunched
Definition: vrfGlobalPlansManager.h:61
makVrv::DtSignalConnectionManager myConnections
Definition: vrfGlobalPlansManager.h:159
class DtSimBlock:
Definition: simBlock.h:27
Contains makVrv::DtVirtualBaseClass class.
DtString icon
Definition: vrfGlobalPlansManager.h:62
std::map< DtEditGlobalPlanWidget *, GlobalPlanInformation > GlobalPlanInformationMap
Definition: vrfGlobalPlansManager.h:153
int ordinal
Definition: vrfGlobalPlansManager.h:63
File: simMsg.h.
Definition: simMessage.h:35
boost::signals2::signal< void()> signal_clearGlobalPlans
Definition: vrfGlobalPlansManager.h:126
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Contains makVrv::DtVrlinkSimulatedEntityState class.
class DtPlan:
Definition: plan.h:92
boost::signals2::signal< void(const GlobalPlanInformation &, const std::string &)> signal_receivedGlobalPlans
Definition: vrfGlobalPlansManager.h:129
Base class to provide boost signal/slot management.
class DtSimStatement:
Definition: simStatement.h:38
DtGlobalPlansDialogInterface * myGlobalPlansDialog
Definition: vrfGlobalPlansManager.h:156
std::pair< DtUUID, DtSimulationAddress > EditingPlan
Definition: vrfGlobalPlansManager.h:52
makVrv::DtVrlinkSimulatedEntityState * state
Definition: vrfGlobalPlansManager.h:64
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:70
std::map< std::string, GlobalPlanInformation > GlobalPlans
Definition: vrfGlobalPlansManager.h:68
Definition: editGlobalPlanWidget.h:26
Definition: vrfGlobalPlansManager.h:55
const GlobalPlans & globalPlans() const
Definition: vrfGlobalPlansManager.h:99
GlobalPlans myGlobalPlans
Definition: vrfGlobalPlansManager.h:158
Instances of DtRwTriggersList are lists of readable, writeable when statements (triggers) The list co...
Definition: rwTriggersList.h:21

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)