VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
uiIntegerElement.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 #include <readerWriter/rwInt.h>
14 
15 class QIntValidator;
16 class QLineEdit;
17 
20 {
21  Q_OBJECT
22 
23 public:
24 
27 
29  virtual ~DtUiIntegerElement();
30 
32 
34  virtual void setValue(int);
35  virtual int value() const;
36 
37 protected:
38  virtual void createControls(QWidget*);
39  virtual void decorateElement();
40 
41 protected:
42  virtual void setFromParameters(const std::vector<DtReaderWriter*>& parentRw);
43  virtual void elementChanged();
44 
45  virtual DtString sourceValueToDisplayLabel(const int source, bool* foundDisplayValue = NULL) const;
46  virtual int displayLabelToSourceValue(const DtString& display, bool* foundSourceValue = NULL) const;
47  virtual void processUiEvent(const DtUiElementEvent& e);
48 
49 protected slots:
50  virtual void recalculateAsRestOf();
51 
52 protected:
53  QIntValidator* myValidator;
54 
57 
58  typedef std::map<DtString, int> DisplayLabelToSourceValueMap;
60 };
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:220
boost::function< DtUiElement *(makVrv::DtDe &)> CreatorFunction
Definition: uiElement.h:174
virtual void elementChanged()
virtual void decorateElement()
Sets element decoration depending on the isModified state of the element.
bool myIsLineEdit
True if this string element uses a line edit, false if combo box.
Definition: uiIntegerElement.h:56
For validation, add lower_bound and upper_bound properties to set a lower and upper bound...
Definition: uiIntegerElement.h:19
For validation, add lower_bound and upper_bound properties to set a lower and upper bound...
Definition: uiMapAwareElement.h:18
std::map< DtString, int > DisplayLabelToSourceValueMap
Definition: uiIntegerElement.h:58
const char * source
Definition: lz4.h:436
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
QIntValidator * myValidator
Definition: uiIntegerElement.h:53
DisplayLabelToSourceValueMap myDisplayToSourceValues
Definition: uiIntegerElement.h:59
#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

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)