.Simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
ChangeConfirmation.h
1 // ChangeConfirmation.h - ChangeConfirmationGUI main window declaration.
2 // Written by Nicholas Kriner
3 #ifndef __Change_Confirmation_GUI_H__
4 #define __Change_Confirmation_GUI_H__
5 #pragma region Includes
6 #include "stdafx.h"
7 #include "ui_ChangeConfirmationGUI.h"
8 
9 #include "Scheduler.h"
10 
11 using namespace std;
12 #pragma endregion
13 namespace SchedulerGUI {
18  class ChangeConfirmation : public QDialog {
19  Q_OBJECT
20  public:
21  #pragma region Constants
22  static const string ChangeConfirmation::EmptySpaceNames;
25  static const string ChangeConfirmation::EmptySpaceValues;
26  #pragma endregion
27 
35  ChangeConfirmation(InfoStruct oldStruct, InfoStruct newStruct, int *changeAccepted);
36 
41 
42  protected slots:
43  #pragma region Protected Slots
44 
49  void AcceptChanges();
50 
56  void RevertChanges();
57  #pragma endregion
58  protected:
59  #pragma region Initialization and Helper Methods
60 
63  void ShowInfoStructDifference(InfoStruct structA, InfoStruct structB);
64 
70  bool DoubleChanged(double a, double b);
71 
78  QString BeautifyOutput(QString paramName, double paramA, double paramB);
79 
86  QString BeautifyOutput(QString paramName, QString paramA, QString paramB);
87 
93  void ConnectWidgets();
94  #pragma endregion
95  #pragma region UI Internals
96  int* Accept_;
97  Ui::ChangeConfirmationGUI UI_;
98  #pragma endregion
99  };
100 }
101 #endif // !__ChangeConfirmation_GUI_H__
Ui::ChangeConfirmationGUI UI_
Instance of the UI/form.
Definition: ChangeConfirmation.h:97
Takes in, as input, two InfoStructs and prompts the user to Accept and change, Reject and revert...
Definition: ChangeConfirmation.h:18
int * Accept_
Set to true if the changes are accepted; false otherwise.
Definition: ChangeConfirmation.h:96
Defines the structure used to hold the configurable constants of the simulation.
Definition: InfoStruct.h:36