From e7065796753dd6bf37f166a3da4dcf37d2893bb6 Mon Sep 17 00:00:00 2001 From: ccolin Date: Tue, 22 Dec 2020 13:30:32 +0100 Subject: synchronize playing status to play/pause button --- src/main_window.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/main_window.cc') 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); -- cgit v1.2.3-70-g09d2