File indexing completed on 2024-04-28 04:49:54
0001 /* 0002 SPDX-FileCopyrightText: 1998-2007 Sebastian Trueg <trueg@k3b.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #ifndef _K3B_VIDEODVD_TIME_H_ 0007 #define _K3B_VIDEODVD_TIME_H_ 0008 0009 #include "k3b_export.h" 0010 0011 #include <QString> 0012 0013 namespace K3b { 0014 namespace VideoDVD 0015 { 0016 /** 0017 * This should not be confused with Msf 0018 */ 0019 class LIBK3B_EXPORT Time 0020 { 0021 public: 0022 Time(); 0023 Time( unsigned short hour, 0024 unsigned short min, 0025 unsigned short sec, 0026 unsigned short frame, 0027 double frameRate ); 0028 0029 unsigned short hour() const { return m_hour; } 0030 unsigned short minute() const { return m_minute; } 0031 unsigned short second() const { return m_second; } 0032 unsigned short frame() const { return m_frame; } 0033 double frameRate() const { return m_frameRate; } 0034 0035 double totalSeconds() const; 0036 unsigned int totalFrames() const; 0037 0038 QString toString( bool includeFrames = true ) const; 0039 0040 private: 0041 unsigned short m_hour; 0042 unsigned short m_minute; 0043 unsigned short m_second; 0044 unsigned short m_frame; 0045 double m_frameRate; 0046 }; 0047 } 0048 } 0049 0050 #endif