VR-Forces 4.7 Class Documentation
 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 
17 
19 
20 class QSlider;
21 
22 namespace makVrf
23 {
24  struct DtVrlinkSimulatedAggregateState;
25 
29  {
30  Q_OBJECT
31  public:
32  //CTOR
33  DtSetStateAmmunitionPropertyDialog(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
34 
35  //DTOR
37 
38  protected:
39 
40  protected:
41  struct AmmoEntry
42  {
44  double baseValue;
45  };
46 
48  typedef std::map<std::string, AmmoEntry> AmmoEntries;
49 
50  struct AmmoValue
51  {
52  AmmoValue() : rootProperty(""), totalBase(0), originalValue(0.) {};
53  AmmoValue(const AmmoValue& orig) :
54  rootProperty(orig.rootProperty), rootItem(orig.rootItem), ammoEntries(orig.ammoEntries), originalValue(orig.originalValue) {};
55 
56  double totalBase;
57  double originalValue;
58  QSlider* slider;
62  };
63 
65  typedef std::map<std::string, AmmoValue> BaseValues;
66 
67  protected:
68  virtual void revertValue();
69  virtual void totalChanged(const std::string& type);
70 
72  virtual void setupGui(const std::vector<makVrv::DtSimEntry*>& data);
73 
75  virtual void addAmmunitionItem(makVrv::DtSimEntry*);
76 
78  virtual void extractBaseValues(DtReaderWriter*, BaseValues& map);
79 
81  virtual void updateTotalsForType(const std::string&);
82 
83  virtual void modifyStateProperty();
84 
86  virtual void sendRequest();
87 
89  virtual void setupStatement(const DtSimStatement* stmt);
90 
91  virtual DtString translationModule() const;
92 
93  protected slots:
95  virtual void totalChanged();
96 
97  protected:
100  };
101 
103  {
104  public:
106  virtual DtTaskSetDialogInterface* createDialog(makVrv::DtDe&, QWidget* parent);
107  };
108 }

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)