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

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)