WIP: Add a SimulationOptions window
This commit is contained in:
parent
cd95c112d3
commit
16ffbef2ce
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -256,6 +256,7 @@
|
||||
<property name="title">
|
||||
<string>Edit</string>
|
||||
</property>
|
||||
<addaction name="actionSimulation_Options"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuTools">
|
||||
<property name="title">
|
||||
@ -333,6 +334,11 @@
|
||||
<string>Save As</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSimulation_Options">
|
||||
<property name="text">
|
||||
<string>Simulation Options</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
14
gui/SimulationOptions.cpp
Normal file
14
gui/SimulationOptions.cpp
Normal file
@ -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;
|
||||
}
|
22
gui/SimulationOptions.h
Normal file
22
gui/SimulationOptions.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef SIMULATIONOPTIONS_H
|
||||
#define SIMULATIONOPTIONS_H
|
||||
|
||||
#include <QMainWindow>
|
||||
|
||||
namespace Ui {
|
||||
class SimulationOptions;
|
||||
}
|
||||
|
||||
class SimulationOptions : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SimulationOptions(QWidget *parent = nullptr);
|
||||
~SimulationOptions();
|
||||
|
||||
private:
|
||||
Ui::SimulationOptions *ui;
|
||||
};
|
||||
|
||||
#endif // SIMULATIONOPTIONS_H
|
113
gui/SimulationOptions.ui
Normal file
113
gui/SimulationOptions.ui
Normal file
@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SimulationOptions</class>
|
||||
<widget class="QMainWindow" name="SimulationOptions">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>381</width>
|
||||
<height>289</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Simulation Options</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget">
|
||||
<widget class="QWidget" name="formLayoutWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>20</y>
|
||||
<width>261</width>
|
||||
<height>131</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Time Step (s)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="timeStep">
|
||||
<property name="placeholderText">
|
||||
<string>0.01</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Atmosphere Model</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="atmosphereModelCombo"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Gravity Model</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="gravityModelCombo"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Integrator</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="integratorCombo"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>200</x>
|
||||
<y>200</y>
|
||||
<width>166</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>381</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
<property name="title">
|
||||
<string>File</string>
|
||||
</property>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusbar"/>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -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 += \
|
||||
|
Loading…
x
Reference in New Issue
Block a user