VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
angleEntryWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 
17 #include <boost/signals2.hpp>
18 
19 class QLineEdit;
20 class QDoubleValidator;
21 class QHBoxLayout;
22 
23 namespace makVrf
24 {
27  {
28  Q_OBJECT
29 
30  public:
31  DtAngleEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
32 
33  //DTOR
34  virtual ~DtAngleEntryWidget() override;
35 
38  virtual void setLabel(const QString&) override;
39  virtual QString label() const override;
40 
45  virtual void setRange(double bottom, double top) override;
46 
48  virtual void setDefaultValue(const std::string&) override;
49 
51 
53  virtual double angle() const;
54 
56  virtual void setAngle(double);
57 
59  virtual DtReaderWriter* createBoundVariable(const std::string& variableName) override;
60 
62  virtual void setupFromBoundVariable(const DtReaderWriter* variableName) override;
63  virtual void setupFrom(const std::set<makVrv::DtUniqueID>& data) override;
64 
67  virtual DtTaskSetVariableWidgetExtensionInterface* parameterContents(
68  QWidget* parent, const Qt::WindowFlags& flags = 0) const override;
69 
71  virtual void setIsAngleEntry(bool);
72  bool isAngleEntry() const;
73 
75  {
76  return makVrv::DtUnicode::tr("Real Unit: radian");
77  }
78 
79  virtual void setUseCompassFormatting(bool);
80  bool useCompassFormatting() const
81  {
82  return myUseCompassFormatting;
83  }
84 
86  boost::signals2::signal<void ()> signal_changed;
87 
88  static std::string designerGroup()
89  {
90  return tr("VR-Forces Entity Manipulation").toUtf8().constData();
91  }
92 
93  static std::string headerFile()
94  {
95  return tr("<vrfGuiDataEntryWidgets/headingEntryWidget.h>").toUtf8().constData();
96  }
97 
98  static std::string variableName()
99  {
100  return tr("heading").toUtf8().constData();
101  }
102 
103  virtual void setVariableData(const QString&) override;
104 
105  protected slots:
106  virtual void onHeadingChanged();
107 
108  protected:
109 
113  virtual void slot_onUnitChanged(const makVrv::DtUnicode& category, const makVrv::DtUnicode& type, int from, int old);
114 
117  virtual void slot_displayUnitDecimalsChanged(const makVrv::DtUnicode& category, const makVrv::DtUnicode& type);
118 
121  virtual void refreshLabels();
122 
124  virtual void updateDecimalsDisplay() override;
125 
126  public:
128  virtual void setRangeTop(double) override;
129  virtual void setRangeBottom(double) override;
130 
131  virtual double rangeTop() const override;
132  virtual double rangeBottom() const override;
133 
134  protected:
135  QString myLabelText;
136  bool myIsAngleEntry = false;
138  };
139 
143  {
144  Q_OBJECT
145 
146  public:
147  DtAngleEntryVariableWidgetExtension(makVrv::DtDe&, QWidget* w, const Qt::WindowFlags& f = 0);
148  virtual ~DtAngleEntryVariableWidgetExtension() override;
149 
150  virtual int setFrom(const DtScriptedTaskVariable&, QGridLayout* parentLayout, int startRow) override;
151  virtual void setTo(DtScriptedTaskVariable&) const override;
152 
153  virtual void setReadOnly(bool) override;
154 
155  protected slots:
156  virtual void isAngleEntryToggled();
157 
158  public:
166  };
167 
169 }
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
static std::string variableName()
Definition: angleEntryWidget.h:98
DtAngleEntryWidget * myRangeBottom
Definition: angleEntryWidget.h:164
Definition: readerWriter.h:85
DtTaskSetVariableWidgetCreator< DtAngleEntryWidget > DtAngleEntryWidgetCreator
Definition: angleEntryWidget.h:168
static std::string designerGroup()
Definition: angleEntryWidget.h:88
Contains the DtUnitConverterCollection class declaration.
static std::string headerFile()
Definition: angleEntryWidget.h:93
bool myUseCompassFormatting
Definition: angleEntryWidget.h:137
Definition: simpleVariableWidget.h:314
QCheckBox * myInitializeFromStatePropertyEnabled
Definition: angleEntryWidget.h:161
bool useCompassFormatting() const
Definition: angleEntryWidget.h:80
QLineEdit * myInitializeFromStateProperty
Definition: angleEntryWidget.h:163
Simple line text entry widget that will allow the user to enter a heading value.
Definition: angleEntryWidget.h:26
DT_DLL_vrfutil double angle(double vec1[3], double vec2[3])
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:422
Extension widget which simply contains three heading variable widgets to allow for reuse of existing ...
Definition: angleEntryWidget.h:142
A class for keeping track of meta data for variables of scripted tasks. The information is currently ...
Definition: scriptedTaskVariable.h:34
static makVrv::DtUnicode codeVariableType()
Definition: angleEntryWidget.h:74
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
DtAngleEntryWidget * myRangeTop
Definition: angleEntryWidget.h:165
QCheckBox * myIsAngleEntry
Definition: angleEntryWidget.h:160
QString myLabelText
Definition: angleEntryWidget.h:135
boost::signals2::signal< void()> signal_changed
Signal sent when heading has changed.
Definition: angleEntryWidget.h:86
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
Extension interface for contents for definition of variables in the scripted task meta data variable ...
Definition: taskSetVariableWidget.h:83
DtAngleEntryWidget * myDefaultValue
Definition: angleEntryWidget.h:159
QLabel * myInitializeFromStatePropertyLabel
Definition: angleEntryWidget.h:162

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)