VR-Forces 4.1 Class Documentation
DtRangeRingsManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2011 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtRangeRingsManager.h,v $ $Revision: 1.1 $ $State: Exp $
7 ******************************************************************************/
8 
11 
13 
14 #pragma once
15 
17 #include <vrvUtil/signalslib.h>
18 
19 #include <vrfGuiCore/vrfGuiCore.h>
23 #include <vrvUtil/event_signal.h>
24 #include <vrvUtil/DtUnicode.h>
25 
26 #include <vrvCore/DtDe.h>
27 
28 namespace makVrv
29 {
30  class DtRecordSettingsBackupInterface;
31  class DtEventQueueInterface;
32  class DtSharedSettingsManager;
33 }
34 
35 namespace makVrf
36 {
38 
42  {
43  public:
44 
50 
54  static std::string className();
55 
57  virtual ~DtSharedRangeRingsSettings();
58 
59  virtual void setFill2D(bool);
60  virtual bool fill2D() const;
61 
62  virtual void setShowRangeSphere(bool);
63  virtual bool showRangeSphere() const;
64 
65  virtual void setShowWeaponNameLabel( bool );
66  virtual bool showWeaponNameLabel() const;
67 
68  virtual void setShowEntityNameLabel( bool );
69  virtual bool showEntityNameLabel() const;
70 
71  virtual void setShowRangeValueLabel( bool );
72  virtual bool showRangeValueLabel() const;
73 
74  virtual const DtRangeRingsSettingsRecord::ColorOptions& colorOptions() const;
75 
76  virtual void setColorOptions(const DtRangeRingsSettingsRecord::ColorOptions&);
77  virtual void getColor(int type, int force, float& r, float& g, float& b, float& a, makVrv::DtUnicode&) const;
78  virtual void setColor(int type, int color, const makVrv::DtUnicode&);
79  virtual void removeColorOption(int type);
80 
81  virtual void getRecord(DtRangeRingsSettingsRecord& rec) const;
82  virtual void setFromRecord(const DtRangeRingsSettingsRecord& rec);
83 
84  protected:
85  virtual void colorFromForce(int force, float& r, float& g, float& b);
86 
87  protected:
88 
91 
92  protected:
93  bool myFill2D;
98 
100  };
101 
104  {
105  public:
107  virtual ~DtRangeRingsManager();
108 
110  static DtRangeRingsManager& instance(makVrv::DtDe& de);
111  static void registerInstance(makVrv::DtDe&, DtRangeRingsManager*);
112 
114  virtual void loadDefaults(bool fromFactory = false);
115 
117  virtual void saveAsDefaults();
118 
119  const makVrv::DtRecordSettingsBackupInterface* settingsBackup() const
120  {
121  return mySettingsBackup;
122  }
123 
125  {
126  return mySettingsBackup;
127  }
128 
130  void exportSettings(const std::string& fileName);
131 
133  void importSettings(const std::string& fileName);
134 
135  void setAutoSave(bool b);
136  bool autoSave() const;
137 
138  virtual void getRecord(DtRangeRingsSettingsRecord& rec) const;
139  virtual void setFromRecord(const DtRangeRingsSettingsRecord& rec);
140 
141  virtual void setFill2D(bool b);
142  virtual bool fill2D() const;
143 
144  virtual void setShowRangeSphere( bool onOff );
145  virtual bool showRangeSphere() const;
146 
147  virtual void setShowWeaponNameLabel( bool );
148  virtual bool showWeaponNameLabel() const;
149 
150  virtual void setShowEntityNameLabel( bool );
151  virtual bool showEntityNameLabel() const;
152 
153  virtual void setShowRangeValueLabel( bool );
154  virtual bool showRangeValueLabel() const;
155 
156  virtual const DtRangeRingsSettingsRecord::ColorOptions& colorOptions() const;
157  virtual void setColorOptions(const DtRangeRingsSettingsRecord::ColorOptions&);
158  virtual void getColor(int type, int force, float& r, float& g, float& b, float& a, makVrv::DtUnicode&) const;
159  virtual void setColor(int type, int color, const makVrv::DtUnicode&);
160 
161  virtual void removeColorOption(int type);
162 
163  protected:
164  virtual void completeSetup();
165 
166  protected:
169  };
170 
174  {
175  public:
176 
181 
185 
189  static DtSharedRangeRingsSettingsSignaler* findInstance(
191 
194 
200 
202 
203  protected:
205 
206  private:
209  };
210 }

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)