VR-Forces 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() override;
30 
32  virtual void setLabel(const QString&) override;
33 
34  virtual QString label() const override;
35 
37  virtual void setVariableData(const std::string&) override {
38  }
39 
41  virtual makVrv::DtUnicode elementDisplayDefault() const;
42 
44  virtual void setDefaultValue(const std::string&) override {
45  }
46 
48  virtual void setupFrom(const std::set<makVrv::DtUniqueID>& data) override {
49  }
50 
52  virtual void setRange(double, double) override {
53  }
54 
56  virtual DtReaderWriter* createBoundVariable(const std::string&) override {
57  return 0;
58  }
59 
61  virtual void setupFromBoundVariable(const DtReaderWriter*) override {
62  }
63 
65  virtual bool guiElementOnly() const override {
66  return true;
67  }
68 
70  virtual bool isValid() const override {
71  return true;
72  }
73 
75  {
76  return makVrv::DtUnicode::tr("Label");
77  }
78 
79  static std::string designerGroup()
80  {
81  return tr("VR-Forces Data Labels").toUtf8().constData();
82  }
83 
84  static std::string headerFile()
85  {
86  return tr("<vrfGuiDataEntryWidgets/simpleLabelWidgets.h>").toUtf8().constData();
87  }
88 
89  static std::string variableName()
90  {
91  return tr("label").toUtf8().constData();
92  }
93 
94  virtual void refreshLabels();
95 
97  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const = 0;
98  virtual makVrv::DtUnicode unitNotation() const = 0;
99 
100  protected:
101  virtual void slot_onUnitChanged(const makVrv::DtUnicode& category, const makVrv::DtUnicode& type);
102  virtual void selectionChanged(const std::set<makVrv::DtUniqueID>&) override;
103 
104  public:
106 
107  protected:
108  QString myLabelText;
109  };
110 
113  {
114  Q_OBJECT
115  public:
116  DtSimpleRangeLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
117 
118  //DTOR
119  virtual ~DtSimpleRangeLabel() override;
120 
121  protected:
122  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const override;
123  virtual makVrv::DtUnicode unitNotation() const override;
124  };
125 
128  {
129  Q_OBJECT
130  public:
131  DtSimpleSmallRangeLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
132 
133  //DTOR
134  virtual ~DtSimpleSmallRangeLabel() override;
135 
136  virtual makVrv::DtUnicode elementDisplayDefault() const override;
137 
138  protected:
139  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const override;
140  virtual makVrv::DtUnicode unitNotation() const override;
141  };
142 
145  {
146  Q_OBJECT
147 
148  public:
149  DtSimpleAltitudeLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
150 
151  //DTOR
152  virtual ~DtSimpleAltitudeLabel() override;
153 
154  protected:
155  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const override;
156  virtual makVrv::DtUnicode unitNotation() const override;
157  };
158 
161  {
162  Q_OBJECT
163 
164  public:
165  DtSimpleRateLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
166 
167  //DTOR
168  virtual ~DtSimpleRateLabel() override;
169 
170  protected:
171  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const override;
172  virtual makVrv::DtUnicode unitNotation() const override;
173  };
174 
177  {
178  Q_OBJECT
179 
180  public:
181  DtSimpleTurnRateLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
182 
183  //DTOR
184  virtual ~DtSimpleTurnRateLabel() override;
185 
186  protected:
187  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const override;
188  virtual makVrv::DtUnicode unitNotation() const override;
189  };
190 
193  {
194  Q_OBJECT
195 
196  public:
197  DtSimpleHeadingLabel(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
198 
199  //DTOR
200  virtual ~DtSimpleHeadingLabel() override;
201 
202  protected:
203  virtual bool supportsDisplayNotation(const makVrv::DtUnicode& type) const override;
204  virtual makVrv::DtUnicode unitNotation() const override;
205  };
206 
213 }
Heading (orientation) label. This will change units if display units for orientation change...
Definition: simpleLabelWidgets.h:192
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
virtual bool guiElementOnly() const override
This is a GUI element only.
Definition: simpleLabelWidgets.h:65
virtual void setupFrom(const std::set< makVrv::DtUniqueID > &data) override
Sets up widget with currently selected item. Since this is a GUI only element this is not implemented...
Definition: simpleLabelWidgets.h:48
static std::string variableName()
Definition: simpleLabelWidgets.h:89
CreationFlags
Definition: taskSetVariableWidget.h:118
virtual DtReaderWriter * createBoundVariable(const std::string &) override
Creates the bound variable. Since this is a GUI only element, not implemented.
Definition: simpleLabelWidgets.h:56
virtual void setRange(double, double) override
Sets the range of the item. This widget does not support that.
Definition: simpleLabelWidgets.h:52
virtual void setupFromBoundVariable(const DtReaderWriter *) override
Sets up from bound variable. Since this is a GUI only element, not implemented.
Definition: simpleLabelWidgets.h:61
virtual void setVariableData(const std::string &) override
No-op.
Definition: simpleLabelWidgets.h:37
Definition: readerWriter.h:85
static makVrv::DtUnicode codeVariableType()
Definition: simpleLabelWidgets.h:74
Altitude label. This will change units if display units for altitude change.
Definition: simpleLabelWidgets.h:144
QString myLabelText
Definition: simpleLabelWidgets.h:108
Basic implementation that has a label at the top.
Definition: taskSetVariableWidget.h:231
DtTaskSetVariableWidgetCreator< DtSimpleRangeLabel > DtScriptedTaskRangeLabelCreator
Definition: simpleLabelWidgets.h:207
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
DtTaskSetVariableWidgetCreator< DtSimpleAltitudeLabel > DtScriptedTaskAltitudeLabelCreator
Definition: simpleLabelWidgets.h:209
DtTaskSetVariableWidgetCreator< DtSimpleSmallRangeLabel > DtScriptedTaskSmallRangeLabelCreator
Definition: simpleLabelWidgets.h:208
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
DtTaskSetVariableWidgetCreator< DtSimpleTurnRateLabel > DtScriptedTaskTurnRateLabelCreator
Definition: simpleLabelWidgets.h:211
Range label. This will change units if display units for distance change.
Definition: simpleLabelWidgets.h:112
QLabel * myLabel
Definition: simpleLabelWidgets.h:105
DtTaskSetVariableWidgetCreator< DtSimpleRateLabel > DtScriptedTaskRateLabelCreator
Definition: simpleLabelWidgets.h:210
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:79
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 std::string headerFile()
Definition: simpleLabelWidgets.h:84
DtTaskSetVariableWidgetCreator< DtSimpleHeadingLabel > DtScriptedTaskHeadingLabelCreator
Definition: simpleLabelWidgets.h:212
virtual bool isValid() const override
Indicates the current selection is valid.
Definition: simpleLabelWidgets.h:70
virtual void setDefaultValue(const std::string &) override
Default value to set in control.
Definition: simpleLabelWidgets.h:44
Small range label. This will change units if display units for small distance change.
Definition: simpleLabelWidgets.h:127
Rate label. This will change units if display units for velocity change.
Definition: simpleLabelWidgets.h:160
Turn Rate (Rotational Velocity) label. This will change units if display units for rotational velocit...
Definition: simpleLabelWidgets.h:176

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)