VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
scriptedObjectMovementEditor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
13 #include "vrfutil/movementFile.h"
16 #include <QtWidgets/QDialog>
17 
18 class QPushButton;
19 class QToolButton;
20 class QComboBox;
21 class QListWidget;
22 class QSpinBox;
23 class QLabel;
24 class QTreeWidget;
25 class QIntValidator;
30 class QLineEdit;
31 class QFrame;
32 class QComboBox;
33 class QDoubleValidator;
34 class QGridLayout;
35 class QListWidgetItem;
36 
37 namespace makVrv
38 {
39  class DtDe;
40 }
41 
46 {
47  Q_OBJECT
48 
49 public:
50  DtScriptedObjectMovementEditor(makVrv::DtDe& de, bool precisionMode, QWidget* parent, const Qt::WindowFlags& flags = Qt::Tool);
52 
53 protected:
55  virtual void accept();
56 
58  virtual void setupFiles();
59 
61  virtual DtFilename defaultMovementFile() const;
62 
64  virtual DtEntityType defaultMissileType() const;
65 
67  virtual void setupFilesThatMatch(const std::string& ext);
68 
70  virtual std::vector<std::string> filesThatMatch(const std::string& ext, const DtSimulationModelSet* sms) const;
71 
73  virtual void setupDefaultTypesFor(const DtEntityType&);
74 
75  virtual void mergeMovementFilesTo(const std::vector<std::string>&, std::map<std::string, std::string>& movementFiles) const;
76 
78  virtual DtComponentDescriptor* findFromSystem(const DtComponentSystemDescriptorList*) const;
79 
81  virtual DtComponentDescriptor* findFromComponents(const DtComponentDescriptorList*) const;
82 
84  virtual void addPhase(const DtScriptedMovementPhase&);
85 
86  virtual void setFormatsFromMovementFile();
87 
88  virtual bool inMasterSMS(DtFilename) const;
89  virtual bool selectedInMasterSMS() const;
90  virtual void enableInterface(bool);
91 
92  virtual DtFilename movementFile(const std::string& key) const;
93 
94 protected slots:
95  virtual void onAddScriptedObjectMovement();
96  virtual void onRemoveScriptedObjectMovement();
97  virtual void onRenameScriptedObjectMovement();
98  virtual void onSeletScriptedMovementObject();
99  virtual void onGroundClampTypeChanged();
100  virtual void onPhaseSelected();
101  virtual void onDescriptionChanged();
102  virtual void onAddCategory();
103  virtual void onRemoveCategory();
104  virtual void onCategorySelected();
105  virtual void onCategoryChanged(QListWidgetItem*);
106  virtual void onAddNewMissile();
107  virtual void onAddNewMovementFile();
108  virtual void onAddNewFileConfiguration();
109  virtual void onCopyScriptedObjectMovement();
110 
112  virtual void onAddPhase();
113 
115  virtual void onRemovePhase();
116 
118  virtual void onPhaseChanged();
119 
122  virtual void onMissileTypeChanged();
123 
126  virtual std::string configurationThatMatches(const DtScriptedMovementFileConfiguration&, QString nameIfMissing);
127 
128  virtual void setupScriptedMovementObjectsMap(const std::map<std::string, std::string>&);
129 
130  virtual DtMovementFile::MovementFileConfigurations allMovementFileConfigurations() const;
131  virtual DtMovementFile::MovementFileConfigurations loadMovementFileConfigurations(const DtSimulationModelSet*) const;
132 
133 public:
136 
152  QListWidget* myCategories;
153 
158  QGridLayout* myPhasesLayout;
159  QWidget* myPhasesCanvas;
160 
171 
172 protected:
174 
175  typedef std::map<std::string, DtScriptedMovementObject> ScriptedMovementObjectsMap;
178 
180  std::map<std::string, std::string> myMasterSMSMovementFiles;
181  std::map<std::string, std::string> myMovementFiles;
182  std::vector<DtEntityType> myMissileTypes;
183 
185 };
186 
189 {
190 public:
193 
196 
199 
201  static void registerInstance(makVrv::DtDe&, DtScriptedObjectMovementEditorCreator*);
202 
204  virtual DtScriptedObjectMovementEditor* create(QWidget* parent, bool precisionMode);
205 
206 protected:
208 };
QLabel * myGroundClampTypeLabel
Definition: scriptedObjectMovementEditor.h:167
QLabel * myFormatLabel
Definition: scriptedObjectMovementEditor.h:163
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
QToolButton * myRemoveScriptedObjectMovement
Definition: scriptedObjectMovementEditor.h:139
QLabel * myDescriptionLabel
Definition: scriptedObjectMovementEditor.h:147
QWidget * myPhasesCanvas
Definition: scriptedObjectMovementEditor.h:159
QToolButton * myRemovePhase
Definition: scriptedObjectMovementEditor.h:155
QToolButton * myAddNewMovementFile
Definition: scriptedObjectMovementEditor.h:144
QToolButton * myRenameScriptedObjectMovement
Definition: scriptedObjectMovementEditor.h:140
List of DtComponentSystemDescriptor instances.
Definition: componentSystemDescriptorList.h:20
QLabel * myMovementFileLabel
Definition: scriptedObjectMovementEditor.h:161
QToolButton * myAddCategory
Definition: scriptedObjectMovementEditor.h:150
QLabel * myInstructions
Definition: scriptedObjectMovementEditor.h:137
QComboBox * myMovementFile
Definition: scriptedObjectMovementEditor.h:162
Instances of DtComponentDescriptorList are readable/writeable lists of DtComponentDescriptor objects...
Definition: componentDescriptorList.h:22
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
QPushButton * myCancelButton
Definition: scriptedObjectMovementEditor.h:135
std::map< std::string, std::string > myMovementFiles
Definition: scriptedObjectMovementEditor.h:181
makVrv::DtDe & myDe
Definition: scriptedObjectMovementEditor.h:207
QComboBox * myScriptedMovementObjects
Definition: scriptedObjectMovementEditor.h:146
makVrv::DtDe & myDe
Definition: scriptedObjectMovementEditor.h:184
std::vector< DtScriptedMovementFileConfiguration > MovementFileConfigurations
Definition: movementFile.h:278
QLabel * myCompletionRuleLabel
Definition: scriptedObjectMovementEditor.h:169
QToolButton * myAddPhase
Definition: scriptedObjectMovementEditor.h:154
Contains makVrv::DtVirtualBaseClass class.
bool myPrecisionMode
Definition: scriptedObjectMovementEditor.h:173
ScriptedMovementObjectsMap myScriptedMovementObjectsMap
Definition: scriptedObjectMovementEditor.h:176
QComboBox * myMissileType
Definition: scriptedObjectMovementEditor.h:166
QLabel * myScriptedMovementObjectsLabel
Definition: scriptedObjectMovementEditor.h:145
QToolButton * myRemoveCategory
Definition: scriptedObjectMovementEditor.h:151
QLabel * myPhasesLabel
Definition: scriptedObjectMovementEditor.h:156
QComboBox * myPhases
Definition: scriptedObjectMovementEditor.h:157
QToolButton * myAddScriptedObjectMovement
Definition: scriptedObjectMovementEditor.h:138
QLineEdit * myDescription
Definition: scriptedObjectMovementEditor.h:148
This class will allow for the adding, modifying or removing of scripted object files that will contai...
Definition: scriptedObjectMovementEditor.h:45
ScriptedMovementObjectsMap myScriptedObjectMovementsToRemove
Definition: scriptedObjectMovementEditor.h:177
QGridLayout * myPhasesLayout
Definition: scriptedObjectMovementEditor.h:158
QComboBox * myFormat
Definition: scriptedObjectMovementEditor.h:164
QPushButton * myOKButton
Definition: scriptedObjectMovementEditor.h:134
The DtScriptedMovementObject will contain information about an object that can be used for scripted m...
Definition: scriptedMovementObject.h:38
The DtScriptedMovementObject will contain information about an object that can be used for scripted m...
Definition: movementFile.h:37
A simulation model set contains all the information that can be used to support a scenario either for...
Definition: simulationModelSet.h:31
Creator for the canvas.
Definition: scriptedObjectMovementEditor.h:188
QToolButton * myAddNewMissile
Definition: scriptedObjectMovementEditor.h:142
QToolButton * myAddNewFileConfiguration
Definition: scriptedObjectMovementEditor.h:143
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
QComboBox * myCompletionRule
Definition: scriptedObjectMovementEditor.h:170
QComboBox * myGroundClampType
Definition: scriptedObjectMovementEditor.h:168
std::map< std::string, std::string > myMasterSMSMovementFiles
Map is filename without extension and the file path. Assuming same file names are replacements if app...
Definition: scriptedObjectMovementEditor.h:180
QListWidget * myCategories
Definition: scriptedObjectMovementEditor.h:152
std::map< std::string, DtScriptedMovementObject > ScriptedMovementObjectsMap
Definition: scriptedObjectMovementEditor.h:175
std::vector< DtEntityType > myMissileTypes
Definition: scriptedObjectMovementEditor.h:182
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:33
QLabel * myCategoriesLabel
Definition: scriptedObjectMovementEditor.h:149
QToolButton * myCopyScriptedObjectMovement
Definition: scriptedObjectMovementEditor.h:141
QLabel * myMissileTypeLabel
Definition: scriptedObjectMovementEditor.h:165

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)