File indexing completed on 2024-05-26 04:56:55

0001 /*
0002     SPDX-FileCopyrightText: 2020 Jean-Baptiste Mardelle
0003     SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 */
0005 
0006 #pragma once
0007 
0008 #include "definitions.h"
0009 #include <QDialog>
0010 
0011 namespace Ui {
0012 class ClipSpeed_UI;
0013 }
0014 
0015 class TimecodeDisplay;
0016 class KMessageWidget;
0017 
0018 class SpeedDialog : public QDialog
0019 {
0020     Q_OBJECT
0021 
0022 public:
0023     explicit SpeedDialog(QWidget *parent, double speed, int duration, double minSpeed, double maxSpeed, bool reversed, bool pitch_compensate,
0024                          ClipType::ProducerType clipType);
0025     ~SpeedDialog() override;
0026 
0027     double getValue() const;
0028     bool getPitchCompensate() const;
0029 
0030 private:
0031     Ui::ClipSpeed_UI *ui;
0032     TimecodeDisplay *m_durationDisplay;
0033     int m_duration;
0034     void checkSpeed(double res);
0035 };