File indexing completed on 2024-04-28 04:48:38

0001 /*
0002     SPDX-FileCopyrightText: 2005 Max Howell <max.howell@methylblue.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #ifndef TIMELABEL_H
0008 #define TIMELABEL_H
0009 
0010 #include <QLabel>
0011 
0012 class TimeLabel : public QLabel
0013 {
0014     Q_OBJECT
0015 public:
0016     explicit TimeLabel(QWidget *parent);
0017     ~TimeLabel() override;
0018     void mousePressEvent(QMouseEvent *) override;
0019     void updateTime();
0020     enum TimeFormats { SHOW_REMAINING, SHOW_COMPLETED };
0021 public Q_SLOTS:
0022     void setCurrentTime(qint64);
0023     void setTotalTime(qint64);
0024 
0025 private:
0026     TimeFormats m_timeFormat;
0027     qint64 m_currentTime;
0028     qint64 m_totalTime;
0029 };
0030 
0031 #endif