VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrfGuiCore
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
16
#include <
vrvUtil/DtVirtualBaseClass.h
>
17
#include <
vrvUtil/signalslib.h
>
18
19
#include <
vrfGuiCore/vrfGuiCore.h
>
20
#include <
vrfGuiCore/DtRangeRingsSettingsRecord.h
>
21
#include <
vrvCore/DtObserverSettingsManager.h
>
22
#include <
vrvCore/DtSharedSettings.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
{
37
const
makVrv::DtObserverSettingsManager::ObserverSetting
DtVrfGuiRangeRingsShowType
=
makVrv::DtObserverSettingsManager::ObserverSetting
(200);
38
41
class
DT_DLL_VRFGUICORE
DtSharedRangeRingsSettings
:
public
makVrv::DtSharedSettings
42
{
43
public
:
44
47
friend
class
makVrv::DtReadSettingsLock
<
DtSharedRangeRingsSettings
>;
48
friend
class
makVrv::DtWriteSettingsLock
<
DtSharedRangeRingsSettings
>;
49
friend
class
makVrv::DtSharedSettingsManager
;
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
90
DtSharedRangeRingsSettings
(
makVrv::DtSharedSettingsManager
& manager);
91
92
protected
:
93
bool
myFill2D
;
94
bool
myShowRangeSphere
;
95
bool
myShowWeaponNameLabel
;
96
bool
myShowEntityNameLabel
;
97
bool
myShowRangeValueLabel
;
98
99
DtRangeRingsSettingsRecord::ColorOptions
myColorOptions
;
100
};
101
103
class
DT_DLL_VRFGUICORE
DtRangeRingsManager
:
public
makVrv::DtVirtualBaseClass
104
{
105
public
:
106
DtRangeRingsManager
(
makVrv::DtDe
&);
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
124
makVrv::DtRecordSettingsBackupInterface
* settingsBackup()
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
:
167
makVrv::DtDe
&
myDe
;
168
makVrv::DtRecordSettingsBackupInterface
*
mySettingsBackup
;
169
};
170
173
class
DT_DLL_VRFGUICORE
DtSharedRangeRingsSettingsSignaler
:
public
makVrv::DtVirtualBaseClass
174
{
175
public
:
176
180
static
DtSharedRangeRingsSettingsSignaler
& instance(
const
makVrv::DtSharedSettingsManager
&);
181
184
static
DtSharedRangeRingsSettingsSignaler
& instance(
makVrv::DtEventQueueInterface
&);
185
189
static
DtSharedRangeRingsSettingsSignaler
* findInstance(
190
makVrv::DtEventQueueInterface
*);
191
193
virtual
~
DtSharedRangeRingsSettingsSignaler
();
194
196
makVrv::event_signal<void (bool)>
signal_fill2DChanged
;
197
makVrv::event_signal<void (bool)>
signal_rangeSphereToggled
;
198
makVrv::event_signal<void ()>
signal_labelSettingsChanged
;
199
makVrv::event_signal<void ()>
signal_colorsChanged
;
200
202
203
protected
:
204
DtSharedRangeRingsSettingsSignaler
(
makVrv::DtEventQueueInterface
& eqi);
205
206
private
:
207
DtSharedRangeRingsSettingsSignaler
(
const
DtSharedRangeRingsSettingsSignaler
&);
208
DtSharedRangeRingsSettingsSignaler
& operator=(
const
DtSharedRangeRingsSettingsSignaler
&);
209
};
210
}
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)