VR-Forces 4.3 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 
18 #include <vrfutil/rwProperties.h>
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) {};
53  AmmoValue(const AmmoValue& orig) :
54  rootProperty(orig.rootProperty), rootItem(orig.rootItem), ammoEntries(orig.ammoEntries) {};
55 
56  double totalBase;
57  QSlider* slider;
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:
96  };
97 
99  {
100  public:
102  virtual DtTaskSetDialogInterface* create(makVrv::DtDe&, QWidget* parent);
103  };
104 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)