MythTV master
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
PlaybackState Class Reference

Utility class to query playback state from database. More...

#include <mythfrontend/playbackstate.h>

Classes

struct  Markup
 Markup for a video file. More...
 

Public Member Functions

 PlaybackState ()
 
void Initialize ()
 Initializes playback state from database. More...
 
void Update (const QString &filename)
 Updates playback state of video with specified filename. More...
 
bool HasBookmark (const QString &filename) const
 Query bookmark of video with the specified filename. More...
 
uint64_t GetLastPlayPos (const QString &filename) const
 Query last playback position of video with the specified filename. More...
 
uint GetWatchedPercent (const QString &filename) const
 Query watched percent of video with the specified filename. More...
 
bool AlwaysShowWatchedProgress () const
 Returns cached setting "AlwaysShowWatchedProgress". More...
 

Private Member Functions

void QueryData (const QString &filterFilename=QString())
 Query playback state from database, only for single video if a filename is specified. More...
 

Private Attributes

QMap< QString, Markupm_fileMarkup
 maps filename to markup More...
 
bool m_alwaysShowWatchedProgress {false}
 

Detailed Description

Utility class to query playback state from database.

Definition at line 11 of file playbackstate.h.

Constructor & Destructor Documentation

◆ PlaybackState()

PlaybackState::PlaybackState ( )

Definition at line 11 of file playbackstate.cpp.

Member Function Documentation

◆ AlwaysShowWatchedProgress()

bool PlaybackState::AlwaysShowWatchedProgress ( ) const

Returns cached setting "AlwaysShowWatchedProgress".

Definition at line 128 of file playbackstate.cpp.

Referenced by anonymous_namespace{videodlg.cpp}::CopyPlaybackStateToUI().

◆ GetLastPlayPos()

uint64_t PlaybackState::GetLastPlayPos ( const QString &  filename) const

Query last playback position of video with the specified filename.

Definition at line 102 of file playbackstate.cpp.

◆ GetWatchedPercent()

uint PlaybackState::GetWatchedPercent ( const QString &  filename) const

Query watched percent of video with the specified filename.

Definition at line 112 of file playbackstate.cpp.

Referenced by anonymous_namespace{videodlg.cpp}::CopyPlaybackStateToUI().

◆ HasBookmark()

bool PlaybackState::HasBookmark ( const QString &  filename) const

Query bookmark of video with the specified filename.

Definition at line 92 of file playbackstate.cpp.

Referenced by anonymous_namespace{videodlg.cpp}::CopyPlaybackStateToUI().

◆ Initialize()

void PlaybackState::Initialize ( void  )

Initializes playback state from database.

Definition at line 16 of file playbackstate.cpp.

Referenced by VideoDialog::fetchVideos().

◆ QueryData()

void PlaybackState::QueryData ( const QString &  filterFilename = QString())
private

Query playback state from database, only for single video if a filename is specified.

Definition at line 35 of file playbackstate.cpp.

Referenced by Initialize(), and Update().

◆ Update()

void PlaybackState::Update ( const QString &  filename)

Updates playback state of video with specified filename.

Definition at line 27 of file playbackstate.cpp.

Referenced by VideoDialog::OnPlaybackStopped(), and VideoDialog::playbackStateChanged().

Member Data Documentation

◆ m_alwaysShowWatchedProgress

bool PlaybackState::m_alwaysShowWatchedProgress {false}
private

Definition at line 46 of file playbackstate.h.

Referenced by AlwaysShowWatchedProgress(), and PlaybackState().

◆ m_fileMarkup

QMap<QString, Markup> PlaybackState::m_fileMarkup
private

maps filename to markup

Definition at line 45 of file playbackstate.h.

Referenced by GetLastPlayPos(), GetWatchedPercent(), HasBookmark(), Initialize(), and QueryData().


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