RetroArch
ui_qt_load_core_window.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_LOAD_CORE_WINDOW_H
19 #define _QT_LOAD_CORE_WINDOW_H
20 
21 extern "C" {
22 #include <retro_common_api.h>
23 }
24 
25 #include <QtWidgets>
26 
27 class LoadCoreTableWidget : public QTableWidget
28 {
29  Q_OBJECT
30 public:
31  LoadCoreTableWidget(QWidget *parent = NULL);
32 signals:
33  void enterPressed();
34 protected:
35  void keyPressEvent(QKeyEvent *event);
36 };
37 
38 class LoadCoreWindow : public QMainWindow
39 {
40  Q_OBJECT
41 public:
42  LoadCoreWindow(QWidget *parent = 0);
43  void initCoreList(const QStringList &extensionFilters = QStringList());
44  void setStatusLabel(QString label);
45 signals:
46  void coreLoaded();
47  void windowClosed();
48 private slots:
50  void onCoreEnterPressed();
51  void onCellDoubleClicked(int row, int column);
52 protected:
53  void keyPressEvent(QKeyEvent *event);
54  void closeEvent(QCloseEvent *event);
55 private:
56  void loadCore(const char *path);
57 
58  QVBoxLayout m_layout;
60  QLabel *m_statusLabel;
61 };
62 
64 
66 
67 #endif
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
void setStatusLabel(QString label)
Definition: ui_qt_load_core_window.cpp:101
GLsizei const GLchar ** path
Definition: glext.h:7901
Definition: ui_qt_load_core_window.h:27
GLuint GLsizei const GLchar * label
Definition: glext.h:8583
void initCoreList(const QStringList &extensionFilters=QStringList())
Definition: ui_qt_load_core_window.cpp:188
LoadCoreWindow(QWidget *parent=0)
Definition: ui_qt_load_core_window.cpp:55
void closeEvent(QCloseEvent *event)
Definition: ui_qt_load_core_window.cpp:83
#define NULL
Pointer to 0.
Definition: gctypes.h:65
void onLoadCustomCoreClicked()
Definition: ui_qt_load_core_window.cpp:162
joypad_connection_t * slots
Definition: btstack_hid.c:629
LoadCoreTableWidget * m_table
Definition: ui_qt_load_core_window.h:59
GLenum GLenum GLvoid * row
Definition: glext.h:6316
Definition: ui_qt_load_core_window.h:38
GLenum GLenum GLvoid GLvoid * column
Definition: glext.h:6316
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
void keyPressEvent(QKeyEvent *event)
Definition: ui_qt_load_core_window.cpp:90
void windowClosed()
void onCoreEnterPressed()
Definition: ui_qt_load_core_window.cpp:144
void loadCore(const char *path)
Definition: ui_qt_load_core_window.cpp:111
QLabel * m_statusLabel
Definition: ui_qt_load_core_window.h:60
struct _cl_event * event
Definition: glext.h:8406
QVBoxLayout m_layout
Definition: ui_qt_load_core_window.h:58
void onCellDoubleClicked(int row, int column)
Definition: ui_qt_load_core_window.cpp:106
LoadCoreTableWidget(QWidget *parent=NULL)
Definition: ui_qt_load_core_window.cpp:39
void keyPressEvent(QKeyEvent *event)
Definition: ui_qt_load_core_window.cpp:44