VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
offsetLocationEntryWidget.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 
15 class QGridLayout;
16 class QLineEdit;
17 class QLabel;
18 
19 namespace makVrf
20 {
21  class DtSmallRangeEntryWidget;
22 
28  {
29  Q_OBJECT
30 
31  Q_PROPERTY(QString xLabel READ xLabel WRITE setXLabel)
32  Q_PROPERTY(QString yLabel READ yLabel WRITE setYLabel)
33  Q_PROPERTY(QString zLabel READ zLabel WRITE setZLabel)
34 
35  public:
36  DtOffsetLocationEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
37 
38  //DTOR
39  virtual ~DtOffsetLocationEntryWidget() override;
40 
42  virtual void setLabel(const std::string&) override;
43 
46  virtual void setXLabel(const QString&);
47  virtual QString xLabel() const;
48 
49  virtual void setYLabel(const QString&);
50  virtual QString yLabel() const;
51 
52  virtual void setZLabel(const QString&);
53  virtual QString zLabel() const;
55 
59  virtual void setRange(double bottom, double top) override;
60 
62  virtual void setDefaultValue(const std::string&) override;
63 
66  virtual void setVariableData(const QString&) override;
68 
70  virtual double x() const;
71 
73  virtual double y() const;
74 
76  virtual double z() const;
77 
79  virtual void setX(double);
80 
82  virtual void setY(double);
83 
85  virtual void setZ(double);
86 
88  virtual DtReaderWriter* createBoundVariable(const std::string& variableName) override;
89 
91  virtual void setupFromBoundVariable(const DtReaderWriter* variableName) override;
92 
95  virtual DtTaskSetVariableWidgetExtensionInterface* parameterContents(
96  QWidget* parent, const Qt::WindowFlags& flags = 0) const override;
97 
98  static makVrv::DtUnicode codeVariableType()
99  {
100  return makVrv::DtUnicode::tr("VectorOffset3D");
101  }
102 
103  static std::string designerGroup()
104  {
105  return tr("VR-Forces Entity Manipulation").toUtf8().constData();
106  }
107 
108  static std::string headerFile()
109  {
110  return tr("<vrfGuiDataEntryWidgets/offsetLocationEntryWidget.h>").toUtf8().constData();
111  }
112 
113  static std::string variableName()
114  {
115  return tr("offsetLocation").toUtf8().constData();
116  }
117 
118  virtual void setTopLabelIsCheckable(bool b) override;
119 
120  protected:
121  virtual void topLabelCheckStateChanged() override;
122  virtual void adjustLabelSizes();
123  virtual std::string variableDataFromUiDesigner(
124  const QDomElement& element, const DtScriptedTaskVariableLayoutConverter& converter) const override;
125 
127  virtual void selectionChanged(const std::set<makVrv::DtUniqueID>& oldSelection) override;
128 
129  public:
130  QGridLayout* myGridLayout;
131  QWidget* myCanvas;
135  };
136 
140  {
141  Q_OBJECT
142 
143  public:
144  DtOffsetLocationEntryWidgetExtension(makVrv::DtDe&, QWidget* w, const Qt::WindowFlags& f = 0);
145  virtual ~DtOffsetLocationEntryWidgetExtension() override;
146 
147  virtual int setFrom(const DtScriptedTaskVariable&, QGridLayout* parentLayout, int startRow) override;
148  virtual void setTo(DtScriptedTaskVariable&) const override;
149 
150  virtual void setReadOnly(bool) override;
151 
152  public:
157  };
158 
160 }
DtSmallRangeEntryWidget * myZ
Definition: offsetLocationEntryWidget.h:134
DtSmallRangeEntryWidget * myX
Definition: offsetLocationEntryWidget.h:132
CreationFlags
Definition: taskSetVariableWidget.h:118
QWidget * myCanvas
Definition: offsetLocationEntryWidget.h:131
DtSmallRangeEntryWidget * myRangeBottom
Definition: offsetLocationEntryWidget.h:155
Simple line text entry widget that will allow the user to enter a small range value.
Definition: smallRangeEntryWidget.h:27
This class will parse the UI file for known scripted task variable types and pull out specified scrip...
Definition: scriptedTaskVariableLayoutConverter.h:32
Definition: readerWriter.h:85
DtSmallRangeEntryWidget * myY
Definition: offsetLocationEntryWidget.h:133
Basic implementation that has a label at the top.
Definition: taskSetVariableWidget.h:231
static std::string headerFile()
Definition: offsetLocationEntryWidget.h:108
QLineEdit * myDefaultValue
Definition: offsetLocationEntryWidget.h:154
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
Extension widget which simply contains three Range variable widgets to allow for reuse of existing cl...
Definition: offsetLocationEntryWidget.h:139
Definition: taskSetVariableWidget.h:422
DtSmallRangeEntryWidget * myRangeTop
Definition: offsetLocationEntryWidget.h:156
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
static std::string variableName()
Definition: offsetLocationEntryWidget.h:113
DtTaskSetVariableWidgetCreator< DtOffsetLocationEntryWidget > DtOffsetLocationEntryWidgetCreator
Definition: offsetLocationEntryWidget.h:159
QGridLayout * myGridLayout
Definition: offsetLocationEntryWidget.h:130
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
QLabel * myDefaultValueLabel
Definition: offsetLocationEntryWidget.h:153
static std::string designerGroup()
Definition: offsetLocationEntryWidget.h:103
Extension interface for contents for definition of variables in the scripted task meta data variable ...
Definition: taskSetVariableWidget.h:83
A collection of 3 range widgets for x, y and z offsets (in meters). It is up to the user of this widg...
Definition: offsetLocationEntryWidget.h:27

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)