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 (std::chrono::milliseconds 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 30 of file srtwriter.h.

Constructor & Destructor Documentation

◆ SRTWriter()

SRTWriter::SRTWriter ( const QString &  fileName)

Definition at line 33 of file srtwriter.h.

◆ ~SRTWriter()

SRTWriter::~SRTWriter ( void  )

Definition at line 52 of file srtwriter.h.

Member Function Documentation

◆ AddSubtitle()

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

Adds next subtitle.

Definition at line 14 of file srtwriter.cpp.

◆ IsOpen()

bool SRTWriter::IsOpen ( void  )

Definition at line 59 of file srtwriter.h.

◆ Flush()

void SRTWriter::Flush ( void  )

Definition at line 60 of file srtwriter.h.

◆ FormatTime()

QString SRTWriter::FormatTime ( std::chrono::milliseconds  time_in_msec)

Formats time to format appropriate to SubRip file.

Definition at line 32 of file srtwriter.cpp.

Referenced by AddSubtitle().

Member Data Documentation

◆ m_outFile

QFile SRTWriter::m_outFile

Output file.

Definition at line 66 of file srtwriter.h.

◆ m_outStream

QTextStream SRTWriter::m_outStream

Output stream associated with m_outFile.

Definition at line 68 of file srtwriter.h.

Referenced by AddSubtitle().

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