MythTV  master
Go to the documentation of this file.
1 #ifndef GAMEUI_H_
2 #define GAMEUI_H_
4 #include <QString>
5 #include <QObject>
7 // myth
8 #include <mythscreentype.h>
12 #include <mythprogressdialog.h>
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;
24 class GameUI : public MythScreenType
25 {
28  public:
29  explicit GameUI(MythScreenStack *parentStack);
30  ~GameUI() = default;
32  bool Create() override; // MythScreenType
33  void BuildTree();
34  bool keyPressEvent(QKeyEvent *event) override; // MythScreenType
36  public slots:
37  void nodeChanged(MythGenericTree* node);
39  void showImages(void);
40  void searchComplete(const QString&);
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);
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);
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);
71  private:
72  bool m_showHashed {false};
73  bool m_gameShowFileName {false};
90  MythUIImage *m_boxImage {nullptr};
95  GameScanner *m_scanner {nullptr};
96 };
98 #endif
MythUIBusyDialog * m_busyPopup
Definition: gameui.h:78
This widget is used for grouping other widgets for display when a particular named state is called.
void toggleFavorite(void)
Definition: gameui.cpp:488
void resetOtherTrees(MythGenericTree *node)
Definition: gameui.cpp:860
void clearRomInfo(void)
Definition: gameui.cpp:353
MythGenericTree * m_gameTree
Definition: gameui.h:75
void doScan(void)
Definition: gameui.cpp:1094
MetadataDownload * m_query
Definition: gameui.h:92
unsigned int slots[4]
Definition: element.c:38
void updateChangedNode(MythGenericTree *node, RomInfo *romInfo)
Definition: gameui.cpp:881
void handleDownloadedImages(MetadataLookup *lookup)
Definition: gameui.cpp:1057
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
void showImages(void)
Definition: gameui.cpp:291
MythUIImage * m_boxImage
Definition: gameui.h:90
void reloadAllData(bool dbchanged)
Definition: gameui.cpp:1102
MythUIImage * m_gameImage
Definition: gameui.h:88
void ShowMenu(void) override
Definition: gameui.cpp:421
void OnGameSearchListSelection(RefCountHandler< MetadataLookup > lookup)
Definition: gameui.cpp:947
bool m_showHashed
Definition: gameui.h:72
MythUIStateType * m_gameFavouriteState
Definition: gameui.h:87
MythUIText * m_gameYearText
Definition: gameui.h:84
void nodeChanged(MythGenericTree *node)
Definition: gameui.cpp:215
void customEvent(QEvent *event) override
Definition: gameui.cpp:499
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: gameui.cpp:178
GameScanner * m_scanner
Definition: gameui.h:95
MythUIButtonTree * m_gameUITree
Definition: gameui.h:81
void searchStart(void)
Definition: gameui.cpp:455
void showInfo(void)
Definition: gameui.cpp:400
static QString getFilter(MythGenericTree *node)
Definition: gameui.cpp:774
MythScreenStack * m_popupStack
Definition: gameui.h:79
MythUIText * m_gamePlotText
Definition: gameui.h:86
static QString getChildLevelString(MythGenericTree *node)
Definition: gameui.cpp:764
void updateRomInfo(RomInfo *rom)
Definition: gameui.cpp:315
MythUIImage * m_fanartImage
Definition: gameui.h:89
void gameSearch(MythGenericTree *node=nullptr, bool automode=false)
Definition: gameui.cpp:894
void fillNode(MythGenericTree *node)
Definition: gameui.cpp:796
GameUI(MythScreenStack *parentStack)
Definition: gameui.cpp:46
void OnGameSearchDone(MetadataLookup *lookup)
Definition: gameui.cpp:957
MetadataImageDownload * m_imageDownload
Definition: gameui.h:93
void edit(void)
Definition: gameui.cpp:378
void BuildTree()
Definition: gameui.cpp:93
bool Create() override
Definition: gameui.cpp:55
QString getFillSql(MythGenericTree *node) const
Definition: gameui.cpp:643
static bool isLeaf(MythGenericTree *node)
Definition: gameui.cpp:791
MythUIText * m_gameSystemText
Definition: gameui.h:83
void itemClicked(MythUIButtonListItem *item)
Definition: gameui.cpp:252
MythUIText * m_gameTitleText
Definition: gameui.h:82
Screen in which all other widgets are contained and rendered.
Definition: gameui.h:24
void StartGameImageSet(MythGenericTree *node, QStringList coverart, QStringList fanart, QStringList screenshot)
Definition: gameui.cpp:1009
void searchComplete(const QString &)
Definition: gameui.cpp:301
void createBusyDialog(const QString &title)
Definition: gameui.cpp:933
MythGenericTree * m_favouriteNode
Definition: gameui.h:76
A tree widget for displaying and navigating a MythGenericTree()
bool m_gameShowFileName
Definition: gameui.h:73
static int getLevelsOnThisBranch(MythGenericTree *node)
Definition: gameui.cpp:782
MythUIText * m_gameGenreText
Definition: gameui.h:85