diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index 4b7ec5a..b83112e 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -19,6 +19,7 @@ #include "gui/AnalysisWindow.h" #include "gui/MainWindow.h" #include "gui/ThrustCurveMotorSelector.h" +#include "gui/SimulationOptions.h" #include "model/Rocket.h" #include "utils/RSEDatabaseLoader.h" @@ -160,3 +161,14 @@ void MainWindow::on_getTCMotorData_clicked() } + +void MainWindow::on_actionSimulation_Options_triggered() +{ + if(!simOptionsWindow) + { + simOptionsWindow = new SimulationOptions(this); + } + simOptionsWindow->show(); + +} + diff --git a/gui/MainWindow.h b/gui/MainWindow.h index 68c5be7..4c79055 100644 --- a/gui/MainWindow.h +++ b/gui/MainWindow.h @@ -11,6 +11,8 @@ // qtrocket headers #include "QtRocket.h" +#include "gui/SimulationOptions.h" + QT_BEGIN_NAMESPACE namespace Ui { class MainWindow; } @@ -43,8 +45,12 @@ private slots: void on_getTCMotorData_clicked(); -private: + void on_actionSimulation_Options_triggered(); + + private: Ui::MainWindow* ui; QtRocket* qtRocket; + + SimulationOptions* simOptionsWindow{nullptr}; }; #endif // MAINWINDOW_H diff --git a/gui/MainWindow.ui b/gui/MainWindow.ui index bd6a333..f1d3b91 100644 --- a/gui/MainWindow.ui +++ b/gui/MainWindow.ui @@ -256,6 +256,7 @@ Edit + @@ -333,6 +334,11 @@ Save As + + + Simulation Options + + diff --git a/gui/SimulationOptions.cpp b/gui/SimulationOptions.cpp new file mode 100644 index 0000000..f29038f --- /dev/null +++ b/gui/SimulationOptions.cpp @@ -0,0 +1,14 @@ +#include "SimulationOptions.h" +#include "ui_SimulationOptions.h" + +SimulationOptions::SimulationOptions(QWidget *parent) : + QMainWindow(parent), + ui(new Ui::SimulationOptions) +{ + ui->setupUi(this); +} + +SimulationOptions::~SimulationOptions() +{ + delete ui; +} diff --git a/gui/SimulationOptions.h b/gui/SimulationOptions.h new file mode 100644 index 0000000..6c19c54 --- /dev/null +++ b/gui/SimulationOptions.h @@ -0,0 +1,22 @@ +#ifndef SIMULATIONOPTIONS_H +#define SIMULATIONOPTIONS_H + +#include + +namespace Ui { +class SimulationOptions; +} + +class SimulationOptions : public QMainWindow +{ + Q_OBJECT + +public: + explicit SimulationOptions(QWidget *parent = nullptr); + ~SimulationOptions(); + +private: + Ui::SimulationOptions *ui; +}; + +#endif // SIMULATIONOPTIONS_H diff --git a/gui/SimulationOptions.ui b/gui/SimulationOptions.ui new file mode 100644 index 0000000..2ae26b0 --- /dev/null +++ b/gui/SimulationOptions.ui @@ -0,0 +1,113 @@ + + + SimulationOptions + + + + 0 + 0 + 381 + 289 + + + + + 0 + 0 + + + + Simulation Options + + + + + + 60 + 20 + 261 + 131 + + + + + + + Time Step (s) + + + + + + + 0.01 + + + + + + + Atmosphere Model + + + + + + + + + + Gravity Model + + + + + + + + + + Integrator + + + + + + + + + + + + 200 + 200 + 166 + 25 + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + 0 + 0 + 381 + 22 + + + + + File + + + + + + + + + diff --git a/qtrocket.pro b/qtrocket.pro index c43ceff..a2efda4 100644 --- a/qtrocket.pro +++ b/qtrocket.pro @@ -12,6 +12,7 @@ SOURCES += \ QtRocket.cpp \ gui/AboutWindow.cpp \ gui/AnalysisWindow.cpp \ + gui/SimulationOptions.cpp \ gui/ThrustCurveMotorSelector.cpp \ gui/qcustomplot.cpp \ main.cpp \ @@ -46,6 +47,7 @@ HEADERS += \ gui/AnalysisWindow.h \ gui/RocketTreeView.h \ gui/MainWindow.h \ + gui/SimulationOptions.h \ gui/ThrustCurveMotorSelector.h \ gui/qcustomplot.h \ model/MotorCase.h \ @@ -83,6 +85,7 @@ FORMS += \ gui/AboutWindow.ui \ gui/AnalysisWindow.ui \ gui/MainWindow.ui \ + gui/SimulationOptions.ui \ gui/ThrustCurveMotorSelector.ui TRANSLATIONS += \