diff options
Diffstat (limited to 'src/main_window.cc')
-rw-r--r-- | src/main_window.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main_window.cc b/src/main_window.cc index 7bc7855..e63bf0e 100644 --- a/src/main_window.cc +++ b/src/main_window.cc @@ -5,6 +5,7 @@ #include <QFileDialog> #include <QJsonDocument> #include <QStyle> +#include <QDockWidget> MainWindow::MainWindow(QWidget *parent) { @@ -25,6 +26,12 @@ MainWindow::MainWindow(QWidget *parent) { slider = new QSlider(Qt::Horizontal); bottom_tb.addWidget(slider); slider->setEnabled(false); + + QDockWidget *dock = new QDockWidget("Outils", this); + dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); + settings_pane = new SettingsPane(); + dock->setWidget(settings_pane); + addDockWidget(Qt::RightDockWidgetArea, dock); } @@ -65,6 +72,8 @@ void MainWindow::open(const QString &path) { connect(slider, &QSlider::sliderReleased, dc, &DroneController::resume); connect(slider, &QSlider::valueChanged, dc, &DroneController::seek); connect(dc, &DroneController::frameChanged, slider, &QSlider::setValue); + connect(dc, &DroneController::collision, settings_pane, &SettingsPane::addCollision); + dc->computeCollisions(10); pause(); slider->setEnabled(true); } |