29#include <qmainwindow.h>
32#include <QActionGroup>
37#include <QWidgetAction>
57class ProgressStatusBar;
81 MainForm(vector<QString> files, QApplication *app,
bool interactive =
true,
string filesType =
"auto", QWidget *parent = 0);
84 int RenderAndExit(
int start,
int end,
const std::string &baseFile,
int width,
int height);
90 static const QEvent::Type ParamsChangeEvent;
91 static const QEvent::Type ParamsIntermediateChangeEvent;
92 static const std::string _documentationURL;
99 QAction *_playForwardAction;
100 QAction *_playBackwardAction;
101 QAction *_pauseAction;
105 QAction * _editUndoAction;
106 QAction * _editRedoAction;
107 QAction * _appSettingsAction;
108 QLineEdit * _timeStepEdit;
109 QIntValidator *_timeStepEditValidator;
111 QComboBox *_alignViewCombo;
112 QMenuBar * _main_Menubar;
116 QMenu * _captureMenu;
118 QMenu * _developerMenu;
120 QToolBar *_vizToolBar;
121 QToolBar *_animationToolBar;
126 QMenu *_closeVDCMenu;
132 QAction *_fileOpenAction;
133 QAction *_fileSaveAction;
134 QAction *_fileSaveAsAction;
135 QAction *_fileExitAction;
139 QAction *_helpAboutAction;
140 QAction *_whatsThisAction;
141 QAction *_installCLIToolsAction;
142 QAction *_webDocumentationAction;
146 QAction *_dataLoad_MetafileAction;
147 QAction *_dataClose_MetafileAction;
148 QAction *_fileNew_SessionAction;
149 QAction *_plotAction;
150 QAction *_statsAction;
151 QAction *_pythonAction;
155 QMenu * _singleImageMenu;
156 QAction *_captureSingleJpegAction;
157 QAction *_captureSinglePngAction;
158 QAction *_captureSingleTiffAction;
160 QMenu * _imageSequenceMenu;
161 QAction *_captureJpegSequenceAction;
162 QAction *_capturePngSequenceAction;
163 QAction *_captureTiffSequenceAction;
165 QAction *_captureEndImageAction;
169 QAction * _tileAction;
170 QAction * _cascadeAction;
171 QAction * _homeAction;
172 QAction * _sethomeAction;
173 QAction * _viewAllAction;
174 QAction * _viewRegionAction;
175 QAction * _stepForwardAction;
176 QAction * _stepBackAction;
177 QSpinBox * _interactiveRefinementSpin;
178 QDockWidget *_tabDockWindow;
180 bool _animationCapture =
false;
181 int _progressSavedFB = -1;
182 bool _progressEnabled =
false;
183 bool _needToReenableProgressAfterAnimation =
false;
184 QAction *_progressEnabledMenuItem =
nullptr;
186 ProgressStatusBar * _status =
nullptr;
187 std::chrono::time_point<std::chrono::system_clock> _progressLastUpdateTime;
188 const QObject * _disableUserInputForAllExcept =
nullptr;
189 bool _insideMessedUpQtEventLoop =
false;
202 string _capturingAnimationVizName;
204 bool _stateChangeFlag;
205 bool _sessionNewFlag;
206 bool _begForCitation;
207 int _eventsSinceLastSave;
209 bool _paramsEventQueued =
false;
215 QMenu *_loadBookmarkMenu;
216 QMenu *_deleteBookmarkMenu;
218 void createBookmark();
219 void populateBookmarkList();
220 void loadBookmark(
int i);
221 void deleteBookmark(
int i);
227 void _performSessionAutoSave();
228 void _stateChangeCB();
229 void _intermediateStateChangedCB();
231 QMdiArea *getMDIArea() {
return _mdiArea; }
233 QApplication *getApp() {
return _App; }
235 void setInteractiveRefinementSpin(
int);
236 void enableKeyframing(
bool onoff);
244 _playForwardAction->setChecked(
false);
245 _playBackwardAction->setChecked(
false);
246 _pauseAction->setChecked(
true);
249 void showCitationReminder();
251 void stopAnimCapture(
string vizName)
253 if (vizName == _capturingAnimationVizName) endAnimCapture();
286 virtual void undoRedoHelper(
bool undo);
287 static bool doesQStringContainNonASCIICharacter(
const QString &s);
288 static int checkQStringContainsNonASCIICharacter(
const QString &s);
289 std::vector<string> myGetOpenFileNames(
string prompt,
string dir,
string filter,
bool multi);
291 void closeDataHelper(
string dataSetName);
293 bool openDataHelper(
string dataSetName,
string format,
const vector<string> &files,
const vector<string> &options = vector<string>());
295 enum DatasetExistsAction { Prompt, AddNew, ReplaceFirst };
296 void loadDataHelper(
string dataSetName,
const std::vector<string> &files,
string prompt,
string filter,
string format,
bool multi, DatasetExistsAction existsAction = Prompt);
297 void _createCaptureMenu();
298 void _createToolsMenu();
299 void _createEditMenu();
300 void _createFileMenu();
301 void _createHelpMenu();
302 void _createDeveloperMenu();
304 void hookupSignals();
305 void _createAnimationToolBar();
306 void _createVizToolBar();
307 void createToolBars();
308 void _createProgressWidget();
309 void _disableProgressWidget();
310 virtual void sessionOpenHelper(
string fileName,
bool loadDatasets =
true);
311 void closeAllParamsDatasets();
312 void loadAllParamsDatasets();
314 template<
class T>
bool isDatasetValidFormat(
const std::vector<std::string> &paths)
const;
315 bool determineDatasetFormat(
const std::vector<std::string> &paths, std::string *fmt)
const;
317 void CheckForUpdates();
318 void CheckForNotices();
319 void CheckForCasperVGL();
321 bool isOpenGLContextActive()
const;
325 void enableWidgets(
bool onOff);
327 void enableAnimationWidgets(
bool onOff);
329 void _fileSaveHelper(
string path);
331 string _getDataSetName(
string file, DatasetExistsAction existsAction = Prompt);
336 void sessionOpen(QString qfileName =
"",
bool loadDatasets =
true);
343 void loadData(
string fileName =
"");
344 void closeData(
string fileName =
"");
346 void captureJpegSequence();
347 void captureTiffSequence();
348 void capturePngSequence();
349 void selectAnimCatureOutput(
string filter,
string defaultSuffix);
350 void startAnimCapture(
string baseFile,
string defaultSuffix =
"tiff");
351 void endAnimCapture();
352 void captureSingleImage(
string filter,
string defaultSuffix);
353 void captureSingleJpeg();
354 void captureSinglePng();
355 void captureSingleTiff();
356 void installCLITools();
358 void launchPlotUtility();
359 void launchPythonVariables();
364 void launchWebDocs()
const;
365 void setInteractiveRefLevel(
int);
366 void loadStartingPrefs();
368 void setActiveEventRouter(
string type);
370 void _setProj4String(
string proj4String);
372 void _setAnimationOnOff(
bool onOff);
373 void _setAnimationDraw();
This class is just migrated legacy code to de-spaghetti other legacy code. (It is not written by me)
A class that specifies parameters used in animation.
static string GetClassType()
A utility singleton class that provides error reporting functinality.
static string GetClassType()
bool eventFilter(QObject *obj, QEvent *event)
int RenderAndExit(int start, int end, const std::string &baseFile, int width, int height)
MainForm(vector< QString > files, QApplication *app, bool interactive=true, string filesType="auto", QWidget *parent=0)
A class for describing settings at settings.
static string GetClassType()
A class that manages the contents of the parameter tabs in VAPOR GUI.
Provides API for VAPOR visualizer User Interfaces (UIs)
A singleton class for managing Params instances.
ParamsBase * GetParams(string classType)
A class for managing all visualizers.