File indexing completed on 2024-06-09 04:53:16
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 TIMEEDIT_H 0009 #define TIMEEDIT_H 0010 0011 #include <QTimeEdit> 0012 0013 QT_FORWARD_DECLARE_CLASS(QEvent) 0014 0015 class TimeEdit : public QTimeEdit 0016 { 0017 Q_OBJECT 0018 0019 public: 0020 TimeEdit(QWidget *parent = 0); 0021 0022 int msecsStep() const; 0023 0024 int value() const; 0025 0026 void stepBy(int steps) override; 0027 0028 public slots: 0029 void setMSecsStep(int msecs); 0030 void setValue(int value); 0031 0032 signals: 0033 void valueChanged(int value); 0034 void valueEntered(int value); 0035 0036 protected slots: 0037 void onTimeChanged(const QTime &time); 0038 0039 protected: 0040 StepEnabled stepEnabled() const override; 0041 void keyPressEvent(QKeyEvent *event) override; 0042 0043 private: 0044 int m_secsStep; 0045 }; 0046 0047 #endif