VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
newSimulationModelSetWizard.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 
12 #include <vlutil/vlString.h>
13 
14 #include <QtWidgets/QDialog>
15 #include <QtCore/QList>
16 
17 class QPushButton;
18 class QRadioButton;
19 class QFileDialog;
20 class QLineEdit;
22 class DtFilename;
23 class QProgressDialog;
25 class QLabel;
26 class QVBoxLayout;
27 
29 {
30  Q_OBJECT
31 
32 public:
33  DtWizardPage(makVrv::DtDe&, QWidget*, const Qt::WindowFlags& f = 0);
34  virtual ~DtWizardPage();
35 
36  virtual DtWizardPage* nextPage(QWidget* p) { return NULL; };
37 
38  virtual bool isLastPage() const;
39  virtual bool showFinishButton() const;
40  virtual bool pageComplete() const;
41  virtual bool nextPageComplete() const { return false; };
42 
43  virtual void execute() {};
44 
45  virtual void cancel() {};
46 
47  virtual void keyPressEvent(QKeyEvent*);
48 
49  virtual void setTitle(const QString&);
50  virtual void setDescription(const QString&);
51 
52  virtual void showTitle(bool);
53  virtual void showDescription(bool);
54 
55 signals:
56  void pageCompleted(bool);
57  void returnPressed();
58  void backPage();
59  void rejected();
60 
61 protected:
64 
65 public:
67  QWidget* myContents;
68  QVBoxLayout* myContentsLayout;
69  QVBoxLayout* myMainLayout;
71 };
72 
74 {
75  Q_OBJECT
76 
77 public:
78  DtNewModelSetPage(makVrv::DtDe&, QWidget*, const Qt::WindowFlags& f = 0, bool shallowCopyOnly = false);
79  virtual ~DtNewModelSetPage();
80 
81  void setSimulationModelSet(const DtSimulationModelSet* s) { mySet = s; };
82 
83  virtual void accept();
84  virtual void reject();
85 
86  virtual void setIncludeSMSFiles(const std::vector<DtString>&);
87  virtual void setIncludeSMSFiles(const QString&);
88 
89 protected:
90  virtual bool isLastPage() const;
91  virtual bool showFinishButton() const { return true; };
92  virtual bool hideButtons(QWidget*);
93  virtual bool pageComplete() const;
94  virtual bool nextPageComplete() const { return false; };
95  virtual QLineEdit* lineEdit(QWidget*);
96  virtual void execute();
97  virtual void createFromSet(const DtSimulationModelSet& set, const QStringList& ignoreFiles = QStringList(),
98  const QStringList& overrideIgnoreFiles = QStringList());
99 
102  virtual int fileCount(const DtFilename&, const QStringList& ignore) const;
103  virtual bool duplicateDirectory(const DtFilename& sourceDir, const DtFilename& destDir,
104  const QStringList& ignore, const QStringList& overrideIgnore, QProgressDialog*, int& onFile);
105 
106 protected slots:
107  virtual void directoryChanged();
108 
109 public:
111 
112 protected:
114  std::vector<DtString> myIncludeSMSFiles;
116 };
117 
119 {
120  Q_OBJECT
121 
122 public:
123  DtExistingModelSetPage(makVrv::DtDe&, QWidget*, const QString& title, const Qt::WindowFlags& f = 0, DtNewModelSetPage* nextPage = 0, bool shallowCopyOnly = false);
124  virtual ~DtExistingModelSetPage();
125 
126 protected:
127  virtual bool isLastPage() const { return false; };
128  virtual bool showFinishButton() const { return false; };
129  virtual bool pageComplete() const;
130  virtual bool nextPageComplete() const { return pageComplete(); };
131  virtual DtWizardPage* nextPage(QWidget* p);
132  virtual void execute();
133 
134 protected:
138 };
139 
141 {
142  Q_OBJECT
143 
144 public:
145  DtIncludeSimulationModelSetsPage(makVrv::DtDe&, QWidget*, DtWizardPage* nextPage, DtWizardPage* parentPage = 0, const Qt::WindowFlags& f = 0);
147 
148  virtual void setSimulationModelSet(const QString&);
149 
150 protected:
151  virtual bool isLastPage() const;
152  virtual bool pageComplete() const;
153  virtual bool nextPageComplete() const { return pageComplete(); };
154  virtual DtWizardPage* nextPage(QWidget* p);
155  virtual void execute();
156  virtual void copyIncludeFiles();
157  virtual void copyIncludeFiles(DtWizardPage*);
158 
159 protected:
164 };
165 
167 {
168  Q_OBJECT
169 
170 public:
171  DtSimulationModelSetSelectionPage(makVrv::DtDe&, QWidget*, const Qt::WindowFlags& f = 0);
173 
174 protected:
175  virtual DtWizardPage* nextPage(QWidget* p);
176  virtual bool pageComplete() const { return true; };
177  virtual bool nextPageComplete() const { return true; };
178  virtual void execute();
179  virtual DtNewModelSetPage* createNewModelSetPage(QWidget* p, bool shallowCopyOnly);
180  virtual DtExistingModelSetPage* createExistingModelSetPage(QWidget* p, DtNewModelSetPage* nextPage,
181  const QString& title, bool shallowCopyOnly = false);
182 
183 public:
184  QWidget* myChoiceWidget;
185  QRadioButton* myMinimalModelSet;
186  QRadioButton* myExtendExisting;
188 
189 protected:
191 };
192 
194 {
195  Q_OBJECT
196 
197 public:
198  DtChoicePage(makVrv::DtDe&, QWidget*, const Qt::WindowFlags& f = 0);
199  virtual ~DtChoicePage();
200 
201 protected:
202  virtual DtWizardPage* nextPage(QWidget* p);
203  virtual bool pageComplete() const { return true; };
204  virtual bool nextPageComplete() const { return true; };
205  virtual void execute();
206  virtual DtSimulationModelSetSelectionPage* createSimulationModelSetSelectionPage(QWidget* p);
207  virtual DtExistingModelSetPage* createExistingModelSetPage(QWidget* p, DtNewModelSetPage* nextPage, const QString& title, bool shallowCopyOnly = false);
208 
209 public:
210  QWidget* myChoiceWidget;
211  QRadioButton* myCreateNew;
212  QRadioButton* myCreateFromExisting;
214 
215 protected:
217 };
218 
220 {
221  Q_OBJECT
222 
223 public:
224  DtNewSimulationModelSetWizard(makVrv::DtDe&, QWidget* p, const Qt::WindowFlags& f = 0, DtWizardPage* statePage = 0);
226 
227  virtual void createNewModelSet();
228 
229 protected:
230  virtual void keyPressEvent(QKeyEvent*);
231  virtual DtChoicePage* createChoicePage(QWidget*);
232 
233 protected slots:
234  virtual void backButtonClicked();
235  virtual void nextButtonClicked();
236  virtual void enableNextButton(bool);
237  virtual void returnKeyPressed();
238 
239 protected:
245 
246 protected:
247  QWidget* myChoicePage;
250 };
251 
254 {
255 public:
258 
261 
264 
266  static void registerInstance(makVrv::DtDe&, DtNewSimulationModelSetWizardCreator*);
267 
269  virtual DtNewSimulationModelSetWizard* create(QWidget* parent, DtWizardPage* startPage = 0);
270 
271 protected:
273 };

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)