VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simpleLabelWidgets.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 
15 #include <QtWidgets/QLabel>
16 
17 namespace makVrf
18 {
19  class DtScriptedTaskEntityTypeDataWidget;
20 
23  {
24  Q_OBJECT
25  public:
26  DtSimpleLabelWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
27 
28  //DTOR
29  virtual ~DtSimpleLabelWidget();
30 
32  virtual void setLabel(const QString&);
33 
34  virtual QString label() const;
35 
37  virtual void setVariableData(const std::string&)
38  {
39  }
40 
42  virtual makVrv::DtUnicode elementDisplayDefault() const;
43 
45  virtual void setDefaultValue(const std::string&)
46  {
47  }
48 
50  virtual void setupFrom(const std::vector<makVrv::DtSimEntry*>& data)
51  {
52  }
53 
55  virtual void setRange(double, double)
56  {
57  }
58 
60  virtual DtReaderWriter* createBoundVariable(const std::string&)
61  {
62  return 0;
63  }
64 
67  {
68  }
69 
71  virtual bool guiElementOnly() const
72  {
73  return true;
74  }
75 
77  virtual bool isValid() const
78  {
79  return true;
80  }
81 
83  {
84  return makVrv::DtUnicode::tr("Label");
85  }
86 
87  static std::string designerGroup()
88  {
89  return tr("VR-Forces Data Labels").toUtf8().constData();
90  }
91 
92  static std::string headerFile()
93  {
94  return tr("<vrfGuiDataEntryWidgets/simpleLabelWidgets.h>").toUtf8().constData();
95  }
96 
97  static std::string variableName()
98  {
99  return tr("label").toUtf8().constData();
100  }
101 
102  virtual void refreshLabels();
103 
105  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const = 0;
106  virtual makVrv::DtUnicode unitNotation() const = 0;
107 
108  protected:
109  virtual void slot_onUnitChanged(const makVrv::DtUnicode& category, const makVrv::DtUnicode& type);
110  virtual void selectionChanged(const std::set<makVrv::DtUniqueID>&);
111 
112  public:
114 
115  protected:
116  QString myLabelText;
117  };
118 
121  {
122  Q_OBJECT
123  public:
124  DtSimpleRangeLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
125 
126  //DTOR
127  virtual ~DtSimpleRangeLabel();
128 
129  protected:
130  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const;
131  virtual makVrv::DtUnicode unitNotation() const;
132  };
133 
136  {
137  Q_OBJECT
138  public:
139  DtSimpleSmallRangeLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
140 
141  //DTOR
142  virtual ~DtSimpleSmallRangeLabel();
143 
144  virtual makVrv::DtUnicode elementDisplayDefault() const;
145 
146  protected:
147  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const;
148  virtual makVrv::DtUnicode unitNotation() const;
149  };
150 
153  {
154  Q_OBJECT
155 
156  public:
157  DtSimpleAltitudeLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
158 
159  //DTOR
160  virtual ~DtSimpleAltitudeLabel();
161 
162  protected:
163  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const;
164  virtual makVrv::DtUnicode unitNotation() const;
165  };
166 
169  {
170  Q_OBJECT
171 
172  public:
173  DtSimpleRateLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
174 
175  //DTOR
176  virtual ~DtSimpleRateLabel();
177 
178  protected:
179  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const;
180  virtual makVrv::DtUnicode unitNotation() const;
181  };
182 
185  {
186  Q_OBJECT
187 
188  public:
189  DtSimpleTurnRateLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
190 
191  //DTOR
192  virtual ~DtSimpleTurnRateLabel();
193 
194  protected:
195  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const;
196  virtual makVrv::DtUnicode unitNotation() const;
197  };
198 
201  {
202  Q_OBJECT
203 
204  public:
205  DtSimpleHeadingLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
206 
207  //DTOR
208  virtual ~DtSimpleHeadingLabel();
209 
210  protected:
211  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const;
212  virtual makVrv::DtUnicode unitNotation() const;
213  };
214 
221 }
Heading (orientation) label. This will change units if display units for orientation change...
Definition: simpleLabelWidgets.h:200
virtual bool guiElementOnly() const
This is a GUI element only.
Definition: simpleLabelWidgets.h:71
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
static std::string variableName()
Definition: simpleLabelWidgets.h:97
CreationFlags
Definition: taskSetVariableWidget.h:118
virtual DtReaderWriter * createBoundVariable(const std::string &)
Creates the bound variable. Since this is a GUI only element, not implemented.
Definition: simpleLabelWidgets.h:60
virtual void setupFrom(const std::vector< makVrv::DtSimEntry * > &data)
Sets up widget with currently selected item. Since this is a GUI only element this is not implemented...
Definition: simpleLabelWidgets.h:50
Definition: readerWriter.h:85
static makVrv::DtUnicode codeVariableType()
Definition: simpleLabelWidgets.h:82
Altitude label. This will change units if display units for altitude change.
Definition: simpleLabelWidgets.h:152
QString myLabelText
Definition: simpleLabelWidgets.h:116
Basic implementation that has a label at the top.
Definition: taskSetVariableWidget.h:228
DtTaskSetVariableWidgetCreator< DtSimpleRangeLabel > DtScriptedTaskRangeLabelCreator
Definition: simpleLabelWidgets.h:215
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:419
DtTaskSetVariableWidgetCreator< DtSimpleAltitudeLabel > DtScriptedTaskAltitudeLabelCreator
Definition: simpleLabelWidgets.h:217
DtTaskSetVariableWidgetCreator< DtSimpleSmallRangeLabel > DtScriptedTaskSmallRangeLabelCreator
Definition: simpleLabelWidgets.h:216
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
virtual bool isValid() const
Indicates the current selection is valid.
Definition: simpleLabelWidgets.h:77
DtTaskSetVariableWidgetCreator< DtSimpleTurnRateLabel > DtScriptedTaskTurnRateLabelCreator
Definition: simpleLabelWidgets.h:219
Range label. This will change units if display units for distance change.
Definition: simpleLabelWidgets.h:120
virtual void setVariableData(const std::string &)
No-op.
Definition: simpleLabelWidgets.h:37
QLabel * myLabel
Definition: simpleLabelWidgets.h:113
DtTaskSetVariableWidgetCreator< DtSimpleRateLabel > DtScriptedTaskRateLabelCreator
Definition: simpleLabelWidgets.h:218
These classes will define simple label widgets. These widgets are not variables – they are simply dis...
Definition: simpleLabelWidgets.h:22
static std::string designerGroup()
Definition: simpleLabelWidgets.h:87
virtual void setDefaultValue(const std::string &)
Default value to set in control.
Definition: simpleLabelWidgets.h:45
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:70
static std::string headerFile()
Definition: simpleLabelWidgets.h:92
DtTaskSetVariableWidgetCreator< DtSimpleHeadingLabel > DtScriptedTaskHeadingLabelCreator
Definition: simpleLabelWidgets.h:220
Small range label. This will change units if display units for small distance change.
Definition: simpleLabelWidgets.h:135
virtual void setupFromBoundVariable(const DtReaderWriter *)
Sets up from bound variable. Since this is a GUI only element, not implemented.
Definition: simpleLabelWidgets.h:66
Rate label. This will change units if display units for velocity change.
Definition: simpleLabelWidgets.h:168
Turn Rate (Rotational Velocity) label. This will change units if display units for rotational velocit...
Definition: simpleLabelWidgets.h:184
virtual void setRange(double, double)
Sets the range of the item. This widget does not support that.
Definition: simpleLabelWidgets.h:55

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)