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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)