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
16class MythGenericTree;
17class MythUIText;
18class MythUIStateType;
19class RomInfo;
20class QTimer;
21class QKeyEvent;
22class QEvent;
23class GameScanner;
24
25class 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 void ShowMenu(void) override; // MythScreenType
36 bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
37
38 public slots:
39 void nodeChanged(MythGenericTree* node);
41 void showImages(void);
42 void searchComplete(const QString& string);
43 void gameSearch(MythGenericTree *node = nullptr,
44 bool automode = false);
46 void OnGameSearchDone(MetadataLookup *lookup);
47 void StartGameImageSet(MythGenericTree *node, QStringList coverart,
48 QStringList fanart, QStringList screenshot);
49 void doScan(void);
50 void reloadAllData(bool dbchanged);
51
52 protected:
53 void customEvent(QEvent *event) override; // MythUIType
54
55 private:
56 void updateRomInfo(RomInfo *rom);
57 void clearRomInfo(void);
58 void edit(void);
59 void showInfo(void);
60 void searchStart(void);
61 void toggleFavorite(void);
62 void createBusyDialog(const QString& title);
63
64 QString getFillSql(MythGenericTree* node) const;
65 static QString getChildLevelString(MythGenericTree *node);
66 static QString getFilter(MythGenericTree *node) ;
67 static int getLevelsOnThisBranch(MythGenericTree *node);
68 static bool isLeaf(MythGenericTree *node);
69 void fillNode(MythGenericTree *node);
71 void updateChangedNode(MythGenericTree *node, RomInfo *romInfo);
73
74 private:
75 bool m_showHashed {false};
76 bool m_gameShowFileName {false};
77
80
83
94
97
99};
100
101#endif
Definition: gameui.h:26
static bool isLeaf(MythGenericTree *node)
Definition: gameui.cpp:805
MythUIButtonTree * m_gameUITree
Definition: gameui.h:84
void OnGameSearchListSelection(RefCountHandler< MetadataLookup > lookup)
Definition: gameui.cpp:963
MetadataDownload * m_query
Definition: gameui.h:95
void reloadAllData(bool dbchanged)
Definition: gameui.cpp:1107
bool Create() override
Definition: gameui.cpp:57
bool m_gameShowFileName
Definition: gameui.h:76
MythUIStateType * m_gameFavouriteState
Definition: gameui.h:90
MythUIBusyDialog * m_busyPopup
Definition: gameui.h:81
void nodeChanged(MythGenericTree *node)
Definition: gameui.cpp:217
static QString getChildLevelString(MythGenericTree *node)
Definition: gameui.cpp:778
void fillNode(MythGenericTree *node)
Definition: gameui.cpp:810
MythUIText * m_gamePlotText
Definition: gameui.h:89
void searchStart(void)
Definition: gameui.cpp:464
void gameSearch(MythGenericTree *node=nullptr, bool automode=false)
Definition: gameui.cpp:910
MythUIText * m_gameSystemText
Definition: gameui.h:86
void updateChangedNode(MythGenericTree *node, RomInfo *romInfo)
Definition: gameui.cpp:895
void showImages(void)
Definition: gameui.cpp:294
MythUIText * m_gameYearText
Definition: gameui.h:87
void StartGameImageSet(MythGenericTree *node, QStringList coverart, QStringList fanart, QStringList screenshot)
Definition: gameui.cpp:1018
MythUIText * m_gameTitleText
Definition: gameui.h:85
void BuildTree()
Definition: gameui.cpp:95
void createBusyDialog(const QString &title)
Definition: gameui.cpp:949
void edit(void)
Definition: gameui.cpp:381
MythUIText * m_gameGenreText
Definition: gameui.h:88
bool m_showHashed
Definition: gameui.h:75
static int getLevelsOnThisBranch(MythGenericTree *node)
Definition: gameui.cpp:796
void clearRomInfo(void)
Definition: gameui.cpp:356
QString getFillSql(MythGenericTree *node) const
Definition: gameui.cpp:654
MythScreenStack * m_popupStack
Definition: gameui.h:82
void searchComplete(const QString &string)
Definition: gameui.cpp:304
~GameUI() override=default
MetadataImageDownload * m_imageDownload
Definition: gameui.h:96
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: gameui.cpp:182
static QString getFilter(MythGenericTree *node)
Definition: gameui.cpp:788
MythUIImage * m_boxImage
Definition: gameui.h:93
void toggleFavorite(void)
Definition: gameui.cpp:499
void customEvent(QEvent *event) override
Definition: gameui.cpp:510
void doScan(void)
Definition: gameui.cpp:1099
void ShowMenu(void) override
Definition: gameui.cpp:428
void showInfo(void)
Definition: gameui.cpp:405
GameScanner * m_scanner
Definition: gameui.h:98
MythGenericTree * m_favouriteNode
Definition: gameui.h:79
void resetOtherTrees(MythGenericTree *node)
Definition: gameui.cpp:874
MythUIImage * m_fanartImage
Definition: gameui.h:92
void itemClicked(MythUIButtonListItem *item)
Definition: gameui.cpp:256
MythGenericTree * m_gameTree
Definition: gameui.h:78
void OnGameSearchDone(MetadataLookup *lookup)
Definition: gameui.cpp:973
GameUI(MythScreenStack *parentStack)
Definition: gameui.cpp:49
void handleDownloadedImages(MetadataLookup *lookup)
Definition: gameui.cpp:1062
MythUIImage * m_gameImage
Definition: gameui.h:91
void updateRomInfo(RomInfo *rom)
Definition: gameui.cpp:318
Screen in which all other widgets are contained and rendered.
A tree widget for displaying and navigating a MythGenericTree()
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:98
This widget is used for grouping other widgets for display when a particular named state is called.
All purpose text widget, displays a text string.
Definition: mythuitext.h:29