VR-Forces 4.0.4 Class Documentation
include/vrfGuiCore/DtVrfSpotReportManager.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2011 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 
00008 
00017 
00018 #pragma once
00019 
00020 #include <vrfGuiCore/vrfGuiCore.h>
00021 #include <vrfGuiCore/DtVrfGuiApplication.h>
00022 #include <vrfGuiCore/DtVrfSpotReportsSettingsRecord.h>
00023 #include <vrvCore/DtElementDefinitionManager.h>
00024 #include <vrvUtil/signalslib.h>
00025 
00026 #include <vrvUtil/DtVirtualBaseClass.h>
00027 #include <vrvCore/DtEntityState.h>
00028 
00029 #include <boost/signal.hpp>
00030 
00031 class DtVrfObjectMessage;
00032 
00033 namespace makVrv
00034 {
00035    class DtDe;
00036    class DtRecordSettingsBackupInterface;
00037    class DtObjectDictionary;
00038    class DtSharedSettingsManager;
00039    class DtElementDefinitionNew;
00040    class DtVisualizerDefinition;
00041 }
00042 
00043 namespace makVrf
00044 {
00045    class DtSpotReportDataHandlerCreatorInterface;
00046    class DtSpotReportVisualHandlerCreatorInterface;
00047    class DtVrfSelectionFilter;
00048    class DtVrfSpotReportVisualizer;
00049    
00050    const makVrv::DtElementEntry::ElementType SpotReportsElementType = (makVrv::DtElementEntry::ElementType)(makVrv::DtElementDefinitionTypeManager::BuiltInElementTypes_End + 1);
00051 
00053    class DT_DLL_VRFGUICORE DtVrfSpotReportManager : public makVrv::DtVirtualBaseClass
00054    {
00055    public:
00056       DtVrfSpotReportManager(makVrv::DtDe&);
00057       virtual ~DtVrfSpotReportManager();
00058 
00060       static DtVrfSpotReportManager& instance(makVrv::DtDe& de);
00061 
00062       void setAutoSave(bool b);
00063       bool autoSave() const;
00064 
00065       virtual void getRecord(DtVrfSpotReportsSettingsRecord& rec) const;
00066 
00068       virtual void setFromRecord(const DtVrfSpotReportsSettingsRecord& rec);
00069 
00070    public:
00071       //{@
00074       void setDisplayReportingName(bool);
00075       bool displayReportingName() const;
00076 
00077       void setDisplayObservedName(bool);
00078       bool displayObservedName() const;
00079 
00080       void setDisplayLastContact(bool);
00081       bool displayLastContact() const;
00082 
00083       void setDisplayLocation(bool);
00084       bool displayLocation() const;
00085 
00086       void setDisplayVelocity(bool);
00087       bool displayVelocity() const;
00088 
00089       void setDisplayHeading(bool);
00090       bool displayHeading() const;
00091 
00092       void setDisplayEntityType(bool);
00093       bool displayEntityType() const;
00094 
00095       void setDisplayHeadingIndicator(bool);
00096       bool displayHeadingIndicator() const;
00097 
00098       void setDisplayVelocityIndicator(bool);
00099       bool displayVelocityIndicator() const;
00100 
00101       void setApplyToEnvironmentals(bool);
00102       bool applyToEnvironmentals() const;
00103 
00104       const std::vector<int>& certaintyLevels() const;
00105       void setCertaintyLevels(const std::vector<int>&);
00106       void setCertaintyLevel(int level, int time);
00107 
00111       virtual bool showSpotReportsForForce(int) const;
00112       virtual bool showGroundTruthForForce(int) const;
00113 
00115       virtual void addShowSpotReportFor(int);
00116       virtual void removeShowSpotReportFor(int);
00117       void setShowSpotReportsForForce(const std::vector<int>&);
00118       const std::vector<int> spotReportsFor() const;
00119 
00120       virtual void addShowGroundTruthFor(int);
00121       virtual void removeShowGroundTruthFor(int);
00122       void setShowGroundTruthForForce(const std::vector<int>&);
00123       const std::vector<int> groundTruthFor() const;
00124 
00126       virtual void setDisplayFlag(int, bool);
00127       
00130       virtual void setSpotReportsGloballyEnabled(bool enabled);
00131 
00135       void setSystemEnabled(bool);
00136       bool systemEnabled() const;
00138 
00139    public:
00141       virtual void loadDefaults(bool fromFactory = false);
00142 
00144       virtual void saveAsDefaults();
00145 
00146       const makVrv::DtRecordSettingsBackupInterface* settingsBackup() const
00147       {
00148          return mySettingsBackup;
00149       }
00150 
00151       makVrv::DtRecordSettingsBackupInterface* settingsBackup()
00152       {
00153          return mySettingsBackup;
00154       }
00155 
00157       void exportSettings(const std::string& fileName);
00158 
00160       void importSettings(const std::string& fileName);
00161 
00162       virtual void processReceiveSpotReport(const DtVrfObjectMessage* msg);
00163 
00168       virtual std::string addOrUpdateSpotReport(const std::string& type, void*, const std::string& key = "");
00169 
00170    public:
00173       virtual void addFogOfWarFilter(const DtVrfSelectionFilter&);
00174 
00177       virtual void removeFogOfWarFilter(const std::string&);
00178 
00180       virtual bool passesFogOfWarFilters(const makVrv::DtVrlinkSimulatedBaseState*) const;
00181 
00183       virtual bool blockSignals(bool);
00184 
00185    public:
00188       virtual void addSpotReportDataHandler(const std::string& s, DtSpotReportDataHandlerCreatorInterface*);
00189 
00190       virtual void removeSpotReportDataHandler(const std::string& s);
00191 
00193       virtual void setSpotReportsSelectable(bool);
00194       virtual bool spotReportsSelectable() const;
00195 
00196    public:
00199       virtual void addSpotReportVisualHandler(const std::string& s, DtSpotReportVisualHandlerCreatorInterface*);
00200 
00201       virtual void removeSpotReportVisualHandler(const std::string& s);
00202 
00203    public:
00205       boost::signal<void (const DtVrfSpotReportsSettingsRecord&)> signal_spotReportOptionsChanged;
00206 
00208       boost::signal<void (bool)> signal_spotReportsSelectableChanged;
00209 
00211       boost::signal<void (DtVrfSpotReportVisualizer*)> signal_spotReportCreated;
00212 
00213    protected:
00216       virtual void constructSpotReportDictionary();
00217 
00221       virtual bool upgradeFromDictionary(makVrv::DtElementDefinitionTypeManager::ElementDefinitionType dictType,
00222          bool force = false);
00223 
00225       virtual void mergeItemsFrom(const makVrv::DtElementDefinitionNew* source, makVrv::DtElementDefinitionNew* spotReport,
00226          const std::vector<int>& supportedSets);
00227 
00228       virtual bool isUnusedVisualizer(const makVrv::DtVisualizerDefinition*) const;
00229 
00230    protected:
00231       makVrv::DtDe&           myDe;
00232       makVrv::DtRecordSettingsBackupInterface* mySettingsBackup;
00233       bool mySignalsBlocked;
00234       DtVrfSpotReportsSettingsRecord mySpotReportSettings;
00235 
00236       bool mySpotReportsSelectable;
00237    };
00238 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)