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 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);
69 void updateChangedNode(MythGenericTree *node, RomInfo *romInfo);
71
72 private:
73 bool m_showHashed {false};
74 bool m_gameShowFileName {false};
75
78
81
92
95
97};
98
99#endif
Definition: gameui.h:26
static bool isLeaf(MythGenericTree *node)
Definition: gameui.cpp:803
MythUIButtonTree * m_gameUITree
Definition: gameui.h:82
void OnGameSearchListSelection(RefCountHandler< MetadataLookup > lookup)
Definition: gameui.cpp:961
MetadataDownload * m_query
Definition: gameui.h:93
void reloadAllData(bool dbchanged)
Definition: gameui.cpp:1105
bool Create() override
Definition: gameui.cpp:57
bool m_gameShowFileName
Definition: gameui.h:74
MythUIStateType * m_gameFavouriteState
Definition: gameui.h:88
MythUIBusyDialog * m_busyPopup
Definition: gameui.h:79
void nodeChanged(MythGenericTree *node)
Definition: gameui.cpp:217
static QString getChildLevelString(MythGenericTree *node)
Definition: gameui.cpp:776
void fillNode(MythGenericTree *node)
Definition: gameui.cpp:808
MythUIText * m_gamePlotText
Definition: gameui.h:87
void searchStart(void)
Definition: gameui.cpp:462
void gameSearch(MythGenericTree *node=nullptr, bool automode=false)
Definition: gameui.cpp:908
MythUIText * m_gameSystemText
Definition: gameui.h:84
void updateChangedNode(MythGenericTree *node, RomInfo *romInfo)
Definition: gameui.cpp:893
void showImages(void)
Definition: gameui.cpp:292
MythUIText * m_gameYearText
Definition: gameui.h:85
void StartGameImageSet(MythGenericTree *node, QStringList coverart, QStringList fanart, QStringList screenshot)
Definition: gameui.cpp:1016
MythUIText * m_gameTitleText
Definition: gameui.h:83
void BuildTree()
Definition: gameui.cpp:95
void createBusyDialog(const QString &title)
Definition: gameui.cpp:947
void edit(void)
Definition: gameui.cpp:379
MythUIText * m_gameGenreText
Definition: gameui.h:86
bool m_showHashed
Definition: gameui.h:73
static int getLevelsOnThisBranch(MythGenericTree *node)
Definition: gameui.cpp:794
void clearRomInfo(void)
Definition: gameui.cpp:354
QString getFillSql(MythGenericTree *node) const
Definition: gameui.cpp:652
MythScreenStack * m_popupStack
Definition: gameui.h:80
void searchComplete(const QString &string)
Definition: gameui.cpp:302
~GameUI() override=default
MetadataImageDownload * m_imageDownload
Definition: gameui.h:94
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: gameui.cpp:182
static QString getFilter(MythGenericTree *node)
Definition: gameui.cpp:786
MythUIImage * m_boxImage
Definition: gameui.h:91
void toggleFavorite(void)
Definition: gameui.cpp:497
void customEvent(QEvent *event) override
Definition: gameui.cpp:508
void doScan(void)
Definition: gameui.cpp:1097
void ShowMenu(void) override
Definition: gameui.cpp:426
void showInfo(void)
Definition: gameui.cpp:403
GameScanner * m_scanner
Definition: gameui.h:96
MythGenericTree * m_favouriteNode
Definition: gameui.h:77
void resetOtherTrees(MythGenericTree *node)
Definition: gameui.cpp:872
MythUIImage * m_fanartImage
Definition: gameui.h:90
void itemClicked(MythUIButtonListItem *item)
Definition: gameui.cpp:254
MythGenericTree * m_gameTree
Definition: gameui.h:76
void OnGameSearchDone(MetadataLookup *lookup)
Definition: gameui.cpp:971
GameUI(MythScreenStack *parentStack)
Definition: gameui.cpp:49
void handleDownloadedImages(MetadataLookup *lookup)
Definition: gameui.cpp:1060
MythUIImage * m_gameImage
Definition: gameui.h:89
void updateRomInfo(RomInfo *rom)
Definition: gameui.cpp:316
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