VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
unitPatchSelectionEntryWidget.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  DtUnitPatchSelectionEntryWidget( makVrv::DtDe& de, QWidget* parent,
39  const Qt::WindowFlags& flags = 0, const CreationFlags& cflags = NormalMode );
40 
42  virtual ~DtUnitPatchSelectionEntryWidget() override;
43 
45  virtual void setPrimaryUnitPatch( const DtPatchIdentifier& patchId );
46 
48  virtual DtPatchIdentifier primaryUnitPatch() const;
49 
51  virtual void setSecondaryUnitPatch( const DtPatchIdentifier& patchId );
52 
54  virtual DtPatchIdentifier secondaryUnitPatch() const;
55 
56  virtual void setLabel( const std::string& val ) override;
57  virtual void setLabel( const QString& val ) override;
58 
59  virtual void setToolTip( const QString& tooltip ) override;
60 
62  virtual bool isValid() const override { return true; }
63 
64  virtual void setRange( double bottom, double top ) override;
65 
71 
72  virtual void setDefaultValue( const std::string& value ) override;
73  virtual void setDefaultValue( const QString& value );
74 
76 
77  virtual void setVariableData( const std::string& data ) override;
78 
80  virtual void setupFrom( const std::set<makVrv::DtUniqueID>& data ) override;
81 
83  virtual DtReaderWriter* createBoundVariable(const std::string& variableName) override;
84 
86  virtual void setupFromBoundVariable(const DtReaderWriter* variableName) override;
87 
89  virtual void setIndent(int) override;
90 
92  virtual std::string variableDataFromUiDesigner( const QDomElement&, const DtScriptedTaskVariableLayoutConverter& ) const override;
93 
96  virtual std::string scriptedTaskVariableName() const override;
97 
100 
102  {
103  return makVrv::DtUnicode::tr( "Patch identifier (country:service:patch)" );
104  }
105 
106  static std::string designerGroup()
107  {
108  return tr("VR-Forces Entity Manipulation").toUtf8().constData();
109  }
110 
111  static std::string headerFile()
112  {
113  return tr("<vrfGuiDataEntryWidgets/unitPatchSelectionEntryWidget.h>").toUtf8().constData();
114  }
115 
116  static std::string variableName()
117  {
118  return tr("unitPatchSelection").toUtf8().constData();
119  }
120 
122 
124  boost::signals2::signal<void(const DtPatchIdentifier&,const DtPatchIdentifier&)> signal_patchSelectionChanged;
125 
126  protected slots:
127 
128  virtual void slot_onCountryChanged();
129 
130  virtual void slot_onPatchComboBox_currentIndexChanged( int index );
131 
132  protected:
133 
135  void setupGui();
136 
137  virtual void initialize();
138 
139  virtual void initializePatchLists();
140  virtual void reinitializePatchLists();
141 
142  virtual void clear();
143 
144  protected:
145 
148 
149  std::string myAppearance;
150 
151  QSpacerItem* myIndentationSpacer;
155 
157 
158  };
159 
161 
162 }
A unicode string. DtUnicode stores a UTF-16 encoded unicode string. Code Point, a Unicode character...
Definition: DtUnicode.h:33
static makVrv::DtUnicode codeVariableType()
Definition: unitPatchSelectionEntryWidget.h:101
DtTaskSetVariableWidgetCreator< DtUnitPatchSelectionEntryWidget > DtUnitPatchSelectionEntryWidgetCreator
Definition: unitPatchSelectionEntryWidget.h:160
static std::string designerGroup()
Definition: unitPatchSelectionEntryWidget.h:106
virtual bool isValid() const override
Indicates the current selection is valid.
Definition: unitPatchSelectionEntryWidget.h:62
CreationFlags
Definition: taskSetVariableWidget.h:118
makVrv::DtDe & myDe
Definition: unitPatchSelectionEntryWidget.h:146
QComboBox * myPrimaryPatchComboBox
Definition: unitPatchSelectionEntryWidget.h:152
This class will parse the UI file for known scripted task variable types and pull out specified scrip...
Definition: scriptedTaskVariableLayoutConverter.h:32
Definition: readerWriter.h:85
static std::string variableName()
Definition: unitPatchSelectionEntryWidget.h:116
static std::string headerFile()
Definition: unitPatchSelectionEntryWidget.h:111
std::string myAppearance
Definition: unitPatchSelectionEntryWidget.h:149
QComboBox * mySecondaryPatchComboBox
Definition: unitPatchSelectionEntryWidget.h:153
makVrv::DtSignalConnectionManager myConnections
Definition: unitPatchSelectionEntryWidget.h:147
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
This class will define the interface needed for being a task set variable that can be used in task di...
Definition: taskSetVariableWidget.h:115
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
#define DT_DLL_VRFGUIDATAENTRYWIDGETS
Definition: vrfGuiDataEntryWidgets.h:22
Widget that allows the selection of a force.
Definition: unitPatchSelectionEntryWidget.h:33
bool myInitialized
Definition: unitPatchSelectionEntryWidget.h:156
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
QCheckBox * myApplyImmediatelyCheckBox
Definition: unitPatchSelectionEntryWidget.h:154
boost::signals2::signal< void(const DtPatchIdentifier &, const DtPatchIdentifier &)> signal_patchSelectionChanged
Signal data values are the patch IDs for the primary and secondary patches, respectively.
Definition: unitPatchSelectionEntryWidget.h:124
QSpacerItem * myIndentationSpacer
Definition: unitPatchSelectionEntryWidget.h:151

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)