VR-Forces 5.0.1 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 <QtWidgets/QCheckBox>
18 #include <QtCore/QList>
19 #include <QtCore/QStringList>
20 
21 #include <tbb/atomic.h>
22 
23 #include <set>
24 
25 class QPushButton;
26 class QFileDialog;
27 class QLineEdit;
29 class DtFilename;
30 class QProgressBar;
31 class QComboBox;
32 
34 {
38 };
39 
41 {
43  QString mySmsVersion;
46  boost::shared_ptr<DtSimulationModelSet> mySmsToUpgrade;
47  boost::shared_ptr<DtSimulationModelSet> myNewBaseSms;
48  QStringList myFileUpgradeFailures;
49  bool mySuccess;
50 };
51 
53 {
54  Q_OBJECT
55 
56 public:
57  DtChooseSmsToUpgradePage(makVrv::DtDe& de, QWidget* parent,
58  boost::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
59  virtual ~DtChooseSmsToUpgradePage();
60 
61  virtual bool isLastPage() const { return false; };
62  virtual bool showFinishButton() const { return false; };
63  virtual bool pageComplete() const;
64  virtual bool nextPageComplete() const { return pageComplete(); };
65  virtual DtWizardPage* nextPage(QWidget* p);
66 
67 
68 protected slots:
69 
70  virtual void browseForSms();
71  virtual void smsChanged();
72  virtual void destinationChanged();
73 
74 protected:
75 
79 
82 
83  boost::shared_ptr<DtSmsUpgradeInfo> myInfo;
84 };
85 
87 {
88  Q_OBJECT
89 
90 public:
91  DtChooseSmsCopiedFromPage(makVrv::DtDe& de, QWidget* parent,
92  boost::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
93  virtual ~DtChooseSmsCopiedFromPage();
94 
95  virtual bool isLastPage() const { return false; };
96  virtual bool showFinishButton() const { return false; };
97  virtual bool pageComplete() const;
98  virtual bool nextPageComplete() const { return pageComplete(); };
99  virtual DtWizardPage* nextPage(QWidget* p);
100 
101 protected slots:
102 
103  virtual void selectionChanged();
104 
105 protected:
106 
107  QRadioButton* myEntityLevelButton;
108  QRadioButton* myAggregateLevelButton;
109  QRadioButton* myOriginalSmsButton;
110 
111  boost::shared_ptr<DtSmsUpgradeInfo> myInfo;
112 };
113 
115 {
116  Q_OBJECT
117 
118 public:
119  DtChooseVersionPage(makVrv::DtDe& de, QWidget* parent,
120  boost::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
121  virtual ~DtChooseVersionPage();
122 
123  virtual bool isLastPage() const { return false; };
124  virtual bool showFinishButton() const { return false; };
125  virtual bool pageComplete() const;
126  virtual bool nextPageComplete() const { return pageComplete(); };
127  virtual DtWizardPage* nextPage(QWidget* p);
128 
129 protected:
132 
133  boost::shared_ptr<DtSmsUpgradeInfo> myInfo;
134 };
135 
137 {
138  Q_OBJECT
139 
140 public:
141  DtChooseVisualCopyingPage(makVrv::DtDe& de, QWidget* parent,
142  boost::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
143  virtual ~DtChooseVisualCopyingPage();
144 
145  virtual bool isLastPage() const { return false; };
146  virtual bool showFinishButton() const { return false; };
147  virtual bool pageComplete() const;
148  virtual bool nextPageComplete() const { return pageComplete(); };
149  virtual DtWizardPage* nextPage(QWidget* p);
150 
151 protected:
152 
153  QRadioButton* myCopyVisualsIntoSms;
154  QRadioButton* myDoNotCopyVisuals;
155 
156  boost::shared_ptr<DtSmsUpgradeInfo> myInfo;
157 };
158 
160 {
161  Q_OBJECT
162 
163 public:
164  DtUpgradeSmsProgressPage(makVrv::DtDe& de, QWidget* parent,
165  boost::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
166  virtual ~DtUpgradeSmsProgressPage();
167 
168  virtual bool isLastPage() const { return false; };
169  virtual bool showFinishButton() const { return false; };
170  virtual bool pageComplete() const;
171  virtual bool nextPageComplete() const { return pageComplete(); };
172  virtual DtWizardPage* nextPage(QWidget* p);
173 
174  virtual void cancel();
175 
176  virtual void execute();
177 
178  static std::vector<DtString> makePathsRelativeToDataDirectory(makVrv::DtDe&, const std::vector<DtString>&);
179 
180 protected:
181 
182  void getDestination(QString& modelSetDir, QString& smsFile) const;
183 
184  int fileCount(const DtFilename& sourceDir) const;
185  void allFilesOfType(const DtFilename& sourceDir, const QString& ext, QStringList& files) const;
186  void copyFilesFromSMS(
187  const DtSimulationModelSet* sourceSet,
188  const QString& destination,
189  QStringList& failedToCopy,
190  const QStringList& filesToIgnore = QStringList(),
191  const QStringList& fileTypesToIgnore = QStringList(),
192  const QStringList& fileTypesToNotOverwrite = QStringList());
193  bool duplicateDirectory(
194  const DtSimulationModelSet* sourceSet,
195  const DtFilename& sourceDir, const DtFilename& destDir,
196  const QStringList& filesToIgnore,
197  const QStringList& fileTypesToIgnore,
198  const QStringList& fileTypesToNotOverwrite,
199  QStringList& notCopied);
200  bool copyVisualsFromSMS(
201  const DtSimulationModelSet* sourceSet,
202  const DtFilename& destinationModelSetVisualsDir,
203  const QString& newSmsName,
204  QStringList& failedToCopy);
205  bool copyVisualsFromDirectory(
206  const DtFilename& sourceDir, const DtFilename& destDir,
207  const QString& oldSmsName, const QString& newSmsName,
208  QStringList& failedToCopy, const DtFilename& subPath = DtFilename::nullFilename());
209 
210 protected:
214 
215  tbb::atomic<bool> myCancel;
216 
217  boost::shared_ptr<DtSmsUpgradeInfo> myInfo;
218 };
219 
221 {
222  Q_OBJECT
223 
224 public:
225  DtUpgradeSmsCompletePage(makVrv::DtDe& de, QWidget* parent,
226  boost::shared_ptr<DtSmsUpgradeInfo> info, const Qt::WindowFlags& f = 0);
227  virtual ~DtUpgradeSmsCompletePage();
228 
229  virtual bool isLastPage() const { return true; };
230  virtual bool showFinishButton() const { return true; };
231  virtual bool pageComplete() const { return true; };
232  virtual bool nextPageComplete() const { return false; };
233  virtual DtWizardPage* nextPage(QWidget* p) { return 0; };
234 
235 protected slots:
236 
237  virtual void saveReport();
238 
239 protected:
240 
243  QTextEdit* myText;
244 
245  boost::shared_ptr<DtSmsUpgradeInfo> myInfo;
246 };
247 
249 {
250  Q_OBJECT
251 
252 public:
253  DtSimulationModelSetUpgradeWizard(makVrv::DtDe&, QWidget* p, const Qt::WindowFlags& f = 0);
255 
256  virtual void createNewModelSet();
257 
258 protected:
259  virtual void keyPressEvent(QKeyEvent*);
260 
261 protected slots:
262  virtual void backButtonClicked();
263  virtual void nextButtonClicked();
264  virtual void cancelButtonClicked();
265  virtual void enableNextButton(bool);
266  virtual void returnKeyPressed();
267 
268 protected:
274 
275 protected:
278 
279  boost::shared_ptr<DtSmsUpgradeInfo> myInfo;
280 };
281 
284 {
285 public:
288 
291 
294 
296  static void registerInstance(makVrv::DtDe&, DtSimulationModelSetUpgradeWizardCreator*);
297 
299  virtual DtSimulationModelSetUpgradeWizard* create(QWidget* parent);
300 
301 protected:
303 };
304 
virtual DtWizardPage * nextPage(QWidget *p)
Definition: newSimulationModelSetWizard.h:36
virtual bool isLastPage() const
Definition: simulationModelSetUpgradeWizard.h:95
QComboBox * myVersions
Definition: simulationModelSetUpgradeWizard.h:130
virtual bool nextPageComplete() const
Definition: simulationModelSetUpgradeWizard.h:171
virtual bool showFinishButton() const
Definition: simulationModelSetUpgradeWizard.h:62
tbb::atomic< bool > myCancel
Definition: simulationModelSetUpgradeWizard.h:215
virtual bool isLastPage() const
Definition: simulationModelSetUpgradeWizard.h:229
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:159
bool myIsComplete
Definition: simulationModelSetUpgradeWizard.h:213
bool myCopyVisuals
Definition: simulationModelSetUpgradeWizard.h:45
QPushButton * myFinishButton
Definition: simulationModelSetUpgradeWizard.h:272
Definition: simulationModelSetUpgradeWizard.h:35
QRadioButton * myAggregateLevelButton
Definition: simulationModelSetUpgradeWizard.h:108
QStringList myFileUpgradeFailures
Definition: simulationModelSetUpgradeWizard.h:48
QString mySmsVersion
Definition: simulationModelSetUpgradeWizard.h:43
virtual bool isLastPage() const
Definition: simulationModelSetUpgradeWizard.h:168
QPushButton * myBackButton
Definition: simulationModelSetUpgradeWizard.h:270
Definition: simulationModelSetUpgradeWizard.h:40
QProgressBar * myProgressBar
Definition: simulationModelSetUpgradeWizard.h:211
Definition: simulationModelSetUpgradeWizard.h:220
Definition: simulationModelSetUpgradeWizard.h:36
QLabel * mySmsToUpgradeLabel
Definition: simulationModelSetUpgradeWizard.h:76
QRadioButton * myOriginalSmsButton
Definition: simulationModelSetUpgradeWizard.h:109
virtual bool showFinishButton() const
Definition: simulationModelSetUpgradeWizard.h:230
virtual bool nextPageComplete() const
Definition: simulationModelSetUpgradeWizard.h:64
Definition: simulationModelSetUpgradeWizard.h:114
boost::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:156
QTextEdit * myText
Definition: simulationModelSetUpgradeWizard.h:243
makVrv::DtDe & myDe
Definition: simulationModelSetUpgradeWizard.h:302
bool mySuccess
Definition: simulationModelSetUpgradeWizard.h:49
virtual bool pageComplete() const
Definition: simulationModelSetUpgradeWizard.h:231
boost::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:83
QRadioButton * myCopyVisualsIntoSms
Definition: simulationModelSetUpgradeWizard.h:153
QRadioButton * myEntityLevelButton
Definition: simulationModelSetUpgradeWizard.h:107
QLineEdit * mySmsToUpgrade
Definition: simulationModelSetUpgradeWizard.h:77
virtual bool showFinishButton() const
Definition: simulationModelSetUpgradeWizard.h:146
makVrv::DtDe & myDe
Definition: simulationModelSetUpgradeWizard.h:276
virtual bool nextPageComplete() const
Definition: simulationModelSetUpgradeWizard.h:148
virtual bool nextPageComplete() const
Definition: simulationModelSetUpgradeWizard.h:232
virtual bool showFinishButton() const
Definition: simulationModelSetUpgradeWizard.h:169
virtual bool pageComplete() const
Contains makVrv::DtVirtualBaseClass class.
DtSmsUpgradeType myUpgradeType
Definition: simulationModelSetUpgradeWizard.h:44
boost::shared_ptr< DtSimulationModelSet > mySmsToUpgrade
Definition: simulationModelSetUpgradeWizard.h:46
QLabel * myFileBeingCopied
Definition: simulationModelSetUpgradeWizard.h:212
Definition: simulationModelSetUpgradeWizard.h:86
virtual DtWizardPage * nextPage(QWidget *p)
Definition: simulationModelSetUpgradeWizard.h:233
virtual bool nextPageComplete() const
Definition: simulationModelSetUpgradeWizard.h:126
Creator for the dialog.
Definition: simulationModelSetUpgradeWizard.h:283
virtual bool isLastPage() const
Definition: simulationModelSetUpgradeWizard.h:145
QRadioButton * myDoNotCopyVisuals
Definition: simulationModelSetUpgradeWizard.h:154
Definition: simulationModelSetUpgradeWizard.h:136
Definition: simulationModelSetUpgradeWizard.h:248
virtual bool nextPageComplete() const
Definition: simulationModelSetUpgradeWizard.h:98
boost::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:111
boost::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:133
QPushButton * myNextButton
Definition: simulationModelSetUpgradeWizard.h:269
DtWizardPage * myStartPage
Definition: simulationModelSetUpgradeWizard.h:277
QString myDestinationName
Definition: simulationModelSetUpgradeWizard.h:42
virtual void cancel()
Definition: newSimulationModelSetWizard.h:45
Definition: newSimulationModelSetWizard.h:28
virtual bool isLastPage() const
Definition: simulationModelSetUpgradeWizard.h:123
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:271
boost::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:217
QLabel * myDestinationLabel
Definition: simulationModelSetUpgradeWizard.h:80
DtSmsUpgradeType
Definition: simulationModelSetUpgradeWizard.h:33
Definition: simulationModelSetUpgradeWizard.h:37
Definition: simulationModelSetUpgradeWizard.h:52
boost::shared_ptr< DtSimulationModelSet > myNewBaseSms
Definition: simulationModelSetUpgradeWizard.h:47
QPushButton * mySaveButton
Definition: simulationModelSetUpgradeWizard.h:242
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:70
QLabel * myAdditionalText
Definition: simulationModelSetUpgradeWizard.h:131
boost::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:245
virtual bool isLastPage() const
Definition: simulationModelSetUpgradeWizard.h:61
virtual void execute()
Definition: newSimulationModelSetWizard.h:43
QLabel * myDescription
Definition: simulationModelSetUpgradeWizard.h:241
QList< DtWizardPage * > myPages
Definition: simulationModelSetUpgradeWizard.h:273
virtual bool showFinishButton() const
Definition: simulationModelSetUpgradeWizard.h:124
boost::shared_ptr< DtSmsUpgradeInfo > myInfo
Definition: simulationModelSetUpgradeWizard.h:279
QPushButton * myBrowseButton
Definition: simulationModelSetUpgradeWizard.h:78
virtual bool showFinishButton() const
Definition: simulationModelSetUpgradeWizard.h:96
#define DT_DLL_simulationObjectEditorimpl
This file is used to determine how to build.
Definition: simulationObjectEditorImplDefines.h:33
QLineEdit * myDestinationName
Definition: simulationModelSetUpgradeWizard.h:81

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)