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() override = 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& string);
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:483
void resetOtherTrees(MythGenericTree *node)
Definition: gameui.cpp:855
void clearRomInfo(void)
Definition: gameui.cpp:348
MythGenericTree * m_gameTree
Definition: gameui.h:75
void doScan(void)
Definition: gameui.cpp:1091
MetadataDownload * m_query
Definition: gameui.h:92
void updateChangedNode(MythGenericTree *node, RomInfo *romInfo)
Definition: gameui.cpp:876
void handleDownloadedImages(MetadataLookup *lookup)
Definition: gameui.cpp:1054
~GameUI() override=default
All purpose text widget, displays a text string.
Definition: mythuitext.h:28
void searchComplete(const QString &string)
Definition: gameui.cpp:296
Image widget, displays a single image or multiple images in sequence.
Definition: mythuiimage.h:97
unsigned int slots[4]
Definition: element.cpp:38
void showImages(void)
Definition: gameui.cpp:286
MythUIImage * m_boxImage
Definition: gameui.h:90
void reloadAllData(bool dbchanged)
Definition: gameui.cpp:1099
MythUIImage * m_gameImage
Definition: gameui.h:88
void ShowMenu(void) override
Definition: gameui.cpp:416
void OnGameSearchListSelection(RefCountHandler< MetadataLookup > lookup)
Definition: gameui.cpp:942
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:213
void customEvent(QEvent *event) override
Definition: gameui.cpp:494
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:450
void showInfo(void)
Definition: gameui.cpp:395
static QString getFilter(MythGenericTree *node)
Definition: gameui.cpp:769
MythScreenStack * m_popupStack
Definition: gameui.h:79
MythUIText * m_gamePlotText
Definition: gameui.h:86
static QString getChildLevelString(MythGenericTree *node)
Definition: gameui.cpp:759
void updateRomInfo(RomInfo *rom)
Definition: gameui.cpp:310
MythUIImage * m_fanartImage
Definition: gameui.h:89
void gameSearch(MythGenericTree *node=nullptr, bool automode=false)
Definition: gameui.cpp:889
void fillNode(MythGenericTree *node)
Definition: gameui.cpp:791
GameUI(MythScreenStack *parentStack)
Definition: gameui.cpp:46
void OnGameSearchDone(MetadataLookup *lookup)
Definition: gameui.cpp:952
MetadataImageDownload * m_imageDownload
Definition: gameui.h:93
void edit(void)
Definition: gameui.cpp:373
void BuildTree()
Definition: gameui.cpp:93
bool Create() override
Definition: gameui.cpp:55
QString getFillSql(MythGenericTree *node) const
Definition: gameui.cpp:638
static bool isLeaf(MythGenericTree *node)
Definition: gameui.cpp:786
MythUIText * m_gameSystemText
Definition: gameui.h:83
void itemClicked(MythUIButtonListItem *item)
Definition: gameui.cpp:250
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:1006
void createBusyDialog(const QString &title)
Definition: gameui.cpp:928
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:777
MythUIText * m_gameGenreText
Definition: gameui.h:85