VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
embarkationSlotEntryWidget.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
13 #if !defined(Q_MOC_RUN)
17 #endif
18 #include <boost/signals2.hpp>
19 
20 class QLabel;
21 class QGridLayout;
22 class QComboBox;
23 class QCheckBox;
24 
25 namespace makVrf
26 {
30  {
31  Q_OBJECT
32 
33  public:
34  DtEmbarkationSlotEntryWidget(makVrv::DtDe& de, QWidget* parent, const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode);
35 
36  //DTOR
38 
40  virtual void setRange(double bottom, double top);
41 
43  virtual void setDefaultValue(const std::string&);
44 
46  virtual DtReaderWriter* createBoundVariable(const std::string& variableName);
47 
49  virtual void setupFromBoundVariable(const DtReaderWriter* variableName);
50 
53  virtual void setupGui(const std::vector<makVrv::DtSimEntry*>& data);
54 
56  virtual void setupFrom(const std::vector<makVrv::DtSimEntry*>& data);
57 
62  virtual void setEmbarkInSlot(int s);
63  virtual int embarkInSlot() const;
64 
65  virtual void setSlotName(const DtString&);
66  virtual DtString slotName() const;
67 
68  virtual void setSlotType(const DtString&);
69  virtual DtString slotType() const;
70 
71  virtual int slotForNameAndType() const;
72 
73  virtual void setChooseAnyAvailableSlotIfTaken(bool);
74  virtual bool chooseAnyAvailableSlotIfTaken() const;
75 
77  {
78  return makVrv::DtUnicode::tr("Slot: <name>.slot, <name>.chooseAny");
79  }
80 
81  virtual void disableControls(bool);
82 
83  static std::string designerGroup()
84  {
85  return tr("VR-Forces Position Entry").toUtf8().constData();
86  }
87 
88  static std::string headerFile()
89  {
90  return tr("<vrfGuiDataEntryWidgets/embarkationSlotEntryWidget.h>").toUtf8().constData();
91  }
92 
93  static std::string variableName()
94  {
95  return tr("embarkationSlot").toUtf8().constData();
96  }
97 
99  boost::signals2::signal<void ()> signal_informationReceived;
100 
102  boost::signals2::signal<void ()> signal_noSlotsAvailable;
103 
104  protected:
105  virtual void slot_slotInformationReceived(const DtUUID&, const DtIfEmbarkationSlotInformationResponse::SlotInformationMap&);
106  virtual void updateSlotStatus();
107  virtual void resetAndHide();
108 
110  virtual void widgetInitializedForDialog(DtScriptedTaskDialog*, const std::vector<makVrv::DtSimEntry*>& data);
111 
112  protected slots:
113  virtual void slotNameChanged();
114  virtual void slotTypeChanged();
115 
116  public:
117  QGridLayout* myContentLayout;
125 
126  protected:
130 
131  std::vector<makVrv::DtSimEntry*> myEmbarking;
132 
133  typedef std::map<DtString, std::map<DtString, int> > TypeToNameMap;
135 
136  typedef std::map<int, bool> SlotAvailability;
138 
140  };
141 
143 }
UUID is a unique ID wrapper class.
Definition: uuid.h:59
QLabel * myStatusLabel
Definition: embarkationSlotEntryWidget.h:123
DtUUID myRequesting
Definition: embarkationSlotEntryWidget.h:139
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
DtTaskSetVariableWidgetCreator< DtEmbarkationSlotEntryWidget > DtEmbarkationSlotEntryWidgetCreator
Definition: embarkationSlotEntryWidget.h:142
CreationFlags
Definition: taskSetVariableWidget.h:119
std::map< int, SlotInformation > SlotInformationMap
Definition: ifEmbarkationSlotInformationResponse.h:35
Definition: readerWriter.h:85
boost::signals2::signal< void()> signal_noSlotsAvailable
Signal when there is no slot available to embark on.
Definition: embarkationSlotEntryWidget.h:102
int myEmbarkInSlot
Definition: embarkationSlotEntryWidget.h:127
std::map< int, bool > SlotAvailability
Definition: embarkationSlotEntryWidget.h:136
QComboBox * mySlotTypeCombo
Definition: embarkationSlotEntryWidget.h:121
QLabel * myStatus
Definition: embarkationSlotEntryWidget.h:124
static makVrv::DtUnicode codeVariableType()
Definition: embarkationSlotEntryWidget.h:76
QLabel * mySlotTypeLabel
Definition: embarkationSlotEntryWidget.h:120
std::map< DtString, std::map< DtString, int > > TypeToNameMap
Definition: embarkationSlotEntryWidget.h:133
This class will created a dialog from scripted task meta data and send that information to the back-e...
Definition: scriptedTaskDialog.h:60
Basic implementation that has a label at the top.
Definition: taskSetVariableWidget.h:233
QLabel * mySlotNameLabel
Definition: embarkationSlotEntryWidget.h:118
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
std::vector< makVrv::DtSimEntry * > myEmbarking
Definition: embarkationSlotEntryWidget.h:131
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
DtString mySlotName
Definition: embarkationSlotEntryWidget.h:128
static std::string headerFile()
Definition: embarkationSlotEntryWidget.h:88
SlotAvailability mySlotAvailabiltyMap
Definition: embarkationSlotEntryWidget.h:137
static std::string designerGroup()
Definition: embarkationSlotEntryWidget.h:83
QComboBox * mySlotNameCombo
Definition: embarkationSlotEntryWidget.h:119
boost::signals2::signal< void()> signal_informationReceived
Signal sent when request for slot is fulfilled.
Definition: embarkationSlotEntryWidget.h:99
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
QCheckBox * myChooseAny
Definition: embarkationSlotEntryWidget.h:122
Widget that allows for the selection of an embarkation slot from the given data. If there is more tha...
Definition: embarkationSlotEntryWidget.h:29
DtString mySlotType
Definition: embarkationSlotEntryWidget.h:129
TypeToNameMap myTypeToNameMap
Definition: embarkationSlotEntryWidget.h:134
QGridLayout * myContentLayout
Definition: embarkationSlotEntryWidget.h:117
static std::string variableName()
Definition: embarkationSlotEntryWidget.h:93

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)