VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
uiRealElement.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2013 MaK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 
8 
9 #pragma once
10 
13 
14 class QDoubleValidator;
15 
19 {
20  Q_OBJECT
21 
22 public:
23 
26 
28  virtual ~DtUiRealElement();
29 
30  virtual void setFromParameters(const std::vector<DtReaderWriter*>& parentRw);
31 
33 
36  virtual int decimalPlaces() const;
37  virtual void setDecimalPlaces(int num);
39 
41  virtual void setValue(double);
42  virtual double value() const;
43 
44  virtual void elementChanged();
45 
46 protected:
47  virtual void createControls(QWidget*);
48  virtual void decorateElement();
49 
50  virtual DtString sourceValueToDisplayLabel(const double source, bool* foundDisplayValue = NULL) const;
51  virtual double displayLabelToSourceValue(const DtString& display, bool* foundSourceValue = NULL) const;
52  virtual void processUiEvent(const DtUiElementEvent& e);
53 
54 protected slots:
55  virtual void recalculateAsRestOf();
56  virtual void revertButtonClicked();
57 
58 public:
59  QDoubleValidator* myValidator;
60 
61 protected:
63  typedef std::map<DtString, double> DisplayLabelToSourceValueMap;
66 };
DisplayLabelToSourceValueMap myDisplayToSourceValues
Definition: uiRealElement.h:64
bool myIsLineEdit
Definition: uiRealElement.h:62
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.
virtual void processUiEvent(const DtUiElementEvent &)
Process ui event. Default does nothing.
Definition: uiElement.h:223
boost::function< DtUiElement *(makVrv::DtDe &)> CreatorFunction
Definition: uiElement.h:177
virtual void elementChanged()
QDoubleValidator * myValidator
Definition: uiRealElement.h:59
virtual void decorateElement()
Sets element decoration depending on the isModified state of the element.
std::map< DtString, double > DisplayLabelToSourceValueMap
Definition: uiRealElement.h:63
For validation, add lower_bound and upper_bound and decimals properties to set a lower and upper boun...
Definition: uiRealElement.h:18
For validation, add lower_bound and upper_bound properties to set a lower and upper bound...
Definition: uiMapAwareElement.h:18
const char * source
Definition: lz4.h:442
The DtUiElement class is the base for which all UI elements are defined.
Definition: uiElement.h:95
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
#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:172
int myDecimalPlaces
Definition: uiRealElement.h:65

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)