3 #ifndef __Scheduler_GUI_H__
4 #define __Scheduler_GUI_H__
5 #pragma region Includes
7 #include "ui_SchedulerGUI.h"
9 #include "rapidjson/document.h"
10 #include "rapidjson/filestream.h"
11 #include "rapidjson/prettywriter.h"
13 #include <qmessagebox.h>
14 #include <qsettings.h>
15 #include <qdialogbuttonbox.h>
16 #include <qpushbutton.h>
17 #include <qdatetime.h>
20 #include <Utilities.h>
21 #include <ProjectNames.h>
22 #include <SimulationWorker.h>
23 #include <SimulationController.h>
24 #include <ChangeConfirmation.h>
28 #include <InfoStruct\InfoStruct.h>
29 #include <Constants\AtomicProperties.h>
31 using namespace MDSimulation;
41 namespace SchedulerGUI {
52 #pragma region Constants
53 static const QString Scheduler::ModuleName;
57 static const QString Scheduler::MostRecentlyUsedFile;
60 static const QString Scheduler::MostRecentDirectory;
79 #pragma region Protected Slots
88 void LoadParameters();
93 void LoadRecentFile();
98 void SaveParameters();
114 void UpdateDriverMode(
const QString& newMode);
120 void UpdateGasComp();
132 void UpdateParameters();
137 void ChangeOutDirBox(
const QString& dirPath);
147 void TogglePlaySim();
153 void ToggleStartButtonName(
const bool state);
159 void TogglePlayButtonName(
const bool state);
164 void WriteToLog(
const QString& message);
167 #pragma region Initialization and Helper Methods
177 void InitGasComboBoxes();
182 void InitLiquidComboBox();
187 void ConnectWidgets();
193 QString FullName(
const string& symbol);
198 bool ValidParam(QLineEdit ¶mBox);
203 void ResetGasComboBoxes();
230 bool DoubleChanged(
double a,
double b);
232 #pragma region UI Internals
254 #endif // !__Scheduler_GUI_H__
map< string, QString > FullGasNames_
Map of elements' symbols->fullnames.
Definition: Scheduler.h:243
Ui::SchedulerGUI UI_
Instance of the UI/form.
Definition: Scheduler.h:248
The main window of Scheduler.
Definition: Scheduler.h:49
QSettings * SchedulerSettings_
Settings for use in the scheduler's saving and loading of parameters.
Definition: Scheduler.h:239
bool GasCompCorrect_
True if the gases add up to 1.0, false otherwise.
Definition: Scheduler.h:245
Takes in, as input, two InfoStructs and prompts the user to Accept and change, Reject and revert...
Definition: ChangeConfirmation.h:18
vector< GasCombo > GasList_
Vector list of the gas Combo/Spin boxes.
Definition: Scheduler.h:244
Options
Used by ChangeConfirmation to signify which action the user wishes to take.
Definition: Scheduler.h:44
InfoStruct InfoStruct_
Parameters object used to read and write variables to/from .json files.
Definition: Scheduler.h:249
QString LogString_
String used for writing messages to and forwarding to the UI's action log box.
Definition: Scheduler.h:247
Handles the running of the simulation with all the necessary requirements and conditions.
Definition: SimulationController.h:17
static const string EmptySpaces
Blank spaces. Used for formatting.
Definition: Scheduler.h:63
SimulationController * SimControl_
Used to create, run, and control a simulation instance.
Definition: Scheduler.h:242
Defines the structure used to hold the configurable constants of the simulation.
Definition: InfoStruct.h:36
bool AllBoxesFilled_
True if all boxes have valid data, false otherwise.
Definition: Scheduler.h:246