aboutsummaryrefslogtreecommitdiff
path: root/src/main_window.cc
diff options
context:
space:
mode:
authorccolin2020-12-22 13:30:32 +0100
committerccolin2020-12-22 13:30:32 +0100
commite7065796753dd6bf37f166a3da4dcf37d2893bb6 (patch)
treed2195205b2dd44f10398c91acdbe6716f235c0bf /src/main_window.cc
parent7fbe0814d52ba861a02b0560d4e6872845ef241e (diff)
synchronize playing status to play/pause button
Diffstat (limited to 'src/main_window.cc')
-rw-r--r--src/main_window.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main_window.cc b/src/main_window.cc
index 5e58660..8acfefb 100644
--- a/src/main_window.cc
+++ b/src/main_window.cc
@@ -55,6 +55,8 @@ void MainWindow::open(const QString &path) {
if (dc) delete dc;
dc = new DroneController(json_doc.object());
playpause_action->setEnabled(true);
+ connect(dc, &DroneController::playing, this, &MainWindow::play);
+ connect(dc, &DroneController::pausing, this, &MainWindow::pause);
slider->setMinimum(0);
slider->setMaximum(dc->getDuration());
connect(slider, &QSlider::sliderPressed, dc, &DroneController::suspend);