VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
bhaveGuiManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
12 #include "bhaveMsgs/ifSpawnList.h"
13 
18 #include <vrvCore/DtEntityState.h>
19 
20 #include <vector>
21 
22 //Vantage
24 #include <vrvCore/DtDe.h>
25 
26 //VRLink
27 #include <vlpi/entityType.h>
28 
29 
30 #include <boost/signal.hpp>
31 
32 
34 class DtSimMessage;
35 class QString;
36 class DtSimCommand;
37 class DtModelSetEntry;
38 
39 namespace makVrf
40 {
41  class DtEntityCreatePaletteInterface;
42  class DtEntityMapperKey;
43 }
44 
45 namespace makVrv
46 {
47  class DtSimObjectEntry;
48 }
49 
50 namespace BHAVE
51 {
52  namespace BHAVE3DGui
53  {
54 
59  {
60 
61  public:
62 
65 
67  virtual ~DtBhaveGuiManager();
68 
70  static DtBhaveGuiManager& instance(makVrv::DtDe& de);
71 
73  virtual bool init();
74 
76  virtual DtBhavePluginOptions* pluginOptions();
77  virtual void requestSpawnTemplateList();
78 
79  virtual const SpawnTemplateDescriptionList& spawnPatternList() const;
81  virtual bool setPatternList( const SpawnTemplateDescriptionList & list, bool initialSend);
82 
83  virtual const SpawnTemplateDescriptionList & patternList() const;
84  virtual SpawnTemplateDescriptionList & patternList();
85 
87  virtual void slot_updateCreationPalette(makVrf::DtEntityCreatePaletteInterface* palette);
88 
90 
93  virtual void slot_spawnCreateObject(const makVrf::DtVrfObjectManipulationHandlerBaseClass::ObjectManipulationData&, QString);
94 
97  virtual void slot_sinkCreateObject(const makVrf::DtVrfObjectManipulationHandlerBaseClass::ObjectManipulationData&, QString);
98 
100  static int nextSpawnNumber();
102  static int nextSinkNumber();
103 
105  virtual void slot_commandRequestToBeAddedToPlan(DtSimCommand&, bool forEdit);
106  virtual DtString sinkPointName(const DtString& templateName) const;
107  virtual DtString spawnPointName(const DtString& templateName) const;
108 
110  virtual bool bhaveValid(bool showWarningDialogIfNotValid = true);
111 
112  public:
113  boost::signal<void (const SpawnTemplateDescriptionList &)> signal_patternListUpdated;
114  boost::signal<void (const SpawnTemplateDescriptionList &)> signal_spawnSinkPointCountUpdated;
115 
116  boost::signal<void (const DtString&)> signal_spawnPointAdded;
117  boost::signal<void (const DtString&)> signal_sinkPointAdded;
118 
119  boost::signal<void (const DtString&)> signal_spawnPointRemoved;
120  boost::signal<void (const DtString&)> signal_sinkPointRemoved;
121 
122  boost::signal<void (bool)> signal_validityChanged;
123 
124  protected:
125 
128  virtual void updateCreateMenuWithSpawnAndSinkPoints(makVrf::DtEntityCreatePaletteInterface* palette);
129 
131  virtual void removePaletteItems(makVrf::DtEntityCreatePaletteInterface* iFace);
132 
134  virtual void removeCreateMenuItems(makVrf::DtEntityCreatePaletteInterface* palette);
135 
138  virtual void slot_simStateAdded(makVrv::DtSimObjectEntry& e);
139 
141  virtual void slot_simObjectEntryAboutToBeRemoved(makVrv::DtSimObjectEntry& e);
142 
144  virtual void resetCounters(bool requestTemplates = true);
145 
147  virtual DtModelSetEntry* addModelSetEntryIfMissing(const DtString& label, const makVrf::DtEntityMapperKey&,
148  const DtString& category);
149 
150  protected:
151 
152  virtual void processTemplateList(DtSimMessage* rsp);
153  virtual int indexOfTemplate(DtString& tempName);
154 
155  virtual void completeInitialization();
156 
157  virtual void addPotentialSpawnSinkPoint(const makVrv::DtVrlinkSimulatedBaseState&);
158  virtual void removePotentialSpawnSinkPoint(const std::string& templateName, const DtEntityType& t);
159 
160  virtual void slot_stateViewUpdated(makVrv::DtStateView<makVrv::DtVrlinkSimulatedBaseState>* s);
161  virtual void processValidityResponse(DtSimMessage* rsp);
162 
163  protected:
164 
168 
170 
172  static int theNextSinkNumber;
173  static int theNextSpawnNumber;
174 
176  {
177  std::string templateName;
178  std::string templateType;
179  };
180 
181  typedef std::map<makVrv::DtUniqueID, TemplateInfo> UniqueIdToTemplateInfo;
183 
186 
189  };
190 
194  {
195  public:
196  virtual makVrf::DtCopyObject* create(makVrv::DtDe&);
197  };
198 
201  {
202  public:
205 
206  protected:
208  virtual void createObject(const DtVector& center);
209 
210  virtual void createSpawnObject(const DtVector&);
211  virtual void createSinkObject(const DtVector&);
212  };
213  }
214 }
215 

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)