MythTV  master
gameui.h
Go to the documentation of this file.
1 #ifndef GAMEUI_H_
2 #define GAMEUI_H_
3 
4 // Qt
5 #include <QString>
6 #include <QObject>
7 
8 // MythTV
14 
15 class MythUIButtonTree;
16 class MythGenericTree;
17 class MythUIText;
18 class MythUIStateType;
19 class RomInfo;
20 class QTimer;
21 class QKeyEvent;
22 class QEvent;
23 class GameScanner;
24 
25 class GameUI : public MythScreenType
26 {
27  Q_OBJECT
28 
29  public:
30  explicit GameUI(MythScreenStack *parentStack);
31  ~GameUI() override = default;
32 
33  bool Create() override; // MythScreenType
34  void BuildTree();
35  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
36 
37  public slots:
38  void nodeChanged(MythGenericTree* node);
40  void showImages(void);
41  void searchComplete(const QString& string);
42  void gameSearch(MythGenericTree *node = nullptr,
43  bool automode = false);
45  void OnGameSearchDone(MetadataLookup *lookup);
46  void StartGameImageSet(MythGenericTree *node, QStringList coverart,
47  QStringList fanart, QStringList screenshot);
48  void doScan(void);
49  void reloadAllData(bool dbchanged);
50 
51  private:
52  void updateRomInfo(RomInfo *rom);
53  void clearRomInfo(void);
54  void edit(void);
55  void showInfo(void);
56  void ShowMenu(void) override; // MythScreenType
57  void searchStart(void);
58  void toggleFavorite(void);
59  void customEvent(QEvent *event) override; // MythUIType
60  void createBusyDialog(const QString& title);
61 
62  QString getFillSql(MythGenericTree* node) const;
63  static QString getChildLevelString(MythGenericTree *node);
64  static QString getFilter(MythGenericTree *node) ;
65  static int getLevelsOnThisBranch(MythGenericTree *node);
66  static bool isLeaf(MythGenericTree *node);
67  void fillNode(MythGenericTree *node);
68  void resetOtherTrees(MythGenericTree *node);
69  void updateChangedNode(MythGenericTree *node, RomInfo *romInfo);
71 
72  private:
73  bool m_showHashed {false};
74  bool m_gameShowFileName {false};
75 
78 
81 
91  MythUIImage *m_boxImage {nullptr};
92 
95 
96  GameScanner *m_scanner {nullptr};
97 };
98 
99 #endif
GameUI::getFillSql
QString getFillSql(MythGenericTree *node) const
Definition: gameui.cpp:640
GameUI::m_popupStack
MythScreenStack * m_popupStack
Definition: gameui.h:80
GameUI::isLeaf
static bool isLeaf(MythGenericTree *node)
Definition: gameui.cpp:791
GameUI::customEvent
void customEvent(QEvent *event) override
Definition: gameui.cpp:496
RefCountHandler
Definition: referencecounterlist.h:17
GameUI::getChildLevelString
static QString getChildLevelString(MythGenericTree *node)
Definition: gameui.cpp:764
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:933
GameUI::ShowMenu
void ShowMenu(void) override
Definition: gameui.cpp:418
GameUI::nodeChanged
void nodeChanged(MythGenericTree *node)
Definition: gameui.cpp:215
GameUI::m_gameYearText
MythUIText * m_gameYearText
Definition: gameui.h:85
GameUI::edit
void edit(void)
Definition: gameui.cpp:375
GameUI
Definition: gameui.h:25
GameUI::StartGameImageSet
void StartGameImageSet(MythGenericTree *node, QStringList coverart, QStringList fanart, QStringList screenshot)
Definition: gameui.cpp:1002
GameUI::m_gameUITree
MythUIButtonTree * m_gameUITree
Definition: gameui.h:82
GameUI::m_scanner
GameScanner * m_scanner
Definition: gameui.h:96
MythScreenStack
Definition: mythscreenstack.h:16
GameScanner
Definition: gamescan.h:71
MetadataDownload
Definition: metadatadownload.h:35
GameUI::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: gameui.cpp:180
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
GameUI::itemClicked
void itemClicked(MythUIButtonListItem *item)
Definition: gameui.cpp:252
GameUI::doScan
void doScan(void)
Definition: gameui.cpp:1083
GameUI::searchComplete
void searchComplete(const QString &string)
Definition: gameui.cpp:298
GameUI::m_gameTree
MythGenericTree * m_gameTree
Definition: gameui.h:76
mythprogressdialog.h
GameUI::m_gamePlotText
MythUIText * m_gamePlotText
Definition: gameui.h:87
MetadataLookup
Definition: metadatacommon.h:87
MythUIButtonListItem
Definition: mythuibuttonlist.h:41
GameUI::updateChangedNode
void updateChangedNode(MythGenericTree *node, RomInfo *romInfo)
Definition: gameui.cpp:881
GameUI::m_gameImage
MythUIImage * m_gameImage
Definition: gameui.h:89
GameUI::gameSearch
void gameSearch(MythGenericTree *node=nullptr, bool automode=false)
Definition: gameui.cpp:894
GameUI::reloadAllData
void reloadAllData(bool dbchanged)
Definition: gameui.cpp:1091
metadatadownload.h
metadataimagedownload.h
GameUI::OnGameSearchDone
void OnGameSearchDone(MetadataLookup *lookup)
Definition: gameui.cpp:957
GameUI::m_gameGenreText
MythUIText * m_gameGenreText
Definition: gameui.h:86
GameUI::OnGameSearchListSelection
void OnGameSearchListSelection(RefCountHandler< MetadataLookup > lookup)
Definition: gameui.cpp:947
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:1046
GameUI::showInfo
void showInfo(void)
Definition: gameui.cpp:397
GameUI::m_busyPopup
MythUIBusyDialog * m_busyPopup
Definition: gameui.h:79
GameUI::m_gameShowFileName
bool m_gameShowFileName
Definition: gameui.h:74
RomInfo
Definition: rominfo.h:14
GameUI::m_gameSystemText
MythUIText * m_gameSystemText
Definition: gameui.h:84
GameUI::m_gameTitleText
MythUIText * m_gameTitleText
Definition: gameui.h:83
MythUIText
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
GameUI::m_fanartImage
MythUIImage * m_fanartImage
Definition: gameui.h:90
GameUI::GameUI
GameUI(MythScreenStack *parentStack)
Definition: gameui.cpp:48
GameUI::m_query
MetadataDownload * m_query
Definition: gameui.h:93
GameUI::Create
bool Create() override
Definition: gameui.cpp:57
MythGenericTree
Definition: mythgenerictree.h:27
GameUI::showImages
void showImages(void)
Definition: gameui.cpp:288
GameUI::m_imageDownload
MetadataImageDownload * m_imageDownload
Definition: gameui.h:94
GameUI::m_gameFavouriteState
MythUIStateType * m_gameFavouriteState
Definition: gameui.h:88
GameUI::resetOtherTrees
void resetOtherTrees(MythGenericTree *node)
Definition: gameui.cpp:860
GameUI::clearRomInfo
void clearRomInfo(void)
Definition: gameui.cpp:350
GameUI::m_favouriteNode
MythGenericTree * m_favouriteNode
Definition: gameui.h:77
GameUI::getFilter
static QString getFilter(MythGenericTree *node)
Definition: gameui.cpp:774
GameUI::getLevelsOnThisBranch
static int getLevelsOnThisBranch(MythGenericTree *node)
Definition: gameui.cpp:782
GameUI::BuildTree
void BuildTree()
Definition: gameui.cpp:95
GameUI::~GameUI
~GameUI() override=default
GameUI::m_showHashed
bool m_showHashed
Definition: gameui.h:73
GameUI::searchStart
void searchStart(void)
Definition: gameui.cpp:452
GameUI::toggleFavorite
void toggleFavorite(void)
Definition: gameui.cpp:485
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:796
mythscreentype.h
GameUI::m_boxImage
MythUIImage * m_boxImage
Definition: gameui.h:91
GameUI::updateRomInfo
void updateRomInfo(RomInfo *rom)
Definition: gameui.cpp:312