| 1 | // |
| 2 | // filepicker.h - A ROM chooser |
| 3 | // |
| 4 | |
| 5 | #include <QtWidgets> |
| 6 | |
| 7 | // Forward declarations |
| 8 | class QListWidget; |
| 9 | class FileThread; |
| 10 | class FileListModel; |
| 11 | class QListView; |
| 12 | |
| 13 | class FilePickerWindow: public QWidget |
| 14 | { |
| 15 | // Once we have signals/slots, we need this... |
| 16 | Q_OBJECT |
| 17 | |
| 18 | public: |
| 19 | FilePickerWindow(QWidget * parent = 0); |
| 20 | QString GetSelectedPrettyName(void); |
| 21 | void ScanSoftwareFolder(bool allow = false); |
| 22 | |
| 23 | public slots: |
| 24 | void AddFileToList(unsigned long index); |
| 25 | void AddFileToList2(unsigned long index, QString, QImage *, unsigned long size); |
| 26 | void AddFileToList3(unsigned long index, QString, QImage *, unsigned long size, bool, unsigned long, unsigned long); |
| 27 | void UpdateSelection(const QModelIndex &, const QModelIndex &); |
| 28 | void LoadButtonPressed(void); |
| 29 | void CatchDoubleClick(const QModelIndex &); |
| 30 | |
| 31 | signals: |
| 32 | void RequestLoad(QString); |
| 33 | void FilePickerHiding(void); |
| 34 | |
| 35 | protected: |
| 36 | void keyPressEvent(QKeyEvent *); |
| 37 | // void PopulateList(void); |
| 38 | |
| 39 | private: |
| 40 | QString currentFile; |
| 41 | QString prettyFilename; |
| 42 | QListWidget * fileList2; |
| 43 | FileThread * fileThread; |
| 44 | FileListModel * model; |
| 45 | QListView * fileList; |
| 46 | QLabel * cartImage; |
| 47 | QLabel * title; |
| 48 | QLabel * data; |
| 49 | QPushButton * insertCart; |
| 50 | }; |