00001 #ifndef GAMEUI_H_ 00002 #define GAMEUI_H_ 00003 00004 #include <QString> 00005 #include <QObject> 00006 00007 // myth 00008 #include <mythscreentype.h> 00009 #include <metadata/metadatacommon.h> 00010 #include <metadata/metadatadownload.h> 00011 #include <metadata/metadataimagedownload.h> 00012 #include <mythprogressdialog.h> 00013 00014 class MythUIButtonTree; 00015 class MythGenericTree; 00016 class MythUIText; 00017 class MythUIStateType; 00018 class RomInfo; 00019 class QTimer; 00020 class QKeyEvent; 00021 class QEvent; 00022 class GameScanner; 00023 00024 class GameUI : public MythScreenType 00025 { 00026 Q_OBJECT 00027 00028 public: 00029 GameUI(MythScreenStack *parentStack); 00030 ~GameUI(); 00031 00032 bool Create(); 00033 void Load(); 00034 bool keyPressEvent(QKeyEvent *event); 00035 00036 public slots: 00037 void nodeChanged(MythGenericTree* node); 00038 void itemClicked(MythUIButtonListItem* item); 00039 void showImages(void); 00040 void searchComplete(QString); 00041 void gameSearch(MythGenericTree *node = NULL, 00042 bool automode = false); 00043 void OnGameSearchListSelection(MetadataLookup *lookup); 00044 void OnGameSearchDone(MetadataLookup *lookup); 00045 void StartGameImageSet(MythGenericTree *node, QStringList coverart, 00046 QStringList fanart, QStringList screenshot); 00047 void doScan(void); 00048 void reloadAllData(bool dbchanged); 00049 00050 private: 00051 void updateRomInfo(RomInfo *rom); 00052 void clearRomInfo(void); 00053 void edit(void); 00054 void showInfo(void); 00055 void showMenu(void); 00056 void searchStart(void); 00057 void toggleFavorite(void); 00058 void customEvent(QEvent *event); 00059 void createBusyDialog(QString title); 00060 00061 QString getFillSql(MythGenericTree* node) const; 00062 QString getChildLevelString(MythGenericTree *node) const; 00063 QString getFilter(MythGenericTree *node) const; 00064 int getLevelsOnThisBranch(MythGenericTree *node) const; 00065 bool isLeaf(MythGenericTree *node) const; 00066 void fillNode(MythGenericTree *node); 00067 void resetOtherTrees(MythGenericTree *node); 00068 void updateChangedNode(MythGenericTree *node, RomInfo *romInfo); 00069 void handleDownloadedImages(MetadataLookup *lookup); 00070 00071 private: 00072 bool m_showHashed; 00073 int m_gameShowFileName; 00074 00075 MythGenericTree *m_gameTree; 00076 MythGenericTree *m_favouriteNode; 00077 00078 MythUIBusyDialog *m_busyPopup; 00079 MythScreenStack *m_popupStack; 00080 00081 MythUIButtonTree *m_gameUITree; 00082 MythUIText *m_gameTitleText; 00083 MythUIText *m_gameSystemText; 00084 MythUIText *m_gameYearText; 00085 MythUIText *m_gameGenreText; 00086 MythUIText *m_gamePlotText; 00087 MythUIStateType *m_gameFavouriteState; 00088 MythUIImage *m_gameImage; 00089 MythUIImage *m_fanartImage; 00090 MythUIImage *m_boxImage; 00091 00092 MetadataDownload *m_query; 00093 MetadataImageDownload *m_imageDownload; 00094 00095 GameScanner *m_scanner; 00096 }; 00097 00098 #endif
1.6.3