VR-Forces 5.0.3 Developer's Guide
 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 class QToolButton;
18 
21 {
22  Q_OBJECT
23 
24 public:
25 
28 
30  virtual ~DtUiIntegerElement();
31 
33 
35  virtual void setValue(int);
36  virtual int value() const;
37 
38 protected:
39  virtual void createControls(QWidget*);
40  virtual void decorateElement();
41 
42 protected:
43  virtual void setFromParameters(const std::vector<DtReaderWriter*>& parentRw);
44  virtual void elementChanged();
45 
46  virtual DtString sourceValueToDisplayLabel(const int source, bool* foundDisplayValue = NULL) const;
47  virtual int displayLabelToSourceValue(const DtString& display, bool* foundSourceValue = NULL) const;
48  virtual void processUiEvent(const DtUiElementEvent& e);
49 
50 protected slots:
51  virtual void recalculateAsRestOf();
52  virtual void revertButtonClicked();
53 
54 protected:
55  QIntValidator* myValidator;
56 
59 
60  typedef std::map<DtString, int> DisplayLabelToSourceValueMap;
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:231
boost::function< DtUiElement *(makVrv::DtDe &)> CreatorFunction
Definition: uiElement.h:185
virtual void elementChanged()
virtual void decorateElement()
Sets element decoration depending on the isModified state of the element. This version changes myLabe...
bool myIsLineEdit
True if this string element uses a line edit, false if combo box.
Definition: uiIntegerElement.h:58
For validation, add lower_bound and upper_bound properties to set a lower and upper bound...
Definition: uiIntegerElement.h:20
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:60
const char * source
Definition: lz4.h:442
The DtUiElement class is the base for which all UI elements are defined. If you wish to create a new ...
Definition: uiElement.h:97
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:70
QIntValidator * myValidator
Definition: uiIntegerElement.h:55
DisplayLabelToSourceValueMap myDisplayToSourceValues
Definition: uiIntegerElement.h:61
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:33
Base class of the ui element class chain. Properties available through designer for all ui elements a...
Definition: uiElement.h:180

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)