RetroArch
ui_qt.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
3  * Copyright (C) 2011-2017 - Daniel De Matteis
4  * Copyright (C) 2018 - Brad Parker
5  *
6  * RetroArch is free software: you can redistribute it and/or modify it under the terms
7  * of the GNU General Public License as published by the Free Software Found-
8  * ation, either version 3 of the License, or (at your option) any later version.
9  *
10  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  * PURPOSE. See the GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along with RetroArch.
15  * If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef _QT_UI
19 #define _QT_UI
20 
21 #include <QObject>
22 #include <QMainWindow>
23 #include <QTreeView>
24 #include <QListWidget>
25 #include <QTableWidget>
26 #include <QFrame>
27 #include <QWidget>
28 #include <QDialog>
29 #include <QLabel>
30 #include <QRegularExpression>
31 #include <QPalette>
32 #include <QPlainTextEdit>
33 #include <QFutureWatcher>
34 #include <QPixmap>
35 #include <QImage>
36 #include <QPointer>
37 #include <QProgressBar>
38 #include <QElapsedTimer>
39 #include <QSslError>
40 #include <QNetworkReply>
41 
42 extern "C" {
43 #include <retro_assert.h>
44 #include <retro_common_api.h>
45 #include <queues/task_queue.h>
46 #include "../ui_companion_driver.h"
47 #include "../../gfx/video_driver.h"
48 }
49 
50 #define ALL_PLAYLISTS_TOKEN "|||ALL|||"
51 #define ICON_PATH "/xmb/dot-art/png/"
52 #define THUMBNAIL_BOXART "Named_Boxarts"
53 #define THUMBNAIL_SCREENSHOT "Named_Snaps"
54 #define THUMBNAIL_TITLE "Named_Titles"
55 
56 class QApplication;
57 class QCloseEvent;
58 class QKeyEvent;
59 class QTimer;
60 class QFileSystemModel;
61 class QListWidgetItem;
62 class QTableWidgetItem;
63 class QResizeEvent;
64 class QDockWidget;
65 class QComboBox;
66 class QPushButton;
67 class QToolButton;
68 class QTabWidget;
69 class QPixmap;
70 class QPaintEvent;
71 class QSettings;
72 class QCheckBox;
73 class QSpinBox;
74 class QFormLayout;
75 class QStyle;
76 class QScrollArea;
77 class QSlider;
78 class QDragEnterEvent;
79 class QDropEvent;
80 class QNetworkAccessManager;
81 class QNetworkReply;
82 class QProgressDialog;
83 class LoadCoreWindow;
84 class MainWindow;
85 class ThumbnailWidget;
86 class ThumbnailLabel;
87 class FlowLayout;
88 class ShaderParamsDialog;
89 class CoreOptionsDialog;
90 class CoreInfoDialog;
92 class ViewOptionsDialog;
93 
95 {
97 };
98 
99 class GridItem : public QObject
100 {
101  Q_OBJECT
102 public:
103  GridItem();
104 
105  QPointer<ThumbnailWidget> widget;
106  QPointer<ThumbnailLabel> label;
107  QHash<QString, QString> hash;
108  QImage image;
109  QPixmap pixmap;
110  QFutureWatcher<GridItem*> imageWatcher;
111  QString labelText;
112 };
113 
114 class ThumbnailWidget : public QFrame
115 {
116  Q_OBJECT
117 public:
118  ThumbnailWidget(QWidget *parent = 0);
119  ThumbnailWidget(const ThumbnailWidget& other) { retro_assert(false && "DONT EVER USE THIS"); }
120 
121  QSize sizeHint() const;
122  void setSizeHint(QSize size);
123 signals:
124  void mouseDoubleClicked();
125  void mousePressed();
126 private:
127  QSize m_sizeHint;
128 protected:
129  void paintEvent(QPaintEvent *event);
130  void resizeEvent(QResizeEvent *event);
131  void mouseDoubleClickEvent(QMouseEvent *event);
132  void mousePressEvent(QMouseEvent *event);
133 };
134 
135 class ThumbnailLabel : public QWidget
136 {
137  Q_OBJECT
138 public:
139  ThumbnailLabel(QWidget *parent = 0);
140  ~ThumbnailLabel();
141  QSize sizeHint() const;
142 public slots:
143  void setPixmap(const QPixmap &pixmap);
144 protected:
145  void paintEvent(QPaintEvent *event);
146  void resizeEvent(QResizeEvent *event);
147 private:
148  void updateMargins();
149 
150  QPixmap *m_pixmap;
153 };
154 
155 class TreeView : public QTreeView
156 {
157  Q_OBJECT
158 public:
159  TreeView(QWidget *parent = 0);
160 signals:
161  void itemsSelected(QModelIndexList selectedIndexes);
162 protected slots:
163  void columnCountChanged(int oldCount, int newCount);
164  void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
165 };
166 
167 class TableWidget : public QTableWidget
168 {
169  Q_OBJECT
170 public:
171  TableWidget(QWidget *parent = 0);
172  bool isEditorOpen();
173 signals:
174  void enterPressed();
175  void deletePressed();
176 protected:
177  void keyPressEvent(QKeyEvent *event);
178 };
179 
180 class ListWidget : public QListWidget
181 {
182  Q_OBJECT
183 public:
184  ListWidget(QWidget *parent = 0);
185  bool isEditorOpen();
186 signals:
187  void enterPressed();
188  void deletePressed();
189 protected:
190  void keyPressEvent(QKeyEvent *event);
191 };
192 
193 class AppHandler : public QObject
194 {
195  Q_OBJECT
196 
197 public:
198  AppHandler(QObject *parent = 0);
199  ~AppHandler();
200  void exit();
201  bool isExiting() const;
202 
203 private slots:
204  void onLastWindowClosed();
205 };
206 
207 class CoreInfoLabel : public QLabel
208 {
209  Q_OBJECT
210 public:
211  CoreInfoLabel(QString text = QString(), QWidget *parent = 0);
212 };
213 
214 class CoreInfoWidget : public QWidget
215 {
216  Q_OBJECT
217 public:
218  CoreInfoWidget(CoreInfoLabel *label, QWidget *parent = 0);
219  QSize sizeHint() const;
220 protected:
221  void resizeEvent(QResizeEvent *event);
222 private:
224  QScrollArea *m_scrollArea;
225 };
226 
227 class LogTextEdit : public QPlainTextEdit
228 {
229  Q_OBJECT
230 public:
231  LogTextEdit(QWidget *parent = 0);
232 public slots:
233  void appendMessage(const QString& text);
234 };
235 
236 class MainWindow : public QMainWindow
237 {
238  Q_OBJECT
239 
240 public:
241  enum ViewType
242  {
245  };
246 
247  enum Theme
248  {
252  };
253 
255  {
261  };
262 
263  MainWindow(QWidget *parent = NULL);
264  ~MainWindow();
269  QWidget* contentGridWidget();
270  QWidget* searchWidget();
271  QLineEdit* searchLineEdit();
272  QComboBox* launchWithComboBox();
273  QToolButton* startCorePushButton();
274  QToolButton* coreInfoPushButton();
275  QToolButton* runPushButton();
276  QToolButton* stopPushButton();
277  QTabWidget* browserAndPlaylistTabWidget();
278  QVector<QHash<QString, QString> > getPlaylistDefaultCores();
280  QSettings* settings();
281  QVector<QHash<QString, QString> > getCoreInfo();
283  Theme theme();
284  Theme getThemeFromString(QString themeString);
285  QString getThemeString(Theme theme);
286  QHash<QString, QString> getSelectedCore();
287  void showStatusMessage(QString msg, unsigned priority, unsigned duration, bool flush);
288  bool showMessageBox(QString msg, MessageBoxType msgType = MSGBOX_TYPE_INFO, Qt::WindowModality modality = Qt::ApplicationModal, bool showDontAsk = true, bool *dontAsk = NULL);
289  bool setCustomThemeFile(QString filePath);
290  void setCustomThemeString(QString qss);
291  const QString& customThemeString() const;
292  GridItem* doDeferredImageLoad(GridItem *item, QString path);
293  void setCurrentViewType(ViewType viewType);
294  QString getCurrentViewTypeString();
299  void addFilesToPlaylist(QStringList files);
300  QString getCurrentPlaylistPath();
301  QHash<QString, QString> getCurrentContentHash();
302  static double lerp(double x, double y, double a, double b, double d);
304  QVector<QPair<QString, QString> > getPlaylists();
305  QString getScrubbedString(QString str);
306 
307 signals:
308  void thumbnailChanged(const QPixmap &pixmap);
309  void thumbnail2Changed(const QPixmap &pixmap);
310  void thumbnail3Changed(const QPixmap &pixmap);
311  void gotLogMessage(const QString &msg);
312  void gotStatusMessage(QString msg, unsigned priority, unsigned duration, bool flush);
313  void gotReloadPlaylists();
314  void gotReloadShaderParams();
315  void gotReloadCoreOptions();
316  void showErrorMessageDeferred(QString msg);
317  void showInfoMessageDeferred(QString msg);
318  void extractArchiveDeferred(QString path, QString extractionDir, QString tempExtension, retro_task_callback_t cb);
319  void itemChanged();
320  void gridItemChanged(QString title);
321  void gotThumbnailDownload(QString system, QString title);
322  void scrollToDownloads(QString path);
323  void scrollToDownloadsAgain(QString path);
324 
325 public slots:
327  void onBrowserUpClicked();
328  void onBrowserStartClicked();
329  void initContentTableWidget();
330  void initContentGridLayout();
333  void setCoreActions();
334  void onRunClicked();
335  void loadContent(const QHash<QString, QString> &contentHash);
336  void onStartCoreClicked();
339  void selectBrowserDir(QString path);
340  void resizeThumbnails(bool one, bool two, bool three);
341  void onResizeThumbnailOne();
342  void onResizeThumbnailTwo();
343  void onResizeThumbnailThree();
344  void appendLogMessage(const QString &msg);
345  void onGotLogMessage(const QString &msg);
346  void onGotStatusMessage(QString msg, unsigned priority, unsigned duration, bool flush);
347  void reloadPlaylists();
348  void deferReloadPlaylists();
349  void onGotReloadPlaylists();
351  void onGotReloadCoreOptions();
352  void showWelcomeScreen();
353  void onIconViewClicked();
354  void onListViewClicked();
355  void onTabWidgetIndexChanged(int index);
357  void onFileDropWidgetContextMenuRequested(const QPoint &pos);
358  void showAbout();
359  void showDocs();
360  void updateRetroArchNightly();
364  void downloadThumbnail(QString system, QString title, QUrl url = QUrl());
365  void downloadAllThumbnails(QString system, QUrl url = QUrl());
366  void downloadPlaylistThumbnails(QString playlistPath);
367  void downloadNextPlaylistThumbnail(QString system, QString title, QString type, QUrl url = QUrl());
368 
369 private slots:
370  void onLoadCoreClicked(const QStringList &extensionFilters = QStringList());
371  void onUnloadCoreMenuAction();
372  void onTimeout();
373  void onCoreLoaded();
374  void onCurrentListItemChanged(QListWidgetItem *current, QListWidgetItem *previous);
375  void onCurrentTableItemChanged(QTableWidgetItem *current, QTableWidgetItem *previous);
376  void onCurrentTableItemDataChanged(QTableWidgetItem *item);
377  void onCurrentListItemDataChanged(QListWidgetItem *item);
378  void currentItemChanged(const QHash<QString, QString> &hash);
379  void onSearchEnterPressed();
380  void onSearchLineEditEdited(const QString &text);
381  void addPlaylistItemsToTable(const QStringList &paths, bool all = false);
382  void addPlaylistHashToTable(const QVector<QHash<QString, QString> > &items);
383  void addPlaylistItemsToGrid(const QStringList &paths, bool all = false);
384  void addPlaylistHashToGrid(const QVector<QHash<QString, QString> > &items);
385  void onContentItemDoubleClicked(QTableWidgetItem *item);
386  void onCoreLoadWindowClosed();
387  void onTreeViewItemsSelected(QModelIndexList selectedIndexes);
388  void onSearchResetClicked();
390  void onFileBrowserTreeContextMenuRequested(const QPoint &pos);
391  void onPlaylistWidgetContextMenuRequested(const QPoint &pos);
392  void onStopClicked();
393  void onDeferredImageLoaded();
394  void onZoomValueChanged(int value);
395  void onContentGridInited();
397  void onPendingItemUpdates();
399  void onGridItemClicked(ThumbnailWidget *thumbnailWidget = NULL);
400  void onPlaylistFilesDropped(QStringList files);
401  void onShaderParamsClicked();
402  void onCoreOptionsClicked();
403  void onShowErrorMessage(QString msg);
404  void onShowInfoMessage(QString msg);
405  void onContributorsClicked();
406  void onItemChanged();
407  void onGridItemChanged(QString title);
408  void onFileSystemDirLoaded(const QString &path);
409  void onDownloadScroll(QString path);
410  void onDownloadScrollAgain(QString path);
411  int onExtractArchive(QString path, QString extractionDir, QString tempExtension, retro_task_callback_t cb);
412 
413  void onUpdateNetworkError(QNetworkReply::NetworkError code);
414  void onUpdateNetworkSslErrors(const QList<QSslError> &errors);
416  void onUpdateDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
419 
420  void onThumbnailDownloadNetworkError(QNetworkReply::NetworkError code);
421  void onThumbnailDownloadNetworkSslErrors(const QList<QSslError> &errors);
423  void onThumbnailDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
426  void onDownloadThumbnail(QString system, QString title);
427 
428  void onThumbnailPackDownloadNetworkError(QNetworkReply::NetworkError code);
429  void onThumbnailPackDownloadNetworkSslErrors(const QList<QSslError> &errors);
431  void onThumbnailPackDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
434 
435  void onPlaylistThumbnailDownloadNetworkError(QNetworkReply::NetworkError code);
436  void onPlaylistThumbnailDownloadNetworkSslErrors(const QList<QSslError> &errors);
438  void onPlaylistThumbnailDownloadProgress(qint64 bytesReceived, qint64 bytesTotal);
441 
442 private:
443  void setCurrentCoreLabel();
444  void getPlaylistFiles();
445  bool isCoreLoaded();
446  bool isContentLessCore();
447  void removeGridItems();
448  void loadImageDeferred(GridItem *item, QString path);
449  void calcGridItemSize(GridItem *item, int zoomValue);
450  bool updateCurrentPlaylistEntry(const QHash<QString, QString> &contentHash);
451  int extractArchive(QString path);
452  void removeUpdateTempFiles();
453  bool addDirectoryFilesToList(QProgressDialog *dialog, QStringList &list, QDir &dir, QStringList &extensions);
454  void renamePlaylistItem(QListWidgetItem *item, QString newName);
456  bool currentPlaylistIsAll();
457  QVector<QHash<QString, QString> > getPlaylistItems(QString pathString);
458 
460  QTimer *m_timer;
461  QString m_currentCore;
463  QLabel *m_statusLabel;
465  QFileSystemModel *m_dirModel;
468  QWidget *m_searchWidget;
469  QLineEdit *m_searchLineEdit;
470  QDockWidget *m_searchDock;
471  QStringList m_playlistFiles;
473  QToolButton *m_startCorePushButton;
474  QToolButton *m_coreInfoPushButton;
475  QToolButton *m_runPushButton;
476  QToolButton *m_stopPushButton;
482  QRegularExpression m_fileSanitizerRegex;
483  QSettings *m_settings;
486  QStyle *m_defaultStyle;
489  QDockWidget *m_coreInfoDock;
492  QDockWidget *m_logDock;
493  QWidget *m_logWidget;
495  QVector<QByteArray> m_imageFormats;
496  QListWidgetItem *m_historyPlaylistsItem;
500  QWidget *m_gridWidget;
501  QScrollArea *m_gridScrollArea;
502  QVector<QPointer<GridItem> > m_gridItems;
504  QSlider *m_zoomSlider;
506  QList<GridItem*> m_pendingItemUpdates;
508  QProgressBar *m_gridProgressBar;
510  QHash<QString, QString> m_currentGridHash;
512  QPointer<ThumbnailWidget> m_currentGridWidget;
517  QPointer<ShaderParamsDialog> m_shaderParamsDialog;
518  QPointer<CoreOptionsDialog> m_coreOptionsDialog;
519  QNetworkAccessManager *m_networkManager;
520 
521  QProgressDialog *m_updateProgressDialog;
523  QPointer<QNetworkReply> m_updateReply;
524 
527  QPointer<QNetworkReply> m_thumbnailDownloadReply;
529 
532  QPointer<QNetworkReply> m_thumbnailPackDownloadReply;
533 
536  QPointer<QNetworkReply> m_playlistThumbnailDownloadReply;
537  QVector<QHash<QString, QString> > m_pendingPlaylistThumbnails;
542 
543 protected:
544  void closeEvent(QCloseEvent *event);
545  void keyPressEvent(QKeyEvent *event);
546 };
547 
548 Q_DECLARE_METATYPE(ThumbnailWidget)
549 Q_DECLARE_METATYPE(QPointer<ThumbnailWidget>)
550 Q_DECLARE_METATYPE(struct video_shader_parameter*)
551 
553 
554 typedef struct ui_application_qt
555 {
556  QApplication *app;
558 
559 typedef struct ui_window_qt
560 {
563 
565 
566 #endif
Definition: ui_qt.h:257
void downloadNextPlaylistThumbnail(QString system, QString title, QString type, QUrl url=QUrl())
Definition: playlistthumbnaildownload.cpp:196
CoreInfoLabel * m_coreInfoLabel
Definition: ui_qt.h:490
void onItemChanged()
Definition: ui_qt_window.cpp:715
QToolButton * m_runPushButton
Definition: ui_qt.h:475
void thumbnail2Changed(const QPixmap &pixmap)
void gotReloadPlaylists()
void setCurrentCoreLabel()
Definition: ui_qt_window.cpp:2779
void onFileBrowserTreeContextMenuRequested(const QPoint &pos)
Definition: ui_qt_window.cpp:1001
void extractArchiveDeferred(QString path, QString extractionDir, QString tempExtension, retro_task_callback_t cb)
AppHandler(QObject *parent=0)
Definition: ui_qt_application.cpp:64
QString labelText
Definition: ui_qt.h:111
ViewOptionsDialog * m_viewOptionsDialog
Definition: ui_qt.h:484
void onSearchLineEditEdited(const QString &text)
Definition: ui_qt_window.cpp:2167
void onUpdateDownloadCanceled()
Definition: updateretroarch.cpp:111
~ThumbnailLabel()
Definition: ui_qt.cpp:117
QProgressDialog * m_thumbnailPackDownloadProgressDialog
Definition: ui_qt.h:530
Definition: ui_qt.h:256
TreeView * m_dirTree
Definition: ui_qt.h:464
void onGotReloadPlaylists()
Definition: playlist.cpp:810
Definition: ui_qt.h:193
bool setCustomThemeFile(QString filePath)
Definition: ui_qt_window.cpp:876
QDockWidget * m_searchDock
Definition: ui_qt.h:470
unsigned m_downloadedThumbnails
Definition: ui_qt.h:538
void onThumbnailDownloadNetworkError(QNetworkReply::NetworkError code)
Definition: thumbnaildownload.cpp:26
Definition: ui_qt.h:155
ViewType getCurrentViewType()
Definition: ui_qt_window.cpp:2636
QScrollArea * m_gridScrollArea
Definition: ui_qt.h:501
void loadImageDeferred(GridItem *item, QString path)
Definition: ui_qt_window.cpp:2966
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
CoreInfoDialog * m_coreInfoDialog
Definition: ui_qt.h:485
void removeGridItems()
Definition: ui_qt_window.cpp:2886
Definition: ui_qt.h:99
QString getCurrentViewTypeString()
Definition: ui_qt_window.cpp:3159
void initContentTableWidget()
Definition: ui_qt_window.cpp:3059
QWidget * searchWidget()
Definition: ui_qt_window.cpp:2366
void onTreeViewItemsSelected(QModelIndexList selectedIndexes)
Definition: ui_qt_window.cpp:1534
Definition: ui_qt.h:243
CoreInfoWidget(CoreInfoLabel *label, QWidget *parent=0)
Definition: ui_qt_window.cpp:241
QLabel * m_statusLabel
Definition: ui_qt.h:463
void onThumbnailPackDownloadCanceled()
Definition: thumbnailpackdownload.cpp:90
void showWelcomeScreen()
Definition: ui_qt_window.cpp:840
QPointer< ThumbnailLabel > label
Definition: ui_qt.h:106
Definition: ui_qt.h:96
QProgressDialog * m_updateProgressDialog
Definition: ui_qt.h:521
QString m_currentCoreVersion
Definition: ui_qt.h:462
void onUpdateRetroArchFinished(bool success)
Definition: updateretroarch.cpp:185
QHash< QString, QString > m_currentGridHash
Definition: ui_qt.h:510
void onStopClicked()
Definition: ui_qt_window.cpp:2770
void initContentGridLayout()
Definition: ui_qt_window.cpp:2986
void paintEvent(QPaintEvent *event)
Definition: ui_qt.cpp:81
void renamePlaylistItem(QListWidgetItem *item, QString newName)
Definition: ui_qt_window.cpp:2421
QWidget * m_logWidget
Definition: ui_qt.h:493
Definition: ui_qt.h:554
void setPixmap(const QPixmap &pixmap)
Definition: ui_qt.cpp:123
void onTableWidgetEnterPressed()
Definition: ui_qt_window.cpp:1615
GLsizei const GLchar ** path
Definition: glext.h:7901
bool updateCurrentPlaylistEntry(const QHash< QString, QString > &contentHash)
Definition: playlist.cpp:383
void enterPressed()
void onThumbnailPackDownloadFinished()
Definition: thumbnailpackdownload.cpp:95
void itemsSelected(QModelIndexList selectedIndexes)
~AppHandler()
Definition: ui_qt_application.cpp:69
void setTheme(Theme theme=THEME_SYSTEM_DEFAULT)
Definition: ui_qt_window.cpp:1211
bool currentPlaylistIsSpecial()
Definition: playlist.cpp:988
~MainWindow()
Definition: ui_qt_window.cpp:646
void onPlaylistWidgetContextMenuRequested(const QPoint &pos)
Definition: playlist.cpp:485
Definition: ui_qt.h:214
FlowLayout * m_gridLayout
Definition: ui_qt.h:499
QIcon m_folderIcon
Definition: ui_qt.h:497
bool isContentLessCore()
Definition: ui_qt_window.cpp:1908
QSettings * m_settings
Definition: ui_qt.h:483
void addPlaylistHashToGrid(const QVector< QHash< QString, QString > > &items)
Definition: playlist.cpp:1146
void mousePressEvent(QMouseEvent *event)
Definition: ui_qt.cpp:67
QFile m_thumbnailPackDownloadFile
Definition: ui_qt.h:531
SpecialPlaylist
Definition: ui_qt.h:94
GLsizeiptr size
Definition: glext.h:6559
int m_allPlaylistsListMaxCount
Definition: ui_qt.h:513
Definition: ui_qt.h:180
QSize m_sizeHint
Definition: ui_qt.h:127
void resizeEvent(QResizeEvent *event)
Definition: ui_qt_window.cpp:255
void onIconViewClicked()
Definition: ui_qt_window.cpp:797
void onPlaylistThumbnailDownloadCanceled()
Definition: playlistthumbnaildownload.cpp:50
QVector< QHash< QString, QString > > getCoreInfo()
Definition: ui_qt_window.cpp:1240
Theme getThemeFromString(QString themeString)
Definition: ui_qt_window.cpp:1177
Definition: ui_qt.h:135
QDockWidget * m_logDock
Definition: ui_qt.h:492
QPixmap * m_pixmap
Definition: ui_qt.h:150
Definition: video_shader_parse.h:99
void onSearchResetClicked()
Definition: ui_qt_window.cpp:1523
GLsizei const GLuint * paths
Definition: glext.h:12624
void setCurrentViewType(ViewType viewType)
Definition: ui_qt_window.cpp:2612
void onPlaylistThumbnailDownloadNetworkSslErrors(const QList< QSslError > &errors)
Definition: playlistthumbnaildownload.cpp:29
QSlider * m_zoomSlider
Definition: ui_qt.h:504
TableWidget * m_tableWidget
Definition: ui_qt.h:467
QFileSystemModel * m_dirModel
Definition: ui_qt.h:465
void onRunClicked()
Definition: ui_qt_window.cpp:1880
QList< GridItem * > m_pendingItemUpdates
Definition: ui_qt.h:506
void onCurrentListItemDataChanged(QListWidgetItem *item)
Definition: ui_qt_window.cpp:2416
bool isEditorOpen()
Definition: ui_qt_window.cpp:220
QVector< QHash< QString, QString > > getPlaylistItems(QString pathString)
Definition: playlist.cpp:1254
QString m_customThemeString
Definition: ui_qt.h:498
void onRetroArchUpdateDownloadFinished()
Definition: updateretroarch.cpp:116
void onGotReloadShaderParams()
Definition: ui_qt_window.cpp:1106
bool m_playlistThumbnailDownloadWasCanceled
Definition: ui_qt.h:540
void onSearchEnterPressed()
Definition: ui_qt_window.cpp:2376
QTabWidget * browserAndPlaylistTabWidget()
Definition: ui_qt_window.cpp:1610
MainWindow * qtWindow
Definition: ui_qt.h:561
int onExtractArchive(QString path, QString extractionDir, QString tempExtension, retro_task_callback_t cb)
Definition: ui_qt_window.cpp:3268
int m_pixmapHeight
Definition: ui_qt.h:152
Definition: ui_qt.h:236
bool success(size_t len)
Definition: peglib.h:475
MessageBoxType
Definition: ui_qt.h:254
QComboBox * launchWithComboBox()
Definition: ui_qt_window.cpp:2162
void gridItemChanged(QString title)
QTimer * m_timer
Definition: ui_qt.h:460
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
void onThumbnailDownloadFinished()
Definition: thumbnaildownload.cpp:76
QStringList m_pendingThumbnailDownloadTypes
Definition: ui_qt.h:528
Definition: ui_qt.h:207
QToolButton * startCorePushButton()
Definition: ui_qt_window.cpp:2157
void onGridItemClicked(ThumbnailWidget *thumbnailWidget=NULL)
Definition: ui_qt_window.cpp:753
GLuint GLuint GLsizei count
Definition: glext.h:6292
void gotStatusMessage(QString msg, unsigned priority, unsigned duration, bool flush)
void thumbnail3Changed(const QPixmap &pixmap)
int m_pixmapWidth
Definition: ui_qt.h:151
void onTimeout()
Definition: ui_qt_window.cpp:2745
QToolButton * m_coreInfoPushButton
Definition: ui_qt.h:474
GLuint GLsizei const GLchar * label
Definition: glext.h:8583
void onShowErrorMessage(QString msg)
Definition: ui_qt_window.cpp:3258
QString getSpecialPlaylistPath(SpecialPlaylist playlist)
Definition: ui_qt_window.cpp:738
void scrollToDownloadsAgain(QString path)
void setAllPlaylistsGridMaxCount(int count)
Definition: playlist.cpp:1378
QTabWidget * m_browserAndPlaylistTabWidget
Definition: ui_qt.h:477
QHash< QString, QString > getCurrentContentHash()
Definition: ui_qt_window.cpp:1633
QDockWidget * m_coreInfoDock
Definition: ui_qt.h:489
CoreInfoLabel * m_label
Definition: ui_qt.h:223
void currentItemChanged(const QHash< QString, QString > &hash)
Definition: ui_qt_window.cpp:2488
ViewType m_viewType
Definition: ui_qt.h:507
QVector< QHash< QString, QString > > getPlaylistDefaultCores()
Definition: playlist.cpp:1067
Definition: playlistentrydialog.h:12
TreeView(QWidget *parent=0)
Definition: ui_qt_window.cpp:176
void appendMessage(const QString &text)
Definition: ui_qt_window.cpp:267
void removeUpdateTempFiles()
Definition: updateretroarch.cpp:41
void onCurrentTableItemDataChanged(QTableWidgetItem *item)
Definition: ui_qt_window.cpp:2393
void onThumbnailDownloadReadyRead()
Definition: thumbnaildownload.cpp:201
void exit()
Definition: ui_qt_application.cpp:73
Definition: coreoptionsdialog.h:14
LogTextEdit * m_logTextEdit
Definition: ui_qt.h:494
QScrollArea * m_scrollArea
Definition: ui_qt.h:224
#define NULL
Pointer to 0.
Definition: gctypes.h:65
GLenum type
Definition: glext.h:6233
QPointer< QNetworkReply > m_thumbnailDownloadReply
Definition: ui_qt.h:527
void onGotStatusMessage(QString msg, unsigned priority, unsigned duration, bool flush)
Definition: ui_qt_window.cpp:1048
void onZoomValueChanged(int value)
Definition: ui_qt_window.cpp:827
QHash< QString, QString > hash
Definition: ui_qt.h:107
bool currentPlaylistIsAll()
Definition: playlist.cpp:1013
Definition: ui_qt.h:559
QVector< QHash< QString, QString > > m_pendingPlaylistThumbnails
Definition: ui_qt.h:537
void resizeThumbnails(bool one, bool two, bool three)
Definition: ui_qt_window.cpp:2555
void onLaunchWithComboBoxIndexChanged(int index)
Definition: ui_qt_window.cpp:1133
LogTextEdit(QWidget *parent=0)
Definition: ui_qt_window.cpp:261
void gotReloadCoreOptions()
LoadCoreWindow * m_loadCoreWindow
Definition: ui_qt.h:459
TableWidget(QWidget *parent=0)
Definition: ui_qt_window.cpp:195
ThumbnailWidget(const ThumbnailWidget &other)
Definition: ui_qt.h:119
QVector< QPair< QString, QString > > getPlaylists()
Definition: ui_qt_window.cpp:671
Theme m_currentTheme
Definition: ui_qt.h:488
void onPlaylistThumbnailDownloadReadyRead()
Definition: playlistthumbnaildownload.cpp:186
void onContributorsClicked()
Definition: ui_qt_window.cpp:3191
void onGridItemChanged(QString title)
Definition: ui_qt_window.cpp:698
joypad_connection_t * slots
Definition: btstack_hid.c:629
void onPlaylistThumbnailDownloadFinished()
Definition: playlistthumbnaildownload.cpp:57
void closeEvent(QCloseEvent *event)
Definition: ui_qt_window.cpp:3177
QWidget * contentGridWidget()
Definition: ui_qt_window.cpp:2674
void updateMargins()
Definition: viewoptionsdialog.h:15
FlowLayout * contentGridLayout()
Definition: ui_qt_window.cpp:2679
int m_allPlaylistsGridMaxCount
Definition: ui_qt.h:514
void onThumbnailDownloadCanceled()
Definition: thumbnaildownload.cpp:71
CoreInfoWidget * m_coreInfoWidget
Definition: ui_qt.h:491
void onUnloadCoreMenuAction()
Definition: ui_qt_window.cpp:2855
void onGridItemDoubleClicked()
Definition: ui_qt_window.cpp:784
QSize sizeHint() const
Definition: ui_qt.cpp:134
void downloadThumbnail(QString system, QString title, QUrl url=QUrl())
Definition: thumbnaildownload.cpp:211
bool m_pendingRun
Definition: ui_qt.h:478
Definition: shaderparamsdialog.h:27
void onThumbnailPackDownloadProgress(qint64 bytesReceived, qint64 bytesTotal)
Definition: thumbnailpackdownload.cpp:197
Definition: ui_qt.h:249
void onCurrentTableItemChanged(QTableWidgetItem *current, QTableWidgetItem *previous)
Definition: ui_qt_window.cpp:2381
QFile m_playlistThumbnailDownloadFile
Definition: ui_qt.h:535
QPointer< QNetworkReply > m_playlistThumbnailDownloadReply
Definition: ui_qt.h:536
QStringList m_playlistFiles
Definition: ui_qt.h:471
bool isExiting() const
Definition: ui_qt_application.cpp:81
bool isCoreLoaded()
Definition: ui_qt_window.cpp:1915
GLenum GLsizei const GLvoid * pathString
Definition: glext.h:12621
ViewType m_lastViewType
Definition: ui_qt.h:511
void showAbout()
Definition: ui_qt_window.cpp:3215
QImage image
Definition: ui_qt.h:108
void setCoreActions()
Definition: ui_qt_window.cpp:1933
void showStatusMessage(QString msg, unsigned priority, unsigned duration, bool flush)
Definition: ui_qt_window.cpp:1043
QFutureWatcher< GridItem * > imageWatcher
Definition: ui_qt.h:110
QPointer< ThumbnailWidget > m_currentGridWidget
Definition: ui_qt.h:512
Definition: flowlayout.h:68
void onStartCoreClicked()
Definition: ui_qt_window.cpp:1657
void onDownloadThumbnail(QString system, QString title)
Definition: thumbnaildownload.cpp:185
QString getThemeString(Theme theme)
Definition: ui_qt_window.cpp:1189
void(* retro_task_callback_t)(void *task_data, void *user_data, const char *error)
Definition: task_queue.h:47
static const unsigned char msg[]
Definition: ccm.c:375
void onUpdateDownloadProgress(qint64 bytesReceived, qint64 bytesTotal)
Definition: updateretroarch.cpp:201
Definition: coreinfodialog.h:9
PlaylistEntryDialog * playlistEntryDialog()
Definition: ui_qt_window.cpp:1923
QLineEdit * m_searchLineEdit
Definition: ui_qt.h:469
QLineEdit * searchLineEdit()
Definition: ui_qt_window.cpp:2371
void onListViewClicked()
Definition: ui_qt_window.cpp:803
void onUpdateGridItemPixmapFromImage(GridItem *item)
Definition: ui_qt_window.cpp:2954
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
void deferReloadShaderParams()
Definition: ui_qt_window.cpp:1081
QWidget * m_searchWidget
Definition: ui_qt.h:468
void onContentItemDoubleClicked(QTableWidgetItem *item)
Definition: ui_qt_window.cpp:1652
void onPlaylistThumbnailDownloadProgress(qint64 bytesReceived, qint64 bytesTotal)
Definition: playlistthumbnaildownload.cpp:175
QPixmap pixmap
Definition: ui_qt.h:109
void keyPressEvent(QKeyEvent *event)
Definition: ui_qt_window.cpp:225
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
void onShowHiddenDockWidgetAction()
Definition: ui_qt_window.cpp:2345
QStyle * m_defaultStyle
Definition: ui_qt.h:486
void onResizeThumbnailOne()
Definition: ui_qt_window.cpp:2540
void onTabWidgetIndexChanged(int index)
Definition: ui_qt_window.cpp:2105
void onThumbnailDownloadNetworkSslErrors(const QList< QSslError > &errors)
Definition: thumbnaildownload.cpp:50
void onPlaylistThumbnailDownloadNetworkError(QNetworkReply::NetworkError code)
Definition: playlistthumbnaildownload.cpp:25
void onBrowserUpClicked()
Definition: ui_qt_window.cpp:2717
void itemChanged()
void gotThumbnailDownload(QString system, QString title)
void columnCountChanged(int oldCount, int newCount)
Definition: ui_qt_window.cpp:181
QToolButton * m_startCorePushButton
Definition: ui_qt.h:473
void onLastWindowClosed()
Definition: ui_qt_application.cpp:86
void onContentGridInited()
Definition: ui_qt_window.cpp:3035
MainWindow(QWidget *parent=NULL)
Definition: ui_qt_window.cpp:276
Definition: inftrees.h:27
QToolButton * runPushButton()
Definition: ui_qt_window.cpp:2147
void keyPressEvent(QKeyEvent *event)
Definition: ui_qt_window.cpp:205
CoreInfoLabel(QString text=QString(), QWidget *parent=0)
Definition: ui_qt_window.cpp:235
void calcGridItemSize(GridItem *item, int zoomValue)
Definition: ui_qt_window.cpp:809
Definition: ui_qt_load_core_window.h:38
static const struct @104 priority[]
QFile m_thumbnailDownloadFile
Definition: ui_qt.h:526
QSettings * settings()
Definition: ui_qt_window.cpp:3154
QString m_currentCore
Definition: ui_qt.h:461
#define retro_assert(cond)
Definition: retro_assert.h:34
void deletePressed()
void addPlaylistItemsToGrid(const QStringList &paths, bool all=false)
Definition: playlist.cpp:1119
QVector< QByteArray > m_imageFormats
Definition: ui_qt.h:495
void onBrowserStartClicked()
Definition: ui_qt_window.cpp:2727
unsigned m_failedThumbnails
Definition: ui_qt.h:539
RETRO_BEGIN_DECLS struct ui_application_qt ui_application_qt_t
void showInfoMessageDeferred(QString msg)
void mouseDoubleClicked()
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
void resizeEvent(QResizeEvent *event)
Definition: ui_qt.cpp:198
void onShaderParamsClicked()
Definition: ui_qt_window.cpp:1086
void onUpdateNetworkSslErrors(const QList< QSslError > &errors)
Definition: updateretroarch.cpp:90
void onViewClosedDocksAboutToShow()
Definition: ui_qt_window.cpp:2309
void onThumbnailPackDownloadNetworkError(QNetworkReply::NetworkError code)
Definition: thumbnailpackdownload.cpp:45
GLuint index
Definition: glext.h:6671
void appendLogMessage(const QString &msg)
Definition: ui_qt_window.cpp:1118
void paintEvent(QPaintEvent *event)
Definition: ui_qt.cpp:139
void onPlaylistFilesDropped(QStringList files)
Definition: playlist.cpp:124
static double lerp(double x, double y, double a, double b, double d)
Definition: ui_qt_window.cpp:749
GridItem()
Definition: ui_qt_window.cpp:164
int m_lastZoomSliderValue
Definition: ui_qt.h:505
QProgressDialog * m_playlistThumbnailDownloadProgressDialog
Definition: ui_qt.h:534
void onDeferredImageLoaded()
Definition: ui_qt_window.cpp:2913
void onPendingItemUpdates()
Definition: ui_qt_window.cpp:2936
void keyPressEvent(QKeyEvent *event)
Definition: ui_qt_window.cpp:3140
void addPlaylistItemsToTable(const QStringList &paths, bool all=false)
Definition: playlist.cpp:1325
GridItem * doDeferredImageLoad(GridItem *item, QString path)
Definition: ui_qt_window.cpp:2972
QPixmap * m_thumbnailPixmap2
Definition: ui_qt.h:480
void setSizeHint(QSize size)
Definition: ui_qt.cpp:104
const QString & customThemeString() const
Definition: ui_qt_window.cpp:871
void reloadPlaylists()
Definition: playlist.cpp:815
QPixmap * m_thumbnailPixmap3
Definition: ui_qt.h:481
int extractArchive(QString path)
void downloadPlaylistThumbnails(QString playlistPath)
Definition: playlistthumbnaildownload.cpp:287
QPointer< CoreOptionsDialog > m_coreOptionsDialog
Definition: ui_qt.h:518
QComboBox * m_launchWithComboBox
Definition: ui_qt.h:472
QHash< QString, QString > getSelectedCore()
Definition: ui_qt_window.cpp:1674
void onThumbnailPackDownloadNetworkSslErrors(const QList< QSslError > &errors)
Definition: thumbnailpackdownload.cpp:69
void downloadAllThumbnails(QString system, QUrl url=QUrl())
Definition: thumbnailpackdownload.cpp:218
ListWidget * playlistListWidget()
Definition: ui_qt_window.cpp:2735
void onCoreOptionsClicked()
Definition: ui_qt_window.cpp:1096
void selectBrowserDir(QString path)
Definition: ui_qt_window.cpp:1546
void onThumbnailPackDownloadReadyRead()
Definition: thumbnailpackdownload.cpp:208
void setCustomThemeString(QString qss)
Definition: ui_qt_window.cpp:922
Theme
Definition: ui_qt.h:247
QWidget * m_gridWidget
Definition: ui_qt.h:500
QListWidgetItem * m_historyPlaylistsItem
Definition: ui_qt.h:496
QApplication * app
Definition: ui_qt.h:556
ViewOptionsDialog * viewOptionsDialog()
Definition: ui_qt_window.cpp:1928
void updateRetroArchNightly()
Definition: updateretroarch.cpp:222
void addFilesToPlaylist(QStringList files)
Definition: playlist.cpp:130
ListWidget(QWidget *parent=0)
Definition: ui_qt_window.cpp:215
QNetworkAccessManager * m_networkManager
Definition: ui_qt.h:519
void gotLogMessage(const QString &msg)
QElapsedTimer m_statusMessageElapsedTimer
Definition: ui_qt.h:516
Definition: ui_qt.h:167
void enterPressed()
QPointer< ThumbnailWidget > widget
Definition: ui_qt.h:105
Definition: ui_qt.h:258
includes all by default used to find thumbnails Please choose a single playlist first Add Entry Add Folder Select Files< multiple > Please fill out all required fields RetroArch updated successfully Please restart the application for the changes to take effect Contributors Move Down Load Remove Add Pass No shader passes Reset All Passes Download thumbnail Start on playlist
Definition: msg_hash_el.h:7543
struct ui_window_qt ui_window_qt_t
struct _cl_event * event
Definition: glext.h:8406
bool addDirectoryFilesToList(QProgressDialog *dialog, QStringList &list, QDir &dir, QStringList &extensions)
Definition: playlist.cpp:42
QPointer< QNetworkReply > m_thumbnailPackDownloadReply
Definition: ui_qt.h:532
void deleteCurrentPlaylistItem()
Definition: playlist.cpp:1027
GLsizei const GLfloat * value
Definition: glext.h:6709
void deletePressed()
void onTableWidgetDeletePressed()
Definition: ui_qt_window.cpp:1628
QToolButton * coreInfoPushButton()
Definition: ui_qt_window.cpp:1529
void onThumbnailPackExtractFinished(bool success)
Definition: thumbnailpackdownload.cpp:297
QFile m_updateFile
Definition: ui_qt.h:522
void gotReloadShaderParams()
void setAllPlaylistsListMaxCount(int count)
Definition: playlist.cpp:1370
void onBrowserDownloadsClicked()
Definition: ui_qt_window.cpp:2684
ThumbnailLabel(QWidget *parent=0)
Definition: ui_qt.cpp:109
Definition: ui_qt.h:244
void loadContent(const QHash< QString, QString > &contentHash)
Definition: ui_qt_window.cpp:1748
QRegularExpression m_fileSanitizerRegex
Definition: ui_qt.h:482
ListWidget * m_listWidget
Definition: ui_qt.h:466
QString m_pendingDirScrollPath
Definition: ui_qt.h:541
void onResizeThumbnailThree()
Definition: ui_qt_window.cpp:2550
QWidget * m_gridLayoutWidget
Definition: ui_qt.h:503
QSize sizeHint() const
Definition: ui_qt_window.cpp:250
void thumbnailChanged(const QPixmap &pixmap)
void onLoadCoreClicked(const QStringList &extensionFilters=QStringList())
Definition: ui_qt_window.cpp:2878
void mouseDoubleClickEvent(QMouseEvent *event)
Definition: ui_qt.cpp:74
QPointer< ShaderParamsDialog > m_shaderParamsDialog
Definition: ui_qt.h:517
void deferReloadPlaylists()
Definition: playlist.cpp:805
PlaylistEntryDialog * m_playlistEntryDialog
Definition: ui_qt.h:515
void onGotLogMessage(const QString &msg)
Definition: ui_qt_window.cpp:1123
Definition: ui_qt.h:250
QPixmap * m_thumbnailPixmap
Definition: ui_qt.h:479
QSize sizeHint() const
Definition: ui_qt.cpp:99
void onCurrentListItemChanged(QListWidgetItem *current, QListWidgetItem *previous)
Definition: ui_qt_window.cpp:2641
void onResizeThumbnailTwo()
Definition: ui_qt_window.cpp:2545
ThumbnailWidget(QWidget *parent=0)
Definition: ui_qt.cpp:61
void onFileDropWidgetContextMenuRequested(const QPoint &pos)
Definition: filedropwidget.cpp:82
Definition: ui_qt.h:227
Theme theme()
Definition: ui_qt_window.cpp:1206
QToolButton * m_stopPushButton
Definition: ui_qt.h:476
void onUpdateDownloadReadyRead()
Definition: updateretroarch.cpp:212
void onDownloadScrollAgain(QString path)
Definition: ui_qt_window.cpp:2710
void onDownloadScroll(QString path)
Definition: ui_qt_window.cpp:2700
void showErrorMessageDeferred(QString msg)
void onThumbnailDownloadProgress(qint64 bytesReceived, qint64 bytesTotal)
Definition: thumbnaildownload.cpp:190
bool isEditorOpen()
Definition: ui_qt_window.cpp:200
Definition: ui_qt.h:251
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Definition: ui_qt_window.cpp:186
void scrollToDownloads(QString path)
void onFileSystemDirLoaded(const QString &path)
Definition: ui_qt_window.cpp:658
void onGotReloadCoreOptions()
Definition: ui_qt_window.cpp:1112
QPointer< QNetworkReply > m_updateReply
Definition: ui_qt.h:523
QProgressDialog * m_thumbnailDownloadProgressDialog
Definition: ui_qt.h:525
void onCoreLoadWindowClosed()
Definition: ui_qt_window.cpp:2820
void resizeEvent(QResizeEvent *event)
Definition: ui_qt.cpp:94
void showDocs()
Definition: ui_qt_window.cpp:3253
QProgressBar * m_gridProgressBar
Definition: ui_qt.h:508
void onUpdateNetworkError(QNetworkReply::NetworkError code)
Definition: updateretroarch.cpp:66
QString getCurrentPlaylistPath()
Definition: playlist.cpp:974
QString getScrubbedString(QString str)
Definition: ui_qt_window.cpp:3346
QPalette m_defaultPalette
Definition: ui_qt.h:487
void onCoreLoaded()
Definition: ui_qt_window.cpp:2834
QToolButton * stopPushButton()
Definition: ui_qt_window.cpp:2152
TreeView * dirTreeView()
Definition: ui_qt_window.cpp:2740
ViewType
Definition: ui_qt.h:241
const char *const str
Definition: portlistingparse.c:18
TableWidget * contentTableWidget()
Definition: ui_qt_window.cpp:2669
bool showMessageBox(QString msg, MessageBoxType msgType=MSGBOX_TYPE_INFO, Qt::WindowModality modality=Qt::ApplicationModal, bool showDontAsk=true, bool *dontAsk=NULL)
Definition: ui_qt_window.cpp:927
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
QVector< QPointer< GridItem > > m_gridItems
Definition: ui_qt.h:502
void onShowInfoMessage(QString msg)
Definition: ui_qt_window.cpp:3263
Definition: ui_qt.h:114
QWidget * m_gridProgressWidget
Definition: ui_qt.h:509
void addPlaylistHashToTable(const QVector< QHash< QString, QString > > &items)
Definition: playlist.cpp:1350
void getPlaylistFiles()
Definition: playlist.cpp:1111