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

#include <mythbackend/recordingextender.h>

Collaboration diagram for ActiveGame:
[legend]

Public Member Functions

 ActiveGame (int recordedid, QString title)
 
 ActiveGame (int recordedid, QString title, SportInfo info)
 
int getRecordedId () const
 
QString getTitle () const
 
SportInfo getInfo () const
 
QString getTeam1 () const
 
QString getTeam2 () const
 
QString getTeam1Norm () const
 
QString getTeam2Norm () const
 
QString getAbbrev1 () const
 
QString getAbbrev2 () const
 
QUrl getInfoUrl () const
 
QUrl getGameUrl () const
 
QDateTime getStartTime () const
 
QString getStartTimeAsString () const
 
void setInfo (const SportInfo &info)
 
void setTeams (QString team1, QString team2)
 
void setTeamsNorm (QString team1, QString team2)
 
void setAbbrev1 (const QString &abbrev)
 
void setAbbrev2 (const QString &abbrev)
 
void setAbbrevs (QStringList abbrevs)
 
void setInfoUrl (QUrl url)
 Set the game scheduling information URL. More...
 
void setGameUrl (QUrl url)
 Set the game status information URL. More...
 
void setStartTime (const QDateTime &time)
 
bool isValid () const
 
bool teamsMatch (const QStringList &names, const QStringList &abbrevs) const
 Do the supplied team names/abbrevs match this game. More...
 

Private Attributes

int m_recordedid {0}
 
QString m_title
 
SportInfo m_info
 
QString m_team1
 
QString m_team2
 
QString m_team1Normalized
 
QString m_team2Normalized
 
QString m_abbrev1
 
QString m_abbrev2
 
QUrl m_infoUrl
 
QUrl m_gameUrl
 
QDateTime m_startTime
 

Detailed Description

Definition at line 50 of file recordingextender.h.

Constructor & Destructor Documentation

◆ ActiveGame() [1/2]

ActiveGame::ActiveGame ( int  recordedid,
QString  title 
)
inline

Definition at line 53 of file recordingextender.h.

◆ ActiveGame() [2/2]

ActiveGame::ActiveGame ( int  recordedid,
QString  title,
SportInfo  info 
)
inline

Definition at line 55 of file recordingextender.h.

Member Function Documentation

◆ getAbbrev1()

QString ActiveGame::getAbbrev1 ( ) const
inline

◆ getAbbrev2()

QString ActiveGame::getAbbrev2 ( ) const
inline

◆ getGameUrl()

QUrl ActiveGame::getGameUrl ( ) const
inline

◆ getInfo()

SportInfo ActiveGame::getInfo ( ) const
inline

◆ getInfoUrl()

QUrl ActiveGame::getInfoUrl ( ) const
inline

◆ getRecordedId()

int ActiveGame::getRecordedId ( ) const
inline

Definition at line 58 of file recordingextender.h.

Referenced by RecordingExtender::processActiveRecordings().

◆ getStartTime()

QDateTime ActiveGame::getStartTime ( ) const
inline

Definition at line 69 of file recordingextender.h.

Referenced by RecExtMlbDataPage::findGameInfo().

◆ getStartTimeAsString()

QString ActiveGame::getStartTimeAsString ( ) const
inline

◆ getTeam1()

QString ActiveGame::getTeam1 ( ) const
inline

◆ getTeam1Norm()

QString ActiveGame::getTeam1Norm ( ) const
inline

Definition at line 63 of file recordingextender.h.

◆ getTeam2()

QString ActiveGame::getTeam2 ( ) const
inline

◆ getTeam2Norm()

QString ActiveGame::getTeam2Norm ( ) const
inline

Definition at line 64 of file recordingextender.h.

◆ getTitle()

QString ActiveGame::getTitle ( ) const
inline

◆ isValid()

bool ActiveGame::isValid ( void  ) const
inline

Definition at line 86 of file recordingextender.h.

◆ setAbbrev1()

void ActiveGame::setAbbrev1 ( const QString &  abbrev)
inline

Definition at line 78 of file recordingextender.h.

◆ setAbbrev2()

void ActiveGame::setAbbrev2 ( const QString &  abbrev)
inline

Definition at line 79 of file recordingextender.h.

◆ setAbbrevs()

void ActiveGame::setAbbrevs ( QStringList  abbrevs)
inline

◆ setGameUrl()

void ActiveGame::setGameUrl ( QUrl  url)

Set the game status information URL.

The game status page provides the current games state/statistics, which can be used to tell when the game has finished.

Parameters
[in]namesThe new URL.

Definition at line 85 of file recordingextender.cpp.

Referenced by RecExtEspnDataPage::findGameInfo(), and RecExtMlbDataPage::parseGameObject().

◆ setInfo()

void ActiveGame::setInfo ( const SportInfo info)
inline

Definition at line 73 of file recordingextender.h.

Referenced by RecordingExtender::processNewRecordings().

◆ setInfoUrl()

void ActiveGame::setInfoUrl ( QUrl  url)

Set the game scheduling information URL.

The schedule pages contain the team names, starting time, and game ID (which can be use to create the game status link.)

Parameters
[in]namesThe new URL.

Definition at line 73 of file recordingextender.cpp.

Referenced by RecExtEspnDataSource::findInfoUrl(), and RecExtMlbDataSource::findInfoUrl().

◆ setStartTime()

void ActiveGame::setStartTime ( const QDateTime &  time)
inline

◆ setTeams()

void ActiveGame::setTeams ( QString  team1,
QString  team2 
)
inline

Definition at line 74 of file recordingextender.h.

Referenced by RecordingExtender::processNewRecordings().

◆ setTeamsNorm()

void ActiveGame::setTeamsNorm ( QString  team1,
QString  team2 
)
inline

Definition at line 76 of file recordingextender.h.

Referenced by RecordingExtender::processNewRecordings().

◆ teamsMatch()

bool ActiveGame::teamsMatch ( const QStringList &  names,
const QStringList &  abbrevs 
) const

Do the supplied team names/abbrevs match this game.

First try an exact match of names, and then look for whether the class variable names contain the argument names or vice versa. (I.E. TV listing says 'Chorrera' but ESPN has 'Independiente de la Chorrera'.) Lastly compare the abbreviations.

Parameters
[in]namesThe names of the two teams.
[in]abbrevsThe abbreviations of the two teams.
Returns
whether or not a match was found.

Definition at line 101 of file recordingextender.cpp.

Referenced by RecExtEspnDataPage::findGameInfo(), and RecExtMlbDataPage::parseGameObject().

Member Data Documentation

◆ m_abbrev1

QString ActiveGame::m_abbrev1
private

Definition at line 103 of file recordingextender.h.

Referenced by getAbbrev1(), setAbbrev1(), and setAbbrevs().

◆ m_abbrev2

QString ActiveGame::m_abbrev2
private

Definition at line 104 of file recordingextender.h.

Referenced by getAbbrev2(), setAbbrev2(), and setAbbrevs().

◆ m_gameUrl

QUrl ActiveGame::m_gameUrl
private

Definition at line 106 of file recordingextender.h.

Referenced by getGameUrl(), and setGameUrl().

◆ m_info

SportInfo ActiveGame::m_info
private

Definition at line 97 of file recordingextender.h.

Referenced by getInfo(), and setInfo().

◆ m_infoUrl

QUrl ActiveGame::m_infoUrl
private

Definition at line 105 of file recordingextender.h.

Referenced by getInfoUrl(), isValid(), and setInfoUrl().

◆ m_recordedid

int ActiveGame::m_recordedid {0}
private

Definition at line 95 of file recordingextender.h.

Referenced by getRecordedId().

◆ m_startTime

QDateTime ActiveGame::m_startTime
private

Definition at line 107 of file recordingextender.h.

Referenced by getStartTime(), getStartTimeAsString(), isValid(), and setStartTime().

◆ m_team1

QString ActiveGame::m_team1
private

Definition at line 99 of file recordingextender.h.

Referenced by getTeam1(), isValid(), setTeams(), and teamsMatch().

◆ m_team1Normalized

QString ActiveGame::m_team1Normalized
private

Definition at line 101 of file recordingextender.h.

Referenced by getTeam1Norm(), setTeamsNorm(), and teamsMatch().

◆ m_team2

QString ActiveGame::m_team2
private

Definition at line 100 of file recordingextender.h.

Referenced by getTeam2(), isValid(), setTeams(), and teamsMatch().

◆ m_team2Normalized

QString ActiveGame::m_team2Normalized
private

Definition at line 102 of file recordingextender.h.

Referenced by getTeam2Norm(), setTeamsNorm(), and teamsMatch().

◆ m_title

QString ActiveGame::m_title
private

Definition at line 96 of file recordingextender.h.

Referenced by getTitle().


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