MythTV  master
gameui.h
Go to the documentation of this file.
1 #ifndef GAMEUI_H_
2 #define GAMEUI_H_
3 
4 #include <QString>
5 #include <QObject>
6 
7 // myth
8 #include <mythscreentype.h>
12 #include <mythprogressdialog.h>
13 
14 class MythUIButtonTree;
15 class MythGenericTree;
16 class MythUIText;
17 class MythUIStateType;
18 class RomInfo;
19 class QTimer;
20 class QKeyEvent;
21 class QEvent;
22 class GameScanner;
23 
24 class GameUI : public MythScreenType
25 {
26  Q_OBJECT
27 
28  public:
29  explicit GameUI(MythScreenStack *parentStack);
30  ~GameUI() override = default;
31 
32  bool Create() override; // MythScreenType
33  void BuildTree();
34  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
35 
36  public slots:
37  void nodeChanged(MythGenericTree* node);
39  void showImages(void);
40  void searchComplete(const QString& string);
41  void gameSearch(MythGenericTree *node = nullptr,
42  bool automode = false);
44  void OnGameSearchDone(MetadataLookup *lookup);
45  void StartGameImageSet(MythGenericTree *node, QStringList coverart,
46  QStringList fanart, QStringList screenshot);
47  void doScan(void);
48  void reloadAllData(bool dbchanged);
49 
50  private:
51  void updateRomInfo(RomInfo *rom);
52  void clearRomInfo(void);
53  void edit(void);
54  void showInfo(void);
55  void ShowMenu(void) override; // MythScreenType
56  void searchStart(void);
57  void toggleFavorite(void);
58  void customEvent(QEvent *event) override; // MythUIType
59  void createBusyDialog(const QString& title);
60 
61  QString getFillSql(MythGenericTree* node) const;
62  static QString getChildLevelString(MythGenericTree *node);
63  static QString getFilter(MythGenericTree *node) ;
64  static int getLevelsOnThisBranch(MythGenericTree *node);
65  static bool isLeaf(MythGenericTree *node);
66  void fillNode(MythGenericTree *node);
67  void resetOtherTrees(MythGenericTree *node);
68  void updateChangedNode(MythGenericTree *node, RomInfo *romInfo);
70 
71  private:
72  bool m_showHashed {false};
73  bool m_gameShowFileName {false};
74 
77 
80 
90  MythUIImage *m_boxImage {nullptr};
91 
94 
95  GameScanner *m_scanner {nullptr};
96 };
97 
98 #endif
GameUI::getFillSql
QString getFillSql(MythGenericTree *node) const
Definition: gameui.cpp:638
GameUI::m_popupStack
MythScreenStack * m_popupStack
Definition: gameui.h:79
GameUI::isLeaf
static bool isLeaf(MythGenericTree *node)
Definition: gameui.cpp:786
GameUI::customEvent
void customEvent(QEvent *event) override
Definition: gameui.cpp:494
RefCountHandler
Definition: referencecounterlist.h:17
GameUI::getChildLevelString
static QString getChildLevelString(MythGenericTree *node)
Definition: gameui.cpp:759
MythUIImage
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
MetadataImageDownload
Definition: metadataimagedownload.h:87
GameUI::createBusyDialog
void createBusyDialog(const QString &title)
Definition: gameui.cpp:928
GameUI::ShowMenu
void ShowMenu(void) override
Definition: gameui.cpp:416
GameUI::nodeChanged
void nodeChanged(MythGenericTree *node)
Definition: gameui.cpp:213
GameUI::m_gameYearText
MythUIText * m_gameYearText
Definition: gameui.h:84
title
QString title
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:636
GameUI::edit
void edit(void)
Definition: gameui.cpp:373
GameUI
Definition: gameui.h:24
GameUI::StartGameImageSet
void StartGameImageSet(MythGenericTree *node, QStringList coverart, QStringList fanart, QStringList screenshot)
Definition: gameui.cpp:997
GameUI::m_gameUITree
MythUIButtonTree * m_gameUITree
Definition: gameui.h:81
GameUI::m_scanner
GameScanner * m_scanner
Definition: gameui.h:95
MythScreenStack
Definition: mythscreenstack.h:16
GameScanner
Definition: gamescan.h:70
MetadataDownload
Definition: metadatadownload.h:35
GameUI::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: gameui.cpp:178
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:44
GameUI::itemClicked
void itemClicked(MythUIButtonListItem *item)
Definition: gameui.cpp:250
GameUI::doScan
void doScan(void)
Definition: gameui.cpp:1078
GameUI::searchComplete
void searchComplete(const QString &string)
Definition: gameui.cpp:296
GameUI::m_gameTree
MythGenericTree * m_gameTree
Definition: gameui.h:75
mythprogressdialog.h
GameUI::m_gamePlotText
MythUIText * m_gamePlotText
Definition: gameui.h:86
MetadataLookup
Definition: metadatacommon.h:87
MythUIButtonListItem
Definition: mythuibuttonlist.h:27
GameUI::updateChangedNode
void updateChangedNode(MythGenericTree *node, RomInfo *romInfo)
Definition: gameui.cpp:876
GameUI::m_gameImage
MythUIImage * m_gameImage
Definition: gameui.h:88
GameUI::gameSearch
void gameSearch(MythGenericTree *node=nullptr, bool automode=false)
Definition: gameui.cpp:889
GameUI::reloadAllData
void reloadAllData(bool dbchanged)
Definition: gameui.cpp:1086
metadatadownload.h
metadataimagedownload.h
GameUI::OnGameSearchDone
void OnGameSearchDone(MetadataLookup *lookup)
Definition: gameui.cpp:952
GameUI::m_gameGenreText
MythUIText * m_gameGenreText
Definition: gameui.h:85
GameUI::OnGameSearchListSelection
void OnGameSearchListSelection(RefCountHandler< MetadataLookup > lookup)
Definition: gameui.cpp:942
MythUIButtonTree
A tree widget for displaying and navigating a MythGenericTree()
Definition: mythuibuttontree.h:16
MythUIBusyDialog
Definition: mythprogressdialog.h:36
GameUI::handleDownloadedImages
void handleDownloadedImages(MetadataLookup *lookup)
Definition: gameui.cpp:1041
GameUI::showInfo
void showInfo(void)
Definition: gameui.cpp:395
GameUI::m_busyPopup
MythUIBusyDialog * m_busyPopup
Definition: gameui.h:78
GameUI::m_gameShowFileName
bool m_gameShowFileName
Definition: gameui.h:73
RomInfo
Definition: rominfo.h:12
GameUI::m_gameSystemText
MythUIText * m_gameSystemText
Definition: gameui.h:83
GameUI::m_gameTitleText
MythUIText * m_gameTitleText
Definition: gameui.h:82
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:30
GameUI::m_fanartImage
MythUIImage * m_fanartImage
Definition: gameui.h:89
GameUI::GameUI
GameUI(MythScreenStack *parentStack)
Definition: gameui.cpp:46
GameUI::m_query
MetadataDownload * m_query
Definition: gameui.h:92
GameUI::Create
bool Create() override
Definition: gameui.cpp:55
MythGenericTree
Definition: mythgenerictree.h:20
GameUI::showImages
void showImages(void)
Definition: gameui.cpp:286
GameUI::m_imageDownload
MetadataImageDownload * m_imageDownload
Definition: gameui.h:93
GameUI::m_gameFavouriteState
MythUIStateType * m_gameFavouriteState
Definition: gameui.h:87
GameUI::resetOtherTrees
void resetOtherTrees(MythGenericTree *node)
Definition: gameui.cpp:855
GameUI::clearRomInfo
void clearRomInfo(void)
Definition: gameui.cpp:348
GameUI::m_favouriteNode
MythGenericTree * m_favouriteNode
Definition: gameui.h:76
GameUI::getFilter
static QString getFilter(MythGenericTree *node)
Definition: gameui.cpp:769
GameUI::getLevelsOnThisBranch
static int getLevelsOnThisBranch(MythGenericTree *node)
Definition: gameui.cpp:777
GameUI::BuildTree
void BuildTree()
Definition: gameui.cpp:93
GameUI::~GameUI
~GameUI() override=default
GameUI::m_showHashed
bool m_showHashed
Definition: gameui.h:72
GameUI::searchStart
void searchStart(void)
Definition: gameui.cpp:450
GameUI::toggleFavorite
void toggleFavorite(void)
Definition: gameui.cpp:483
metadatacommon.h
MythUIStateType
This widget is used for grouping other widgets for display when a particular named state is called....
Definition: mythuistatetype.h:22
GameUI::fillNode
void fillNode(MythGenericTree *node)
Definition: gameui.cpp:791
mythscreentype.h
GameUI::m_boxImage
MythUIImage * m_boxImage
Definition: gameui.h:90
GameUI::updateRomInfo
void updateRomInfo(RomInfo *rom)
Definition: gameui.cpp:310