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;
112  QRadioButton* myOriginalSmsButton;
113 
114  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
115 };
116 
118 {
119  Q_OBJECT
120 
121 public:
122  DtChooseVersionPage(makVrv::DtDe& de, QWidget* parent,
123  std::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
124  virtual ~DtChooseVersionPage() override;
125 
126  virtual bool isLastPage() const override { return false; };
127  virtual bool showFinishButton() const override { return false; };
128  virtual bool pageComplete() const override;
129  virtual bool nextPageComplete() const override { return pageComplete(); };
130  virtual DtWizardPage* nextPage(QWidget* p) override;
131 
132 protected:
135 
136  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
137 };
138 
140 {
141  Q_OBJECT
142 
143 public:
144  DtChooseVisualCopyingPage(makVrv::DtDe& de, QWidget* parent,
145  std::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
146  virtual ~DtChooseVisualCopyingPage() override;
147 
148  virtual bool isLastPage() const override { return false; };
149  virtual bool showFinishButton() const override { return false; };
150  virtual bool pageComplete() const override;
151  virtual bool nextPageComplete() const override { return pageComplete(); };
152  virtual DtWizardPage* nextPage(QWidget* p) override;
153 
154 protected:
155 
156  QRadioButton* myCopyVisualsIntoSms;
157  QRadioButton* myDoNotCopyVisuals;
158 
159  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
160 };
161 
163 {
164  Q_OBJECT
165 
166 public:
167  DtUpgradeSmsProgressPage(makVrv::DtDe& de, QWidget* parent,
168  std::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
169  virtual ~DtUpgradeSmsProgressPage() override;
170 
171  virtual bool isLastPage() const override { return false; };
172  virtual bool showFinishButton() const override { return false; };
173  virtual bool pageComplete() const override;
174  virtual bool nextPageComplete() const override { return pageComplete(); };
175  virtual DtWizardPage* nextPage(QWidget* p) override;
176 
177  virtual void cancel() override;
178 
179  virtual void execute() override;
180 
181  static std::vector<DtString> makePathsRelativeToDataDirectory(makVrv::DtDe&, const std::vector<DtString>&);
182 
183 protected:
184 
185  void getDestination(QString& modelSetDir, QString& smsFile) const;
186 
187  int fileCount(const DtFilename& sourceDir) const;
188  void allFilesOfType(const DtFilename& sourceDir, const QString& ext, QStringList& files) const;
189  void copyFilesFromSMS(
190  const DtSimulationModelSet* sourceSet,
191  const QString& destination,
192  QStringList& failedToCopy,
193  const QStringList& filesToIgnore = QStringList(),
194  const QStringList& fileTypesToIgnore = QStringList(),
195  const QStringList& fileTypesToNotOverwrite = QStringList());
196  bool duplicateDirectory(
197  const DtSimulationModelSet* sourceSet,
198  const DtFilename& sourceDir, const DtFilename& destDir,
199  const QStringList& filesToIgnore,
200  const QStringList& fileTypesToIgnore,
201  const QStringList& fileTypesToNotOverwrite,
202  QStringList& notCopied);
203  bool copyVisualsFromSMS(
204  const DtSimulationModelSet* sourceSet,
205  const DtFilename& destinationModelSetVisualsDir,
206  const QString& newSmsName,
207  QStringList& failedToCopy);
208  bool copyVisualsFromDirectory(
209  const DtFilename& sourceDir, const DtFilename& destDir,
210  const QString& oldSmsName, const QString& newSmsName,
211  QStringList& failedToCopy, const DtFilename& subPath = DtFilename::nullFilename());
212 
213 protected:
217 
218  std::atomic<bool> myCancel;
219 
220  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
221 };
222 
224 {
225  Q_OBJECT
226 
227 public:
228  DtUpgradeSmsCompletePage(makVrv::DtDe& de, QWidget* parent,
229  std::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
230  virtual ~DtUpgradeSmsCompletePage() override;
231 
232  virtual bool isLastPage() const override { return true; };
233  virtual bool showFinishButton() const override { return true; };
234  virtual bool pageComplete() const override { return true; };
235  virtual bool nextPageComplete() const override { return false; };
236  virtual DtWizardPage* nextPage(QWidget* p) override { return 0; };
237 
238 protected slots:
239 
240  virtual void saveReport();
241 
242 protected:
243 
246  QTextEdit* myText;
247 
248  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
249 };
250 
252 {
253  Q_OBJECT
254 
255 public:
256  DtSimulationModelSetUpgradeWizard(makVrv::DtDe&, QWidget* p, const Qt::WindowFlags& f = 0);
257  virtual ~DtSimulationModelSetUpgradeWizard() override;
258 
259  virtual void createNewModelSet();
260  virtual bool performUpgrade(const DtFilename&);
261  virtual bool performSystemUpgrade(const DtFilename&);
262 
263 public slots:
264  virtual void nextButtonClicked();
265 
266 protected:
267  virtual void keyPressEvent(QKeyEvent*) override;
268 
269 protected slots:
270  virtual void backButtonClicked();
271  virtual void cancelButtonClicked();
272  virtual void enableNextButton(bool);
273  virtual void returnKeyPressed();
274 
275 protected:
281 
282 protected:
285 
286  std::shared_ptr<DtSmsUpgradeInfo> myInfo;
287 };
288 
291 {
292 public:
295 
297  virtual ~DtSimulationModelSetUpgradeWizardCreator() override;
298 
301 
303  static void registerInstance(makVrv::DtDe&, DtSimulationModelSetUpgradeWizardCreator*);
304 
306  virtual DtSimulationModelSetUpgradeWizard* create(QWidget* parent);
307 
308 protected:
310 };
311 
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:101
virtual DtWizardPage * nextPage(QWidget *p)
Definition: newSimulationModelSetWizard.h:36
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:99
QComboBox * myVersions
Definition: simulationModelSetUpgradeWizard.h:133
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:220
bool myUpgradeInPlace
Definition: simulationModelSetUpgradeWizard.h:49
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:129
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:162
bool myIsComplete
Definition: simulationModelSetUpgradeWizard.h:216
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:126
bool myCopyVisuals
Definition: simulationModelSetUpgradeWizard.h:44
QPushButton * myFinishButton
Definition: simulationModelSetUpgradeWizard.h:279
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:277
Definition: simulationModelSetUpgradeWizard.h:39
QProgressBar * myProgressBar
Definition: simulationModelSetUpgradeWizard.h:214
Definition: simulationModelSetUpgradeWizard.h:223
Definition: simulationModelSetUpgradeWizard.h:35
QLabel * mySmsToUpgradeLabel
Definition: simulationModelSetUpgradeWizard.h:79
QRadioButton * myOriginalSmsButton
Definition: simulationModelSetUpgradeWizard.h:112
bool myUpgradeSystemsOnly
Definition: simulationModelSetUpgradeWizard.h:50
Definition: simulationModelSetUpgradeWizard.h:117
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:136
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:232
QTextEdit * myText
Definition: simulationModelSetUpgradeWizard.h:246
makVrv::DtDe & myDe
Definition: simulationModelSetUpgradeWizard.h:309
bool mySuccess
Definition: simulationModelSetUpgradeWizard.h:48
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:98
QRadioButton * myCopyVisualsIntoSms
Definition: simulationModelSetUpgradeWizard.h:156
QRadioButton * myEntityLevelButton
Definition: simulationModelSetUpgradeWizard.h:110
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:148
QLineEdit * mySmsToUpgrade
Definition: simulationModelSetUpgradeWizard.h:80
makVrv::DtDe & myDe
Definition: simulationModelSetUpgradeWizard.h:283
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:172
virtual bool pageComplete() const
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:286
Contains makVrv::DtVirtualBaseClass class.
DtSmsUpgradeType myUpgradeType
Definition: simulationModelSetUpgradeWizard.h:43
QLabel * myFileBeingCopied
Definition: simulationModelSetUpgradeWizard.h:215
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:290
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:65
std::shared_ptr< DtSimulationModelSet > myNewBaseSms
Definition: simulationModelSetUpgradeWizard.h:46
QRadioButton * myDoNotCopyVisuals
Definition: simulationModelSetUpgradeWizard.h:157
Definition: simulationModelSetUpgradeWizard.h:139
Definition: simulationModelSetUpgradeWizard.h:251
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:233
QPushButton * myNextButton
Definition: simulationModelSetUpgradeWizard.h:276
DtWizardPage * myStartPage
Definition: simulationModelSetUpgradeWizard.h:284
QString myDestinationName
Definition: simulationModelSetUpgradeWizard.h:41
virtual void cancel()
Definition: newSimulationModelSetWizard.h:45
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:151
Definition: newSimulationModelSetWizard.h:28
virtual bool pageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:234
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:278
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:174
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:248
QLabel * myDestinationLabel
Definition: simulationModelSetUpgradeWizard.h:83
virtual bool isLastPage() const override
Definition: simulationModelSetUpgradeWizard.h:171
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:114
DtSmsUpgradeType
Definition: simulationModelSetUpgradeWizard.h:32
std::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:159
virtual DtWizardPage * nextPage(QWidget *p) override
Definition: simulationModelSetUpgradeWizard.h:236
Definition: simulationModelSetUpgradeWizard.h:36
Definition: simulationModelSetUpgradeWizard.h:53
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:149
QPushButton * mySaveButton
Definition: simulationModelSetUpgradeWizard.h:245
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:134
virtual bool nextPageComplete() const override
Definition: simulationModelSetUpgradeWizard.h:235
virtual void execute()
Definition: newSimulationModelSetWizard.h:43
QLabel * myDescription
Definition: simulationModelSetUpgradeWizard.h:244
QList< DtWizardPage * > myPages
Definition: simulationModelSetUpgradeWizard.h:280
QPushButton * myBrowseButton
Definition: simulationModelSetUpgradeWizard.h:81
virtual bool showFinishButton() const override
Definition: simulationModelSetUpgradeWizard.h:127
std::atomic< bool > myCancel
Definition: simulationModelSetUpgradeWizard.h:218
#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 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)