VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
smallRangeEntryWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 #include <boost/signals2.hpp>
15 
19 
20 class QLineEdit;
21 class QDoubleValidator;
22 class QHBoxLayout;
23 
24 namespace makVrf
25 {
28  {
29  Q_OBJECT
30 
31  public:
32  DtSmallRangeEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
33 
34  //DTOR
35  virtual ~DtSmallRangeEntryWidget();
36 
39  virtual void setLabel(const QString&);
40  virtual QString label() const;
41 
46  virtual void setRange(double bottom, double top);
47 
49  virtual void setDefaultValue(const std::string&);
51 
53  virtual double range() const;
54 
56  virtual void setRange(double);
57 
59  virtual DtReaderWriter* createBoundVariable(const std::string& variableName);
60 
62  virtual void setupFromBoundVariable(const DtReaderWriter* variableName);
63 
66  virtual DtTaskSetVariableWidgetExtensionInterface* parameterContents(QWidget* parent, const Qt::WindowFlags& flags = 0) const;
67 
69  virtual void setChangeWithDisplaySettings(bool);
70  virtual void setDisplayUnits(makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits units);
71 
73  {
74  return makVrv::DtUnicode::tr("Real Unit: meters");
75  }
76 
77  boost::signals2::signal<void ()> signal_changed;
78 
81  virtual void refreshLabels();
82 
83  static std::string designerGroup()
84  {
85  return tr("VR-Forces Entity Manipulation").toUtf8().constData();
86  }
87 
88  static std::string headerFile()
89  {
90  return tr("<vrfGuiDataEntryWidgets/rangeEntryWidget.h>").toUtf8().constData();
91  }
92 
93  static std::string variableName()
94  {
95  return tr("range").toUtf8().constData();
96  }
97 
98  protected:
99 
103  virtual void slot_onUnitChanged(const makVrv::DtUnicode& category, const makVrv::DtUnicode& type, int from, int old);
104 
107  virtual void slot_displayUnitDecimalsChanged(const makVrv::DtUnicode& category, const makVrv::DtUnicode& type);
108 
110  virtual void updateDecimalsDisplay();
111 
112  virtual double convertDistanceUnitNativeToDisplay(double d) const;
113  virtual double convertDistanceUnitDisplayToNative(double d, const makVrv::DtSelectionManager::IdSet& idSet = makVrv::DtSelectionManager::IdSet()) const;
114  virtual std::string convertDistanceUnitNativeToDisplayString(double d) const;
115 
116  protected slots:
117  virtual void onRangeChanged();
118 
119  protected:
120  QString myLabelText;
123  };
124 
128  {
129  Q_OBJECT
130 
131  public:
132  DtSmallRangeEntryVariableWidgetExtension(makVrv::DtDe&, QWidget* w, const Qt::WindowFlags& f = 0);
134 
135  virtual int setFrom(const DtScriptedTaskVariable&, QGridLayout* parentLayout, int startRow);
136  virtual void setTo(DtScriptedTaskVariable&) const;
137 
138  virtual void setReadOnly(bool);
139 
140  public:
144  };
145 
147 }
static std::string variableName()
Definition: smallRangeEntryWidget.h:93
boost::signals2::signal< void()> signal_changed
Definition: smallRangeEntryWidget.h:77
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
bool myChangeWithDisplaySettings
Definition: smallRangeEntryWidget.h:122
CreationFlags
Definition: taskSetVariableWidget.h:118
static makVrv::DtUnicode codeVariableType()
Definition: smallRangeEntryWidget.h:72
Simple line text entry widget that will allow the user to enter a small range value.
Definition: smallRangeEntryWidget.h:27
DtSmallRangeEntryWidget * myDefaultValue
Definition: smallRangeEntryWidget.h:141
Contains makVrv:DtSelectionManager class.
Definition: readerWriter.h:85
Contains the DtUnitConverterCollection class declaration.
DtTaskSetVariableWidgetCreator< DtSmallRangeEntryWidget > DtSmallRangeEntryWidgetCreator
Definition: smallRangeEntryWidget.h:146
static std::string headerFile()
Definition: smallRangeEntryWidget.h:88
DistanceUnits
Enumeration of the different distance units.
Definition: DtDisplayUnitsSettingsRecord.h:56
Definition: simpleVariableWidget.h:281
static DtUnicode tr(const char *ascii)
Ascii translation function, used to be compatible with Qt&#39;s translation tools. This will simply call ...
Definition: DtUnicode.h:92
Definition: taskSetVariableWidget.h:419
A class for keeping track of meta data for variables of scripted tasks. The information is currently ...
Definition: scriptedTaskVariable.h:34
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
makArchives::DtDisplayUnitsSettingsRecord::DistanceUnits myDistanceUnits
Definition: smallRangeEntryWidget.h:121
QString myLabelText
Definition: smallRangeEntryWidget.h:120
Extension widget which simply contains three Range variable widgets to allow for reuse of existing cl...
Definition: smallRangeEntryWidget.h:127
DtSmallRangeEntryWidget * myRangeBottom
Definition: smallRangeEntryWidget.h:142
static std::string designerGroup()
Definition: smallRangeEntryWidget.h:83
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
Extension interface for contents for definition of variables in the scripted task meta data variable ...
Definition: taskSetVariableWidget.h:83
std::set< DtUniqueID > IdSet
Definition: DtSelectionManager.h:32
DtSmallRangeEntryWidget * myRangeTop
Definition: smallRangeEntryWidget.h:143

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)