VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
depthEntryWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 
17 
18 class QLineEdit;
19 class QDoubleValidator;
20 class QHBoxLayout;
21 
22 namespace makVrf
23 {
26  {
27  Q_OBJECT
28 
29  public:
30  DtDepthEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
31 
32  //DTOR
33  virtual ~DtDepthEntryWidget() override;
34 
37  virtual void setLabel(const QString&) override;
38  virtual QString label() const override;
39 
44  virtual void setRange(double bottom, double top) override;
45 
47  virtual void setDefaultValue(const std::string&) override;
48 
50 
52  virtual double depth() const;
53 
56  virtual void setDepth(double);
57 
59  virtual DtReaderWriter* createBoundVariable(const std::string& variableName) override;
60 
62  virtual void setupFromBoundVariable(const DtReaderWriter* variableName) override;
63 
66  virtual DtTaskSetVariableWidgetExtensionInterface* parameterContents(
67  QWidget* parent, const Qt::WindowFlags& flags = 0) const override;
68 
70  {
71  return makVrv::DtUnicode::tr("Real Unit: meters");
72  }
73 
74  static std::string designerGroup()
75  {
76  return tr("VR-Forces Position Entry").toUtf8().constData();
77  }
78 
79  static std::string headerFile()
80  {
81  return tr("<vrfGuiDataEntryWidgets/depthEntryWidget.h>").toUtf8().constData();
82  }
83 
84  static std::string variableName()
85  {
86  return tr("depth").toUtf8().constData();
87  }
88 
89  protected:
90 
94  virtual void slot_onUnitChanged(const makVrv::DtUnicode&, const makVrv::DtUnicode&, int from, int old);
95 
98  virtual void slot_displayUnitDecimalsChanged(const makVrv::DtUnicode&, const makVrv::DtUnicode&);
99 
102  virtual void refreshLabels();
103 
105  virtual void selectionChanged(const std::set<makVrv::DtUniqueID>& oldSelection) override;
106 
108  virtual void updateDecimalsDisplay() override;
109 
110  protected:
111  QString myLabelText;
112  };
113 
117  {
118  Q_OBJECT
119 
120  public:
121  DtDepthEntryVariableWidgetExtension(makVrv::DtDe&, QWidget* w, const Qt::WindowFlags& f = 0);
122  virtual ~DtDepthEntryVariableWidgetExtension() override;
123 
124  virtual int setFrom(const DtScriptedTaskVariable&, QGridLayout* parentLayout, int startRow) override;
125  virtual void setTo(DtScriptedTaskVariable&) const override;
126 
127  virtual void setReadOnly(bool) override;
128 
129  public:
136  };
137 
139 }
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
CreationFlags
Definition: taskSetVariableWidget.h:118
QString myLabelText
Definition: depthEntryWidget.h:111
Simple line text entry widget that will allow the user to enter a depth value.
Definition: depthEntryWidget.h:25
Definition: readerWriter.h:85
DtTaskSetVariableWidgetCreator< DtDepthEntryWidget > DtDepthEntryWidgetCreator
Definition: depthEntryWidget.h:138
Contains the DtUnitConverterCollection class declaration.
QLineEdit * myInitializeFromStateProperty
Definition: depthEntryWidget.h:133
static makVrv::DtUnicode codeVariableType()
Definition: depthEntryWidget.h:69
Definition: simpleVariableWidget.h:314
Extension widget which simply contains three depth variable widgets to allow for reuse of existing cl...
Definition: depthEntryWidget.h:116
static std::string variableName()
Definition: depthEntryWidget.h:84
DtDepthEntryWidget * myRangeTop
Definition: depthEntryWidget.h:135
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
static std::string designerGroup()
Definition: depthEntryWidget.h:74
DtDepthEntryWidget * myDefaultValue
Definition: depthEntryWidget.h:130
Definition: taskSetVariableWidget.h:422
QLabel * myInitializeFromStatePropertyLabel
Definition: depthEntryWidget.h:132
DtDepthEntryWidget * myRangeBottom
Definition: depthEntryWidget.h:134
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
QCheckBox * myInitializeFromStatePropertyEnabled
Definition: depthEntryWidget.h:131
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:76
static std::string headerFile()
Definition: depthEntryWidget.h:79
Extension interface for contents for definition of variables in the scripted task meta data variable ...
Definition: taskSetVariableWidget.h:83

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)