VR-Forces 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 {
28  {
29  Q_OBJECT
30  public:
31  //CTOR
32  DtSetStateHealthPropertyDialog(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0);
33 
34  //DTOR
35  virtual ~DtSetStateHealthPropertyDialog() override;
36 
37  virtual void revertValue() override;
38 
39  protected:
43  virtual void setupGui(const std::set<makVrv::DtUniqueID>& data) override;
44 
46  virtual void addResetKilledCapturedWoundedMissing();
47 
48  virtual void addHealthItems(DtSimObjectReference);
49 
51  virtual void setupBaseValues(const PropertyItem&);
52 
54  virtual void modifyStateProperty() override;
55  virtual void modifyBasedOnHealth(PropertyItem&);
56 
59  virtual DtRwProperties modifiedProperties() const override;
60 
61  virtual void updateHealthSlider();
62 
63  virtual void setupStateProperties(DtSetStateProperties* col) override;
64 
67  virtual void setupHealthPercentage();
68 
70  virtual void setupGuiWhenNoSelection() override {};
71  virtual void setupGuiWhenSelectionInvalid() override {};
72 
73  protected slots:
74  virtual void healthSliderChanged();
75  virtual void healthPercentageSliderChanged();
76  virtual void healthPercentageTextChanged();
77 
78  public:
79  QSlider* myHealthSlider;
83 
84  protected:
85  typedef std::map<const DtPropertyInterface*, double> BaseValues;
86  typedef std::map<std::string, PropertyItem> AggregateProperties;
87 
90 
91  double myBaseHealth;
92  };
93 
95  {
96  public:
98  virtual DtTaskSetDialogInterface* createDialog(makVrv::DtDe&, QWidget* parent) override;
99  };
100 }
File: setStateProperties.h.
Definition: setStateProperties.h:40
QSlider * myHealthSlider
Definition: setStateHealthPropertyDialog.h:79
virtual void setupGuiWhenSelectionInvalid() override
Sets up the GUI to handle the case where the selected sim object is not valid for this property...
Definition: setStateHealthPropertyDialog.h:71
Definition: taskSetDialogInterface.h:82
BaseValues myBaseValues
Definition: setStateHealthPropertyDialog.h:88
Definition: setStatePropertiesDialog.h:208
AggregateProperties myAggregateProperties
Definition: setStateHealthPropertyDialog.h:89
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:27
std::map< std::string, PropertyItem > AggregateProperties
Definition: setStateHealthPropertyDialog.h:86
double myBaseHealth
Definition: setStateHealthPropertyDialog.h:91
QLineEdit * myHealthPercentage
Definition: setStateHealthPropertyDialog.h:82
Sets up the set dialog to be able to change all state properties. If multiple items are selected only...
Definition: setStatePropertyDialog.h:32
QLabel * myHealthPercentageLabel
Definition: setStateHealthPropertyDialog.h:81
A list of properties. A DtPropertyInterface object that is a specialized version of DtRwVariableBindi...
Definition: rwProperties.h:122
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:76
virtual void setupGuiWhenNoSelection() override
This dialog assumes you are setting values for a correct object.
Definition: setStateHealthPropertyDialog.h:70
Definition: setStateHealthPropertyDialog.h:94
std::map< const DtPropertyInterface *, double > BaseValues
Definition: setStateHealthPropertyDialog.h:85
QCheckBox * myResetKilledCapturedWoundedMissing
Definition: setStateHealthPropertyDialog.h:80
#define DT_DLL_VRFGUITASKSETQT
Definition: vrfGuiTaskSetQt.h:22

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)