File indexing completed on 2024-06-09 04:52:58
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 DURATIONLIMITSDIALOG_H 0009 #define DURATIONLIMITSDIALOG_H 0010 0011 #include "actionwithtargetdialog.h" 0012 #include "core/time.h" 0013 0014 QT_FORWARD_DECLARE_CLASS(QGroupBox) 0015 QT_FORWARD_DECLARE_CLASS(QCheckBox) 0016 QT_FORWARD_DECLARE_CLASS(QCheckBox) 0017 class TimeEdit; 0018 0019 namespace SubtitleComposer { 0020 class DurationLimitsDialog : public ActionWithTargetDialog 0021 { 0022 Q_OBJECT 0023 0024 public: 0025 DurationLimitsDialog(const Time &minDuration, const Time &maxDuration, QWidget *parent = 0); 0026 0027 Time minDuration() const; 0028 Time maxDuration() const; 0029 0030 bool enforceMaxDuration() const; 0031 bool enforceMinDuration() const; 0032 bool preventOverlap() const; 0033 0034 private slots: 0035 void onMinDurationValueChanged(int value); 0036 void onMaxDurationValueChanged(int value); 0037 0038 private: 0039 QGroupBox *m_maxGroupBox; 0040 TimeEdit *m_maxDurationTimeEdit; 0041 0042 QGroupBox *m_minGroupBox; 0043 QCheckBox *m_preventOverlapCheckBox; 0044 TimeEdit *m_minDurationTimeEdit; 0045 }; 0046 } 0047 #endif