File indexing completed on 2024-12-22 04:40:06

0001 /*
0002     SPDX-FileCopyrightText: 2007-2009 Sergio Pistone <sergio_pistone@yahoo.com.ar>
0003     SPDX-FileCopyrightText: 2010-2022 Mladen Milinkovic <max@smoothware.net>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef AUTODURATIONSDIALOG_H
0009 #define AUTODURATIONSDIALOG_H
0010 
0011 #include "actionwithtargetdialog.h"
0012 
0013 QT_FORWARD_DECLARE_CLASS(QCheckBox)
0014 QT_FORWARD_DECLARE_CLASS(QSpinBox)
0015 QT_FORWARD_DECLARE_CLASS(QButtonGroup)
0016 
0017 namespace SubtitleComposer {
0018 class AutoDurationsDialog : public ActionWithTargetDialog
0019 {
0020 public:
0021     AutoDurationsDialog(unsigned charMillis, unsigned wordMillis, unsigned lineMillis, QWidget *parent = 0);
0022 
0023     unsigned charMillis() const;
0024     unsigned wordMillis() const;
0025     unsigned lineMillis() const;
0026 
0027     bool preventOverlap() const;
0028 
0029     SubtitleTarget calculationMode() const;
0030 
0031     bool translationMode() const;
0032     void setTranslationMode(bool enabled) override;
0033 
0034 private:
0035     QSpinBox *m_charMillisSpinBox;
0036     QSpinBox *m_wordMillisSpinBox;
0037     QSpinBox *m_lineMillisSpinBox;
0038 
0039     QCheckBox *m_preventOverlapCheckBox;
0040 
0041     bool m_translationMode;
0042     QButtonGroup *m_calculationButtonGroup;
0043 };
0044 }
0045 #endif