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();
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);
46 
48  virtual void setupFromBoundVariable(const DtReaderWriter* variableName);
49 
50  virtual DtTaskSetVariableWidgetExtensionInterface* parameterContents(QWidget* parent, const Qt::WindowFlags& flags = 0) const;
51 
53  virtual void setPerRunway(bool);
54  bool perRunway() const
55  {
56  return myPerRunway;
57  }
58 
60  {
61  return makVrv::DtUnicode::tr("Aerodrome");
62  }
63 
64  static std::string designerGroup()
65  {
66  return tr("VR-Forces Data Entry").toUtf8().constData();
67  }
68 
69  static std::string headerFile()
70  {
71  return tr("<vrfGuiDataEntryWidgets/runwaySelectorWidget.h>").toUtf8().constData();
72  }
73 
74  static std::string variableName()
75  {
76  return tr("aerodrome").toUtf8().constData();
77  }
78 
79  protected:
80  virtual void updateRunways();
81  virtual void widgetInitializedForDialog(DtScriptedTaskDialog*, const std::vector<makVrv::DtSimEntry*>& data);
82 
83  protected:
84  std::string myAirportCode;
85  std::string myRunway;
86  bool myPerRunway = false;
87  };
88 
91  {
92  Q_OBJECT
93 
94  public:
95  DtRunwaySelectorWidgetExtension(makVrv::DtDe&, QWidget* w, const Qt::WindowFlags& f = 0);
97 
98  virtual void setTo(DtScriptedTaskVariable& v) const override;
99  virtual int setFrom(const DtScriptedTaskVariable& v, QGridLayout* parentLayout, int startRow) override;
100 
101  protected:
103  };
104 
106 }
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:85
CreationFlags
Definition: taskSetVariableWidget.h:119
static std::string designerGroup()
Definition: runwaySelectorWidget.h:64
QCheckBox * myPerRunway
Definition: runwaySelectorWidget.h:102
Definition: readerWriter.h:85
static std::string variableName()
Definition: runwaySelectorWidget.h:74
Simple string variable widget extension. Hides top/bottom items as they are not needed.
Definition: runwaySelectorWidget.h:90
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:84
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:426
static std::string headerFile()
Definition: runwaySelectorWidget.h:69
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:54
static makVrv::DtUnicode codeVariableType()
Definition: runwaySelectorWidget.h:59
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
Simple general extension widget that provides a default value and range. Subclasses can supply additi...
Definition: simpleVariableWidget.h:186
Extension interface for contents for definition of variables in the scripted task meta data variable ...
Definition: taskSetVariableWidget.h:84
DtTaskSetVariableWidgetCreator< DtRunwaySelectorWidget > DtRunwaySelectorWidgetCreator
Definition: runwaySelectorWidget.h:105
This class is a simple combo box that will use the variable data (values separated by ;) to add entri...
Definition: simpleVariableWidget.h:654

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)