VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #if !defined(Q_MOC_RUN)
18 
20 #endif
21 
22 class QSlider;
23 
24 namespace makVrf
25 {
26  struct DtVrlinkSimulatedAggregateState;
27 
31  {
32  Q_OBJECT
33  public:
34  //CTOR
35  DtSetStateAmmunitionPropertyDialog(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
36 
37  //DTOR
39 
40  protected:
41 
42  protected:
43  struct AmmoEntry
44  {
46  double baseValue;
47  };
48 
50  typedef std::map<std::string, AmmoEntry> AmmoEntries;
51 
52  struct AmmoValue
53  {
54  AmmoValue() : rootProperty(""), totalBase(0), originalValue(0.) {};
55  AmmoValue(const AmmoValue& orig) :
56  rootProperty(orig.rootProperty), rootItem(orig.rootItem), ammoEntries(orig.ammoEntries), originalValue(orig.originalValue) {};
57 
58  double totalBase;
59  double originalValue;
60  QSlider* slider;
64  };
65 
67  typedef std::map<std::string, AmmoValue> BaseValues;
68 
69  protected:
70  virtual void revertValue();
71  virtual void totalChanged(const std::string& type);
72 
74  virtual void setupGui(const std::vector<makVrv::DtSimEntry*>& data);
75 
77  virtual void addAmmunitionItem(makVrv::DtSimEntry*);
78 
80  virtual void extractBaseValues(DtReaderWriter*, BaseValues& map);
81 
83  virtual void updateTotalsForType(const std::string&);
84 
85  virtual void modifyStateProperty();
86 
88  virtual void sendRequest();
89 
91  virtual void setupStatement(const DtSimStatement* stmt);
92 
93  virtual DtString translationModule() const;
94 
95  protected slots:
97  virtual void totalChanged();
98 
99  protected:
102  };
103 
105  {
106  public:
108  virtual DtTaskSetDialogInterface* createDialog(makVrv::DtDe&, QWidget* parent);
109  };
110 }
Definition: setStateAmmunitionPropertyDialog.h:52
AmmoValue(const AmmoValue &orig)
Definition: setStateAmmunitionPropertyDialog.h:55
std::map< std::string, AmmoValue > BaseValues
Values of ammo by type.
Definition: setStateAmmunitionPropertyDialog.h:67
double originalValue
Definition: setStateAmmunitionPropertyDialog.h:59
Definition: taskSetDialogInterface.h:84
Definition: readerWriter.h:85
A DtSimEntry is a container of DtSimState&#39;s and represents the total state of an simulation object...
Definition: DtSimEntry.h:27
Definition: setStateAmmunitionPropertyDialog.h:104
Sets up the set dialog to be able to change all state properties. If multiple items are selected only...
Definition: setStateAmmunitionPropertyDialog.h:30
Definition: setStatePropertiesDialog.h:208
AmmoValue()
Definition: setStateAmmunitionPropertyDialog.h:54
BaseValues myCurrentValues
Definition: setStateAmmunitionPropertyDialog.h:101
BaseValues myBaseValues
Definition: setStateAmmunitionPropertyDialog.h:100
DtRwPropertyInt rootProperty
Definition: setStateAmmunitionPropertyDialog.h:61
double baseValue
Definition: setStateAmmunitionPropertyDialog.h:46
Definition: setStatePropertyDialog.h:226
AmmoEntries ammoEntries
Definition: setStateAmmunitionPropertyDialog.h:63
QSlider * slider
Definition: setStateAmmunitionPropertyDialog.h:60
PropertyItem rootItem
Definition: setStateAmmunitionPropertyDialog.h:62
Sets up the set dialog to be able to change all state properties. If multiple items are selected only...
Definition: setStatePropertyDialog.h:31
DtReaderWriter * countItem
Definition: setStateAmmunitionPropertyDialog.h:45
class DtSimStatement:
Definition: simStatement.h:38
Definition: rwProperty.h:339
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
std::map< std::string, AmmoEntry > AmmoEntries
Values of all ammo regardless of type.
Definition: setStateAmmunitionPropertyDialog.h:50
Definition: setStateAmmunitionPropertyDialog.h:43
#define DT_DLL_VRFGUITASKSETQT
Definition: vrfGuiTaskSetQt.h:22

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)