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:806
MythUIButtonTree * m_gameUITree
Definition: gameui.h:84
void OnGameSearchListSelection(RefCountHandler< MetadataLookup > lookup)
Definition: gameui.cpp:964
MetadataDownload * m_query
Definition: gameui.h:95
void reloadAllData(bool dbchanged)
Definition: gameui.cpp:1108
bool Create() override
Definition: gameui.cpp:58
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:218
static QString getChildLevelString(MythGenericTree *node)
Definition: gameui.cpp:779
void fillNode(MythGenericTree *node)
Definition: gameui.cpp:811
MythUIText * m_gamePlotText
Definition: gameui.h:89
void searchStart(void)
Definition: gameui.cpp:465
void gameSearch(MythGenericTree *node=nullptr, bool automode=false)
Definition: gameui.cpp:911
MythUIText * m_gameSystemText
Definition: gameui.h:86
void updateChangedNode(MythGenericTree *node, RomInfo *romInfo)
Definition: gameui.cpp:896
void showImages(void)
Definition: gameui.cpp:295
MythUIText * m_gameYearText
Definition: gameui.h:87
void StartGameImageSet(MythGenericTree *node, QStringList coverart, QStringList fanart, QStringList screenshot)
Definition: gameui.cpp:1019
MythUIText * m_gameTitleText
Definition: gameui.h:85
void BuildTree()
Definition: gameui.cpp:96
void createBusyDialog(const QString &title)
Definition: gameui.cpp:950
void edit(void)
Definition: gameui.cpp:382
MythUIText * m_gameGenreText
Definition: gameui.h:88
bool m_showHashed
Definition: gameui.h:75
static int getLevelsOnThisBranch(MythGenericTree *node)
Definition: gameui.cpp:797
void clearRomInfo(void)
Definition: gameui.cpp:357
QString getFillSql(MythGenericTree *node) const
Definition: gameui.cpp:655
MythScreenStack * m_popupStack
Definition: gameui.h:82
void searchComplete(const QString &string)
Definition: gameui.cpp:305
~GameUI() override=default
MetadataImageDownload * m_imageDownload
Definition: gameui.h:96
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: gameui.cpp:183
static QString getFilter(MythGenericTree *node)
Definition: gameui.cpp:789
MythUIImage * m_boxImage
Definition: gameui.h:93
void toggleFavorite(void)
Definition: gameui.cpp:500
void customEvent(QEvent *event) override
Definition: gameui.cpp:511
void doScan(void)
Definition: gameui.cpp:1100
void ShowMenu(void) override
Definition: gameui.cpp:429
void showInfo(void)
Definition: gameui.cpp:406
GameScanner * m_scanner
Definition: gameui.h:98
MythGenericTree * m_favouriteNode
Definition: gameui.h:79
void resetOtherTrees(MythGenericTree *node)
Definition: gameui.cpp:875
MythUIImage * m_fanartImage
Definition: gameui.h:92
void itemClicked(MythUIButtonListItem *item)
Definition: gameui.cpp:257
MythGenericTree * m_gameTree
Definition: gameui.h:78
void OnGameSearchDone(MetadataLookup *lookup)
Definition: gameui.cpp:974
GameUI(MythScreenStack *parentStack)
Definition: gameui.cpp:50
void handleDownloadedImages(MetadataLookup *lookup)
Definition: gameui.cpp:1063
MythUIImage * m_gameImage
Definition: gameui.h:91
void updateRomInfo(RomInfo *rom)
Definition: gameui.cpp:319
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:99
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