MythTV  master
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
SRTWriter Class Reference

Class to write SubRip files. More...

#include <srtwriter.h>

Public Member Functions

 SRTWriter (const QString &fileName)
 
 ~SRTWriter (void)
 
void AddSubtitle (const OneSubtitle &sub, int number)
 Adds next subtitle. More...
 
bool IsOpen (void)
 
void Flush (void)
 

Static Private Member Functions

static QString FormatTime (uint64_t time_in_msec)
 Formats time to format appropriate to SubRip file. More...
 

Private Attributes

QFile m_outFile
 Output file. More...
 
QTextStream m_outStream
 Output stream associated with m_outFile. More...
 

Detailed Description

Class to write SubRip files.

Definition at line 26 of file srtwriter.h.

Constructor & Destructor Documentation

◆ SRTWriter()

SRTWriter::SRTWriter ( const QString &  fileName)
inline

Definition at line 29 of file srtwriter.h.

◆ ~SRTWriter()

SRTWriter::~SRTWriter ( void  )
inline

Definition at line 44 of file srtwriter.h.

Member Function Documentation

◆ AddSubtitle()

void SRTWriter::AddSubtitle ( const OneSubtitle sub,
int  number 
)

Adds next subtitle.

Definition at line 8 of file srtwriter.cpp.

◆ IsOpen()

bool SRTWriter::IsOpen ( void  )
inline

Definition at line 51 of file srtwriter.h.

◆ Flush()

void SRTWriter::Flush ( void  )
inline

Definition at line 52 of file srtwriter.h.

◆ FormatTime()

QString SRTWriter::FormatTime ( uint64_t  time_in_msec)
staticprivate

Formats time to format appropriate to SubRip file.

Definition at line 27 of file srtwriter.cpp.

Referenced by AddSubtitle().

Member Data Documentation

◆ m_outFile

QFile SRTWriter::m_outFile
private

Output file.

Definition at line 58 of file srtwriter.h.

◆ m_outStream

QTextStream SRTWriter::m_outStream
private

Output stream associated with m_outFile.

Definition at line 60 of file srtwriter.h.

Referenced by AddSubtitle().


The documentation for this class was generated from the following files: