VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pitchEntryWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
7 
8 #pragma once
9 
11 #include <boost/signals2.hpp>
12 
15 
16 class QLineEdit;
17 class QDoubleValidator;
18 class QHBoxLayout;
19 
20 namespace makVrf
21 {
24  {
25  Q_OBJECT
26 
27  public:
28  DtPitchEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
29 
30  //DTOR
31  virtual ~DtPitchEntryWidget() override;
32 
35  virtual void setLabel(const QString&) override;
36  virtual QString label() const override;
37 
42  virtual void setRange(double bottom, double top) override;
43 
45  virtual void setDefaultValue(const std::string&) override;
46 
48 
50  virtual double pitch() const;
51 
53  virtual void setPitch(double);
54 
56  virtual DtReaderWriter* createBoundVariable(const std::string& variableName) override;
57 
59  virtual void setupFromBoundVariable(const DtReaderWriter* variableName) override;
60  virtual void setupFrom(const std::set<makVrv::DtUniqueID>& data) override;
61 
64  virtual DtTaskSetVariableWidgetExtensionInterface* parameterContents(
65  QWidget* parent, const Qt::WindowFlags& flags = 0) const override;
66 
68  {
69  return makVrv::DtUnicode::tr("Real Unit: radian");
70  }
71 
73  boost::signals2::signal<void ()> signal_changed;
74 
75  static std::string designerGroup()
76  {
77  return tr("VR-Forces Entity Manipulation").toUtf8().constData();
78  }
79 
80  static std::string headerFile()
81  {
82  return tr("<vrfGuiDataEntryWidgets/PitchEntryWidget.h>").toUtf8().constData();
83  }
84 
85  static std::string variableName()
86  {
87  return tr("Pitch").toUtf8().constData();
88  }
89 
90  protected slots:
91  virtual void onPitchChanged();
92 
93  protected:
94 
98  virtual void slot_onUnitChanged(const makVrv::DtUnicode& category, const makVrv::DtUnicode& type, int from, int old);
99 
102  virtual void slot_displayUnitDecimalsChanged(const makVrv::DtUnicode& category, const makVrv::DtUnicode& type);
103 
106  virtual void refreshLabels();
107 
109  virtual void selectionChanged(const std::set<makVrv::DtUniqueID>& oldSelection) override;
110 
112  virtual void updateDecimalsDisplay() override;
113 
114  public:
116  virtual void setRangeTop(double) override;
117  virtual void setRangeBottom(double) override;
118 
119  virtual double rangeTop() const override;
120  virtual double rangeBottom() const override;
121 
122  protected:
123  QString myLabelText;
124  };
125 
129  {
130  Q_OBJECT
131 
132  public:
133  DtPitchEntryVariableWidgetExtension(makVrv::DtDe&, QWidget* w, const Qt::WindowFlags& f = 0);
134  virtual ~DtPitchEntryVariableWidgetExtension() override;
135 
136  virtual int setFrom(const DtScriptedTaskVariable&, QGridLayout* parentLayout, int startRow) override;
137  virtual void setTo(DtScriptedTaskVariable&) const override;
138 
139  virtual void setReadOnly(bool) override;
140 
141  public:
148  };
149 
151 }
QLabel * myInitializeFromStatePropertyLabel
Definition: pitchEntryWidget.h:144
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
DtPitchEntryWidget * myRangeTop
Definition: pitchEntryWidget.h:147
CreationFlags
Definition: taskSetVariableWidget.h:118
QCheckBox * myInitializeFromStatePropertyEnabled
Definition: pitchEntryWidget.h:143
Definition: readerWriter.h:85
DtPitchEntryWidget * myDefaultValue
Definition: pitchEntryWidget.h:142
Contains the DtUnitConverterCollection class declaration.
static std::string designerGroup()
Definition: pitchEntryWidget.h:75
Definition: simpleVariableWidget.h:314
static std::string variableName()
Definition: pitchEntryWidget.h:85
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
boost::signals2::signal< void()> signal_changed
Signal sent when Pitch has changed.
Definition: pitchEntryWidget.h:73
A class for keeping track of meta data for variables of scripted tasks. The information is currently ...
Definition: scriptedTaskVariable.h:34
DtTaskSetVariableWidgetCreator< DtPitchEntryWidget > DtPitchEntryWidgetCreator
Definition: pitchEntryWidget.h:150
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
QLineEdit * myInitializeFromStateProperty
Definition: pitchEntryWidget.h:145
QString myLabelText
Definition: pitchEntryWidget.h:123
Extension widget which simply contains three Pitch variable widgets to allow for reuse of existing cl...
Definition: pitchEntryWidget.h:128
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 makVrv::DtUnicode codeVariableType()
Definition: pitchEntryWidget.h:67
Simple line text entry widget that will allow the user to enter a Pitch value.
Definition: pitchEntryWidget.h:23
static std::string headerFile()
Definition: pitchEntryWidget.h:80
Extension interface for contents for definition of variables in the scripted task meta data variable ...
Definition: taskSetVariableWidget.h:83
DtPitchEntryWidget * myRangeBottom
Definition: pitchEntryWidget.h:146

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)