22 #include <QMainWindow> 
   23 #include <QTreeWidget> 
   29 #include <QPushButton> 
   31 #include <QStringList> 
   34 #include <QListWidget> 
   35 #include <QListWidgetItem> 
   36 #include <QFileSystemWatcher> 
  208     void finishedFCST(
int status ,QProcess::ExitStatus qStatus);
 
  250     bool save_file (
const QString &filename, 
const QString &newfilename = 
"");
 
  254     void load_file (
const QString &filename, 
bool showMsg = 
true);
 
  269     bool callFCST(QStringList arguments, 
bool pipeMsg);
 
  281     void log(
const std::string &input);
 
QStringList current_files
This value stores the current filename we work on. 
Definition: main_window.h:342
 
void create_tab(QString name_)
Function for creating tab given a file in the local working directory Throws an std::runtime_error if...
 
void create_actions()
This function creates all actions. 
 
QListWidget * outputList
Elements for displaying files output by FCST. 
Definition: main_window.h:385
 
bool save_file(const QString &filename, const QString &newfilename="")
Save parameters to filename in XML format. 
 
QString mainFileName
Definition: main_window.h:407
 
void load_file(const QString &filename, bool showMsg=true)
Load parameters from filename in XML format. 
 
QVBoxLayout * vBoxRight
Definition: main_window.h:367
 
QSettings * gui_settings
An object for storing user settings. 
Definition: main_window.h:346
 
QMenu * file_menu
This menu provides all file actions as open, save, save as and exit 
Definition: main_window.h:296
 
QString workingDir
Strings for important locations. 
Definition: main_window.h:396
 
void create_menus()
This function creates all menus. 
 
Definition: main_window.h:376
 
bool callQuit
Definition: main_window.h:270
 
void about()
Show some information on the parameterGUI. 
 
bool callFCST(QStringList arguments, bool pipeMsg)
Functions for calling and killing FCST, if pipeMsg is true then FCST output will be displayed on scre...
 
void log(const std::string &input)
Logging function, appends to gui_log.txt. 
 
QLabel * fileLabel
Definition: main_window.h:388
 
bool maybe_save()
This function checks, if parameters were changed and show a dialog, if changes should be saved...
 
QHBoxLayout * buttonBox
Definition: main_window.h:366
 
Definition: main_window.h:375
 
QLabel * logoLabel
Elements for displaying FCST logo in bottom left corner. 
Definition: main_window.h:362
 
void closeEvent(QCloseEvent *event)
Reimplemented from QMainWindow. 
 
Definition: main_window.h:373
 
QTabWidget * tabWidget
Definition: main_window.h:368
 
QString dataFileName
Definition: main_window.h:407
 
The MainWindow class of the the FCST parameterGUI. 
Definition: main_window.h:144
 
void printOutput()
A slot that should be called to take output from the current process's std and err streams...
 
QPushButton * nextButton
Button for driving user events forward. 
Definition: main_window.h:350
 
Definition: main_window.h:374
 
States
Enumeration describing states of project creation/simulation execution. 
Definition: main_window.h:372
 
bool save_as()
Open a file dialog to save the parameter file. 
 
void finishedFCST(int status, QProcess::ExitStatus qStatus)
A slot that is called when FCST ends, updates GUI state. 
 
QFileSystemWatcher * fileWatcher
Definition: main_window.h:386
 
QString optFileName
Definition: main_window.h:407
 
QHBoxLayout * hBox
Dynamic sizers for managing the size and position of visual elements. 
Definition: main_window.h:366
 
QVBoxLayout * vBoxLeft
Definition: main_window.h:367
 
QAction * new_act
QAction Start a new project. 
Definition: main_window.h:310
 
void tree_was_modified()
A slot that should be always called, if parameter values were changed. 
 
void save_log()
A slot to manage user interaction when the menu "Save Log File" action is triggered. 
 
void updateFolderView(const QString &path)
A slot that is called when fileWatcher reports new files in the workingDir. 
 
bool setWorkingDir()
Function for getting working directory from user. 
 
QAction * save_as_act
QAction save as a file. 
Definition: main_window.h:322
 
std::map< QString, bool > treeStatus
The status of the individual trees, true if they do not need to be saved. 
Definition: main_window.h:291
 
QWidget * buttonPanel
Definition: main_window.h:354
 
QAction * save_act
QAction save a file. 
Definition: main_window.h:318
 
QAction * open_act
QAction open a file. 
Definition: main_window.h:314
 
std::map< QString,QTreeWidget * > tree_widget
This is the trees which we display all parameters. 
Definition: main_window.h:287
 
QString FCSTBinAddr
Definition: main_window.h:397
 
QWidget * body
QWidget elements, essentially panels, to house other elements of interest. 
Definition: main_window.h:354
 
QFont font
Definition: main_window.h:387
 
void create_widgets()
Function for setting up GUI, used by constructor. 
 
MainWindow(const QString &filename="")
Constructor. 
 
QAction * about_qt_act
QAction about Qt. 
Definition: main_window.h:338
 
States currentState
The GUI's current state. 
Definition: main_window.h:381
 
QString paramArg
OpenFCST binary arguments and file names produced by OpenFCST. 
Definition: main_window.h:406
 
void next_click()
A slot for the next button, progresses the GUI's state. 
 
QMenu * help_menu
This menu provides some informations about the parameterGUI and about Qt 
Definition: main_window.h:301
 
void openProject()
Open a project. 
 
QLabel * FCSToutputLabel
Definition: main_window.h:388
 
void fileBrowserClicked(QListWidgetItem *item)
A slot to manage user interaction when a file name is double clicked in the file browser. 
 
void aboutOpenFCST()
Show some information on the OpenFCST. 
 
QProcess * process
Object for calling FCST. 
Definition: main_window.h:392
 
std::ofstream flog
ofstream object for logging 
Definition: main_window.h:402
 
QAction * exit_act
QAction exit the GUI. 
Definition: main_window.h:326
 
QAction * save_log_act
QAction Start a new project. 
Definition: main_window.h:306
 
QTextEdit * textOut
QTextEdit for displaying FCST output to user. 
Definition: main_window.h:358
 
void newProject()
A slot attached to a menu action, to start a new project. 
 
QAction * aboutFCST_act
QAction about the parameterGUI. 
Definition: main_window.h:334
 
bool saveAll()
Save the parameter file. 
 
QAction * about_act
QAction about the parameterGUI. 
Definition: main_window.h:330