diff options
Diffstat (limited to 'src/settings_pane.cc')
-rw-r--r-- | src/settings_pane.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/settings_pane.cc b/src/settings_pane.cc index 7d3b10f..e580d37 100644 --- a/src/settings_pane.cc +++ b/src/settings_pane.cc @@ -12,6 +12,8 @@ SettingsPane::SettingsPane(QWidget *parent) :QWidget(parent) { QDoubleSpinBox *sphere_radius = new QDoubleSpinBox(); sphere_radius->setSingleStep(.1); + QDoubleSpinBox *speed_limit = new QDoubleSpinBox(); + speed_limit->setSingleStep(.1); QCheckBox *show_trajectories = new QCheckBox(); QCheckBox *show_guides = new QCheckBox(); collisions = new QListWidget(); @@ -19,6 +21,8 @@ SettingsPane::SettingsPane(QWidget *parent) connect(sphere_radius, QOverload<double>::of(&QDoubleSpinBox::valueChanged), this, &SettingsPane::sphereRadiusChanged); + connect(speed_limit, QOverload<double>::of(&QDoubleSpinBox::valueChanged), + this, &SettingsPane::speedLimitChanged); connect(show_trajectories, &QCheckBox::stateChanged, this, &SettingsPane::toggledTrajectories); connect(show_guides, &QCheckBox::stateChanged, @@ -32,6 +36,7 @@ SettingsPane::SettingsPane(QWidget *parent) QFormLayout *layout = new QFormLayout; layout->addRow("Taille de la sphère de collision", sphere_radius); + layout->addRow("Limite de vitesse", speed_limit); layout->addRow("Afficher les trajectoires", show_trajectories); layout->addRow("Afficher les guides", show_guides); @@ -52,7 +57,7 @@ void SettingsPane::addCollision(int idA, int idB, int frame) { } -void SettingsPane::addSpeedingViolation(int id, int frame, double speed) { +void SettingsPane::addSpeedingViolation(int id, double speed, int frame) { BookmarkItem *item = new BookmarkItem("Frame " + QString::number(frame) + ": #" + QString::number(id) + " (" + QString::number(speed) + ")", frame); |