VR-Forces 4.8 Class Documentation
 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 
21 #include <vrvUtil/signalslib.h>
22 
23 #include <vlpi/simulationAddress.h>
24 #endif
25 #include <boost/signals2.hpp>
26 
27 #include <QtCore/QObject>
28 
29 namespace makVrv
30 {
31  class DtDe;
32 }
33 
34 class QWidget;
35 class DtSimMessage;
36 class DtSimulationAddress;
37 
38 namespace makVrf
39 {
40  class DtGlobalPlansDialogInterface;
41  class DtEditGlobalPlanWidget;
42  class DtVrfBackendState;
43 
45  {
46  Q_OBJECT
47 
48  public:
49  typedef std::pair<DtUUID, DtSimulationAddress> EditingPlan;
50  typedef std::map<DtEditGlobalPlanWidget*, EditingPlan> EditingPlans;
51 
53  {
58  bool isLaunched;
60  int ordinal;
62  };
63 
64  typedef std::map<makVrv::DtUniqueID, GlobalPlanWithState> GlobalPlanInformation;
65  typedef std::map<std::string, GlobalPlanInformation> GlobalPlans;
66 
67  public:
70 
72  virtual ~DtVrfGlobalPlansManager();
73 
75  static DtVrfGlobalPlansManager& instance(makVrv::DtDe& de);
76 
78  virtual void show(QWidget* parent);
79 
80  virtual DtEditGlobalPlanWidget* editGlobalPlan(const DtUUID& plan, const DtSimulationAddress& simulationAddress, QWidget* parent);
81 
82  virtual void deleteGlobalPlan(const DtUUID& plan, const DtSimulationAddress& simulationAddress);
83 
85  virtual void launchGlobalPlan(const DtUUID& u);
86  virtual void launchGlobalPlan(const makVrv::DtUniqueID& u);
87 
89  virtual bool isGlobalPlan(makVrv::DtUniqueID) const;
90 
92  virtual DtSimulationAddress simulationAddressFor(makVrv::DtUniqueID) const;
93 
94  virtual void requestGlobalPlans();
95 
96  const GlobalPlans& globalPlans() const { return myGlobalPlans; };
97 
98  virtual void globalPlanAdded(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* p);
99  virtual void globalPlanRemoved(const makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* p);
100 
101  virtual DtString planName(const DtUUID&) const;
102 
103  virtual DtUUID uuidForPlan(makVrv::DtUniqueID) const;
104 
105  virtual bool isQuickLaunch(const DtUUID&) const;
106  virtual int ordinal(const DtUUID&) const;
107  virtual bool showOnQuickLaunchToolbar(const DtUUID&) const;
108  virtual bool isLaunched(const DtUUID&) const;
109  virtual DtString quickLaunchIcon(const DtUUID&) const;
110  virtual int nextOrdinal() const;
111 
112  public:
113 
114  boost::signals2::signal<void (DtEditGlobalPlanWidget*, DtUUID, DtSimulationAddress)> signal_globalPlanEditorCreated;
115  boost::signals2::signal<void (DtEditGlobalPlanWidget*, DtUUID, DtSimulationAddress)> signal_globalPlanEditorDeleted;
116  boost::signals2::signal<void ()> signal_clearGlobalPlans;
117  boost::signals2::signal<void (DtUUID, DtSimulationAddress)> signal_globalPlanAdded;
118  boost::signals2::signal<void (const GlobalPlanInformation&,
119  const std::string&)> signal_receivedGlobalPlans;
120 
121  protected:
123  virtual void sessionStatusChanged(bool);
124 
125  virtual void scenarioRewound();
126  virtual void scenarioClosed();
127 
128  virtual void processGlobalPlansResponseCallback(DtSimMessage*);
129 
130  virtual void connectSignals(QWidget*);
131  virtual void disconnectSignals(QWidget*);
132 
133  virtual DtGlobalPlansDialogInterface* createGlobalPlansDialog(QWidget*);
134  virtual DtEditGlobalPlanWidget* createGlobalPlanEditDialog(QWidget*, const DtUUID& p, const DtSimulationAddress& a);
135 
136  virtual void clearGlobalPlans();
137 
138  protected slots:
139  virtual void onGlobalPlanDialogDestroyed();
140 
141  protected:
142 
143  typedef std::map<DtEditGlobalPlanWidget*, GlobalPlanInformation> GlobalPlanInformationMap;
144 
151  };
152 }
UUID is a unique ID wrapper class.
Definition: rwUUID.h:222
boost::signals2::signal< void(DtUUID, DtSimulationAddress)> signal_globalPlanAdded
Definition: vrfGlobalPlansManager.h:117
EditingPlans myEditors
Definition: vrfGlobalPlansManager.h:147
Virtual base class.
Definition: DtVirtualBaseClass.h:22
boost::signals2::signal< void(DtEditGlobalPlanWidget *, DtUUID, DtSimulationAddress)> signal_globalPlanEditorDeleted
Definition: vrfGlobalPlansManager.h:115
#define DT_DLL_VRFGUICOREQT
Definition: vrfGuiCoreQt.h:26
bool isQuickLaunch
Definition: vrfGlobalPlansManager.h:56
Definition: vrfGlobalPlansManager.h:44
makVrv::DtDe & myDe
Definition: vrfGlobalPlansManager.h:145
Definition: globalPlansDialogInterface.h:27
Contains makVrv::DtStateView class.
DtString name
Definition: vrfGlobalPlansManager.h:55
std::map< DtEditGlobalPlanWidget *, EditingPlan > EditingPlans
Definition: vrfGlobalPlansManager.h:50
bool showOnQuickLaunchToolbar
Definition: vrfGlobalPlansManager.h:57
DtUUID uuid
Definition: vrfGlobalPlansManager.h:54
bool myRequestingPlans
Definition: vrfGlobalPlansManager.h:150
std::map< makVrv::DtUniqueID, GlobalPlanWithState > GlobalPlanInformation
Definition: vrfGlobalPlansManager.h:64
boost::signals2::signal< void(DtEditGlobalPlanWidget *, DtUUID, DtSimulationAddress)> signal_globalPlanEditorCreated
Definition: vrfGlobalPlansManager.h:114
bool isLaunched
Definition: vrfGlobalPlansManager.h:58
makVrv::DtSignalConnectionManager myConnections
Definition: vrfGlobalPlansManager.h:149
Contains makVrv::DtVirtualBaseClass class.
DtString icon
Definition: vrfGlobalPlansManager.h:59
std::map< DtEditGlobalPlanWidget *, GlobalPlanInformation > GlobalPlanInformationMap
Definition: vrfGlobalPlansManager.h:143
int ordinal
Definition: vrfGlobalPlansManager.h:60
File: simMsg.h.
Definition: simMessage.h:35
boost::signals2::signal< void()> signal_clearGlobalPlans
Definition: vrfGlobalPlansManager.h:116
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
Contains makVrv::DtEntityState class.
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
boost::signals2::signal< void(const GlobalPlanInformation &, const std::string &)> signal_receivedGlobalPlans
Definition: vrfGlobalPlansManager.h:119
Base class to provide boost signal/slot management.
DtGlobalPlansDialogInterface * myGlobalPlansDialog
Definition: vrfGlobalPlansManager.h:146
std::pair< DtUUID, DtSimulationAddress > EditingPlan
Definition: vrfGlobalPlansManager.h:49
makVrv::DtVrlinkSimulatedEntityState * state
Definition: vrfGlobalPlansManager.h:61
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
std::map< std::string, GlobalPlanInformation > GlobalPlans
Definition: vrfGlobalPlansManager.h:65
Definition: editGlobalPlanWidget.h:25
Definition: vrfGlobalPlansManager.h:52
const GlobalPlans & globalPlans() const
Definition: vrfGlobalPlansManager.h:96
GlobalPlans myGlobalPlans
Definition: vrfGlobalPlansManager.h:148

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)