VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
rankPatchSelectionEntryWidget.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2021 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #if !defined(Q_MOC_RUN)
14 #include <QtWidgets/QWidget>
15 #endif
16 
17 #include <map>
18 
19 class QCheckBox;
20 class QComboBox;
21 
22 class DtPatchIdentifier;
23 
24 namespace makVrv
25 {
26  class DtDe;
27 }
28 
29 namespace makVrf
30 {
31 
34  { Q_OBJECT;
35  public:
36 
38  DtRankPatchSelectionEntryWidget( makVrv::DtDe& de, QWidget* parent,
39  const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode );
40 
43 
45  virtual void setRankPatch( const DtPatchIdentifier& patchId );
46 
48  virtual DtPatchIdentifier rankPatch() const;
49 
50  virtual void setLabel( const std::string& val ) override;
51  virtual void setLabel( const QString& val ) override;
52 
53  virtual void setToolTip( const QString& tooltip ) override;
54 
56  virtual bool isValid() const override { return true; }
57 
58  virtual void setRange( double bottom, double top ) override;
59 
64 
65  virtual void setDefaultValue( const std::string& value ) override;
66  virtual void setDefaultValue( const QString& value );
67 
69 
70  virtual void setVariableData( const std::string& data ) override;
71 
73  virtual void setupFrom( const std::vector<makVrv::DtSimEntry*>& data ) override;
74 
76  virtual DtReaderWriter* createBoundVariable( const std::string& variableName );
77 
79  virtual void setupFromBoundVariable( const DtReaderWriter* variableName );
80 
82  virtual void setIndent( int );
83 
85  virtual std::string variableDataFromUiDesigner( const QDomElement&, const DtScriptedTaskVariableLayoutConverter& ) const override;
86 
89  virtual std::string scriptedTaskVariableName() const override;
90 
93 
95  {
96  return makVrv::DtUnicode::tr( "Patch identifier (country:service:patch)" );
97  }
98 
99  static std::string designerGroup()
100  {
101  return tr("VR-Forces Entity Manipulation").toUtf8().constData();
102  }
103 
104  static std::string headerFile()
105  {
106  return tr("<vrfGuiDataEntryWidgets/rankPatchSelectionEntryWidget.h>").toUtf8().constData();
107  }
108 
109  static std::string variableName()
110  {
111  return tr("rankPatchSelection").toUtf8().constData();
112  }
113 
115 
117  boost::signals2::signal<void(const DtPatchIdentifier&)> signal_patchSelectionChanged;
118 
119  protected slots:
120 
121  virtual void slot_onCountryChanged();
122 
123  virtual void slot_onPatchComboBox_currentIndexChanged( int index );
124 
125  protected:
126 
128  void setupGui();
129 
130  virtual void initialize();
131 
132  virtual void initializePatchList();
133  virtual void reinitializePatchList();
134 
135  virtual void clear();
136 
137  protected:
138 
141 
142  std::string myAppearance;
143 
144  QSpacerItem* myIndentationSpacer;
147 
149 
150  };
151 
153 
154 }
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
CreationFlags
Definition: taskSetVariableWidget.h:119
DtTaskSetVariableWidgetCreator< DtRankPatchSelectionEntryWidget > DtRankPatchSelectionEntryWidgetCreator
Definition: rankPatchSelectionEntryWidget.h:152
This class will parse the UI file for known scripted task variable types and pull out specified scrip...
Definition: scriptedTaskVariableLayoutConverter.h:32
static std::string headerFile()
Definition: rankPatchSelectionEntryWidget.h:104
virtual bool isValid() const override
Indicates the current selection is valid.
Definition: rankPatchSelectionEntryWidget.h:56
std::string myAppearance
Definition: rankPatchSelectionEntryWidget.h:142
Definition: readerWriter.h:85
QCheckBox * myApplyImmediatelyCheckBox
Definition: rankPatchSelectionEntryWidget.h:146
QComboBox * myRankPatchComboBox
Definition: rankPatchSelectionEntryWidget.h:145
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
This class will define the interface needed for being a task set variable that can be used in task di...
Definition: taskSetVariableWidget.h:116
static std::string variableName()
Definition: rankPatchSelectionEntryWidget.h:109
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
boost::signals2::signal< void(const DtPatchIdentifier &)> signal_patchSelectionChanged
Signal data values are the patch IDs for the primary and secondary patches, respectively.
Definition: rankPatchSelectionEntryWidget.h:117
QSpacerItem * myIndentationSpacer
Definition: rankPatchSelectionEntryWidget.h:144
static std::string designerGroup()
Definition: rankPatchSelectionEntryWidget.h:99
bool myInitialized
Definition: rankPatchSelectionEntryWidget.h:148
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
makVrv::DtDe & myDe
Definition: rankPatchSelectionEntryWidget.h:139
Widget that allows the selection of a force.
Definition: rankPatchSelectionEntryWidget.h:33
makVrv::DtSignalConnectionManager myConnections
Definition: rankPatchSelectionEntryWidget.h:140
static makVrv::DtUnicode codeVariableType()
Definition: rankPatchSelectionEntryWidget.h:94

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)