-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindowWorkflowApp.h
109 lines (87 loc) · 2.61 KB
/
MainWindowWorkflowApp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#ifndef MAIN_WINDOW_WORKFLOW_APP_H
#define MAIN_WINDOW_WORKFLOW_APP_H
#include <QMainWindow>
#include <QItemSelection>
#include <QTreeView>
#include <QStandardItemModel>
#include <QJsonObject>
class WorkflowAppWidget;
class SimCenterWidget;
class QPushButton;
class QLabel;
class OpenSRAPreferences;
class ProgramOutputDialog;
class MainWindowWorkflowApp : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindowWorkflowApp(QString appName, WorkflowAppWidget *theApp, QWidget *parent = 0);
~MainWindowWorkflowApp();
void setCopyright(QString ©right);
void setVersion(QString &version);
void setDocumentationURL(QString &version);
void setAbout(QString &about);
void setAbout(QString &, QString&);
void setFeedbackURL(QString &feedback);
void setCite(QString &cite);
void createHelpMenu();
QPushButton *getPreProcessButton() const;
QPushButton *getRunButton() const;
protected:
signals:
void attemptLogin(QString, QString);
void logout();
void sendStatusMessage(QString message);
void sendErrorMessage(QString message);
void sendFatalMessage(QString message);
void sendInfoMessage(QString message);
public slots:
// for menu items
void newFile();
void openConfigJson();
void openRunFolder();
void openFile(QString filename);
bool save();
bool saveAs();
void about();
void manual();
void submitFeedback();
void version();
void preferences();
void copyright();
void cite();
// for main actions
void onRunButtonClicked();
void onPreprocessButtonClicked();
void onExitButtonClicked();
private:
void setCurrentFile(const QString &fileName);
bool saveFile(const QString &fileName);
void loadFile(const QString &fileName);
void createActions();
QMenu *fileMenu = nullptr;
QMenu *editMenu = nullptr;
QMenu *selectSubMenu = nullptr;
QMenu *toolsMenu = nullptr;
QMenu *optionsMenu = nullptr;
QMenu *helpMenu = nullptr;
QToolBar *fileToolBar = nullptr;
QToolBar *editToolBar = nullptr;
QString currentFile;
WorkflowAppWidget *inputWidget = nullptr;
QPushButton *preProcessButton = nullptr;
QPushButton *runButton = nullptr;
QPushButton *loginButton = nullptr;
ProgramOutputDialog* statusWidget = nullptr;
QDockWidget* statusDockWidget = nullptr;
QString versionText;
QString aboutText;
QString aboutTitle;
QString aboutSource;
QString copyrightText;
QString manualURL;
QString feedbackURL;
QString citeText;
OpenSRAPreferences *thePreferences = nullptr;
};
#endif // MAIN_WINDOW_WORKFLOW_APP_H