VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simulationModelSetUpgradeWizard.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 #pragma once
9 
13 #include <vlutil/vlFilename.h>
14 
15 #include <QtWidgets/QDialog>
16 #include <QtWidgets/QTextEdit>
17 #include <QtCore/QList>
18 #include <QtCore/QStringList>
19 
20 #include <atomic>
21 
22 #include <set>
23 
24 class QPushButton;
25 class QFileDialog;
26 class QLineEdit;
28 class DtFilename;
29 class QProgressBar;
30 class QComboBox;
31 
33 {
37 };
38 
40 {
42  QString mySmsVersion;
44  bool myCopyVisuals = false;
45  std::shared_ptr<DtSimulationModelSet> mySmsToUpgrade;
46  std::shared_ptr<DtSimulationModelSet> myNewBaseSms;
47  QStringList myFileUpgradeFailures;
48  bool mySuccess = true;
49  bool myUpgradeInPlace = false;
50  bool myUpgradeSystemsOnly = false;
51 };
52 
54 {
55  Q_OBJECT
56 
57 public:
58  DtChooseSmsToUpgradePage(makVrv::DtDe& de, QWidget* parent,
59  std::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
60  virtual ~DtChooseSmsToUpgradePage() override;
61 
62  virtual bool isLastPage() const override { return false; };
63  virtual bool showFinishButton() const override { return false; };
64  virtual bool pageComplete() const override;
65  virtual bool nextPageComplete() const override { return pageComplete(); };
66  virtual DtWizardPage* nextPage(QWidget* p) override;
67  virtual bool performUpgrade(const DtFilename&);
68  virtual bool performSystemUpgrade(const DtFilename&);
69  virtual std::vector<DtString> getAllIncludes(const DtSimulationModelSet& sms, const std::vector<DtString>&) const;
70 
71 protected slots:
72 
73  virtual void browseForSms();
74  virtual void smsChanged();
75  virtual void destinationChanged();
76 
77 protected:
78 
82 
85 
86  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
87 };
88 
90 {
91  Q_OBJECT
92 
93 public:
94  DtChooseSmsCopiedFromPage(makVrv::DtDe& de, QWidget* parent,
95  std::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
96  virtual ~DtChooseSmsCopiedFromPage() override;
97 
98  virtual bool isLastPage() const override { return false; };
99  virtual bool showFinishButton() const override { return false; };
100  virtual bool pageComplete() const override;
101  virtual bool nextPageComplete() const override { return pageComplete(); };
102  virtual DtWizardPage* nextPage(QWidget* p) override;
103 
104 protected slots:
105 
106  virtual void selectionChanged();
107 
108 protected:
109 
110  QRadioButton* myEntityLevelButton;
111  QRadioButton* myAggregateLevelButton;
113  QRadioButton* myVrEngageButton;
115  QRadioButton* myOriginalSmsButton;
116 
117  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
118 };
119 
121 {
122  Q_OBJECT
123 
124 public:
125  DtChooseVersionPage(makVrv::DtDe& de, QWidget* parent,
126  std::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
127  virtual ~DtChooseVersionPage() override;
128 
129  virtual bool isLastPage() const override { return false; };
130  virtual bool showFinishButton() const override { return false; };
131  virtual bool pageComplete() const override;
132  virtual bool nextPageComplete() const override { return pageComplete(); };
133  virtual DtWizardPage* nextPage(QWidget* p) override;
134 
135 protected:
138 
139  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
140 };
141 
143 {
144  Q_OBJECT
145 
146 public:
147  DtChooseVisualCopyingPage(makVrv::DtDe& de, QWidget* parent,
148  std::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
149  virtual ~DtChooseVisualCopyingPage() override;
150 
151  virtual bool isLastPage() const override { return false; };
152  virtual bool showFinishButton() const override { return false; };
153  virtual bool pageComplete() const override;
154  virtual bool nextPageComplete() const override { return pageComplete(); };
155  virtual DtWizardPage* nextPage(QWidget* p) override;
156 
157 protected:
158 
159  QRadioButton* myCopyVisualsIntoSms;
160  QRadioButton* myDoNotCopyVisuals;
161 
162  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
163 };
164 
166 {
167  Q_OBJECT
168 
169 public:
170  DtUpgradeSmsProgressPage(makVrv::DtDe& de, QWidget* parent,
171  std::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
172  virtual ~DtUpgradeSmsProgressPage() override;
173 
174  virtual bool isLastPage() const override { return false; };
175  virtual bool showFinishButton() const override { return false; };
176  virtual bool pageComplete() const override;
177  virtual bool nextPageComplete() const override { return pageComplete(); };
178  virtual DtWizardPage* nextPage(QWidget* p) override;
179 
180  virtual void cancel() override;
181 
182  virtual void execute() override;
183 
184  static std::vector<DtString> makePathsRelativeToDataDirectory(makVrv::DtDe&, const std::vector<DtString>&);
185 
186 protected:
187 
188  void getDestination(QString& modelSetDir, QString& smsFile) const;
189 
190  int fileCount(const DtFilename& sourceDir) const;
191  void allFilesOfType(const DtFilename& sourceDir, const QString& ext, QStringList& files) const;
192  void copyFilesFromSMS(
193  const DtSimulationModelSet* sourceSet,
194  const QString& destination,
195  QStringList& failedToCopy,
196  const QStringList& filesToIgnore = QStringList(),
197  const QStringList& fileTypesToIgnore = QStringList(),
198  const QStringList& fileTypesToNotOverwrite = QStringList());
199  bool duplicateDirectory(
200  const DtSimulationModelSet* sourceSet,
201  const DtFilename& sourceDir, const DtFilename& destDir,
202  const QStringList& filesToIgnore,
203  const QStringList& fileTypesToIgnore,
204  const QStringList& fileTypesToNotOverwrite,
205  QStringList& notCopied);
206  bool copyVisualsFromSMS(
207  const DtSimulationModelSet* sourceSet,
208  const DtFilename& destinationModelSetVisualsDir,
209  const QString& newSmsName,
210  QStringList& failedToCopy);
211  bool copyVisualsFromDirectory(
212  const DtFilename& sourceDir, const DtFilename& destDir,
213  const QString& oldSmsName, const QString& newSmsName,
214  QStringList& failedToCopy, const DtFilename& subPath = DtFilename::nullFilename());
215 
216 protected:
220 
221  std::atomic<bool> myCancel;
222 
223  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
224 };
225 
227 {
228  Q_OBJECT
229 
230 public:
231  DtUpgradeSmsCompletePage(makVrv::DtDe& de, QWidget* parent,
232  std::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
233  virtual ~DtUpgradeSmsCompletePage() override;
234 
235  virtual bool isLastPage() const override { return true; };
236  virtual bool showFinishButton() const override { return true; };
237  virtual bool pageComplete() const override { return true; };
238  virtual bool nextPageComplete() const override { return false; };
239  virtual DtWizardPage* nextPage(QWidget* p) override { return 0; };
240 
241 protected slots:
242 
243  virtual void saveReport();
244 
245 protected:
246 
249  QTextEdit* myText;
250 
251  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
252 };
253 
255 {
256  Q_OBJECT
257 
258 public:
259  DtSimulationModelSetUpgradeWizard(makVrv::DtDe&, QWidget* p, const Qt::WindowFlags& f = 0);
260  virtual ~DtSimulationModelSetUpgradeWizard() override;
261 
262  virtual void createNewModelSet();
263  virtual bool performUpgrade(const DtFilename&);
264  virtual bool performSystemUpgrade(const DtFilename&);
265 
266 public slots:
267  virtual void nextButtonClicked();
268 
269 protected:
270  virtual void keyPressEvent(QKeyEvent*) override;
271 
272 protected slots:
273  virtual void backButtonClicked();
274  virtual void cancelButtonClicked();
275  virtual void enableNextButton(bool);
276  virtual void returnKeyPressed();
277 
278 protected:
284 
285 protected:
288 
289  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
290 };
291 
294 {
295 public:
298 
300  virtual ~DtSimulationModelSetUpgradeWizardCreator() override;
301 
304 
306  static void registerInstance(makVrv::DtDe&, DtSimulationModelSetUpgradeWizardCreator*);
307 
309  virtual DtSimulationModelSetUpgradeWizard* create(QWidget* parent);
310 
311 protected:
313 };
314 
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:101
virtual DtWizardPage * nextPage(QWidget *p)
Definition: newSimulationModelSetWizard.h:36
QLabel * myVrEngageLabel
Definition: simulationModelSetUpgradeWizard.h:114
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:99
QComboBox * myVersions
Definition: simulationModelSetUpgradeWizard.h:136
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:223
bool myUpgradeInPlace
Definition: simulationModelSetUpgradeWizard.h:49
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:132
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
Definition: simulationModelSetUpgradeWizard.h:165
bool myIsComplete
Definition: simulationModelSetUpgradeWizard.h:219
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:129
bool myCopyVisuals
Definition: simulationModelSetUpgradeWizard.h:44
QPushButton * myFinishButton
Definition: simulationModelSetUpgradeWizard.h:282
Definition: simulationModelSetUpgradeWizard.h:34
QRadioButton * myAggregateLevelButton
Definition: simulationModelSetUpgradeWizard.h:111
QStringList myFileUpgradeFailures
Definition: simulationModelSetUpgradeWizard.h:47
QString mySmsVersion
Definition: simulationModelSetUpgradeWizard.h:42
QPushButton * myBackButton
Definition: simulationModelSetUpgradeWizard.h:280
Definition: simulationModelSetUpgradeWizard.h:39
QProgressBar * myProgressBar
Definition: simulationModelSetUpgradeWizard.h:217
Definition: simulationModelSetUpgradeWizard.h:226
Definition: simulationModelSetUpgradeWizard.h:35
QLabel * mySmsToUpgradeLabel
Definition: simulationModelSetUpgradeWizard.h:79
QRadioButton * myOriginalSmsButton
Definition: simulationModelSetUpgradeWizard.h:115
bool myUpgradeSystemsOnly
Definition: simulationModelSetUpgradeWizard.h:50
Definition: simulationModelSetUpgradeWizard.h:120
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:139
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:235
QTextEdit * myText
Definition: simulationModelSetUpgradeWizard.h:249
makVrv::DtDe & myDe
Definition: simulationModelSetUpgradeWizard.h:312
bool mySuccess
Definition: simulationModelSetUpgradeWizard.h:48
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:98
QRadioButton * myCopyVisualsIntoSms
Definition: simulationModelSetUpgradeWizard.h:159
QRadioButton * myEntityLevelButton
Definition: simulationModelSetUpgradeWizard.h:110
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:151
QLineEdit * mySmsToUpgrade
Definition: simulationModelSetUpgradeWizard.h:80
makVrv::DtDe & myDe
Definition: simulationModelSetUpgradeWizard.h:286
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:175
virtual bool pageComplete() const
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:289
Contains makVrv::DtVirtualBaseClass class.
DtSmsUpgradeType myUpgradeType
Definition: simulationModelSetUpgradeWizard.h:43
QLabel * myFileBeingCopied
Definition: simulationModelSetUpgradeWizard.h:218
Definition: simulationModelSetUpgradeWizard.h:89
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:62
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:86
std::shared_ptr< DtSimulationModelSet > mySmsToUpgrade
Definition: simulationModelSetUpgradeWizard.h:45
Creator for the dialog.
Definition: simulationModelSetUpgradeWizard.h:293
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:65
std::shared_ptr< DtSimulationModelSet > myNewBaseSms
Definition: simulationModelSetUpgradeWizard.h:46
QRadioButton * myDoNotCopyVisuals
Definition: simulationModelSetUpgradeWizard.h:160
Definition: simulationModelSetUpgradeWizard.h:142
Definition: simulationModelSetUpgradeWizard.h:254
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:236
QPushButton * myNextButton
Definition: simulationModelSetUpgradeWizard.h:279
DtWizardPage * myStartPage
Definition: simulationModelSetUpgradeWizard.h:287
QString myDestinationName
Definition: simulationModelSetUpgradeWizard.h:41
virtual void cancel()
Definition: newSimulationModelSetWizard.h:45
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:154
Definition: newSimulationModelSetWizard.h:28
virtual bool pageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:237
QRadioButton * myAggregateTacticalLevelButton
Definition: simulationModelSetUpgradeWizard.h:112
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:63
A simulation model set contains all the information that can be used to support a scenario either for...
Definition: simulationModelSet.h:31
QPushButton * myCancelButton
Definition: simulationModelSetUpgradeWizard.h:281
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:177
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:251
QLabel * myDestinationLabel
Definition: simulationModelSetUpgradeWizard.h:83
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:174
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:117
DtSmsUpgradeType
Definition: simulationModelSetUpgradeWizard.h:32
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:162
virtual DtWizardPage * nextPage(QWidget *p) override
Definition: simulationModelSetUpgradeWizard.h:239
Definition: simulationModelSetUpgradeWizard.h:36
Definition: simulationModelSetUpgradeWizard.h:53
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:152
QPushButton * mySaveButton
Definition: simulationModelSetUpgradeWizard.h:248
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
QLabel * myAdditionalText
Definition: simulationModelSetUpgradeWizard.h:137
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:238
virtual void execute()
Definition: newSimulationModelSetWizard.h:43
QLabel * myDescription
Definition: simulationModelSetUpgradeWizard.h:247
QList< DtWizardPage * > myPages
Definition: simulationModelSetUpgradeWizard.h:283
QPushButton * myBrowseButton
Definition: simulationModelSetUpgradeWizard.h:81
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:130
QRadioButton * myVrEngageButton
Definition: simulationModelSetUpgradeWizard.h:113
std::atomic< bool > myCancel
Definition: simulationModelSetUpgradeWizard.h:221
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:33
QLineEdit * myDestinationName
Definition: simulationModelSetUpgradeWizard.h:84

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)