VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
setStateHealthPropertyDialog.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
12 
13 
14 #pragma once
15 
18 
19 class QSlider;
20 class QLabel;
21 class QLineEdit;
22 
23 namespace makVrf
24 {
25  struct DtVrlinkSimulatedAggregateState;
26 
30  {
31  Q_OBJECT
32  public:
33  //CTOR
34  DtSetStateHealthPropertyDialog(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
35 
36  //DTOR
38 
39  virtual void revertValue();
40 
41  protected:
45  virtual void setupGui(const std::vector<makVrv::DtSimEntry*>& data);
46 
48  virtual void addResetKilledCapturedWoundedMissing();
49 
50  virtual void addHealthItems(DtVrlinkSimulatedAggregateState*);
51 
53  virtual void setupBaseValues(const PropertyItem&);
54 
56  virtual void modifyStateProperty();
57  virtual void modifyBasedOnHealth(PropertyItem&);
58 
61  virtual DtRwProperties modifiedProperties() const;
62 
63  virtual void updateHealthSlider();
64 
65  virtual void setupStateProperties(DtSetStateProperties* col);
66 
69  virtual void setupHealthPercentage();
70 
72  virtual void setupGuiWhenNoSelection() {};
73  virtual void setupGuiWhenSelectionInvalid() {};
74 
75  protected slots:
76  virtual void healthSliderChanged();
77  virtual void healthPercentageSliderChanged();
78  virtual void healthPercentageTextChanged();
79 
80  public:
81  QSlider* myHealthSlider;
85 
86  protected:
87  typedef std::map<const DtPropertyInterface*, double> BaseValues;
88  typedef std::map<std::string, PropertyItem> AggregateProperties;
89 
92 
93  double myBaseHealth;
94  };
95 
97  {
98  public:
100  virtual DtTaskSetDialogInterface* createDialog(makVrv::DtDe&, QWidget* parent);
101  };
102 }
virtual void setupGuiWhenSelectionInvalid()
Sets up the GUI to handle the case where the selected sim object is not valid for this property...
Definition: setStateHealthPropertyDialog.h:73
File: setStateProperties.h.
Definition: setStateProperties.h:40
QSlider * myHealthSlider
Definition: setStateHealthPropertyDialog.h:81
Definition: taskSetDialogInterface.h:84
virtual void setupGuiWhenNoSelection()
This dialog assumes you are setting values for a correct object.
Definition: setStateHealthPropertyDialog.h:72
BaseValues myBaseValues
Definition: setStateHealthPropertyDialog.h:90
Definition: setStatePropertiesDialog.h:208
AggregateProperties myAggregateProperties
Definition: setStateHealthPropertyDialog.h:91
Definition: setStatePropertyDialog.h:226
Sets up the set dialog to be able to change all state properties. If multiple items are selected only...
Definition: setStateHealthPropertyDialog.h:29
std::map< std::string, PropertyItem > AggregateProperties
Definition: setStateHealthPropertyDialog.h:88
double myBaseHealth
Definition: setStateHealthPropertyDialog.h:93
QLineEdit * myHealthPercentage
Definition: setStateHealthPropertyDialog.h:84
Sets up the set dialog to be able to change all state properties. If multiple items are selected only...
Definition: setStatePropertyDialog.h:31
QLabel * myHealthPercentageLabel
Definition: setStateHealthPropertyDialog.h:83
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:126
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:70
Definition: setStateHealthPropertyDialog.h:96
std::map< const DtPropertyInterface *, double > BaseValues
Definition: setStateHealthPropertyDialog.h:87
QCheckBox * myResetKilledCapturedWoundedMissing
Definition: setStateHealthPropertyDialog.h:82
#define DT_DLL_VRFGUITASKSETQT
Definition: vrfGuiTaskSetQt.h:22

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)