VR-Forces 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 
27 
28 namespace makVrv
29 {
30  class DtDe;
31 }
32 
33 class QWidget;
34 class QMimeData;
35 class DtSimMessage;
36 class DtSimulationAddress;
37 class DtPlan;
38 class DtSimStatement;
39 class DtIfPlan;
40 class DtRwTriggersList;
41 class DtSimBlock;
42 
43 namespace makVrf
44 {
45  class DtGlobalPlansDialogInterface;
46  class DtEditGlobalPlanWidget;
47  class DtVrfBackendState;
48 
50  {
51  Q_OBJECT
52 
53  public:
54  typedef std::pair<DtUUID, DtSimulationAddress> EditingPlan;
55  typedef std::map<DtEditGlobalPlanWidget*, EditingPlan> EditingPlans;
56 
58  {
63  bool isLaunched;
65  int ordinal;
67  };
68 
69  typedef std::map<makVrv::DtUniqueID, GlobalPlanWithState> GlobalPlanInformation;
70  typedef std::map<std::string, GlobalPlanInformation> GlobalPlans;
71 
72  public:
75 
77  virtual ~DtVrfGlobalPlansManager();
78 
80  static DtVrfGlobalPlansManager& instance(makVrv::DtDe& de);
81 
83  virtual void show(QWidget* parent);
84 
85  virtual DtEditGlobalPlanWidget* editGlobalPlan(const DtUUID& plan, const DtSimulationAddress& simulationAddress, QWidget* parent);
86  virtual void changeGlobalPlanName(const DtUUID& plan);
87 
88  virtual void deleteGlobalPlan(const DtUUID& plan, const DtSimulationAddress& simulationAddress);
89 
91  virtual void launchGlobalPlan(const DtUUID& u);
92  virtual void launchGlobalPlan(const makVrv::DtUniqueID& u);
93 
95  virtual bool isGlobalPlan(makVrv::DtUniqueID) const;
96 
98  virtual DtSimulationAddress simulationAddressFor(makVrv::DtUniqueID) const;
99 
100  virtual void requestGlobalPlans();
101 
102  const GlobalPlans& globalPlans() const { return myGlobalPlans; };
103 
104  virtual void globalPlanAdded(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* p);
105  virtual void globalPlanRemoved(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* p);
106 
107  virtual DtString planName(const DtUUID&) const;
108 
109  virtual DtUUID uuidForPlan(makVrv::DtUniqueID) const;
110 
111  virtual bool isQuickLaunch(const DtUUID&) const;
112  virtual int ordinal(const DtUUID&) const;
113  virtual bool showOnQuickLaunchToolbar(const DtUUID&) const;
114  virtual bool isLaunched(const DtUUID&) const;
115  virtual DtString quickLaunchIcon(const DtUUID&) const;
116  virtual int nextOrdinal() const;
117 
118  virtual QMimeData* mimeDataForPlan(const DtPlan& plan) const;
119  virtual QMimeData* mimeDataForStatement(const DtPlan& plan, const DtSimStatement& statement) const;
120  virtual QMimeData* mimeDataFromPlanMessage(DtIfPlan&) const;
121 
122  virtual void addTriggersFromBlock(const DtPlan& plan, const DtSimBlock*, DtRwTriggersList&, std::set<DtUUID>& visited) const;
123  virtual void addTriggersFromStatement(const DtPlan& plan, const DtSimStatement*, DtRwTriggersList&, std::set<DtUUID>& visited) const;
124 
125  virtual std::vector<DtEditGlobalPlanWidget*> hasModifiedPlans();
126  virtual void saveModifiedPlans(std::vector<DtEditGlobalPlanWidget*> plans);
127 
128  public:
129 
130  boost::signals2::signal<void (DtEditGlobalPlanWidget*, DtUUID, DtSimulationAddress)> signal_globalPlanEditorCreated;
131  boost::signals2::signal<void (DtEditGlobalPlanWidget*, DtUUID, DtSimulationAddress)> signal_globalPlanEditorDeleted;
132  boost::signals2::signal<void ()> signal_clearGlobalPlans;
133  boost::signals2::signal<void (DtUUID, DtSimulationAddress)> signal_globalPlanAdded;
134  boost::signals2::signal<void (const GlobalPlanInformation&, const std::string&)> signal_receivedGlobalPlans;
135  boost::signals2::signal<void (const GlobalPlanInformation&)> signal_globalPlansNamesChanged;
136 
137  protected:
139  virtual void sessionStatusChanged(bool);
140 
141  virtual void scenarioRewound();
142  virtual void scenarioClosed();
143 
144  virtual void processGlobalPlansResponseCallback(DtSimMessage*);
145 
146  virtual void connectSignals(QWidget*);
147  virtual void disconnectSignals(QWidget*);
148 
149  virtual DtGlobalPlansDialogInterface* createGlobalPlansDialog(QWidget*);
150  virtual DtEditGlobalPlanWidget* createGlobalPlanEditDialog(QWidget*, const DtUUID& p, const DtSimulationAddress& a);
151 
152  virtual void clearGlobalPlans();
153 
154  protected slots:
155  virtual void onGlobalPlanDialogDestroyed();
156 
157  protected:
158 
159  typedef std::map<DtEditGlobalPlanWidget*, GlobalPlanInformation> GlobalPlanInformationMap;
160 
167  };
168 }
class DtIfPlan:
Definition: ifPlan.h:61
UUID is a unique ID wrapper class.
Definition: uuid.h:59
boost::signals2::signal< void(DtUUID, DtSimulationAddress)> signal_globalPlanAdded
Definition: vrfGlobalPlansManager.h:133
EditingPlans myEditors
Definition: vrfGlobalPlansManager.h:163
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:131
#define DT_DLL_VRFGUICOREQT
Definition: vrfGuiCoreQt.h:26
bool isQuickLaunch
Definition: vrfGlobalPlansManager.h:61
Definition: vrfGlobalPlansManager.h:49
makVrv::DtDe & myDe
Definition: vrfGlobalPlansManager.h:161
Definition: globalPlansDialogInterface.h:27
Contains makVrv::DtStateView class.
DtString name
Definition: vrfGlobalPlansManager.h:60
std::map< DtEditGlobalPlanWidget *, EditingPlan > EditingPlans
Definition: vrfGlobalPlansManager.h:55
bool showOnQuickLaunchToolbar
Definition: vrfGlobalPlansManager.h:62
Contains the DtUUID class declaration.
DtUUID uuid
Definition: vrfGlobalPlansManager.h:59
bool myRequestingPlans
Definition: vrfGlobalPlansManager.h:166
std::map< makVrv::DtUniqueID, GlobalPlanWithState > GlobalPlanInformation
Definition: vrfGlobalPlansManager.h:69
boost::signals2::signal< void(DtEditGlobalPlanWidget *, DtUUID, DtSimulationAddress)> signal_globalPlanEditorCreated
Definition: vrfGlobalPlansManager.h:130
bool isLaunched
Definition: vrfGlobalPlansManager.h:63
makVrv::DtSignalConnectionManager myConnections
Definition: vrfGlobalPlansManager.h:165
class DtSimBlock:
Definition: simBlock.h:27
Contains makVrv::DtVirtualBaseClass class.
DtString icon
Definition: vrfGlobalPlansManager.h:64
std::map< DtEditGlobalPlanWidget *, GlobalPlanInformation > GlobalPlanInformationMap
Definition: vrfGlobalPlansManager.h:159
int ordinal
Definition: vrfGlobalPlansManager.h:65
File: simMsg.h.
Definition: simMessage.h:35
boost::signals2::signal< void()> signal_clearGlobalPlans
Definition: vrfGlobalPlansManager.h:132
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Contains makVrv::DtVrlinkSimulatedEntityState class.
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
class DtPlan:
Definition: plan.h:92
boost::signals2::signal< void(const GlobalPlanInformation &, const std::string &)> signal_receivedGlobalPlans
Definition: vrfGlobalPlansManager.h:134
Base class to provide boost signal/slot management.
class DtSimStatement:
Definition: simStatement.h:38
DtGlobalPlansDialogInterface * myGlobalPlansDialog
Definition: vrfGlobalPlansManager.h:162
boost::signals2::signal< void(const GlobalPlanInformation &)> signal_globalPlansNamesChanged
Definition: vrfGlobalPlansManager.h:135
std::pair< DtUUID, DtSimulationAddress > EditingPlan
Definition: vrfGlobalPlansManager.h:54
makVrv::DtVrlinkSimulatedEntityState * state
Definition: vrfGlobalPlansManager.h:66
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
std::map< std::string, GlobalPlanInformation > GlobalPlans
Definition: vrfGlobalPlansManager.h:70
Definition: editGlobalPlanWidget.h:26
Definition: vrfGlobalPlansManager.h:57
const GlobalPlans & globalPlans() const
Definition: vrfGlobalPlansManager.h:102
GlobalPlans myGlobalPlans
Definition: vrfGlobalPlansManager.h:164
Instances of DtRwTriggersList are lists of readable, writeable when statements (triggers) The list co...
Definition: rwTriggersList.h:21

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)