VR-Forces 4.5 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrfGuiCoreQt
setStateAmmunitionPropertyDialog.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2013 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
8
11
12
13
#pragma once
14
15
#include <
vrfGuiCoreQt/vrfGuiCoreQt.h
>
16
#include <
vrfGuiCoreQt/setStatePropertyDialog.h
>
17
18
#include <
vrfutil/rwProperties.h
>
19
20
class
QSlider;
21
22
namespace
makVrf
23
{
24
struct
DtVrlinkSimulatedAggregateState;
25
28
class
DT_DLL_VRFGUICOREQT
DtSetStateAmmunitionPropertyDialog
:
public
DtSetStatePropertyDialog
29
{
30
Q_OBJECT
31
public
:
32
//CTOR
33
DtSetStateAmmunitionPropertyDialog
(
makVrv::DtDe
& de,
QWidget
* parent,
const
Qt::WindowFlags& flags = 0);
34
35
//DTOR
36
virtual
~
DtSetStateAmmunitionPropertyDialog
();
37
38
protected
:
39
40
protected
:
41
struct
AmmoEntry
42
{
43
DtReaderWriter
*
countItem
;
44
double
baseValue
;
45
};
46
48
typedef
std::map<std::string, AmmoEntry>
AmmoEntries
;
49
50
struct
AmmoValue
51
{
52
AmmoValue
() : rootProperty(
""
), totalBase(0) {};
53
AmmoValue
(
const
AmmoValue
& orig) :
54
rootProperty(orig.rootProperty), rootItem(orig.rootItem), ammoEntries(orig.ammoEntries) {};
55
56
double
totalBase;
57
QSlider*
slider
;
58
DtRwPropertyInt
rootProperty
;
59
PropertyItem
rootItem
;
60
AmmoEntries
ammoEntries
;
61
};
62
64
typedef
std::map<std::string, AmmoValue>
BaseValues
;
65
66
protected
:
68
virtual
void
setupGui(
const
std::vector<makVrv::DtSimEntry*>& data);
69
71
virtual
void
addAmmunitionItem(
makVrv::DtSimEntry
*);
72
74
virtual
void
extractBaseValues(
DtReaderWriter
*,
BaseValues
& map);
75
77
virtual
void
updateTotalsForType(
const
std::string&);
78
79
virtual
void
modifyStateProperty();
80
82
virtual
void
sendRequest();
83
85
virtual
void
setupStatement(
const
DtSimStatement
* stmt);
86
87
virtual
DtString
translationModule()
const
;
88
89
protected
slots:
91
virtual
void
totalChanged();
92
93
protected
:
94
BaseValues
myBaseValues
;
95
BaseValues
myCurrentValues
;
96
};
97
98
class
DT_DLL_VRFGUICOREQT
DtSetStateAmmunitionPropertyDialogCreator
:
public
DtSetStatePropertyDialogCreator
99
{
100
public
:
101
DtSetStateAmmunitionPropertyDialogCreator
(
makVrv::DtDe
&);
102
virtual
DtTaskSetDialogInterface
* create(
makVrv::DtDe
&,
QWidget
* parent);
103
};
104
}
Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (
www.mak.com
)