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 
17 namespace makVrf
18 {
19  class DtSmallRangeEntryWidget;
20 
26  {
27  Q_OBJECT
28 
29  Q_PROPERTY(QString xLabel READ xLabel WRITE setXLabel)
30  Q_PROPERTY(QString yLabel READ yLabel WRITE setYLabel)
31  Q_PROPERTY(QString zLabel READ zLabel WRITE setZLabel)
32 
33  public:
34  DtOffsetLocationEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
35 
36  //DTOR
37  virtual ~DtOffsetLocationEntryWidget();
38 
40  virtual void setLabel(const std::string&);
41 
44  virtual void setXLabel(const QString&);
45  virtual QString xLabel() const;
46 
47  virtual void setYLabel(const QString&);
48  virtual QString yLabel() const;
49 
50  virtual void setZLabel(const QString&);
51  virtual QString zLabel() const;
53 
57  virtual void setRange(double bottom, double top);
58 
60  virtual void setDefaultValue(const std::string&);
61 
64  virtual void setVariableData(const QString&);
66 
68  virtual double x() const;
69 
71  virtual double y() const;
72 
74  virtual double z() const;
75 
77  virtual void setX(double);
78 
80  virtual void setY(double);
81 
83  virtual void setZ(double);
84 
86  virtual DtReaderWriter* createBoundVariable(const std::string& variableName);
87 
89  virtual void setupFromBoundVariable(const DtReaderWriter* variableName);
90 
93  virtual DtTaskSetVariableWidgetExtensionInterface* parameterContents(QWidget* parent, const Qt::WindowFlags& flags = 0) const;
94 
95  static makVrv::DtUnicode codeVariableType()
96  {
97  return makVrv::DtUnicode::tr("VectorOffset3D");
98  }
99 
100  static std::string designerGroup()
101  {
102  return tr("VR-Forces Entity Manipulation").toUtf8().constData();
103  }
104 
105  static std::string headerFile()
106  {
107  return tr("<vrfGuiDataEntryWidgets/offsetLocationEntryWidget.h>").toUtf8().constData();
108  }
109 
110  static std::string variableName()
111  {
112  return tr("offsetLocation").toUtf8().constData();
113  }
114 
115  virtual void setTopLabelIsCheckable(bool b);
116 
117  protected:
118  virtual void topLabelCheckStateChanged();
119  virtual void adjustLabelSizes();
120  virtual std::string variableDataFromUiDesigner(const QDomElement& element, const DtScriptedTaskVariableLayoutConverter& converter) const;
121 
123  virtual void selectionChanged(const std::set<makVrv::DtUniqueID>& oldSelection);
124 
125  public:
126  QGridLayout* myGridLayout;
127  QWidget* myCanvas;
131  };
132 
136  {
137  Q_OBJECT
138 
139  public:
140  DtOffsetLocationEntryWidgetExtension(makVrv::DtDe&, QWidget* w, const Qt::WindowFlags& f = 0);
142 
143  virtual int setFrom(const DtScriptedTaskVariable&, QGridLayout* parentLayout, int startRow);
144  virtual void setTo(DtScriptedTaskVariable&) const;
145 
146  virtual void setReadOnly(bool);
147 
148  public:
152  };
153 
155 }
DtSmallRangeEntryWidget * myZ
Definition: offsetLocationEntryWidget.h:130
DtSmallRangeEntryWidget * myX
Definition: offsetLocationEntryWidget.h:128
CreationFlags
Definition: taskSetVariableWidget.h:119
QWidget * myCanvas
Definition: offsetLocationEntryWidget.h:127
DtSmallRangeEntryWidget * myRangeBottom
Definition: offsetLocationEntryWidget.h:150
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 * myDefaultValue
Definition: offsetLocationEntryWidget.h:149
DtSmallRangeEntryWidget * myY
Definition: offsetLocationEntryWidget.h:129
Basic implementation that has a label at the top.
Definition: taskSetVariableWidget.h:233
static std::string headerFile()
Definition: offsetLocationEntryWidget.h:105
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:135
Definition: taskSetVariableWidget.h:426
DtSmallRangeEntryWidget * myRangeTop
Definition: offsetLocationEntryWidget.h:151
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:110
DtTaskSetVariableWidgetCreator< DtOffsetLocationEntryWidget > DtOffsetLocationEntryWidgetCreator
Definition: offsetLocationEntryWidget.h:154
QGridLayout * myGridLayout
Definition: offsetLocationEntryWidget.h:126
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:72
static std::string designerGroup()
Definition: offsetLocationEntryWidget.h:100
Extension interface for contents for definition of variables in the scripted task meta data variable ...
Definition: taskSetVariableWidget.h:84
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:25

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)