VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
runwaySelectorWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 #pragma once
6 
8 #include <QtGui/QValidator>
9 
10 class QComboBox;
11 class QCheckBox;
12 
13 namespace makVrf
14 {
17  {
18  Q_OBJECT
19 
20  public:
21  DtRunwaySelectorWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
22 
23  //DTOR
24  virtual ~DtRunwaySelectorWidget() override;
25 
30  virtual void setRange(double bottom, double top) override;
31 
33  virtual void setDefaultValue(const std::string&) override;
34  virtual void setVariableData(const QString&) override;
35 
37 
38  virtual void setAirportCode(const std::string&);
39  virtual std::string airportCode() const;
40 
41  virtual void setRunway(const std::string&);
42  virtual std::string runway() const;
43 
45  virtual DtReaderWriter* createBoundVariable(const std::string& variableName) override;
46 
48  virtual void setupFromBoundVariable(const DtReaderWriter* variableName) override;
49 
50  virtual DtTaskSetVariableWidgetExtensionInterface* parameterContents(
51  QWidget* parent, const Qt::WindowFlags& flags = 0) const override;
52 
54  virtual void setPerRunway(bool);
55  bool perRunway() const
56  {
57  return myPerRunway;
58  }
59 
61  {
62  return makVrv::DtUnicode::tr("Aerodrome");
63  }
64 
65  static std::string designerGroup()
66  {
67  return tr("VR-Forces Data Entry").toUtf8().constData();
68  }
69 
70  static std::string headerFile()
71  {
72  return tr("<vrfGuiDataEntryWidgets/runwaySelectorWidget.h>").toUtf8().constData();
73  }
74 
75  static std::string variableName()
76  {
77  return tr("aerodrome").toUtf8().constData();
78  }
79 
80  protected:
81  virtual void updateRunways();
82  virtual void widgetInitializedForDialog(DtScriptedTaskDialog*, const std::set<makVrv::DtUniqueID>& data) override;
83 
84  protected:
85  std::string myAirportCode;
86  std::string myRunway;
87  bool myPerRunway = false;
88  };
89 
92  {
93  Q_OBJECT
94 
95  public:
96  DtRunwaySelectorWidgetExtension(makVrv::DtDe&, QWidget* w, const Qt::WindowFlags& f = 0);
97  virtual ~DtRunwaySelectorWidgetExtension() override;
98 
99  virtual void setTo(DtScriptedTaskVariable& v) const override;
100  virtual int setFrom(const DtScriptedTaskVariable& v, QGridLayout* parentLayout, int startRow) override;
101 
102  protected:
104  };
105 
107 }
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
std::string myRunway
Definition: runwaySelectorWidget.h:86
CreationFlags
Definition: taskSetVariableWidget.h:118
static std::string designerGroup()
Definition: runwaySelectorWidget.h:65
QCheckBox * myPerRunway
Definition: runwaySelectorWidget.h:103
Definition: readerWriter.h:85
static std::string variableName()
Definition: runwaySelectorWidget.h:75
Simple string variable widget extension. Hides top/bottom items as they are not needed.
Definition: runwaySelectorWidget.h:91
This class will created a dialog from scripted task meta data and send that information to the back-e...
Definition: scriptedTaskDialog.h:60
std::string myAirportCode
Definition: runwaySelectorWidget.h:85
Widget that must be given an aerodrome code to use as a basis. Will reconstruct itself from a DtRwAer...
Definition: runwaySelectorWidget.h:16
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
static std::string headerFile()
Definition: runwaySelectorWidget.h:70
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
bool perRunway() const
Definition: runwaySelectorWidget.h:55
static makVrv::DtUnicode codeVariableType()
Definition: runwaySelectorWidget.h:60
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
Simple general extension widget that provides a default value and range. Subclasses can supply additi...
Definition: simpleVariableWidget.h:183
Extension interface for contents for definition of variables in the scripted task meta data variable ...
Definition: taskSetVariableWidget.h:83
DtTaskSetVariableWidgetCreator< DtRunwaySelectorWidget > DtRunwaySelectorWidgetCreator
Definition: runwaySelectorWidget.h:106
This class is a simple combo box that will use the variable data (values separated by ;) to add entri...
Definition: simpleVariableWidget.h:656

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)