VR-Forces 4.10 Class Documentation
 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 
18 
19 class QLineEdit;
20 class QDoubleValidator;
21 class QHBoxLayout;
22 
23 namespace makVrf
24 {
27  {
28  Q_OBJECT
29 
30  public:
31  DtSmallRangeEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
32 
33  //DTOR
34  virtual ~DtSmallRangeEntryWidget();
35 
38  virtual void setLabel(const QString&);
39  virtual QString label() const;
40 
45  virtual void setRange(double bottom, double top);
46 
48  virtual void setDefaultValue(const std::string&);
50 
52  virtual double range() const;
53 
55  virtual void setRange(double);
56 
58  virtual DtReaderWriter* createBoundVariable(const std::string& variableName);
59 
61  virtual void setupFromBoundVariable(const DtReaderWriter* variableName);
62 
65  virtual DtTaskSetVariableWidgetExtensionInterface* parameterContents(QWidget* parent, const Qt::WindowFlags& flags = 0) const;
66 
68  {
69  return makVrv::DtUnicode::tr("Real Unit: meters");
70  }
71 
72  boost::signals2::signal<void ()> signal_changed;
73 
76  virtual void refreshLabels();
77 
78  static std::string designerGroup()
79  {
80  return tr("VR-Forces Entity Manipulation").toUtf8().constData();
81  }
82 
83  static std::string headerFile()
84  {
85  return tr("<vrfGuiDataEntryWidgets/rangeEntryWidget.h>").toUtf8().constData();
86  }
87 
88  static std::string variableName()
89  {
90  return tr("range").toUtf8().constData();
91  }
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 
105  virtual void updateDecimalsDisplay();
106 
107  protected slots:
108  virtual void onRangeChanged();
109 
110  protected:
111  QString myLabelText;
112  };
113 
117  {
118  Q_OBJECT
119 
120  public:
121  DtSmallRangeEntryVariableWidgetExtension(makVrv::DtDe&, QWidget* w, const Qt::WindowFlags& f = 0);
123 
124  virtual int setFrom(const DtScriptedTaskVariable&, QGridLayout* parentLayout, int startRow);
125  virtual void setTo(DtScriptedTaskVariable&) const;
126 
127  virtual void setReadOnly(bool);
128 
129  public:
133  };
134 
136 }
static std::string variableName()
Definition: smallRangeEntryWidget.h:88
boost::signals2::signal< void()> signal_changed
Definition: smallRangeEntryWidget.h:72
A unicode string.
Definition: DtUnicode.h:33
CreationFlags
Definition: taskSetVariableWidget.h:118
static makVrv::DtUnicode codeVariableType()
Definition: smallRangeEntryWidget.h:67
Simple line text entry widget that will allow the user to enter a small range value.
Definition: smallRangeEntryWidget.h:26
DtSmallRangeEntryWidget * myDefaultValue
Definition: smallRangeEntryWidget.h:130
Definition: readerWriter.h:85
Contains the DtUnitConverterCollection class declaration.
DtTaskSetVariableWidgetCreator< DtSmallRangeEntryWidget > DtSmallRangeEntryWidgetCreator
Definition: smallRangeEntryWidget.h:135
static std::string headerFile()
Definition: smallRangeEntryWidget.h:83
Definition: simpleVariableWidget.h:275
static DtUnicode tr(const char *ascii)
Ascii translation function, used to be compatible with Qt&#39;s translation tools.
Definition: DtUnicode.h:92
Definition: taskSetVariableWidget.h:419
A class for keeping track of meta data for variables of scripted tasks.
Definition: scriptedTaskVariable.h:31
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:23
QString myLabelText
Definition: smallRangeEntryWidget.h:111
Extension widget which simply contains three Range variable widgets to allow for reuse of existing cl...
Definition: smallRangeEntryWidget.h:116
DtSmallRangeEntryWidget * myRangeBottom
Definition: smallRangeEntryWidget.h:131
static std::string designerGroup()
Definition: smallRangeEntryWidget.h:78
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
Extension interface for contents for definition of variables in the scripted task meta data variable ...
Definition: taskSetVariableWidget.h:83
DtSmallRangeEntryWidget * myRangeTop
Definition: smallRangeEntryWidget.h:132

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)