VR-Forces 4.10 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  virtual void revertButtonClicked();
52 
53 protected:
54  QIntValidator* myValidator;
55 
58 
59  typedef std::map<DtString, int> DisplayLabelToSourceValueMap;
61 };
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()
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:57
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:59
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
QIntValidator * myValidator
Definition: uiIntegerElement.h:54
DisplayLabelToSourceValueMap myDisplayToSourceValues
Definition: uiIntegerElement.h:60
#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

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)