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

#include <gamehandler.h>

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

Public Member Functions

 GameHandler ()
 
void InitMetaDataMap (const QString &GameType)
 
void GetMetadata (GameHandler *handler, const QString &rom, QString *Genre, QString *Year, QString *Country, QString *CRC32, QString *GameName, QString *Plot, QString *Publisher, QString *Version, QString *Fanart, QString *Boxart)
 
void promptForRemoval (const GameScan &scan)
 
void UpdateGameDB (GameHandler *handler)
 
void VerifyGameDB (GameHandler *handler)
 
void clearAllGameData (void)
 
void buildFileList (const QString &directory, GameHandler *handler, int *filecount)
 
void processGames (GameHandler *)
 
void setRebuild (bool setrebuild)
 
bool needRebuild (void) const
 
bool SpanDisks () const
 
QString SystemName () const
 
QString SystemCmdLine () const
 
QString SystemRomPath () const
 
QString SystemWorkingPath () const
 
QString SystemScreenShots () const
 
uint GamePlayerID () const
 
QString GameType () const
 
QStringList ValidExtensions () const
 
void clearAllMetadata (void)
 

Static Public Member Functions

static void updateSettings (GameHandler *)
 
static GameHandlergetHandler (uint i)
 
static GameHandlernewHandler (QString name)
 
static uint count (void)
 
static int buildFileCount (const QString &directory, GameHandler *handler)
 
static void processAllGames (void)
 
static void registerHandler (GameHandler *)
 
static void Launchgame (RomInfo *romdata, const QString &systemname)
 
static void EditSettings (RomInfo *romdata)
 
static void EditSystemSettings (RomInfo *romdata)
 
static RomInfoCreateRomInfo (RomInfo *parent)
 
static RomInfocreate_rominfo (RomInfo *parent)
 
static GameHandlerGetHandler (RomInfo *rominfo)
 
static GameHandlerGetHandlerByName (const QString &systemname)
 

Protected Member Functions

void customEvent (QEvent *event) override
 

Protected Attributes

bool m_rebuild {false}
 
bool m_spandisks {false}
 
QString m_systemname
 
QString m_rompath
 
QString m_commandline
 
QString m_workingpath
 
QString m_screenshots
 
uint m_gameplayerid {0}
 
QString m_gametype
 
QStringList m_validextensions
 
RomDBMap m_romDB
 
GameScanMap m_GameMap
 
bool m_RemoveAll {false}
 
bool m_KeepAll {false}
 

Private Member Functions

void CreateProgress (const QString &message)
 

Private Attributes

MythUIProgressDialogm_progressDlg {nullptr}
 

Static Private Attributes

static GameHandlers_newInstance = nullptr
 

Detailed Description

Definition at line 55 of file gamehandler.h.

Constructor & Destructor Documentation

◆ GameHandler()

GameHandler::GameHandler ( )
inline

Definition at line 60 of file gamehandler.h.

Referenced by newHandler().

Member Function Documentation

◆ updateSettings()

void GameHandler::updateSettings ( GameHandler handler)
static

Definition at line 55 of file gamehandler.cpp.

Referenced by newHandler(), and processAllGames().

◆ getHandler()

GameHandler * GameHandler::getHandler ( uint  i)
static

Definition at line 50 of file gamehandler.cpp.

Referenced by GameUI::BuildTree().

◆ newHandler()

GameHandler * GameHandler::newHandler ( QString  name)
static

Definition at line 81 of file gamehandler.cpp.

Referenced by checkHandlers().

◆ count()

uint GameHandler::count ( void  )
static

Definition at line 92 of file gamehandler.cpp.

Referenced by GameUI::BuildTree().

◆ InitMetaDataMap()

void GameHandler::InitMetaDataMap ( const QString &  GameType)

Definition at line 98 of file gamehandler.cpp.

Referenced by processGames().

◆ GetMetadata()

void GameHandler::GetMetadata ( GameHandler handler,
const QString &  rom,
QString *  Genre,
QString *  Year,
QString *  Country,
QString *  CRC32,
QString *  GameName,
QString *  Plot,
QString *  Publisher,
QString *  Version,
QString *  Fanart,
QString *  Boxart 
)

Definition at line 136 of file gamehandler.cpp.

Referenced by UpdateGameDB().

◆ promptForRemoval()

void GameHandler::promptForRemoval ( const GameScan scan)

Definition at line 210 of file gamehandler.cpp.

Referenced by UpdateGameDB().

◆ UpdateGameDB()

void GameHandler::UpdateGameDB ( GameHandler handler)

Definition at line 373 of file gamehandler.cpp.

Referenced by processGames().

◆ VerifyGameDB()

void GameHandler::VerifyGameDB ( GameHandler handler)

Definition at line 495 of file gamehandler.cpp.

Referenced by processGames().

◆ clearAllGameData()

void GameHandler::clearAllGameData ( void  )

Definition at line 598 of file gamehandler.cpp.

Referenced by GameCallback().

◆ buildFileCount()

int GameHandler::buildFileCount ( const QString &  directory,
GameHandler handler 
)
static

Definition at line 552 of file gamehandler.cpp.

Referenced by processGames().

◆ buildFileList()

void GameHandler::buildFileList ( const QString &  directory,
GameHandler handler,
int *  filecount 
)

Definition at line 616 of file gamehandler.cpp.

Referenced by processGames().

◆ processGames()

void GameHandler::processGames ( GameHandler handler)

Definition at line 671 of file gamehandler.cpp.

Referenced by processAllGames().

◆ processAllGames()

void GameHandler::processAllGames ( void  )
static

Definition at line 759 of file gamehandler.cpp.

Referenced by GameCallback().

◆ registerHandler()

void GameHandler::registerHandler ( GameHandler handler)
static

Definition at line 934 of file gamehandler.cpp.

Referenced by checkHandlers().

◆ Launchgame()

void GameHandler::Launchgame ( RomInfo romdata,
const QString &  systemname 
)
static

Definition at line 819 of file gamehandler.cpp.

Referenced by GameUI::customEvent(), and GameUI::itemClicked().

◆ EditSettings()

static void GameHandler::EditSettings ( RomInfo romdata)
static

◆ EditSystemSettings()

static void GameHandler::EditSystemSettings ( RomInfo romdata)
static

◆ CreateRomInfo()

RomInfo * GameHandler::CreateRomInfo ( RomInfo parent)
static

Definition at line 926 of file gamehandler.cpp.

◆ setRebuild()

void GameHandler::setRebuild ( bool  setrebuild)
inline

Definition at line 91 of file gamehandler.h.

Referenced by processGames().

◆ needRebuild()

bool GameHandler::needRebuild ( void  ) const
inline

Definition at line 92 of file gamehandler.h.

Referenced by processAllGames().

◆ create_rominfo()

static RomInfo* GameHandler::create_rominfo ( RomInfo parent)
static

◆ SpanDisks()

bool GameHandler::SpanDisks ( ) const
inline

Definition at line 95 of file gamehandler.h.

Referenced by Launchgame().

◆ SystemName()

QString GameHandler::SystemName ( ) const
inline

◆ SystemCmdLine()

QString GameHandler::SystemCmdLine ( ) const
inline

Definition at line 97 of file gamehandler.h.

Referenced by Launchgame(), and processGames().

◆ SystemRomPath()

QString GameHandler::SystemRomPath ( ) const
inline

Definition at line 98 of file gamehandler.h.

Referenced by processGames().

◆ SystemWorkingPath()

QString GameHandler::SystemWorkingPath ( ) const
inline

Definition at line 99 of file gamehandler.h.

Referenced by Launchgame().

◆ SystemScreenShots()

QString GameHandler::SystemScreenShots ( ) const
inline

Definition at line 100 of file gamehandler.h.

◆ GamePlayerID()

uint GameHandler::GamePlayerID ( ) const
inline

Definition at line 101 of file gamehandler.h.

◆ GameType()

QString GameHandler::GameType ( ) const
inline

Definition at line 102 of file gamehandler.h.

Referenced by GetMetadata(), Launchgame(), processAllGames(), processGames(), and UpdateGameDB().

◆ ValidExtensions()

QStringList GameHandler::ValidExtensions ( ) const
inline

Definition at line 103 of file gamehandler.h.

◆ clearAllMetadata()

void GameHandler::clearAllMetadata ( void  )

Definition at line 983 of file gamehandler.cpp.

Referenced by customEvent().

◆ GetHandler()

GameHandler * GameHandler::GetHandler ( RomInfo rominfo)
static

Definition at line 782 of file gamehandler.cpp.

Referenced by CreateRomInfo(), and Launchgame().

◆ GetHandlerByName()

GameHandler * GameHandler::GetHandlerByName ( const QString &  systemname)
static

Definition at line 800 of file gamehandler.cpp.

Referenced by GameScanner::doScanAll(), and Launchgame().

◆ customEvent()

void GameHandler::customEvent ( QEvent *  event)
overrideprotected

Definition at line 939 of file gamehandler.cpp.

◆ CreateProgress()

void GameHandler::CreateProgress ( const QString &  message)
private

Definition at line 991 of file gamehandler.cpp.

Referenced by processGames(), UpdateGameDB(), and VerifyGameDB().

Member Data Documentation

◆ m_rebuild

bool GameHandler::m_rebuild {false}
protected

Definition at line 113 of file gamehandler.h.

◆ m_spandisks

bool GameHandler::m_spandisks {false}
protected

Definition at line 114 of file gamehandler.h.

Referenced by updateSettings().

◆ m_systemname

QString GameHandler::m_systemname
protected

Definition at line 115 of file gamehandler.h.

Referenced by newHandler().

◆ m_rompath

QString GameHandler::m_rompath
protected

Definition at line 116 of file gamehandler.h.

Referenced by updateSettings().

◆ m_commandline

QString GameHandler::m_commandline
protected

Definition at line 117 of file gamehandler.h.

Referenced by updateSettings().

◆ m_workingpath

QString GameHandler::m_workingpath
protected

Definition at line 118 of file gamehandler.h.

Referenced by updateSettings().

◆ m_screenshots

QString GameHandler::m_screenshots
protected

Definition at line 119 of file gamehandler.h.

Referenced by updateSettings().

◆ m_gameplayerid

uint GameHandler::m_gameplayerid {0}
protected

Definition at line 120 of file gamehandler.h.

Referenced by updateSettings().

◆ m_gametype

QString GameHandler::m_gametype
protected

Definition at line 121 of file gamehandler.h.

Referenced by updateSettings().

◆ m_validextensions

QStringList GameHandler::m_validextensions
protected

Definition at line 122 of file gamehandler.h.

Referenced by buildFileCount(), buildFileList(), and updateSettings().

◆ m_romDB

RomDBMap GameHandler::m_romDB
protected

Definition at line 124 of file gamehandler.h.

Referenced by GetMetadata(), InitMetaDataMap(), and processGames().

◆ m_GameMap

GameScanMap GameHandler::m_GameMap
protected

Definition at line 125 of file gamehandler.h.

Referenced by buildFileList(), processGames(), UpdateGameDB(), and VerifyGameDB().

◆ m_RemoveAll

bool GameHandler::m_RemoveAll {false}
protected

Definition at line 127 of file gamehandler.h.

Referenced by customEvent(), and promptForRemoval().

◆ m_KeepAll

bool GameHandler::m_KeepAll {false}
protected

Definition at line 128 of file gamehandler.h.

Referenced by customEvent(), and promptForRemoval().

◆ s_newInstance

GameHandler * GameHandler::s_newInstance = nullptr
staticprivate

Definition at line 132 of file gamehandler.h.

Referenced by newHandler().

◆ m_progressDlg

MythUIProgressDialog* GameHandler::m_progressDlg {nullptr}
private

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