VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
uiDetonationParametersConfigurationWidget.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2018 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
6 #pragma once
7 
11 
12 #include <QtGui/QColor>
13 #include <QtCore/QPointF>
14 #include <QtCore/QVector>
15 
16 class DtPlotPicker;
17 class QwtPlot;
18 class QwtPlotCurve;
19 class QFrame;
20 class QTableWidget;
21 class QPushButton;
22 class QVBoxLayout;
23 class QHBoxLayout;
24 class DtRangeProbEntry;
25 class DtEntityType;
26 class QDoubleValidator;
27 class DtRwReal;
28 class QLabel;
29 class QComboBox;
30 class QLineEdit;
31 class QListWidget;
40 class QListWidgetItem;
41 
43 {
44  Q_OBJECT
45 public:
46 
49 
52 
54 
55  virtual void setEnabled(bool);
56 
57  static QString axisTitle(const DtString&);
58 
59 protected:
60  virtual void detonationPowerChanged();
61  virtual void createControls(QWidget* parent);
62  virtual void setFromParameters(const std::vector<DtReaderWriter*>& parentRw);
63  virtual void setupFromPowerEntry(DtMunitionDetonationPowerEntry*);
64  virtual void setupPowerDeterminant(DtPowerRangeDeterminant*);
65 
66  virtual void setupPowerDeterminant(DtPowerDirectDeterminant*);
67  virtual void setupGraphDataFor(DtPowerDirectDeterminant*);
68  virtual void updateDataFor(DtPowerDirectDeterminant*, QLineEdit*);
69 
70  virtual void setupPowerDeterminant(DtPowerRangeCoefficientsDeterminant*);
71  virtual void setupGraphDataFor(DtPowerRangeCoefficientsDeterminant*);
72  virtual void removeSelectedColumn(DtPowerRangeCoefficientsDeterminant*);
73  virtual void addRangeTo(DtPowerRangeCoefficientsDeterminant*);
74  virtual void updateDataFor(DtPowerRangeCoefficientsDeterminant*, QLineEdit*);
75 
76  virtual void setupPowerDeterminant(DtPowerRangeEquivalentTntDeterminant*);
77  virtual void setupGraphDataFor(DtPowerRangeEquivalentTntDeterminant*);
78  virtual void updateDataFor(DtPowerRangeEquivalentTntDeterminant*, QLineEdit*);
79  virtual void processUiEvent(const DtUiElementEvent& e);
80 
81  virtual void setupPowerDeterminant(DtPowerRangeListDeterminant*);
82  virtual void setupGraphDataFor(DtPowerRangeListDeterminant*);
83  virtual void removeSelectedColumn(DtPowerRangeListDeterminant*);
84  virtual void addRangeTo(DtPowerRangeListDeterminant*);
85  virtual void updateDataFor(DtPowerRangeListDeterminant*, QLineEdit*);
86  virtual QListWidgetItem* addNewDeterminant(DtPowerRangeDeterminant* prd);
87 
88  virtual void setupPowerDeterminant(DtPowerRangeDeterminantList*);
89 
90  virtual QString currentText() const;
91  virtual DtString currentPower() const;
92  virtual DtString currentDeterminant() const;
93  virtual DtPowerRangeDeterminant* currentPowerDeterminant() const;
94 
95  virtual bool eventFilter(QObject*, QEvent*);
96  virtual void cellEntered(QObject* e);
97 
98  virtual void moveRange();
99  virtual void wheelMove(double delta);
100 
101  virtual DtPowerRangeDeterminant* getPowerAndDeterminant(DtString& power, DtString& determinant) const;
102 
104  virtual double adjustPower(DtPowerRangeDeterminant* prd, double power, bool toDisplay = true) const;
105  virtual double getProbability(double range, DtPowerRangeListDeterminant* entry) const;
106  virtual int changeRangeForColumn(int column, double toRange);
107 
108  virtual void replotGraph();
109 
110 protected slots:
111  virtual void sectionDoubleClicked(int);
112  virtual void legendClicked(const QVariant&, int);
113  virtual void selectCurve(const QPointF&);
114  virtual void selectPowerLine();
115  virtual void changeCellValue();
116 
117  virtual void onAddPower();
118  virtual void onRemovePower();
119  virtual void onEditPower();
120 
121  virtual void graphDataSelectionChanged();
122 
123  virtual void addRange();
124  virtual void editRange();
125  virtual void removeRange();
126  virtual void onCopyPower();
127  virtual void onAssignAsAttacker();
128 
129  virtual void updateTabVisibility();
130 
131 public:
132  QwtPlot* myGraph;
133  QWidget* myPowerCanvas;
135  QwtPlotCurve* myPlotLine;
136  QHBoxLayout* myButtonLayout;
137  QVBoxLayout* myPowerListLayout;
143  QDoubleValidator* myRangeValidator;
144  QDoubleValidator* myCoefficientValidator;
146  QListWidget* myPowerList;
148  QHBoxLayout* mySingleLineLayout;
151  QHBoxLayout* myTableButtons;
152  QWidget* myDataCanvas;
153  QVBoxLayout* myDataLayout;
158  QWidget* myButtonLine;
159 
160  static QColor thePlotLineColor;
161 
162 protected:
167  std::vector<int> myRangeColumns;
168 };
DtRangeProbEntry is an abstract class whose deriving classes will have one of the two forms of DtPrbD...
Definition: rangeProbEntry.h:19
QPushButton * myRemoveRange
Definition: uiDetonationParametersConfigurationWidget.h:156
QLabel * myComboLabel
Definition: uiDetonationParametersConfigurationWidget.h:145
QPushButton * myEditPower
Definition: uiDetonationParametersConfigurationWidget.h:140
QVBoxLayout * myPowerListLayout
Definition: uiDetonationParametersConfigurationWidget.h:137
QPushButton * myAddRange
Definition: uiDetonationParametersConfigurationWidget.h:154
QPushButton * myCopyPower
Definition: uiDetonationParametersConfigurationWidget.h:141
QHBoxLayout * mySingleLineLayout
Definition: uiDetonationParametersConfigurationWidget.h:148
virtual void createControls(QWidget *parent)
If additional widgets or connections need to be made do it here. The parent is the myWidget member...
virtual void setFromParameters(DtReaderWriter *parentRw)
Calls setFromParameters with std::vector of parameter.
QPushButton * myEditRange
Definition: uiDetonationParametersConfigurationWidget.h:155
QDoubleValidator * myCoefficientValidator
Definition: uiDetonationParametersConfigurationWidget.h:144
virtual void processUiEvent(const DtUiElementEvent &)
Process ui event. Default does nothing.
Definition: uiElement.h:220
QHBoxLayout * myButtonLayout
Definition: uiDetonationParametersConfigurationWidget.h:136
QDoubleValidator * myRangeValidator
Definition: uiDetonationParametersConfigurationWidget.h:143
boost::function< DtUiElement *(makVrv::DtDe &)> CreatorFunction
Definition: uiElement.h:174
A readable/writable object that indicates the power of a detonation of a given type, potentially at different ranges from the point of impact.
Definition: powerRangeListDeterminant.h:17
A readable/writable object that indicates the power of a detonation of a given type as a function of ...
Definition: powerRangeCoefficientsDeterminant.h:53
A readable/writable object that indicates the power of a detonation of a given type, potentially at different ranges from the point of impact.
Definition: powerRangeDeterminant.h:17
QLabel * mySingleLineLabel
Definition: uiDetonationParametersConfigurationWidget.h:150
QListWidget * myPowerList
Definition: uiDetonationParametersConfigurationWidget.h:146
QWidget * myDataCanvas
Definition: uiDetonationParametersConfigurationWidget.h:152
QPushButton * myAddPower
Definition: uiDetonationParametersConfigurationWidget.h:138
QVBoxLayout * myDataLayout
Definition: uiDetonationParametersConfigurationWidget.h:153
A readable/writable list of detonation powers listed by type.
Definition: powerRangeDeterminantList.h:18
Add the ability to set decimals to cursor text.
Definition: plotPicker.h:10
bool myIgnoreNextMouseMove
Definition: uiDetonationParametersConfigurationWidget.h:165
QLineEdit * mySingleLineEdit
Definition: uiDetonationParametersConfigurationWidget.h:149
bool myCanMoveWithMouse
Definition: uiDetonationParametersConfigurationWidget.h:164
QWidget * myPowerCanvas
Definition: uiDetonationParametersConfigurationWidget.h:133
DtMunitionDetonationPowerEntry.
Definition: munitionDetonationPowerEntry.h:19
QwtPlot * myGraph
Definition: uiDetonationParametersConfigurationWidget.h:132
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
virtual void setEnabled(bool)
If this item is not enabled it cannot be modified.
A readable/writable object that indicates the power of a detonation of a given type directly at the p...
Definition: powerDirectDeterminant.h:17
QHBoxLayout * myTableButtons
Definition: uiDetonationParametersConfigurationWidget.h:151
The DtUiElement class is the base for which all UI elements are defined.
Definition: uiElement.h:92
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
QWidget * mySingleLineCanvas
Definition: uiDetonationParametersConfigurationWidget.h:147
QTableWidget * myGraphData
Definition: uiDetonationParametersConfigurationWidget.h:157
A readable/writable object that indicates the power of a detonation of a given type as a function of ...
Definition: powerRangeEquivalentTntDeterminant.h:20
DtPlotPicker * myPlotPicker
Definition: uiDetonationParametersConfigurationWidget.h:134
QPushButton * myRemovePower
Definition: uiDetonationParametersConfigurationWidget.h:139
Definition: uiDetonationParametersConfigurationWidget.h:42
QWidget * myButtonLine
Definition: uiDetonationParametersConfigurationWidget.h:158
bool myMoveRange
Definition: uiDetonationParametersConfigurationWidget.h:166
QwtPlotCurve * myPlotLine
Definition: uiDetonationParametersConfigurationWidget.h:135
std::vector< int > myRangeColumns
Definition: uiDetonationParametersConfigurationWidget.h:167
int mySelectedRange
Definition: uiDetonationParametersConfigurationWidget.h:163
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:32
Base class of the ui element class chain.
Definition: uiElement.h:169
QPushButton * myAssignAsAttacker
Definition: uiDetonationParametersConfigurationWidget.h:142
static QColor thePlotLineColor
Definition: uiDetonationParametersConfigurationWidget.h:160

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)