VR-Forces 4.2 Class Documentation
DtVrfSpotReportManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
17 
18 #pragma once
19 
20 #include <vrfGuiCore/vrfGuiCore.h>
23 #include <vrvCore/DtElementDefinitionManager.h>
24 #include <vrvCore/DtSelectionManager.h>
25 #include <vrvUtil/signalslib.h>
26 
27 #include <vrvUtil/DtVirtualBaseClass.h>
28 #include <vrvCore/DtEntityState.h>
29 
30 #include <boost/signal.hpp>
31 
32 class DtVrfObjectMessage;
33 
34 namespace makVrv
35 {
36  class DtDe;
37  class DtRecordSettingsBackupInterface;
38  class DtObjectDictionary;
39  class DtSharedSettingsManager;
40  class DtElementDefinitionNew;
41  class DtVisualizerDefinition;
42 }
43 
44 namespace makVrf
45 {
46  class DtSpotReportDataHandlerCreatorInterface;
47  class DtSpotReportVisualHandlerCreatorInterface;
48  class DtVrfSelectionFilter;
49  class DtVrfSpotReportVisualizer;
50 
51  const makVrv::DtElementEntry::ElementType SpotReportsElementType = (makVrv::DtElementEntry::ElementType)(makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes_End + 1);
52  const makVrv::DtSelectionManager::SelectionType DtSpotReportSelectionType = makVrv::DtSelectionManager::SelectionType(100);
53 
55  class DT_DLL_VRFGUICORE DtVrfSpotReportManager : public makVrv::DtVirtualBaseClass
56  {
57  public:
58  DtVrfSpotReportManager(makVrv::DtDe&);
59  virtual ~DtVrfSpotReportManager();
60 
62  static DtVrfSpotReportManager& instance(makVrv::DtDe& de);
63 
64  void setAutoSave(bool b);
65  bool autoSave() const;
66 
67  virtual void getRecord(DtVrfSpotReportsSettingsRecord& rec) const;
68 
70  virtual void setFromRecord(const DtVrfSpotReportsSettingsRecord& rec);
71 
72  public:
73  //{@
76  void setDisplayReportingName(bool);
77  bool displayReportingName() const;
78 
79  void setDisplayObservedName(bool);
80  bool displayObservedName() const;
81 
82  void setDisplayLastContact(bool);
83  bool displayLastContact() const;
84 
85  void setDisplayLocation(bool);
86  bool displayLocation() const;
87 
88  void setDisplayVelocity(bool);
89  bool displayVelocity() const;
90 
91  void setDisplayHeading(bool);
92  bool displayHeading() const;
93 
94  void setDisplayEntityType(bool);
95  bool displayEntityType() const;
96 
97  void setDisplayHeadingIndicator(bool);
98  bool displayHeadingIndicator() const;
99 
100  void setDisplayVelocityIndicator(bool);
101  bool displayVelocityIndicator() const;
102 
103  void setApplyToEnvironmentals(bool);
104  bool applyToEnvironmentals() const;
105 
106  const std::vector<int>& certaintyLevels() const;
107  void setCertaintyLevels(const std::vector<int>&);
108  void setCertaintyLevel(int level, int time);
109 
113  virtual bool showSpotReportsForForce(int) const;
114  virtual bool showGroundTruthForForce(int) const;
115 
117  virtual void addShowSpotReportFor(int);
118  virtual void removeShowSpotReportFor(int);
119  void setShowSpotReportsForForce(const std::vector<int>&);
120  const std::vector<int> spotReportsFor() const;
121 
122  virtual void addShowGroundTruthFor(int);
123  virtual void removeShowGroundTruthFor(int);
124  void setShowGroundTruthForForce(const std::vector<int>&);
125  const std::vector<int> groundTruthFor() const;
126 
128  virtual void setDisplayFlag(int, bool);
129 
132  virtual void setSpotReportsGloballyEnabled(bool enabled);
133 
137  void setSystemEnabled(bool);
138  bool systemEnabled() const;
140 
141  public:
143  virtual void loadDefaults(bool fromFactory = false);
144 
146  virtual void saveAsDefaults();
147 
148  const makVrv::DtRecordSettingsBackupInterface* settingsBackup() const
149  {
150  return mySettingsBackup;
151  }
152 
153  makVrv::DtRecordSettingsBackupInterface* settingsBackup()
154  {
155  return mySettingsBackup;
156  }
157 
159  void exportSettings(const std::string& fileName);
160 
162  void importSettings(const std::string& fileName);
163 
164  virtual void processReceiveSpotReport(const DtVrfObjectMessage* msg);
165 
170  virtual std::string addOrUpdateSpotReport(const std::string& type, void*, const std::string& key = "");
171 
172  public:
175  virtual void addFogOfWarFilter(const DtVrfSelectionFilter&);
176 
179  virtual void removeFogOfWarFilter(const std::string&);
180 
182  virtual bool passesFogOfWarFilters(const makVrv::DtVrlinkSimulatedBaseState*) const;
183  virtual bool passesFogOfWarFilters(makVrv::DtUniqueID) const;
184 
186  virtual bool blockSignals(bool);
187 
188  public:
191  virtual void addSpotReportDataHandler(const std::string& s, DtSpotReportDataHandlerCreatorInterface*);
192 
194  virtual void removeSpotReport(makVrv::DtUniqueID);
195 
196  virtual void removeSpotReportDataHandler(const std::string& s);
197 
199  virtual void setSpotReportsSelectable(bool);
200  virtual bool spotReportsSelectable() const;
201 
204  virtual int certaintyLevelForTime(double d) const;
205 
206  public:
209  virtual void addSpotReportVisualHandler(const std::string& s, DtSpotReportVisualHandlerCreatorInterface*);
210 
211  virtual void removeSpotReportVisualHandler(const std::string& s);
212 
213  public:
215  boost::signal<void (const DtVrfSpotReportsSettingsRecord&)> signal_spotReportOptionsChanged;
216 
218  boost::signal<void (bool)> signal_spotReportsSelectableChanged;
219 
221  boost::signal<void (DtVrfSpotReportVisualizer*)> signal_spotReportCreated;
222 
223  protected:
226  virtual void constructSpotReportDictionary();
227 
231  virtual bool upgradeFromDictionary(makVrv::DtElementDefinitionTypeManager::ElementDefinitionType dictType,
232  bool force = false);
233 
235  virtual void mergeItemsFrom(const makVrv::DtElementDefinitionNew* source, makVrv::DtElementDefinitionNew* spotReport,
236  const std::vector<int>& supportedSets);
237 
238  virtual bool isUnusedVisualizer(const makVrv::DtVisualizerDefinition*) const;
239 
240  virtual void enableDecoration(const std::string&, bool);
241  virtual bool decorationIsEnabled(const std::string&) const;
242 
243  protected:
244  makVrv::DtDe& myDe;
245  makVrv::DtRecordSettingsBackupInterface* mySettingsBackup;
248 
250  };
251 }

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)