MythTV  master
Public Types | Signals | Public Member Functions | Private Member Functions | Private Attributes | List of all members
LyricsData Class Reference

#include <lyricsdata.h>

Inheritance diagram for LyricsData:
Inheritance graph
[legend]
Collaboration diagram for LyricsData:
Collaboration graph
[legend]

Public Types

enum  Status { STATUS_NOTLOADED = 0, STATUS_SEARCHING, STATUS_FOUND, STATUS_NOTFOUND }
 

Signals

void statusChanged (LyricsData::Status status, const QString &message)
 

Public Member Functions

 LyricsData ()
 
 LyricsData (MusicMetadata *parent)
 
 LyricsData (MusicMetadata *parent, const QString &grabber, const QString &artist, const QString &album, const QString &title, bool syncronized)
 
 ~LyricsData ()
 
QString grabber (void)
 
void setGrabber (const QString &grabber)
 
QString artist (void)
 
void setArtist (const QString &artist)
 
QString album (void)
 
void setAlbum (const QString &album)
 
QString title (void)
 
void setTitle (const QString &title)
 
QMap< int, LyricsLine * > * lyrics (void)
 
void setLyrics (const QStringList &lyrics)
 
bool syncronized (void)
 
void setSyncronized (bool syncronized)
 
bool changed (void)
 
void setChanged (bool changed)
 
Status getStatus (void)
 
void clear (void)
 
void clearLyrics (void)
 
void findLyrics (const QString &grabber)
 
void save (void)
 
void customEvent (QEvent *event) override
 

Private Member Functions

void loadLyrics (const QString &xmlData)
 
QString createLyricsXML (void)
 

Private Attributes

QMap< int, LyricsLine * > m_lyricsMap
 
MusicMetadatam_parent {nullptr}
 
Status m_status {STATUS_NOTLOADED}
 
QString m_grabber
 
QString m_artist
 
QString m_album
 
QString m_title
 
bool m_syncronized {false}
 
bool m_changed {false}
 

Detailed Description

Definition at line 48 of file lyricsdata.h.

Member Enumeration Documentation

◆ Status

Enumerator
STATUS_NOTLOADED 
STATUS_SEARCHING 
STATUS_FOUND 
STATUS_NOTFOUND 

Definition at line 83 of file lyricsdata.h.

Constructor & Destructor Documentation

◆ LyricsData() [1/3]

LyricsData::LyricsData ( )

◆ LyricsData() [2/3]

LyricsData::LyricsData ( MusicMetadata parent)
inlineexplicit

Definition at line 54 of file lyricsdata.h.

◆ LyricsData() [3/3]

LyricsData::LyricsData ( MusicMetadata parent,
const QString &  grabber,
const QString &  artist,
const QString &  album,
const QString &  title,
bool  syncronized 
)
inline

Definition at line 56 of file lyricsdata.h.

◆ ~LyricsData()

LyricsData::~LyricsData ( )

Definition at line 22 of file lyricsdata.cpp.

Member Function Documentation

◆ grabber()

QString LyricsData::grabber ( void  )
inline

◆ setGrabber()

void LyricsData::setGrabber ( const QString &  grabber)
inline

Definition at line 63 of file lyricsdata.h.

Referenced by EditLyricsDialog::okPressed().

◆ artist()

QString LyricsData::artist ( void  )
inline

◆ setArtist()

void LyricsData::setArtist ( const QString &  artist)
inline

Definition at line 66 of file lyricsdata.h.

Referenced by EditLyricsDialog::okPressed().

◆ album()

QString LyricsData::album ( void  )
inline

◆ setAlbum()

void LyricsData::setAlbum ( const QString &  album)
inline

Definition at line 69 of file lyricsdata.h.

Referenced by EditLyricsDialog::okPressed().

◆ title()

QString LyricsData::title ( void  )
inline

◆ setTitle()

void LyricsData::setTitle ( const QString &  title)
inline

Definition at line 72 of file lyricsdata.h.

Referenced by EditLyricsDialog::okPressed().

◆ lyrics()

QMap<int, LyricsLine*>* LyricsData::lyrics ( void  )
inline

◆ setLyrics()

void LyricsData::setLyrics ( const QStringList &  lyrics)

Definition at line 310 of file lyricsdata.cpp.

Referenced by loadLyrics(), and EditLyricsDialog::okPressed().

◆ syncronized()

bool LyricsData::syncronized ( void  )
inline

◆ setSyncronized()

void LyricsData::setSyncronized ( bool  syncronized)
inline

Definition at line 78 of file lyricsdata.h.

Referenced by EditLyricsDialog::okPressed(), and LyricsView::setLyricTime().

◆ changed()

bool LyricsData::changed ( void  )
inline

Definition at line 80 of file lyricsdata.h.

Referenced by LyricsView::findLyrics(), and LyricsView::ShowMenu().

◆ setChanged()

void LyricsData::setChanged ( bool  changed)
inline

Definition at line 81 of file lyricsdata.h.

Referenced by EditLyricsDialog::okPressed(), and LyricsView::setLyricTime().

◆ getStatus()

Status LyricsData::getStatus ( void  )
inline

Definition at line 91 of file lyricsdata.h.

◆ clear()

void LyricsData::clear ( void  )

Definition at line 27 of file lyricsdata.cpp.

Referenced by LyricsView::customEvent(), findLyrics(), and ~LyricsData().

◆ clearLyrics()

void LyricsData::clearLyrics ( void  )

Definition at line 38 of file lyricsdata.cpp.

Referenced by clear(), loadLyrics(), and setLyrics().

◆ findLyrics()

void LyricsData::findLyrics ( const QString &  grabber)

◆ save()

void LyricsData::save ( void  )

◆ customEvent()

void LyricsData::customEvent ( QEvent *  event)
override

Definition at line 182 of file lyricsdata.cpp.

◆ statusChanged

void LyricsData::statusChanged ( LyricsData::Status  status,
const QString &  message 
)
signal

Referenced by customEvent(), and findLyrics().

◆ loadLyrics()

void LyricsData::loadLyrics ( const QString &  xmlData)
private

Definition at line 229 of file lyricsdata.cpp.

Referenced by customEvent().

◆ createLyricsXML()

QString LyricsData::createLyricsXML ( void  )
private

Definition at line 136 of file lyricsdata.cpp.

Referenced by save().

Member Data Documentation

◆ m_lyricsMap

QMap<int, LyricsLine*> LyricsData::m_lyricsMap
private

Definition at line 107 of file lyricsdata.h.

Referenced by clearLyrics(), createLyricsXML(), and setLyrics().

◆ m_parent

MusicMetadata* LyricsData::m_parent {nullptr}
private

Definition at line 109 of file lyricsdata.h.

Referenced by customEvent(), findLyrics(), save(), and setLyrics().

◆ m_status

Status LyricsData::m_status {STATUS_NOTLOADED}
private

Definition at line 111 of file lyricsdata.h.

Referenced by clear(), customEvent(), findLyrics(), and loadLyrics().

◆ m_grabber

QString LyricsData::m_grabber
private

Definition at line 113 of file lyricsdata.h.

Referenced by clear(), createLyricsXML(), and loadLyrics().

◆ m_artist

QString LyricsData::m_artist
private

Definition at line 114 of file lyricsdata.h.

Referenced by clear(), createLyricsXML(), and loadLyrics().

◆ m_album

QString LyricsData::m_album
private

Definition at line 115 of file lyricsdata.h.

Referenced by clear(), createLyricsXML(), and loadLyrics().

◆ m_title

QString LyricsData::m_title
private

Definition at line 116 of file lyricsdata.h.

Referenced by clear(), createLyricsXML(), and loadLyrics().

◆ m_syncronized

bool LyricsData::m_syncronized {false}
private

Definition at line 117 of file lyricsdata.h.

Referenced by clear(), createLyricsXML(), loadLyrics(), and setLyrics().

◆ m_changed

bool LyricsData::m_changed {false}
private

Definition at line 118 of file lyricsdata.h.

Referenced by clear(), loadLyrics(), and save().


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