mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
commit
2bab38e857
@ -102,9 +102,9 @@ ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HAVE_NETLOGGER), 1)
|
ifeq ($(HAVE_NETLOGGER), 1)
|
||||||
DEF_FLAGS += -DHAVE_LOGGER
|
DEF_FLAGS += -DHAVE_LOGGER
|
||||||
DEFINES += -DHAVE_LOGGER
|
DEFINES += -DHAVE_LOGGER
|
||||||
OBJ += network/net_logger.o
|
OBJ += network/net_logger.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# System
|
# System
|
||||||
@ -357,6 +357,27 @@ ifeq ($(HAVE_QT), 1)
|
|||||||
ui/drivers/qt/thumbnaildownload.o \
|
ui/drivers/qt/thumbnaildownload.o \
|
||||||
ui/drivers/qt/thumbnailpackdownload.o \
|
ui/drivers/qt/thumbnailpackdownload.o \
|
||||||
ui/drivers/qt/playlistthumbnaildownload.o
|
ui/drivers/qt/playlistthumbnaildownload.o
|
||||||
|
ifeq ($(HAVE_MENU), 1)
|
||||||
|
OBJ += ui/drivers/qt/settingswidgets.o \
|
||||||
|
ui/drivers/qt/options/achievements.o \
|
||||||
|
ui/drivers/qt/options/audio.o \
|
||||||
|
ui/drivers/qt/options/configuration.o \
|
||||||
|
ui/drivers/qt/options/core.o \
|
||||||
|
ui/drivers/qt/options/directory.o \
|
||||||
|
ui/drivers/qt/options/drivers.o \
|
||||||
|
ui/drivers/qt/options/input.o \
|
||||||
|
ui/drivers/qt/options/latency.o \
|
||||||
|
ui/drivers/qt/options/logging.o \
|
||||||
|
ui/drivers/qt/options/network.o \
|
||||||
|
ui/drivers/qt/options/osd.o \
|
||||||
|
ui/drivers/qt/options/playlists.o \
|
||||||
|
ui/drivers/qt/options/recording.o \
|
||||||
|
ui/drivers/qt/options/saving.o \
|
||||||
|
ui/drivers/qt/options/throttle.o \
|
||||||
|
ui/drivers/qt/options/ui.o \
|
||||||
|
ui/drivers/qt/options/user.o \
|
||||||
|
ui/drivers/qt/options/video.o
|
||||||
|
endif
|
||||||
|
|
||||||
MOC_HEADERS += ui/drivers/ui_qt.h \
|
MOC_HEADERS += ui/drivers/ui_qt.h \
|
||||||
ui/drivers/qt/ui_qt_load_core_window.h \
|
ui/drivers/qt/ui_qt_load_core_window.h \
|
||||||
@ -367,6 +388,10 @@ ifeq ($(HAVE_QT), 1)
|
|||||||
ui/drivers/qt/coreinfodialog.h \
|
ui/drivers/qt/coreinfodialog.h \
|
||||||
ui/drivers/qt/playlistentrydialog.h \
|
ui/drivers/qt/playlistentrydialog.h \
|
||||||
ui/drivers/qt/viewoptionsdialog.h
|
ui/drivers/qt/viewoptionsdialog.h
|
||||||
|
ifeq ($(HAVE_MENU), 1)
|
||||||
|
MOC_HEADERS += ui/drivers/qt/settingswidgets.h \
|
||||||
|
ui/drivers/qt/options/options.h
|
||||||
|
endif
|
||||||
|
|
||||||
DEFINES += $(QT5CORE_CFLAGS) $(QT5GUI_CFLAGS) $(QT5WIDGETS_CFLAGS) $(QT5CONCURRENT_CFLAGS) $(QT5NETWORK_CFLAGS) -DHAVE_MAIN
|
DEFINES += $(QT5CORE_CFLAGS) $(QT5GUI_CFLAGS) $(QT5WIDGETS_CFLAGS) $(QT5CONCURRENT_CFLAGS) $(QT5NETWORK_CFLAGS) -DHAVE_MAIN
|
||||||
#DEFINES += $(QT5WEBENGINE_CFLAGS)
|
#DEFINES += $(QT5WEBENGINE_CFLAGS)
|
||||||
@ -519,16 +544,16 @@ endif
|
|||||||
|
|
||||||
ifeq ($(HAVE_COREAUDIO), 1)
|
ifeq ($(HAVE_COREAUDIO), 1)
|
||||||
OBJ += audio/drivers/coreaudio.o
|
OBJ += audio/drivers/coreaudio.o
|
||||||
HAVE_COREAUDIO_LIBS = 1
|
HAVE_COREAUDIO_LIBS = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HAVE_COREAUDIO3), 1)
|
ifeq ($(HAVE_COREAUDIO3), 1)
|
||||||
OBJ += audio/drivers/coreaudio3.o
|
OBJ += audio/drivers/coreaudio3.o
|
||||||
HAVE_COREAUDIO_LIBS = 1
|
HAVE_COREAUDIO_LIBS = 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HAVE_COREAUDIO_LIBS), 1)
|
ifeq ($(HAVE_COREAUDIO_LIBS), 1)
|
||||||
LIBS += -framework CoreServices -framework CoreAudio -framework AudioUnit
|
LIBS += -framework CoreServices -framework CoreAudio -framework AudioUnit
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HAVE_CORETEXT), 1)
|
ifeq ($(HAVE_CORETEXT), 1)
|
||||||
@ -796,8 +821,8 @@ ifeq ($(HAVE_MENU_COMMON), 1)
|
|||||||
menu/menu_thumbnail_path.o
|
menu/menu_thumbnail_path.o
|
||||||
|
|
||||||
ifeq ($(HAVE_MENU_COMMON),1)
|
ifeq ($(HAVE_MENU_COMMON),1)
|
||||||
OBJ += menu/drivers_display/menu_display_null.o
|
OBJ += menu/drivers_display/menu_display_null.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HAVE_MENU_WIDGETS), 1)
|
ifeq ($(HAVE_MENU_WIDGETS), 1)
|
||||||
OBJ += menu/widgets/menu_widgets.o
|
OBJ += menu/widgets/menu_widgets.o
|
||||||
@ -807,8 +832,8 @@ endif
|
|||||||
ifeq ($(HAVE_OVERLAY), 1)
|
ifeq ($(HAVE_OVERLAY), 1)
|
||||||
DEFINES += -DHAVE_OVERLAY
|
DEFINES += -DHAVE_OVERLAY
|
||||||
OBJ += tasks/task_overlay.o \
|
OBJ += tasks/task_overlay.o \
|
||||||
input/input_overlay.o \
|
input/input_overlay.o \
|
||||||
led/drivers/led_overlay.o
|
led/drivers/led_overlay.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(HAVE_STB_FONT), 1)
|
ifeq ($(HAVE_STB_FONT), 1)
|
||||||
@ -895,11 +920,11 @@ endif
|
|||||||
|
|
||||||
ifeq ($(HAVE_WAYLAND), 1)
|
ifeq ($(HAVE_WAYLAND), 1)
|
||||||
OBJ += gfx/drivers_context/wayland_ctx.o \
|
OBJ += gfx/drivers_context/wayland_ctx.o \
|
||||||
input/drivers/wayland_input.o \
|
input/drivers/wayland_input.o \
|
||||||
gfx/common/wayland/xdg-shell.o \
|
gfx/common/wayland/xdg-shell.o \
|
||||||
gfx/common/wayland/xdg-shell-unstable-v6.o \
|
gfx/common/wayland/xdg-shell-unstable-v6.o \
|
||||||
gfx/common/wayland/idle-inhibit-unstable-v1.o \
|
gfx/common/wayland/idle-inhibit-unstable-v1.o \
|
||||||
gfx/common/wayland/xdg-decoration-unstable-v1.o
|
gfx/common/wayland/xdg-decoration-unstable-v1.o
|
||||||
ifeq ($(HAVE_EGL), 1)
|
ifeq ($(HAVE_EGL), 1)
|
||||||
LIBS += $(EGL_LIBS)
|
LIBS += $(EGL_LIBS)
|
||||||
endif
|
endif
|
||||||
@ -1174,7 +1199,7 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
|||||||
OBJ += gfx/drivers_context/cgl_ctx.o
|
OBJ += gfx/drivers_context/cgl_ctx.o
|
||||||
else ifneq ($(findstring Win32,$(OS)),)
|
else ifneq ($(findstring Win32,$(OS)),)
|
||||||
GL_LIBS := -lopengl32 -lgdi32 -lcomdlg32
|
GL_LIBS := -lopengl32 -lgdi32 -lcomdlg32
|
||||||
WANT_WGL=1
|
WANT_WGL=1
|
||||||
endif
|
endif
|
||||||
LIBS += $(GL_LIBS)
|
LIBS += $(GL_LIBS)
|
||||||
endif
|
endif
|
||||||
@ -1347,8 +1372,8 @@ ifeq ($(HAVE_D3D11), 1)
|
|||||||
gfx/common/d3d11_common.o \
|
gfx/common/d3d11_common.o \
|
||||||
gfx/drivers_font/d3d11_font.o
|
gfx/drivers_font/d3d11_font.o
|
||||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||||
OBJ += menu/drivers_display/menu_display_d3d11.o
|
OBJ += menu/drivers_display/menu_display_d3d11.o
|
||||||
endif
|
endif
|
||||||
DEFINES += -DHAVE_D3D11
|
DEFINES += -DHAVE_D3D11
|
||||||
HAVE_SLANG = 1
|
HAVE_SLANG = 1
|
||||||
HAVE_GLSLANG = 1
|
HAVE_GLSLANG = 1
|
||||||
@ -1669,8 +1694,8 @@ ifeq ($(HAVE_NETWORKING), 1)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Netplay
|
# Netplay
|
||||||
DEFINES += -DHAVE_NETWORK_CMD
|
DEFINES += -DHAVE_NETWORK_CMD
|
||||||
OBJ += network/netplay/netplay_delta.o \
|
OBJ += network/netplay/netplay_delta.o \
|
||||||
network/netplay/netplay_frontend.o \
|
network/netplay/netplay_frontend.o \
|
||||||
network/netplay/netplay_handshake.o \
|
network/netplay/netplay_handshake.o \
|
||||||
network/netplay/netplay_init.o \
|
network/netplay/netplay_init.o \
|
||||||
@ -1822,8 +1847,8 @@ ifneq ($(findstring Win32,$(OS)),)
|
|||||||
gfx/display_servers/dispserv_win32.o
|
gfx/display_servers/dispserv_win32.o
|
||||||
|
|
||||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||||
OBJ += menu/drivers_display/menu_display_gdi.o
|
OBJ += menu/drivers_display/menu_display_gdi.o
|
||||||
endif
|
endif
|
||||||
LIBS += -lmsimg32 -lhid -lsetupapi
|
LIBS += -lmsimg32 -lhid -lsetupapi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -725,13 +725,15 @@ static const bool playlist_sort_alphabetical = true;
|
|||||||
/* File format to use when writing playlists to disk */
|
/* File format to use when writing playlists to disk */
|
||||||
static const bool playlist_use_old_format = false;
|
static const bool playlist_use_old_format = false;
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
/* Specify when to display 'core name' inline on playlist entries */
|
/* Specify when to display 'core name' inline on playlist entries */
|
||||||
static const unsigned playlist_show_inline_core_name = PLAYLIST_INLINE_CORE_DISPLAY_HIST_FAV;
|
static const unsigned playlist_show_inline_core_name = PLAYLIST_INLINE_CORE_DISPLAY_HIST_FAV;
|
||||||
|
|
||||||
static const bool playlist_show_sublabels = false;
|
|
||||||
|
|
||||||
/* Specifies which runtime record to use on playlist sublabels */
|
/* Specifies which runtime record to use on playlist sublabels */
|
||||||
static const unsigned playlist_sublabel_runtime_type = PLAYLIST_RUNTIME_PER_CORE;
|
static const unsigned playlist_sublabel_runtime_type = PLAYLIST_RUNTIME_PER_CORE;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const bool playlist_show_sublabels = false;
|
||||||
|
|
||||||
/* Show Menu start-up screen on boot. */
|
/* Show Menu start-up screen on boot. */
|
||||||
static const bool default_menu_show_start_screen = true;
|
static const bool default_menu_show_start_screen = true;
|
||||||
|
@ -1783,8 +1783,10 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
|||||||
SETTING_UINT("libnx_overclock", &settings->uints.libnx_overclock, true, SWITCH_DEFAULT_CPU_PROFILE, false);
|
SETTING_UINT("libnx_overclock", &settings->uints.libnx_overclock, true, SWITCH_DEFAULT_CPU_PROFILE, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
SETTING_UINT("playlist_show_inline_core_name", &settings->uints.playlist_show_inline_core_name, true, playlist_show_inline_core_name, false);
|
SETTING_UINT("playlist_show_inline_core_name", &settings->uints.playlist_show_inline_core_name, true, playlist_show_inline_core_name, false);
|
||||||
SETTING_UINT("playlist_sublabel_runtime_type", &settings->uints.playlist_sublabel_runtime_type, true, playlist_sublabel_runtime_type, false);
|
SETTING_UINT("playlist_sublabel_runtime_type", &settings->uints.playlist_sublabel_runtime_type, true, playlist_sublabel_runtime_type, false);
|
||||||
|
#endif
|
||||||
|
|
||||||
*size = count;
|
*size = count;
|
||||||
|
|
||||||
|
@ -1199,6 +1199,8 @@ PLAYLISTS
|
|||||||
/*============================================================
|
/*============================================================
|
||||||
MENU
|
MENU
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
#include "../menu/menu_shader.c"
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
#include "../menu/menu_driver.c"
|
#include "../menu/menu_driver.c"
|
||||||
#include "../menu/menu_input.c"
|
#include "../menu/menu_input.c"
|
||||||
@ -1235,7 +1237,6 @@ MENU
|
|||||||
#include "../menu/cbs/menu_cbs_up.c"
|
#include "../menu/cbs/menu_cbs_up.c"
|
||||||
#include "../menu/cbs/menu_cbs_down.c"
|
#include "../menu/cbs/menu_cbs_down.c"
|
||||||
#include "../menu/cbs/menu_cbs_contentlist_switch.c"
|
#include "../menu/cbs/menu_cbs_contentlist_switch.c"
|
||||||
#include "../menu/menu_shader.c"
|
|
||||||
#include "../menu/menu_displaylist.c"
|
#include "../menu/menu_displaylist.c"
|
||||||
#include "../menu/menu_animation.c"
|
#include "../menu/menu_animation.c"
|
||||||
#include "../menu/menu_thumbnail_path.c"
|
#include "../menu/menu_thumbnail_path.c"
|
||||||
|
@ -58,6 +58,29 @@ UI
|
|||||||
#include "../ui/drivers/qt/thumbnaildownload.cpp"
|
#include "../ui/drivers/qt/thumbnaildownload.cpp"
|
||||||
#include "../ui/drivers/qt/thumbnailpackdownload.cpp"
|
#include "../ui/drivers/qt/thumbnailpackdownload.cpp"
|
||||||
#include "../ui/drivers/qt/playlistthumbnaildownload.cpp"
|
#include "../ui/drivers/qt/playlistthumbnaildownload.cpp"
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
#include "../ui/drivers/qt/settingswidgets.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/drivers.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/video.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/audio.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/saving.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/throttle.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/osd.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/input.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/directory.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/logging.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/core.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/configuration.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/latency.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/playlists.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/user.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/recording.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/ui.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/achievements.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/network.cpp"
|
||||||
|
#include "../ui/drivers/qt/moc_settingswidgets.cpp"
|
||||||
|
#include "../ui/drivers/qt/options/moc_options.cpp"
|
||||||
|
#endif
|
||||||
#include "../ui/drivers/moc_ui_qt.cpp"
|
#include "../ui/drivers/moc_ui_qt.cpp"
|
||||||
#include "../ui/drivers/qt/moc_coreinfodialog.cpp"
|
#include "../ui/drivers/qt/moc_coreinfodialog.cpp"
|
||||||
#include "../ui/drivers/qt/moc_coreoptionsdialog.cpp"
|
#include "../ui/drivers/qt/moc_coreoptionsdialog.cpp"
|
||||||
|
@ -7769,7 +7769,7 @@ MSG_HASH(
|
|||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE,
|
MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE,
|
||||||
"Tipo de visualização de miniatura de ícones:"
|
"Miniatura"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT,
|
MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT,
|
||||||
|
@ -8143,7 +8143,7 @@ MSG_HASH(
|
|||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE,
|
MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE,
|
||||||
"Icon view thumbnail type:"
|
"Thumbnail"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT,
|
MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT,
|
||||||
|
@ -1807,6 +1807,106 @@
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Cg|ARM'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Cg|ARM'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Cg|x64'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Cg|x64'">true</ExcludedFromBuild>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="..\..\..\ui\drivers\qt\settingswidgets.h">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug QT|x64'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug QT|x64'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|x64'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug QT|x64'">false</LinkObjects>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|x64'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug QT|x64'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|x64'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug QT|x64'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|x64'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release QT|Win32'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|Win32'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug QT|Win32'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|Win32'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release QT|x64'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release QT|Win32'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|Win32'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release QT|Win32'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|Win32'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release QT|Win32'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|Win32'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release QT|Win32'">false</LinkObjects>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|Win32'">false</LinkObjects>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug QT|Win32'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|Win32'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug QT|Win32'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|Win32'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug QT|Win32'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|Win32'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug QT|Win32'">false</LinkObjects>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|Win32'">false</LinkObjects>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release QT|x64'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|x64'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release QT|x64'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|x64'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release QT|x64'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|x64'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release QT|x64'">false</LinkObjects>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|x64'">false</LinkObjects>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Cg|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Cg|x64'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Cg|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Cg|x64'">true</ExcludedFromBuild>
|
||||||
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="..\..\..\ui\drivers\qt\options\options.h">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug QT|x64'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug QT|x64'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|x64'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug QT|x64'">false</LinkObjects>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|x64'">false</LinkObjects>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug QT|x64'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|x64'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug QT|x64'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|x64'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release QT|Win32'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|Win32'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug QT|Win32'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|Win32'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release QT|x64'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|x64'">false</ExcludedFromBuild>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release QT|Win32'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|Win32'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release QT|Win32'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|Win32'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release QT|Win32'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|Win32'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release QT|Win32'">false</LinkObjects>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|Win32'">false</LinkObjects>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug QT|Win32'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|Win32'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug QT|Win32'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|Win32'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug QT|Win32'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|Win32'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug QT|Win32'">false</LinkObjects>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Debug QT+CG|Win32'">false</LinkObjects>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release QT|x64'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|x64'">moc.exe "%(FullPath)" > "%(RootDir)%(Directory)moc_%(Filename).cpp"</Command>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release QT|x64'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|x64'">QT: Generate %(RootDir)%(Directory)moc_%(Filename).cpp</Message>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release QT|x64'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|x64'">%(RootDir)%(Directory)moc_%(Filename).cpp</Outputs>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release QT|x64'">false</LinkObjects>
|
||||||
|
<LinkObjects Condition="'$(Configuration)|$(Platform)'=='Release QT+CG|x64'">false</LinkObjects>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Cg|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug Cg|x64'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Cg|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release Cg|x64'">true</ExcludedFromBuild>
|
||||||
|
</CustomBuild>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
@ -4930,13 +4930,15 @@ bool rarch_write_debug_info(void)
|
|||||||
gfx_ctx_ident_t ident_info = {0};
|
gfx_ctx_ident_t ident_info = {0};
|
||||||
const input_driver_t *input_driver;
|
const input_driver_t *input_driver;
|
||||||
const input_device_driver_t *joypad_driver;
|
const input_device_driver_t *joypad_driver;
|
||||||
const char *driver = menu_driver_ident();
|
const char *driver;
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
driver = menu_driver_ident();
|
||||||
|
|
||||||
if (string_is_equal(driver, settings->arrays.menu_driver))
|
if (string_is_equal(driver, settings->arrays.menu_driver))
|
||||||
filestream_printf(file, " - Menu: %s\n", !string_is_empty(driver) ? driver : "n/a");
|
filestream_printf(file, " - Menu: %s\n", !string_is_empty(driver) ? driver : "n/a");
|
||||||
else
|
else
|
||||||
filestream_printf(file, " - Menu: %s (configured for %s)\n", !string_is_empty(driver) ? driver : "n/a", !string_is_empty(settings->arrays.menu_driver) ? settings->arrays.menu_driver : "n/a");
|
filestream_printf(file, " - Menu: %s (configured for %s)\n", !string_is_empty(driver) ? driver : "n/a", !string_is_empty(settings->arrays.menu_driver) ? settings->arrays.menu_driver : "n/a");
|
||||||
|
#endif
|
||||||
driver =
|
driver =
|
||||||
#ifdef HAVE_THREADS
|
#ifdef HAVE_THREADS
|
||||||
(video_driver_is_threaded()) ?
|
(video_driver_is_threaded()) ?
|
||||||
|
48
ui/drivers/qt/options/achievements.cpp
Normal file
48
ui/drivers/qt/options/achievements.cpp
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
AchievementsCategory::AchievementsCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_RETRO_ACHIEVEMENTS_SETTINGS);
|
||||||
|
setCategoryIcon("menu_achievements");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> AchievementsCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new AchievementsPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
AchievementsPage::AchievementsPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *AchievementsPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
|
||||||
|
CheckableSettingsGroup *group = new CheckableSettingsGroup(MENU_ENUM_LABEL_CHEEVOS_ENABLE);
|
||||||
|
|
||||||
|
group->addStringLineEdit(MENU_ENUM_LABEL_CHEEVOS_USERNAME);
|
||||||
|
group->addPasswordLineEdit(MENU_ENUM_LABEL_CHEEVOS_PASSWORD);
|
||||||
|
group->addCheckBox(MENU_ENUM_LABEL_CHEEVOS_HARDCORE_MODE_ENABLE);
|
||||||
|
group->addCheckBox(MENU_ENUM_LABEL_CHEEVOS_LEADERBOARDS_ENABLE);
|
||||||
|
group->addCheckBox(MENU_ENUM_LABEL_CHEEVOS_BADGES_ENABLE);
|
||||||
|
group->addCheckBox(MENU_ENUM_LABEL_CHEEVOS_TEST_UNOFFICIAL);
|
||||||
|
group->addCheckBox(MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE);
|
||||||
|
group->addCheckBox(MENU_ENUM_LABEL_CHEEVOS_AUTO_SCREENSHOT);
|
||||||
|
|
||||||
|
layout->addWidget(group);
|
||||||
|
|
||||||
|
layout->addStretch();
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
94
ui/drivers/qt/options/audio.cpp
Normal file
94
ui/drivers/qt/options/audio.cpp
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
#include <QApplication>
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
AudioCategory::AudioCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_AUDIO_SETTINGS);
|
||||||
|
setCategoryIcon("menu_audio");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> AudioCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new AudioPage(this);
|
||||||
|
pages << new MenuSoundsPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
AudioPage::AudioPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *AudioPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
|
||||||
|
SettingsGroup *outputGroup = new SettingsGroup("Output");
|
||||||
|
SettingsGroup *resamplerGroup = new SettingsGroup("Resampler");
|
||||||
|
SettingsGroup *syncGroup = new SettingsGroup("Synchronization");
|
||||||
|
SettingsGroup *dspGroup = new SettingsGroup("DSP plugin");
|
||||||
|
SettingsGroup *volumeGroup = new SettingsGroup("Volume");
|
||||||
|
|
||||||
|
QHBoxLayout *volumeLayout = new QHBoxLayout();
|
||||||
|
|
||||||
|
outputGroup->addCheckBox(MENU_ENUM_LABEL_AUDIO_ENABLE);
|
||||||
|
outputGroup->addStringComboBox(MENU_ENUM_LABEL_AUDIO_DRIVER);
|
||||||
|
outputGroup->addStringLineEdit(MENU_ENUM_LABEL_AUDIO_DEVICE);
|
||||||
|
outputGroup->addUIntSpinBox(MENU_ENUM_LABEL_AUDIO_LATENCY);
|
||||||
|
|
||||||
|
resamplerGroup->addStringComboBox(MENU_ENUM_LABEL_AUDIO_RESAMPLER_DRIVER);
|
||||||
|
resamplerGroup->addUIntComboBox(MENU_ENUM_LABEL_AUDIO_RESAMPLER_QUALITY);
|
||||||
|
resamplerGroup->addUIntSpinBox(MENU_ENUM_LABEL_AUDIO_OUTPUT_RATE);
|
||||||
|
|
||||||
|
syncGroup->addCheckBox(MENU_ENUM_LABEL_AUDIO_SYNC);
|
||||||
|
syncGroup->addFloatSpinBox(MENU_ENUM_LABEL_AUDIO_MAX_TIMING_SKEW);
|
||||||
|
syncGroup->addFloatSpinBox(MENU_ENUM_LABEL_AUDIO_RATE_CONTROL_DELTA);
|
||||||
|
|
||||||
|
dspGroup->addFileSelector(MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN);
|
||||||
|
|
||||||
|
volumeLayout->addWidget(new CheckableIcon(MENU_ENUM_LABEL_AUDIO_MUTE, qApp->style()->standardIcon(QStyle::SP_MediaVolumeMuted)));
|
||||||
|
volumeLayout->addLayout(new FloatSliderAndSpinBox(MENU_ENUM_LABEL_AUDIO_VOLUME));
|
||||||
|
volumeGroup->addRow(volumeLayout);
|
||||||
|
|
||||||
|
layout->addWidget(outputGroup);
|
||||||
|
layout->addWidget(resamplerGroup);
|
||||||
|
layout->addWidget(syncGroup);
|
||||||
|
layout->addWidget(dspGroup);
|
||||||
|
layout->addWidget(volumeGroup);
|
||||||
|
|
||||||
|
layout->addStretch();
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
MenuSoundsPage::MenuSoundsPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_MENU_SOUNDS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *MenuSoundsPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget();
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_AUDIO_ENABLE_MENU);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_SOUND_OK);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_SOUND_CANCEL);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_SOUND_NOTICE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_SOUND_BGM);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
38
ui/drivers/qt/options/configuration.cpp
Normal file
38
ui/drivers/qt/options/configuration.cpp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
ConfigurationCategory::ConfigurationCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS);
|
||||||
|
setCategoryIcon("setting");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> ConfigurationCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new ConfigurationPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
ConfigurationPage::ConfigurationPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *ConfigurationPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_GAME_SPECIFIC_OPTIONS);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_AUTO_OVERRIDES_ENABLE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_AUTO_REMAPS_ENABLE);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
38
ui/drivers/qt/options/core.cpp
Normal file
38
ui/drivers/qt/options/core.cpp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
CoreCategory::CoreCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_CORE_SETTINGS);
|
||||||
|
setCategoryIcon("core-options");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> CoreCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new CorePage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
CorePage::CorePage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *CorePage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_VIDEO_SHARED_CONTEXT);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_CHECK_FOR_MISSING_FIRMWARE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_VIDEO_ALLOW_ROTATE);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
58
ui/drivers/qt/options/directory.cpp
Normal file
58
ui/drivers/qt/options/directory.cpp
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
DirectoryCategory::DirectoryCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS);
|
||||||
|
setCategoryIcon("folder");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> DirectoryCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new DirectoryPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
DirectoryPage::DirectoryPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *DirectoryPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_CORE_ASSETS_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_ASSETS_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_RGUI_BROWSER_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_RGUI_CONFIG_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_LIBRETRO_DIR_PATH);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_LIBRETRO_INFO_PATH);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_CURSOR_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_CHEAT_DATABASE_PATH);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_VIDEO_FILTER_DIR);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_AUDIO_FILTER_DIR);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_VIDEO_SHADER_DIR);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_RECORDING_OUTPUT_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_RECORDING_CONFIG_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_OVERLAY_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_SCREENSHOT_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_JOYPAD_AUTOCONFIG_DIR);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_INPUT_REMAPPING_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_PLAYLIST_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_SAVEFILE_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_SAVESTATE_DIRECTORY);
|
||||||
|
layout->addDirectorySelector(MENU_ENUM_LABEL_CACHE_DIRECTORY);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
45
ui/drivers/qt/options/drivers.cpp
Normal file
45
ui/drivers/qt/options/drivers.cpp
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
DriversCategory::DriversCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS);
|
||||||
|
setCategoryIcon("menu_drivers");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> DriversCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new DriversPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
DriversPage::DriversPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *DriversPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addStringComboBox(MENU_ENUM_LABEL_INPUT_DRIVER);
|
||||||
|
layout->addStringComboBox(MENU_ENUM_LABEL_JOYPAD_DRIVER);
|
||||||
|
layout->addStringComboBox(MENU_ENUM_LABEL_VIDEO_DRIVER);
|
||||||
|
layout->addStringComboBox(MENU_ENUM_LABEL_AUDIO_DRIVER);
|
||||||
|
layout->addStringComboBox(MENU_ENUM_LABEL_AUDIO_RESAMPLER_DRIVER);
|
||||||
|
layout->addStringComboBox(MENU_ENUM_LABEL_CAMERA_DRIVER);
|
||||||
|
layout->addStringComboBox(MENU_ENUM_LABEL_LOCATION_DRIVER);
|
||||||
|
layout->addStringComboBox(MENU_ENUM_LABEL_MENU_DRIVER);
|
||||||
|
layout->addStringComboBox(MENU_ENUM_LABEL_RECORD_DRIVER);
|
||||||
|
layout->addStringComboBox(MENU_ENUM_LABEL_MIDI_DRIVER);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
162
ui/drivers/qt/options/input.cpp
Normal file
162
ui/drivers/qt/options/input.cpp
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
#include <QStackedWidget>
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
#ifndef CXX_BUILD
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "../../input/input_driver.h"
|
||||||
|
|
||||||
|
#ifndef CXX_BUILD
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
InputCategory::InputCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_INPUT_SETTINGS);
|
||||||
|
setCategoryIcon("core-input-remapping-options");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> InputCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new InputPage(this);
|
||||||
|
pages << new HotkeyBindsPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
InputPage::InputPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *InputPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_INPUT_MAX_USERS);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_INPUT_UNIFIED_MENU_CONTROLS);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_INPUT_SWAP_OK_CANCEL);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_INPUT_ALL_USERS_CONTROL_MENU);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_INPUT_REMAP_BINDS_ENABLE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_INPUT_AUTODETECT_ENABLE);
|
||||||
|
layout->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_INPUT_BUTTON_AXIS_THRESHOLD);
|
||||||
|
layout->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_INPUT_ANALOG_DEADZONE);
|
||||||
|
layout->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_INPUT_ANALOG_SENSITIVITY);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_INPUT_BIND_HOLD);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_INPUT_TURBO_PERIOD);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_INPUT_DUTY_CYCLE);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
HotkeyBindsPage::HotkeyBindsPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *HotkeyBindsPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
QHBoxLayout *layout = new QHBoxLayout;
|
||||||
|
FormLayout *leftLayout = new FormLayout;
|
||||||
|
FormLayout *rightLayout = new FormLayout;
|
||||||
|
|
||||||
|
unsigned i;
|
||||||
|
unsigned count = 0;
|
||||||
|
unsigned half = 40 / 2; /* TODO unhardcode */
|
||||||
|
|
||||||
|
for (i = 0; i < RARCH_BIND_LIST_END; i++)
|
||||||
|
{
|
||||||
|
if (count < half)
|
||||||
|
{
|
||||||
|
if (leftLayout->addBindButton((enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN + i)))
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rightLayout->addBindButton((enum msg_hash_enums)(MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN + i));
|
||||||
|
}
|
||||||
|
|
||||||
|
layout->addLayout(leftLayout);
|
||||||
|
layout->addSpacing(50);
|
||||||
|
layout->addLayout(rightLayout);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserBindsPage::UserBindsPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName("User Binds");
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *UserBindsPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
QGridLayout *layout = new QGridLayout;
|
||||||
|
|
||||||
|
unsigned count = 0;
|
||||||
|
unsigned p, retro_id;
|
||||||
|
unsigned max_users = *(input_driver_get_uint(INPUT_ACTION_MAX_USERS));
|
||||||
|
|
||||||
|
QComboBox *userCombo = new QComboBox;
|
||||||
|
QStackedWidget *stack = new QStackedWidget;
|
||||||
|
|
||||||
|
for (p = 0; p < max_users; p++)
|
||||||
|
{
|
||||||
|
userCombo->addItem(QString::number(p));
|
||||||
|
|
||||||
|
QWidget *uWidget = new QWidget();
|
||||||
|
FormLayout *form = new FormLayout();
|
||||||
|
|
||||||
|
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND + 20; retro_id++)
|
||||||
|
{
|
||||||
|
char descriptor[300];
|
||||||
|
const struct retro_keybind *auto_bind = NULL;
|
||||||
|
const struct retro_keybind *keybind = NULL;
|
||||||
|
|
||||||
|
keybind = &input_config_binds[p][retro_id];
|
||||||
|
|
||||||
|
auto_bind = (const struct retro_keybind*)
|
||||||
|
input_config_get_bind_auto(p, retro_id);
|
||||||
|
|
||||||
|
input_config_get_bind_string(descriptor,
|
||||||
|
keybind, auto_bind, sizeof(descriptor));
|
||||||
|
|
||||||
|
const struct retro_keybind *keyptr =
|
||||||
|
&input_config_binds[p][retro_id];
|
||||||
|
|
||||||
|
QString label = msg_hash_to_str(keyptr->enum_idx);
|
||||||
|
|
||||||
|
form->addRow(QString(msg_hash_to_str(keyptr->enum_idx)), new QPushButton(QString(descriptor)));
|
||||||
|
}
|
||||||
|
uWidget->setLayout(form);
|
||||||
|
|
||||||
|
stack->addWidget(uWidget);
|
||||||
|
}
|
||||||
|
|
||||||
|
connect(userCombo, SIGNAL(activated(int)), stack, SLOT(setCurrentIndex(int)));
|
||||||
|
|
||||||
|
layout->addWidget(userCombo, 0, 0);
|
||||||
|
layout->addWidget(stack, 1, 0);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
57
ui/drivers/qt/options/latency.cpp
Normal file
57
ui/drivers/qt/options/latency.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
LatencyCategory::LatencyCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_LATENCY_SETTINGS);
|
||||||
|
setCategoryIcon("menu_latency");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> LatencyCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new LatencyPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
LatencyPage::LatencyPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *LatencyPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
CheckableSettingsGroup *runAheadGpuSync = new CheckableSettingsGroup(MENU_ENUM_LABEL_RUN_AHEAD_ENABLED);
|
||||||
|
|
||||||
|
{
|
||||||
|
rarch_setting_t *hardSyncSetting = menu_setting_find_enum(MENU_ENUM_LABEL_VIDEO_HARD_SYNC);
|
||||||
|
|
||||||
|
if (hardSyncSetting)
|
||||||
|
{
|
||||||
|
CheckableSettingsGroup *hardSyncGroup = new CheckableSettingsGroup(hardSyncSetting);
|
||||||
|
|
||||||
|
hardSyncGroup->addUIntSpinBox(MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES);
|
||||||
|
|
||||||
|
layout->addRow(hardSyncGroup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_VIDEO_FRAME_DELAY);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_AUDIO_LATENCY);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_INPUT_POLL_TYPE_BEHAVIOR);
|
||||||
|
|
||||||
|
runAheadGpuSync->addUIntComboBox(MENU_ENUM_LABEL_RUN_AHEAD_FRAMES);
|
||||||
|
runAheadGpuSync->addCheckBox(MENU_ENUM_LABEL_RUN_AHEAD_SECONDARY_INSTANCE);
|
||||||
|
runAheadGpuSync->addCheckBox(MENU_ENUM_LABEL_RUN_AHEAD_HIDE_WARNINGS);
|
||||||
|
layout->addRow(runAheadGpuSync);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
37
ui/drivers/qt/options/logging.cpp
Normal file
37
ui/drivers/qt/options/logging.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
LoggingCategory::LoggingCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS);
|
||||||
|
setCategoryIcon("menu_log");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> LoggingCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new LoggingPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
LoggingPage::LoggingPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *LoggingPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_LOG_VERBOSITY);
|
||||||
|
layout->addUIntRadioButtons(MENU_ENUM_LABEL_LIBRETRO_LOG_LEVEL);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_PERFCNT_ENABLE);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
171
ui/drivers/qt/options/network.cpp
Normal file
171
ui/drivers/qt/options/network.cpp
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
#include <QButtonGroup>
|
||||||
|
|
||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
#ifndef CXX_BUILD
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <string/stdstring.h>
|
||||||
|
|
||||||
|
#include "../../network/netplay/netplay.h"
|
||||||
|
|
||||||
|
#ifndef CXX_BUILD
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
NetworkCategory::NetworkCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_NETWORK_SETTINGS);
|
||||||
|
setCategoryIcon("menu_network");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> NetworkCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new NetplayPage(this);
|
||||||
|
pages << new UpdaterPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
NetplayPage::NetplayPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_NETPLAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *NetplayPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
QGridLayout *layout = new QGridLayout;
|
||||||
|
FormLayout *checksLayout = new FormLayout;
|
||||||
|
QGroupBox *serverGroup = new QGroupBox("Server");
|
||||||
|
SettingsGroup *syncGroup = new SettingsGroup("Synchronization");
|
||||||
|
SettingsGroup *slaveGroup = new SettingsGroup("Slave-Mode");
|
||||||
|
SettingsGroup *inputGroup = new SettingsGroup("Input Sharing");
|
||||||
|
SettingsGroup *deviceGroup = new SettingsGroup("Device Request");
|
||||||
|
FormLayout *serverForm = new FormLayout;
|
||||||
|
QHBoxLayout *serverLayout = new QHBoxLayout;
|
||||||
|
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||||
|
QGridLayout *requestGrid = new QGridLayout;
|
||||||
|
unsigned i = 0;
|
||||||
|
unsigned row = 0;
|
||||||
|
unsigned column = 0;
|
||||||
|
|
||||||
|
checksLayout->addCheckBox(MENU_ENUM_LABEL_NETPLAY_PUBLIC_ANNOUNCE);
|
||||||
|
checksLayout->addCheckBox(MENU_ENUM_LABEL_NETPLAY_START_AS_SPECTATOR);
|
||||||
|
|
||||||
|
serverForm->addStringLineEdit(MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS);
|
||||||
|
serverForm->addUIntSpinBox(MENU_ENUM_LABEL_NETPLAY_TCP_UDP_PORT);
|
||||||
|
serverForm->addPasswordLineEdit(MENU_ENUM_LABEL_NETPLAY_PASSWORD);
|
||||||
|
serverForm->addPasswordLineEdit(MENU_ENUM_LABEL_NETPLAY_SPECTATE_PASSWORD);
|
||||||
|
serverForm->addCheckBox(MENU_ENUM_LABEL_NETPLAY_NAT_TRAVERSAL);
|
||||||
|
|
||||||
|
serverLayout->addWidget(createMitmServerGroup());
|
||||||
|
serverLayout->addSpacing(30);
|
||||||
|
serverLayout->addLayout(serverForm);
|
||||||
|
|
||||||
|
serverGroup->setLayout(serverLayout);
|
||||||
|
|
||||||
|
slaveGroup->addCheckBox(MENU_ENUM_LABEL_NETPLAY_ALLOW_SLAVES);
|
||||||
|
slaveGroup->addCheckBox(MENU_ENUM_LABEL_NETPLAY_REQUIRE_SLAVES);
|
||||||
|
|
||||||
|
syncGroup->addCheckBox(MENU_ENUM_LABEL_NETPLAY_STATELESS_MODE);
|
||||||
|
syncGroup->addUIntSpinBox(MENU_ENUM_LABEL_NETPLAY_CHECK_FRAMES);
|
||||||
|
syncGroup->addUIntSpinBox(MENU_ENUM_LABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN);
|
||||||
|
syncGroup->addUIntSpinBox(MENU_ENUM_LABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE);
|
||||||
|
|
||||||
|
inputGroup->addUIntComboBox(MENU_ENUM_LABEL_NETPLAY_SHARE_DIGITAL);
|
||||||
|
inputGroup->addUIntComboBox(MENU_ENUM_LABEL_NETPLAY_SHARE_ANALOG);
|
||||||
|
|
||||||
|
for (i = 0; i < MAX_USERS; i++)
|
||||||
|
{
|
||||||
|
if (column % 4 == 0)
|
||||||
|
{
|
||||||
|
column = 0;
|
||||||
|
row++;
|
||||||
|
}
|
||||||
|
requestGrid->addWidget(new CheckBox((enum msg_hash_enums)(MENU_ENUM_LABEL_NETPLAY_REQUEST_DEVICE_1 + i)), row, column);
|
||||||
|
column++;
|
||||||
|
}
|
||||||
|
|
||||||
|
deviceGroup->addRow(requestGrid);
|
||||||
|
|
||||||
|
layout->addLayout(checksLayout, 0, 0, 1, 2);
|
||||||
|
layout->addWidget(serverGroup, 1, 0, 1, 2);
|
||||||
|
layout->addWidget(slaveGroup, 2, 0, 1, 1);
|
||||||
|
layout->addWidget(syncGroup, 2, 1, 2, 1);
|
||||||
|
layout->addWidget(inputGroup, 3, 0, 1, 1);
|
||||||
|
layout->addWidget(deviceGroup, 4, 0, 1, 2);
|
||||||
|
|
||||||
|
mainLayout->addLayout(layout);
|
||||||
|
|
||||||
|
mainLayout->addStretch();
|
||||||
|
|
||||||
|
widget->setLayout(mainLayout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
QGroupBox *NetplayPage::createMitmServerGroup()
|
||||||
|
{
|
||||||
|
CheckableSettingsGroup *groupBox = new CheckableSettingsGroup(MENU_ENUM_LABEL_NETPLAY_USE_MITM_SERVER);
|
||||||
|
QButtonGroup *buttonGroup = new QButtonGroup(this);
|
||||||
|
|
||||||
|
rarch_setting_t *setting = menu_setting_find_enum(MENU_ENUM_LABEL_NETPLAY_MITM_SERVER);
|
||||||
|
|
||||||
|
unsigned i;
|
||||||
|
unsigned list_len = ARRAY_SIZE(netplay_mitm_server_list);
|
||||||
|
|
||||||
|
if (!setting)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
for (i = 0; i < list_len; i++)
|
||||||
|
{
|
||||||
|
QRadioButton *radioButton = new QRadioButton(netplay_mitm_server_list[i].description);
|
||||||
|
|
||||||
|
/* find the currently selected server in the list */
|
||||||
|
if (string_is_equal(setting->value.target.string, netplay_mitm_server_list[i].name))
|
||||||
|
{
|
||||||
|
radioButton->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
buttonGroup->addButton(radioButton, i);
|
||||||
|
|
||||||
|
groupBox->addRow(radioButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
connect(buttonGroup, SIGNAL(buttonClicked(int)), this, SLOT(onRadioButtonClicked(int)));
|
||||||
|
|
||||||
|
return groupBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
void NetplayPage::onRadioButtonClicked(int id)
|
||||||
|
{
|
||||||
|
rarch_setting_t *setting = menu_setting_find_enum(MENU_ENUM_LABEL_NETPLAY_MITM_SERVER);
|
||||||
|
|
||||||
|
strlcpy(setting->value.target.string, netplay_mitm_server_list[id].name, setting->size);
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdaterPage::UpdaterPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *UpdaterPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addStringLineEdit(MENU_ENUM_LABEL_CORE_UPDATER_BUILDBOT_URL);
|
||||||
|
layout->addStringLineEdit(MENU_ENUM_LABEL_BUILDBOT_ASSETS_URL);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
537
ui/drivers/qt/options/options.h
Normal file
537
ui/drivers/qt/options/options.h
Normal file
@ -0,0 +1,537 @@
|
|||||||
|
#ifndef OPTIONS_H
|
||||||
|
#define OPTIONS_H
|
||||||
|
|
||||||
|
#include <QTabWidget>
|
||||||
|
#include <QColorDialog>
|
||||||
|
#include <QScrollArea>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
#include "../settingswidgets.h"
|
||||||
|
|
||||||
|
class MainWindow;
|
||||||
|
class ViewOptionsWidget;
|
||||||
|
|
||||||
|
class OptionsPage : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
OptionsPage(QObject *parent = nullptr)
|
||||||
|
: QObject(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QString displayName() const
|
||||||
|
{
|
||||||
|
return m_displayName;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual QWidget *widget() = 0;
|
||||||
|
virtual void load() {}
|
||||||
|
virtual void apply() {}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void setDisplayName(msg_hash_enums name)
|
||||||
|
{
|
||||||
|
m_displayName = msg_hash_to_str(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
void setDisplayName(const QString& name)
|
||||||
|
{
|
||||||
|
m_displayName = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString m_displayName = "General";
|
||||||
|
};
|
||||||
|
|
||||||
|
class OptionsCategory : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
OptionsCategory(QObject *parent = nullptr) : QObject(parent) {}
|
||||||
|
OptionsCategory(MainWindow *mainwindow, QObject *parent = nullptr) : QObject(parent) {}
|
||||||
|
virtual QVector<OptionsPage*> pages() = 0;
|
||||||
|
QString displayName() const { return m_displayName; }
|
||||||
|
QString categoryIconName() const { return m_categoryIconName; }
|
||||||
|
virtual void load()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < m_pages.size(); i++)
|
||||||
|
m_pages.at(i)->load();
|
||||||
|
}
|
||||||
|
virtual void apply()
|
||||||
|
{
|
||||||
|
for (int i = 0; i < m_pages.size(); i++)
|
||||||
|
m_pages.at(i)->apply();
|
||||||
|
}
|
||||||
|
protected:
|
||||||
|
void setDisplayName(msg_hash_enums name) { m_displayName = msg_hash_to_str(name); }
|
||||||
|
void setCategoryIcon(const QString &categoryIconName) { m_categoryIconName = categoryIconName; }
|
||||||
|
QString m_displayName;
|
||||||
|
QString m_categoryIconName = "setting";
|
||||||
|
QVector<OptionsPage*> m_pages;
|
||||||
|
};
|
||||||
|
|
||||||
|
/***********************************************************
|
||||||
|
Drivers
|
||||||
|
************************************************************/
|
||||||
|
class DriversCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DriversCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class DriversPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
DriversPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Video
|
||||||
|
************************************************************/
|
||||||
|
class VideoCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
VideoCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class AspectRatioRadioButton : public QRadioButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AspectRatioRadioButton(unsigned min, unsigned max, QWidget *parent = 0);
|
||||||
|
private:
|
||||||
|
unsigned m_min;
|
||||||
|
unsigned m_max;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AspectRatioGroup : public SettingsGroup
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AspectRatioGroup(const QString &title, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
void onAspectRadioToggled(bool checked);
|
||||||
|
void onAspectRadioClicked(bool checked);
|
||||||
|
private:
|
||||||
|
AspectRatioRadioButton *m_radioButton;
|
||||||
|
UIntComboBox *m_comboBox;
|
||||||
|
};
|
||||||
|
|
||||||
|
class VideoPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
VideoPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
private slots:
|
||||||
|
void onResolutionComboIndexChanged(const QString& value);
|
||||||
|
private:
|
||||||
|
QComboBox *m_resolutionCombo;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CrtSwitchresPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
CrtSwitchresPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
private slots:
|
||||||
|
void onCrtSuperResolutionComboIndexChanged(int index);
|
||||||
|
private:
|
||||||
|
QComboBox *m_crtSuperResolutionCombo;
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Audio
|
||||||
|
************************************************************/
|
||||||
|
class AudioCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AudioCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class AudioPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AudioPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
class MenuSoundsPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
MenuSoundsPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Input
|
||||||
|
************************************************************/
|
||||||
|
class InputCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
InputCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class InputPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
InputPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
class HotkeyBindsPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
HotkeyBindsPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
class UserBindsPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
UserBindsPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Latency
|
||||||
|
************************************************************/
|
||||||
|
class LatencyCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LatencyCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class LatencyPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
LatencyPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Core
|
||||||
|
************************************************************/
|
||||||
|
class CoreCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CoreCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class CorePage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
CorePage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Configuration
|
||||||
|
************************************************************/
|
||||||
|
class ConfigurationCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ConfigurationCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConfigurationPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
ConfigurationPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Saving
|
||||||
|
************************************************************/
|
||||||
|
class SavingCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SavingCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class SavingPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
SavingPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Logging
|
||||||
|
************************************************************/
|
||||||
|
class LoggingCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LoggingCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class LoggingPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
LoggingPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Frame Throttle
|
||||||
|
************************************************************/
|
||||||
|
class FrameThrottleCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FrameThrottleCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class FrameThrottlePage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
FrameThrottlePage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
class RewindPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
RewindPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Recording
|
||||||
|
************************************************************/
|
||||||
|
class RecordingCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RecordingCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class RecordingPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
RecordingPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
User Interface
|
||||||
|
************************************************************/
|
||||||
|
class UserInterfaceCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
UserInterfaceCategory(QWidget *parent);
|
||||||
|
UserInterfaceCategory(MainWindow *mainwindow, QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
private:
|
||||||
|
MainWindow *m_mainwindow;
|
||||||
|
};
|
||||||
|
|
||||||
|
class UserInterfacePage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
UserInterfacePage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
class ViewsPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
ViewsPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
class QuickMenuPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
QuickMenuPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
class AppearancePage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AppearancePage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
class DesktopMenuPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
DesktopMenuPage(MainWindow *mainwindow, QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
void load();
|
||||||
|
void apply();
|
||||||
|
private:
|
||||||
|
ViewOptionsWidget *m_widget;
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Onscreen Display
|
||||||
|
************************************************************/
|
||||||
|
class OnscreenDisplayCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OnscreenDisplayCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class OverlayPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
OverlayPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
class NotificationsPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
NotificationsPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Achievements
|
||||||
|
************************************************************/
|
||||||
|
class AchievementsCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AchievementsCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class AchievementsPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AchievementsPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Network
|
||||||
|
************************************************************/
|
||||||
|
class NetworkCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NetworkCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class NetplayPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
NetplayPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
private slots:
|
||||||
|
void onRadioButtonClicked(int);
|
||||||
|
private:
|
||||||
|
QGroupBox* createMitmServerGroup();
|
||||||
|
};
|
||||||
|
|
||||||
|
class UpdaterPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
UpdaterPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Playlists
|
||||||
|
************************************************************/
|
||||||
|
class PlaylistsCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PlaylistsCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class PlaylistsPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
PlaylistsPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
class AccountsPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
AccountsPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
User
|
||||||
|
************************************************************/
|
||||||
|
class UserCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
UserCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class UserPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
UserPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
/************************************************************
|
||||||
|
Directory
|
||||||
|
************************************************************/
|
||||||
|
class DirectoryCategory : public OptionsCategory
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DirectoryCategory(QWidget *parent);
|
||||||
|
QVector<OptionsPage*> pages();
|
||||||
|
};
|
||||||
|
|
||||||
|
class DirectoryPage : public OptionsPage
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
DirectoryPage(QObject *parent = nullptr);
|
||||||
|
QWidget *widget();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
95
ui/drivers/qt/options/osd.cpp
Normal file
95
ui/drivers/qt/options/osd.cpp
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
OnscreenDisplayCategory::OnscreenDisplayCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS);
|
||||||
|
setCategoryIcon("menu_osd");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> OnscreenDisplayCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new OverlayPage(this);
|
||||||
|
pages << new NotificationsPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
NotificationsPage::NotificationsPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_SETTINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *NotificationsPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
|
||||||
|
CheckableSettingsGroup *notificationsGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_VIDEO_FONT_ENABLE);
|
||||||
|
CheckableSettingsGroup *bgGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_ENABLE);
|
||||||
|
|
||||||
|
notificationsGroup->addCheckBox(MENU_ENUM_LABEL_FPS_SHOW);
|
||||||
|
notificationsGroup->addCheckBox(MENU_ENUM_LABEL_FRAMECOUNT_SHOW);
|
||||||
|
notificationsGroup->addCheckBox(MENU_ENUM_LABEL_MEMORY_SHOW);
|
||||||
|
notificationsGroup->addFontSelector(MENU_ENUM_LABEL_VIDEO_FONT_PATH);
|
||||||
|
notificationsGroup->addFloatSpinBox(MENU_ENUM_LABEL_VIDEO_FONT_SIZE);
|
||||||
|
notificationsGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_X);
|
||||||
|
notificationsGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_VIDEO_MESSAGE_POS_Y);
|
||||||
|
notificationsGroup->addRow("Notification Color: ", new FloatColorButton(
|
||||||
|
MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_RED,
|
||||||
|
MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_GREEN,
|
||||||
|
MENU_ENUM_LABEL_VIDEO_MESSAGE_COLOR_BLUE));
|
||||||
|
|
||||||
|
bgGroup->addRow("Notification Background Color: ", new UIntColorButton(
|
||||||
|
MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_RED,
|
||||||
|
MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_GREEN,
|
||||||
|
MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_BLUE));
|
||||||
|
bgGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_VIDEO_MESSAGE_BGCOLOR_OPACITY);
|
||||||
|
|
||||||
|
notificationsGroup->addRow(bgGroup);
|
||||||
|
|
||||||
|
layout->addWidget(notificationsGroup);
|
||||||
|
|
||||||
|
layout->addStretch();
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
OverlayPage::OverlayPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_ONSCREEN_OVERLAY_SETTINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *OverlayPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
|
||||||
|
CheckableSettingsGroup *overlayGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_INPUT_OVERLAY_ENABLE);
|
||||||
|
CheckableSettingsGroup *inputsGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS);
|
||||||
|
|
||||||
|
overlayGroup->addCheckBox(MENU_ENUM_LABEL_OVERLAY_AUTOLOAD_PREFERRED);
|
||||||
|
overlayGroup->addCheckBox(MENU_ENUM_LABEL_INPUT_OVERLAY_HIDE_IN_MENU);
|
||||||
|
|
||||||
|
inputsGroup->addUIntSpinBox(MENU_ENUM_LABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT);
|
||||||
|
|
||||||
|
overlayGroup->addRow(inputsGroup);
|
||||||
|
|
||||||
|
overlayGroup->addFileSelector(MENU_ENUM_LABEL_OVERLAY_PRESET);
|
||||||
|
overlayGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_OVERLAY_OPACITY);
|
||||||
|
overlayGroup->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_OVERLAY_SCALE);
|
||||||
|
|
||||||
|
layout->addWidget(overlayGroup);
|
||||||
|
|
||||||
|
layout->addStretch();
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
43
ui/drivers/qt/options/playlists.cpp
Normal file
43
ui/drivers/qt/options/playlists.cpp
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
PlaylistsCategory::PlaylistsCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS);
|
||||||
|
setCategoryIcon("menu_playlist");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> PlaylistsCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new PlaylistsPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
PlaylistsPage::PlaylistsPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *PlaylistsPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
CheckableSettingsGroup *history = new CheckableSettingsGroup(MENU_ENUM_LABEL_HISTORY_LIST_ENABLE);
|
||||||
|
|
||||||
|
history->addUIntSpinBox(MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE);
|
||||||
|
|
||||||
|
layout->addRow(history);
|
||||||
|
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_PLAYLIST_USE_OLD_FORMAT);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
57
ui/drivers/qt/options/recording.cpp
Normal file
57
ui/drivers/qt/options/recording.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
RecordingCategory::RecordingCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_RECORDING_SETTINGS);
|
||||||
|
setCategoryIcon("menu_record");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> RecordingCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new RecordingPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
RecordingPage::RecordingPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *RecordingPage::widget()
|
||||||
|
{
|
||||||
|
QWidget * widget = new QWidget;
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
SettingsGroup *recordingGroup = new SettingsGroup("Recording");
|
||||||
|
SettingsGroup *streamingGroup = new SettingsGroup("Streaming");
|
||||||
|
QHBoxLayout *hl = new QHBoxLayout;
|
||||||
|
|
||||||
|
recordingGroup->addUIntComboBox(MENU_ENUM_LABEL_VIDEO_RECORD_QUALITY);
|
||||||
|
recordingGroup->addFileSelector(MENU_ENUM_LABEL_RECORD_CONFIG);
|
||||||
|
recordingGroup->addUIntComboBox(MENU_ENUM_LABEL_VIDEO_RECORD_THREADS);
|
||||||
|
recordingGroup->addDirectorySelector(MENU_ENUM_LABEL_RECORDING_OUTPUT_DIRECTORY);
|
||||||
|
recordingGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_POST_FILTER_RECORD);
|
||||||
|
recordingGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_GPU_RECORD);
|
||||||
|
|
||||||
|
hl->addWidget(new UIntRadioButtons(MENU_ENUM_LABEL_STREAMING_MODE));
|
||||||
|
hl->addWidget(new UIntRadioButtons(MENU_ENUM_LABEL_VIDEO_STREAM_QUALITY));
|
||||||
|
|
||||||
|
streamingGroup->addRow(hl);
|
||||||
|
|
||||||
|
streamingGroup->addFileSelector(MENU_ENUM_LABEL_STREAM_CONFIG);
|
||||||
|
streamingGroup->addStringLineEdit(MENU_ENUM_LABEL_STREAMING_TITLE);
|
||||||
|
streamingGroup->addStringLineEdit(MENU_ENUM_LABEL_STREAMING_URL);
|
||||||
|
streamingGroup->addUIntSpinBox(MENU_ENUM_LABEL_UDP_STREAM_PORT);
|
||||||
|
|
||||||
|
layout->addWidget(recordingGroup);
|
||||||
|
layout->addWidget(streamingGroup);
|
||||||
|
|
||||||
|
layout->addStretch();
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
65
ui/drivers/qt/options/saving.cpp
Normal file
65
ui/drivers/qt/options/saving.cpp
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
SavingCategory::SavingCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS);
|
||||||
|
setCategoryIcon("menu_saving");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> SavingCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new SavingPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
SavingPage::SavingPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *SavingPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
SettingsGroup *savesGroup = new SettingsGroup("Saves");
|
||||||
|
SettingsGroup *savestatesGroup = new SettingsGroup("Savestates");
|
||||||
|
CheckableSettingsGroup *autoSavestatesGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_SAVESTATE_AUTO_SAVE);
|
||||||
|
SettingsGroup *saveRamGroup = new SettingsGroup("SaveRAM");
|
||||||
|
SettingsGroup *systemFilesDirGroup = new SettingsGroup("System Files");
|
||||||
|
SettingsGroup *screenshotsDirGroup = new SettingsGroup("Screenshots");
|
||||||
|
|
||||||
|
savesGroup->addCheckBox(MENU_ENUM_LABEL_SORT_SAVEFILES_ENABLE);
|
||||||
|
savesGroup->addCheckBox(MENU_ENUM_LABEL_SAVEFILES_IN_CONTENT_DIR_ENABLE);
|
||||||
|
|
||||||
|
savestatesGroup->addCheckBox(MENU_ENUM_LABEL_SAVESTATE_AUTO_INDEX);
|
||||||
|
|
||||||
|
autoSavestatesGroup->addCheckBox(MENU_ENUM_LABEL_SAVESTATE_AUTO_LOAD);
|
||||||
|
|
||||||
|
savestatesGroup->addRow(autoSavestatesGroup);
|
||||||
|
savestatesGroup->addCheckBox(MENU_ENUM_LABEL_SAVESTATE_THUMBNAIL_ENABLE);
|
||||||
|
savestatesGroup->addCheckBox(MENU_ENUM_LABEL_SORT_SAVESTATES_ENABLE);
|
||||||
|
savestatesGroup->addCheckBox(MENU_ENUM_LABEL_SAVESTATES_IN_CONTENT_DIR_ENABLE);
|
||||||
|
|
||||||
|
saveRamGroup->addCheckBox(MENU_ENUM_LABEL_BLOCK_SRAM_OVERWRITE);
|
||||||
|
saveRamGroup->addUIntSpinBox(MENU_ENUM_LABEL_AUTOSAVE_INTERVAL);
|
||||||
|
|
||||||
|
systemFilesDirGroup->addCheckBox(MENU_ENUM_LABEL_SYSTEMFILES_IN_CONTENT_DIR_ENABLE);
|
||||||
|
|
||||||
|
screenshotsDirGroup->addCheckBox(MENU_ENUM_LABEL_SCREENSHOTS_IN_CONTENT_DIR_ENABLE);
|
||||||
|
|
||||||
|
layout->addRow(savesGroup);
|
||||||
|
layout->addRow(savestatesGroup);
|
||||||
|
layout->addRow(saveRamGroup);
|
||||||
|
layout->addRow(systemFilesDirGroup);
|
||||||
|
layout->addRow(screenshotsDirGroup);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
62
ui/drivers/qt/options/throttle.cpp
Normal file
62
ui/drivers/qt/options/throttle.cpp
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
FrameThrottleCategory::FrameThrottleCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS);
|
||||||
|
setCategoryIcon("menu_frameskip");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> FrameThrottleCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new FrameThrottlePage(this);
|
||||||
|
pages << new RewindPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameThrottlePage::FrameThrottlePage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *FrameThrottlePage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addFloatSpinBox(MENU_ENUM_LABEL_FASTFORWARD_RATIO);
|
||||||
|
layout->addFloatSpinBox(MENU_ENUM_LABEL_SLOWMOTION_RATIO);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_VRR_RUNLOOP_ENABLE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_THROTTLE_FRAMERATE);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
RewindPage::RewindPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_REWIND_SETTINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *RewindPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_REWIND_ENABLE);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_REWIND_GRANULARITY);
|
||||||
|
layout->addSizeSpinBox(MENU_ENUM_LABEL_REWIND_BUFFER_SIZE);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_REWIND_BUFFER_SIZE_STEP);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
288
ui/drivers/qt/options/ui.cpp
Normal file
288
ui/drivers/qt/options/ui.cpp
Normal file
@ -0,0 +1,288 @@
|
|||||||
|
#include "options.h"
|
||||||
|
#include "../viewoptionsdialog.h"
|
||||||
|
|
||||||
|
UserInterfaceCategory::UserInterfaceCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS);
|
||||||
|
setCategoryIcon("menu_ui");
|
||||||
|
}
|
||||||
|
|
||||||
|
UserInterfaceCategory::UserInterfaceCategory(MainWindow *mainwindow, QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
,m_mainwindow(mainwindow)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS);
|
||||||
|
setCategoryIcon("menu_ui");
|
||||||
|
|
||||||
|
m_pages << new UserInterfacePage(this);
|
||||||
|
m_pages << new ViewsPage(this);
|
||||||
|
/* pages << new QuickMenuPage(parent); */
|
||||||
|
m_pages << new AppearancePage(this);
|
||||||
|
m_pages << new DesktopMenuPage(m_mainwindow, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> UserInterfaceCategory::pages()
|
||||||
|
{
|
||||||
|
return m_pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserInterfacePage::UserInterfacePage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *UserInterfacePage::widget()
|
||||||
|
{
|
||||||
|
QWidget * widget = new QWidget;
|
||||||
|
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
|
||||||
|
SettingsGroup *menuGroup = new SettingsGroup("Menu");
|
||||||
|
SettingsGroup *inputGroup = new SettingsGroup("Input");
|
||||||
|
SettingsGroup *miscGroup = new SettingsGroup("Miscelaneous");
|
||||||
|
CheckableSettingsGroup *desktopGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_DESKTOP_MENU_ENABLE);
|
||||||
|
|
||||||
|
menuGroup->addCheckBox(MENU_ENUM_LABEL_SHOW_ADVANCED_SETTINGS);
|
||||||
|
|
||||||
|
{
|
||||||
|
rarch_setting_t *kioskMode = menu_setting_find_enum(MENU_ENUM_LABEL_MENU_ENABLE_KIOSK_MODE);
|
||||||
|
|
||||||
|
/* only on xmb and ozone*/
|
||||||
|
if (kioskMode)
|
||||||
|
{
|
||||||
|
CheckableSettingsGroup *kioskGroup = new CheckableSettingsGroup(kioskMode, widget);
|
||||||
|
|
||||||
|
kioskGroup->addPasswordLineEdit(MENU_ENUM_LABEL_MENU_KIOSK_MODE_PASSWORD);
|
||||||
|
|
||||||
|
menuGroup->addRow(kioskGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
menuGroup->addCheckBox(MENU_ENUM_LABEL_NAVIGATION_WRAPAROUND);
|
||||||
|
menuGroup->addCheckBox(MENU_ENUM_LABEL_PAUSE_LIBRETRO);
|
||||||
|
|
||||||
|
inputGroup->addCheckBox(MENU_ENUM_LABEL_MOUSE_ENABLE);
|
||||||
|
inputGroup->addCheckBox(MENU_ENUM_LABEL_POINTER_ENABLE);
|
||||||
|
|
||||||
|
menuGroup->addRow(inputGroup);
|
||||||
|
menuGroup->addCheckBox(MENU_ENUM_LABEL_THREADED_DATA_RUNLOOP_ENABLE);
|
||||||
|
|
||||||
|
miscGroup->addCheckBox(MENU_ENUM_LABEL_PAUSE_NONACTIVE);
|
||||||
|
miscGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_DISABLE_COMPOSITION);
|
||||||
|
|
||||||
|
menuGroup->addCheckBox(MENU_ENUM_LABEL_UI_COMPANION_ENABLE);
|
||||||
|
menuGroup->addCheckBox(MENU_ENUM_LABEL_UI_COMPANION_START_ON_BOOT);
|
||||||
|
menuGroup->addCheckBox(MENU_ENUM_LABEL_UI_MENUBAR_ENABLE);
|
||||||
|
|
||||||
|
/* layout->addCheckBox(MENU_ENUM_LABEL_DESKTOP_MENU_ENABLE); */
|
||||||
|
desktopGroup->addCheckBox(MENU_ENUM_LABEL_UI_COMPANION_TOGGLE);
|
||||||
|
|
||||||
|
layout->addWidget(menuGroup);
|
||||||
|
layout->addWidget(miscGroup);
|
||||||
|
layout->addWidget(desktopGroup);
|
||||||
|
layout->addStretch();
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewsPage::ViewsPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *ViewsPage::widget()
|
||||||
|
{
|
||||||
|
QWidget * widget = new QWidget();
|
||||||
|
QHBoxLayout *mainLayout = new QHBoxLayout;
|
||||||
|
FormLayout *leftLayout = new FormLayout;
|
||||||
|
QVBoxLayout *rightLayout = new QVBoxLayout;
|
||||||
|
SettingsGroup *quickMenu = new SettingsGroup("Quick Menu");
|
||||||
|
QuickMenuPage *quickPage = new QuickMenuPage(this);
|
||||||
|
SettingsGroup *mainMenu = new SettingsGroup("Main Menu");
|
||||||
|
SettingsGroup *tabs = new SettingsGroup("Tabs");
|
||||||
|
SettingsGroup *status = new SettingsGroup("Status");
|
||||||
|
SettingsGroup *startScreen = new SettingsGroup("StartScreen");
|
||||||
|
|
||||||
|
mainMenu->addCheckBox(MENU_ENUM_LABEL_MENU_SHOW_LOAD_CORE);
|
||||||
|
mainMenu->addCheckBox(MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT);
|
||||||
|
/* mainMenu->addCheckBox(MENU_ENUM_LABEL_SHOW_WIMP); */
|
||||||
|
mainMenu->addCheckBox(MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER);
|
||||||
|
mainMenu->addCheckBox(MENU_ENUM_LABEL_MENU_SHOW_CORE_UPDATER);
|
||||||
|
mainMenu->addCheckBox(MENU_ENUM_LABEL_MENU_SHOW_INFORMATION);
|
||||||
|
mainMenu->addCheckBox(MENU_ENUM_LABEL_MENU_SHOW_CONFIGURATIONS);
|
||||||
|
mainMenu->addCheckBox(MENU_ENUM_LABEL_MENU_SHOW_HELP);
|
||||||
|
mainMenu->addCheckBox(MENU_ENUM_LABEL_MENU_SHOW_QUIT_RETROARCH);
|
||||||
|
mainMenu->addCheckBox(MENU_ENUM_LABEL_MENU_SHOW_REBOOT);
|
||||||
|
mainMenu->addCheckBox(MENU_ENUM_LABEL_MENU_SHOW_SHUTDOWN);
|
||||||
|
|
||||||
|
tabs->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS);
|
||||||
|
tabs->addPasswordLineEdit(MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS_PASSWORD);
|
||||||
|
tabs->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES);
|
||||||
|
tabs->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_HISTORY);
|
||||||
|
tabs->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_IMAGES);
|
||||||
|
tabs->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_MUSIC);
|
||||||
|
tabs->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_VIDEO);
|
||||||
|
tabs->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_NETPLAY);
|
||||||
|
tabs->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_ADD);
|
||||||
|
tabs->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_PLAYLISTS);
|
||||||
|
|
||||||
|
status->addCheckBox(MENU_ENUM_LABEL_TIMEDATE_ENABLE);
|
||||||
|
status->addUIntComboBox(MENU_ENUM_LABEL_TIMEDATE_STYLE);
|
||||||
|
status->addCheckBox(MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE);
|
||||||
|
status->addCheckBox(MENU_ENUM_LABEL_CORE_ENABLE);
|
||||||
|
|
||||||
|
startScreen->addCheckBox(MENU_ENUM_LABEL_RGUI_SHOW_START_SCREEN);
|
||||||
|
|
||||||
|
quickMenu->layout()->setContentsMargins(0, 0, 0, 0);
|
||||||
|
quickMenu->addRow(quickPage->widget());
|
||||||
|
|
||||||
|
leftLayout->addRow(mainMenu);
|
||||||
|
leftLayout->addRow(tabs);
|
||||||
|
leftLayout->addRow(startScreen);
|
||||||
|
|
||||||
|
rightLayout->addWidget(quickMenu);
|
||||||
|
rightLayout->addWidget(status);
|
||||||
|
rightLayout->addStretch();
|
||||||
|
|
||||||
|
mainLayout->addLayout(leftLayout);
|
||||||
|
mainLayout->addLayout(rightLayout);
|
||||||
|
|
||||||
|
widget->setLayout(mainLayout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
QuickMenuPage::QuickMenuPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *QuickMenuPage::widget()
|
||||||
|
{
|
||||||
|
QWidget * widget = new QWidget;
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_START_RECORDING);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_START_STREAMING);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_OPTIONS);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CONTROLS);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CHEATS);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SHADERS);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_REWIND);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_LATENCY);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_CONTENT_SHOW_OVERLAYS);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_QUICK_MENU_SHOW_INFORMATION);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
AppearancePage::AppearancePage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *AppearancePage::widget()
|
||||||
|
{
|
||||||
|
QWidget * widget = new QWidget;
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addFileSelector(MENU_ENUM_LABEL_MENU_WALLPAPER);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_DYNAMIC_WALLPAPER);
|
||||||
|
layout->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_MENU_WALLPAPER_OPACITY);
|
||||||
|
layout->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_MENU_FRAMEBUFFER_OPACITY);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_HORIZONTAL_ANIMATION);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_RGUI_BORDER_FILLER_ENABLE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_RGUI_FULL_WIDTH_LAYOUT);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_LINEAR_FILTER);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_MENU_RGUI_INTERNAL_UPSCALE_LEVEL);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_MENU_RGUI_ASPECT_RATIO_LOCK);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_RGUI_MENU_COLOR_THEME);
|
||||||
|
layout->addFileSelector(MENU_ENUM_LABEL_RGUI_MENU_THEME_PRESET);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_DPI_OVERRIDE_ENABLE);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_DPI_OVERRIDE_VALUE);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_XMB_ALPHA_FACTOR);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_XMB_SCALE_FACTOR);
|
||||||
|
layout->addFontSelector(MENU_ENUM_LABEL_XMB_FONT);
|
||||||
|
layout->addUIntColorButton("Menu Font Color: ",
|
||||||
|
MENU_ENUM_LABEL_MENU_FONT_COLOR_RED,
|
||||||
|
MENU_ENUM_LABEL_MENU_FONT_COLOR_GREEN,
|
||||||
|
MENU_ENUM_LABEL_MENU_FONT_COLOR_BLUE);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_XMB_LAYOUT);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_XMB_THEME);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_XMB_SHADOWS_ENABLE);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_XMB_RIBBON_ENABLE);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_OZONE_MENU_COLOR_THEME);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME);
|
||||||
|
layout->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_MATERIALUI_MENU_HEADER_OPACITY);
|
||||||
|
layout->addFloatSliderAndSpinBox(MENU_ENUM_LABEL_MATERIALUI_MENU_FOOTER_OPACITY);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME);
|
||||||
|
|
||||||
|
{
|
||||||
|
rarch_setting_t *thumbnails = menu_setting_find_enum(MENU_ENUM_LABEL_THUMBNAILS);
|
||||||
|
|
||||||
|
if (thumbnails)
|
||||||
|
{
|
||||||
|
QHBoxLayout *thumbsLayout = new QHBoxLayout;
|
||||||
|
|
||||||
|
rarch_setting_t *leftThumbnails = menu_setting_find_enum(MENU_ENUM_LABEL_LEFT_THUMBNAILS);
|
||||||
|
|
||||||
|
thumbsLayout->addWidget(new UIntRadioButtons(thumbnails));
|
||||||
|
|
||||||
|
if (leftThumbnails)
|
||||||
|
thumbsLayout->addWidget(new UIntRadioButtons(leftThumbnails));
|
||||||
|
|
||||||
|
layout->addRow(thumbsLayout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_XMB_VERTICAL_THUMBNAILS);
|
||||||
|
layout->addUIntRadioButtons(MENU_ENUM_LABEL_MENU_RGUI_THUMBNAIL_DOWNSCALER);
|
||||||
|
layout->addUIntRadioButtons(MENU_ENUM_LABEL_MENU_TICKER_TYPE);
|
||||||
|
layout->addFloatSpinBox(MENU_ENUM_LABEL_MENU_TICKER_SPEED);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
DesktopMenuPage::DesktopMenuPage(MainWindow *mainwindow, QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
,m_widget(new ViewOptionsWidget(mainwindow))
|
||||||
|
{
|
||||||
|
setDisplayName("Desktop Menu");
|
||||||
|
}
|
||||||
|
|
||||||
|
void DesktopMenuPage::apply()
|
||||||
|
{
|
||||||
|
m_widget->saveViewOptions();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DesktopMenuPage::load()
|
||||||
|
{
|
||||||
|
m_widget->loadViewOptions();
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *DesktopMenuPage::widget()
|
||||||
|
{
|
||||||
|
return m_widget;
|
||||||
|
}
|
76
ui/drivers/qt/options/user.cpp
Normal file
76
ui/drivers/qt/options/user.cpp
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
UserCategory::UserCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_USER_SETTINGS);
|
||||||
|
setCategoryIcon("menu_user");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> UserCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new UserPage(this);
|
||||||
|
pages << new AccountsPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
UserPage::UserPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *UserPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
layout->addStringLineEdit(MENU_ENUM_LABEL_NETPLAY_NICKNAME);
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_USER_LANGUAGE);
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
AccountsPage::AccountsPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_ACCOUNTS_LIST);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *AccountsPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
|
||||||
|
SettingsGroup *youtubeGroup = new SettingsGroup(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE));
|
||||||
|
SettingsGroup *twitchGroup = new SettingsGroup(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACCOUNTS_TWITCH));
|
||||||
|
|
||||||
|
#ifdef HAVE_CHEEVOS
|
||||||
|
SettingsGroup *cheevosGroup = new SettingsGroup(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS));
|
||||||
|
|
||||||
|
cheevosGroup->addStringLineEdit(MENU_ENUM_LABEL_CHEEVOS_USERNAME);
|
||||||
|
cheevosGroup->addPasswordLineEdit(MENU_ENUM_LABEL_CHEEVOS_PASSWORD);
|
||||||
|
|
||||||
|
layout->addWidget(cheevosGroup);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
youtubeGroup->addStringLineEdit(MENU_ENUM_LABEL_YOUTUBE_STREAM_KEY);
|
||||||
|
|
||||||
|
layout->addWidget(youtubeGroup);
|
||||||
|
|
||||||
|
twitchGroup->addStringLineEdit(MENU_ENUM_LABEL_TWITCH_STREAM_KEY);
|
||||||
|
|
||||||
|
layout->addWidget(twitchGroup);
|
||||||
|
|
||||||
|
layout->addStretch();
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
337
ui/drivers/qt/options/video.cpp
Normal file
337
ui/drivers/qt/options/video.cpp
Normal file
@ -0,0 +1,337 @@
|
|||||||
|
#include "options.h"
|
||||||
|
|
||||||
|
#ifndef CXX_BUILD
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "../../../../gfx/video_display_server.h"
|
||||||
|
#include "../../../../gfx/video_driver.h"
|
||||||
|
|
||||||
|
#ifndef CXX_BUILD
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
VideoCategory::VideoCategory(QWidget *parent) :
|
||||||
|
OptionsCategory(parent)
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS);
|
||||||
|
setCategoryIcon("menu_video");
|
||||||
|
}
|
||||||
|
|
||||||
|
QVector<OptionsPage*> VideoCategory::pages()
|
||||||
|
{
|
||||||
|
QVector<OptionsPage*> pages;
|
||||||
|
|
||||||
|
pages << new VideoPage(this);
|
||||||
|
pages << new CrtSwitchresPage(this);
|
||||||
|
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
VideoPage::VideoPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
,m_resolutionCombo(new QComboBox())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *VideoPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
|
||||||
|
SettingsGroup *outputGroup = new SettingsGroup("Output");
|
||||||
|
SettingsGroup *aspectGroup = new SettingsGroup("Scaling");
|
||||||
|
|
||||||
|
SettingsGroup *fullscreenGroup = new SettingsGroup("Fullscreen Mode");
|
||||||
|
SettingsGroup *windowedGroup = new SettingsGroup("Windowed Mode");
|
||||||
|
|
||||||
|
QHBoxLayout *fullcreenSizeLayout = new QHBoxLayout;
|
||||||
|
FormLayout *leftFullscreenSizeForm = new FormLayout;
|
||||||
|
FormLayout *rightFullscreenSizeForm = new FormLayout;
|
||||||
|
|
||||||
|
QHBoxLayout *windowedSizeLayout = new QHBoxLayout;
|
||||||
|
FormLayout *leftWindowedSizeForm = new FormLayout;
|
||||||
|
FormLayout *rightWindowedSizeForm = new FormLayout;
|
||||||
|
|
||||||
|
SettingsGroup *syncGroup = new SettingsGroup("Synchronization");
|
||||||
|
CheckableSettingsGroup *vSyncGroup = new CheckableSettingsGroup(MENU_ENUM_LABEL_VIDEO_VSYNC);
|
||||||
|
|
||||||
|
QHBoxLayout *outputScalingLayout = new QHBoxLayout;
|
||||||
|
QHBoxLayout *modeLayout = new QHBoxLayout;
|
||||||
|
QHBoxLayout *syncMiscLayout = new QHBoxLayout;
|
||||||
|
|
||||||
|
SettingsGroup *miscGroup = new SettingsGroup("Miscellaneous");
|
||||||
|
SettingsGroup *filterGroup = new SettingsGroup("Video Filter");
|
||||||
|
|
||||||
|
unsigned i, size = 0;
|
||||||
|
struct video_display_config *list = (struct video_display_config*) video_display_server_get_resolution_list(&size);
|
||||||
|
|
||||||
|
if (list)
|
||||||
|
{
|
||||||
|
for (i = 0; i < size; i++)
|
||||||
|
{
|
||||||
|
char val_d[256], str[256];
|
||||||
|
snprintf(str, sizeof(str), "%dx%d (%d Hz)", list[i].width, list[i].height, list[i].refreshrate);
|
||||||
|
snprintf(val_d, sizeof(val_d), "%d", i);
|
||||||
|
|
||||||
|
m_resolutionCombo->addItem(str);
|
||||||
|
|
||||||
|
if (list[i].current)
|
||||||
|
m_resolutionCombo->setCurrentIndex(i);
|
||||||
|
}
|
||||||
|
|
||||||
|
free(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
outputGroup->addStringComboBox(MENU_ENUM_LABEL_VIDEO_DRIVER);
|
||||||
|
outputGroup->addUIntSpinBox(MENU_ENUM_LABEL_VIDEO_MONITOR_INDEX);
|
||||||
|
outputGroup->addUIntComboBox(MENU_ENUM_LABEL_VIDEO_ROTATION);
|
||||||
|
outputGroup->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION), m_resolutionCombo);
|
||||||
|
outputGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_FORCE_SRGB_DISABLE);
|
||||||
|
|
||||||
|
fullscreenGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_FULLSCREEN);
|
||||||
|
fullscreenGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_WINDOWED_FULLSCREEN);
|
||||||
|
|
||||||
|
leftFullscreenSizeForm->addRow("Width:", new UIntSpinBox(MENU_ENUM_LABEL_VIDEO_FULLSCREEN_X));
|
||||||
|
rightFullscreenSizeForm->addRow("Height:", new UIntSpinBox(MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y));
|
||||||
|
|
||||||
|
fullcreenSizeLayout->addLayout(leftFullscreenSizeForm);
|
||||||
|
fullcreenSizeLayout->addLayout(rightFullscreenSizeForm);
|
||||||
|
|
||||||
|
fullscreenGroup->addRow(fullcreenSizeLayout);
|
||||||
|
|
||||||
|
aspectGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER);
|
||||||
|
aspectGroup->addRow(new AspectRatioGroup("Aspect Ratio"));
|
||||||
|
|
||||||
|
leftWindowedSizeForm->addRow("Scale:", new FloatSpinBox(MENU_ENUM_LABEL_VIDEO_SCALE));
|
||||||
|
leftWindowedSizeForm->addRow("Width:", new UIntSpinBox(MENU_ENUM_LABEL_VIDEO_WINDOW_WIDTH));
|
||||||
|
|
||||||
|
rightWindowedSizeForm->addRow("Opacity:", new UIntSpinBox(MENU_ENUM_LABEL_VIDEO_WINDOW_OPACITY));
|
||||||
|
rightWindowedSizeForm->addRow("Height:", new UIntSpinBox(MENU_ENUM_LABEL_VIDEO_WINDOW_HEIGHT));
|
||||||
|
|
||||||
|
windowedSizeLayout->addLayout(leftWindowedSizeForm);
|
||||||
|
windowedSizeLayout->addLayout(rightWindowedSizeForm);
|
||||||
|
|
||||||
|
windowedGroup->addRow(windowedSizeLayout);
|
||||||
|
|
||||||
|
windowedGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_WINDOW_SHOW_DECORATIONS);
|
||||||
|
windowedGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_WINDOW_SAVE_POSITION);
|
||||||
|
|
||||||
|
vSyncGroup->addUIntSpinBox(MENU_ENUM_LABEL_VIDEO_SWAP_INTERVAL);
|
||||||
|
vSyncGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_ADAPTIVE_VSYNC);
|
||||||
|
vSyncGroup->addUIntSpinBox(MENU_ENUM_LABEL_VIDEO_FRAME_DELAY);
|
||||||
|
syncGroup->addRow(vSyncGroup);
|
||||||
|
|
||||||
|
{
|
||||||
|
rarch_setting_t *hardSyncSetting = menu_setting_find_enum(MENU_ENUM_LABEL_VIDEO_HARD_SYNC);
|
||||||
|
|
||||||
|
if (hardSyncSetting)
|
||||||
|
{
|
||||||
|
CheckableSettingsGroup *hardSyncGroup = new CheckableSettingsGroup(hardSyncSetting);
|
||||||
|
|
||||||
|
hardSyncGroup->addUIntSpinBox(MENU_ENUM_LABEL_VIDEO_HARD_SYNC_FRAMES);
|
||||||
|
|
||||||
|
syncGroup->addRow(hardSyncGroup);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
syncGroup->addUIntSpinBox(MENU_ENUM_LABEL_VIDEO_MAX_SWAPCHAIN_IMAGES);
|
||||||
|
|
||||||
|
miscGroup->addCheckBox(MENU_ENUM_LABEL_SUSPEND_SCREENSAVER_ENABLE);
|
||||||
|
miscGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_THREADED);
|
||||||
|
miscGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_BLACK_FRAME_INSERTION);
|
||||||
|
miscGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_GPU_SCREENSHOT);
|
||||||
|
miscGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_CROP_OVERSCAN);
|
||||||
|
miscGroup->addCheckBox(MENU_ENUM_LABEL_VIDEO_SMOOTH);
|
||||||
|
|
||||||
|
syncMiscLayout->addWidget(syncGroup);
|
||||||
|
syncMiscLayout->addWidget(miscGroup);
|
||||||
|
|
||||||
|
filterGroup->addFileSelector(MENU_ENUM_LABEL_VIDEO_FILTER);
|
||||||
|
|
||||||
|
modeLayout->addWidget(fullscreenGroup);
|
||||||
|
modeLayout->addWidget(windowedGroup);
|
||||||
|
|
||||||
|
outputScalingLayout->addWidget(outputGroup);
|
||||||
|
outputScalingLayout->addWidget(aspectGroup);
|
||||||
|
|
||||||
|
layout->addLayout(outputScalingLayout);
|
||||||
|
layout->addLayout(modeLayout);
|
||||||
|
layout->addLayout(syncMiscLayout);
|
||||||
|
layout->addWidget(filterGroup);
|
||||||
|
|
||||||
|
layout->addStretch();
|
||||||
|
|
||||||
|
connect(m_resolutionCombo, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(onResolutionComboIndexChanged(const QString&)));
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
AspectRatioGroup::AspectRatioGroup(const QString &title, QWidget *parent) :
|
||||||
|
SettingsGroup(title, parent)
|
||||||
|
,m_radioButton(new AspectRatioRadioButton(ASPECT_RATIO_4_3, ASPECT_RATIO_32_9))
|
||||||
|
,m_comboBox(new UIntComboBox(MENU_ENUM_LABEL_VIDEO_ASPECT_RATIO_INDEX, ASPECT_RATIO_4_3, ASPECT_RATIO_32_9))
|
||||||
|
{
|
||||||
|
QHBoxLayout *aspectLayout = new QHBoxLayout;
|
||||||
|
FormLayout *leftAspectForm = new FormLayout;
|
||||||
|
FormLayout *rightAspectForm = new FormLayout;
|
||||||
|
QHBoxLayout *preset = new QHBoxLayout;
|
||||||
|
//AspectRatioRadioButton *aspectRadioButton = new AspectRatioRadioButton(ASPECT_RATIO_4_3, ASPECT_RATIO_32_9);
|
||||||
|
QHBoxLayout *custom = new QHBoxLayout;
|
||||||
|
QVBoxLayout *customRadio = new QVBoxLayout;
|
||||||
|
QHBoxLayout *config = new QHBoxLayout;
|
||||||
|
QHBoxLayout *aspectL = new QHBoxLayout;
|
||||||
|
FormLayout *leftAspect = new FormLayout;
|
||||||
|
FormLayout *rightAspect = new FormLayout;
|
||||||
|
|
||||||
|
leftAspectForm->addRow("X Pos.:", new UIntSpinBox(MENU_ENUM_LABEL_VIDEO_VIEWPORT_CUSTOM_X));
|
||||||
|
leftAspectForm->addRow("Width:", new UIntSpinBox(MENU_ENUM_LABEL_VIDEO_VIEWPORT_CUSTOM_WIDTH));
|
||||||
|
rightAspectForm->addRow("Y Pos.:", new UIntSpinBox(MENU_ENUM_LABEL_VIDEO_VIEWPORT_CUSTOM_Y));
|
||||||
|
rightAspectForm->addRow("Height:", new UIntSpinBox(MENU_ENUM_LABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT));
|
||||||
|
|
||||||
|
aspectLayout->addLayout(leftAspectForm);
|
||||||
|
aspectLayout->addLayout(rightAspectForm);
|
||||||
|
|
||||||
|
preset->addWidget(m_radioButton);
|
||||||
|
preset->addWidget(m_comboBox);
|
||||||
|
preset->setStretch(1, 1);
|
||||||
|
|
||||||
|
customRadio->addWidget(new UIntRadioButton(MENU_ENUM_LABEL_VIDEO_ASPECT_RATIO_INDEX, ASPECT_RATIO_CUSTOM), Qt::AlignTop);
|
||||||
|
customRadio->addStretch();
|
||||||
|
|
||||||
|
custom->addLayout(customRadio);
|
||||||
|
custom->addLayout(aspectLayout);
|
||||||
|
custom->addStretch();
|
||||||
|
|
||||||
|
config->addWidget(new UIntRadioButton(MENU_ENUM_LABEL_VIDEO_ASPECT_RATIO_INDEX, ASPECT_RATIO_CONFIG));
|
||||||
|
config->addWidget(new FloatSpinBox(MENU_ENUM_LABEL_VIDEO_ASPECT_RATIO));
|
||||||
|
config->setStretch(1, 1);
|
||||||
|
config->setSizeConstraint(QLayout::SetMinimumSize);
|
||||||
|
|
||||||
|
leftAspect->addRow(new UIntRadioButton(MENU_ENUM_LABEL_VIDEO_ASPECT_RATIO_INDEX, ASPECT_RATIO_CORE));
|
||||||
|
leftAspect->addRow(preset);
|
||||||
|
|
||||||
|
rightAspect->addRow(config);
|
||||||
|
rightAspect->addRow(new UIntRadioButton(MENU_ENUM_LABEL_VIDEO_ASPECT_RATIO_INDEX, ASPECT_RATIO_SQUARE));
|
||||||
|
|
||||||
|
aspectL->addLayout(leftAspect);
|
||||||
|
aspectL->addStretch();
|
||||||
|
aspectL->addSpacing(30);
|
||||||
|
aspectL->addLayout(rightAspect);
|
||||||
|
|
||||||
|
addRow(aspectL);
|
||||||
|
addRow(custom);
|
||||||
|
|
||||||
|
connect(m_radioButton, SIGNAL(clicked(bool)), this, SLOT(onAspectRadioClicked(bool)));
|
||||||
|
}
|
||||||
|
|
||||||
|
void AspectRatioGroup::paintEvent(QPaintEvent *event)
|
||||||
|
{
|
||||||
|
unsigned value = config_get_ptr()->uints.video_aspect_ratio_idx;
|
||||||
|
|
||||||
|
if (ASPECT_RATIO_4_3 >= value || value <= ASPECT_RATIO_32_9)
|
||||||
|
{
|
||||||
|
m_comboBox->blockSignals(false);
|
||||||
|
m_radioButton->setChecked(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_comboBox->blockSignals(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
SettingsGroup::paintEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AspectRatioGroup::onAspectRadioToggled(bool checked)
|
||||||
|
{
|
||||||
|
if (checked)
|
||||||
|
m_comboBox->currentIndexChanged(m_comboBox->currentIndex());
|
||||||
|
else
|
||||||
|
m_comboBox->blockSignals(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AspectRatioGroup::onAspectRadioClicked(bool checked)
|
||||||
|
{
|
||||||
|
m_comboBox->blockSignals(false);
|
||||||
|
m_comboBox->currentIndexChanged(m_comboBox->currentIndex());
|
||||||
|
setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
CrtSwitchresPage::CrtSwitchresPage(QObject *parent) :
|
||||||
|
OptionsPage(parent)
|
||||||
|
,m_crtSuperResolutionCombo(new QComboBox())
|
||||||
|
{
|
||||||
|
setDisplayName(MENU_ENUM_LABEL_VALUE_CRT_SWITCHRES_SETTINGS);
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *CrtSwitchresPage::widget()
|
||||||
|
{
|
||||||
|
QWidget *widget = new QWidget;
|
||||||
|
|
||||||
|
FormLayout *layout = new FormLayout;
|
||||||
|
|
||||||
|
m_crtSuperResolutionCombo->addItem(msg_hash_to_str(MSG_NATIVE), 0);
|
||||||
|
m_crtSuperResolutionCombo->addItem("1920", 1920);
|
||||||
|
m_crtSuperResolutionCombo->addItem("2560", 2560);
|
||||||
|
m_crtSuperResolutionCombo->addItem("3840", 3840);
|
||||||
|
|
||||||
|
layout->addUIntComboBox(MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION);
|
||||||
|
layout->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER), m_crtSuperResolutionCombo);
|
||||||
|
layout->addUIntSpinBox(MENU_ENUM_LABEL_CRT_SWITCH_X_AXIS_CENTERING);
|
||||||
|
layout->addCheckBox(MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE);
|
||||||
|
|
||||||
|
connect(m_crtSuperResolutionCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(onCrtSuperResolutionComboIndexChanged(int)));
|
||||||
|
|
||||||
|
widget->setLayout(layout);
|
||||||
|
|
||||||
|
return widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
void VideoPage::onResolutionComboIndexChanged(const QString &text)
|
||||||
|
{
|
||||||
|
char str[100];
|
||||||
|
char *pch = NULL;
|
||||||
|
const char *path = text.toUtf8().constData();
|
||||||
|
unsigned width = 0;
|
||||||
|
unsigned height = 0;
|
||||||
|
unsigned refreshrate = 0;
|
||||||
|
|
||||||
|
snprintf(str, sizeof(str), "%s", path);
|
||||||
|
|
||||||
|
pch = strtok(str, "x");
|
||||||
|
if (pch)
|
||||||
|
width = strtoul(pch, NULL, 0);
|
||||||
|
pch = strtok(NULL, " ");
|
||||||
|
if (pch)
|
||||||
|
height = strtoul(pch, NULL, 0);
|
||||||
|
pch = strtok(NULL, "(");
|
||||||
|
if (pch)
|
||||||
|
refreshrate = strtoul(pch, NULL, 0);
|
||||||
|
|
||||||
|
if (video_display_server_set_resolution(width, height,
|
||||||
|
refreshrate, (float)refreshrate, 0, 0, 0))
|
||||||
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
|
video_monitor_set_refresh_rate((float)refreshrate);
|
||||||
|
|
||||||
|
settings->uints.video_fullscreen_x = width;
|
||||||
|
settings->uints.video_fullscreen_y = height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CrtSwitchresPage::onCrtSuperResolutionComboIndexChanged(int index)
|
||||||
|
{
|
||||||
|
Q_UNUSED(index)
|
||||||
|
config_get_ptr()->uints.crt_switch_resolution_super = m_crtSuperResolutionCombo->currentData().value<unsigned>();
|
||||||
|
}
|
||||||
|
|
||||||
|
AspectRatioRadioButton::AspectRatioRadioButton(unsigned min, unsigned max, QWidget *parent) :
|
||||||
|
QRadioButton(parent)
|
||||||
|
,m_min(min)
|
||||||
|
,m_max(max)
|
||||||
|
{
|
||||||
|
}
|
1187
ui/drivers/qt/settingswidgets.cpp
Normal file
1187
ui/drivers/qt/settingswidgets.cpp
Normal file
File diff suppressed because it is too large
Load Diff
421
ui/drivers/qt/settingswidgets.h
Normal file
421
ui/drivers/qt/settingswidgets.h
Normal file
@ -0,0 +1,421 @@
|
|||||||
|
#ifndef SETTINGSWIDGETS_H
|
||||||
|
#define SETTINGSWIDGETS_H
|
||||||
|
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QSpinBox>
|
||||||
|
#include <QSlider>
|
||||||
|
#include <QGroupBox>
|
||||||
|
#include <QToolButton>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QRadioButton>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QFormLayout>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QColorDialog>
|
||||||
|
|
||||||
|
#ifndef CXX_BUILD
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "../../../configuration.h"
|
||||||
|
#include "../../../setting_list.h"
|
||||||
|
#include "../../../menu/menu_setting.h"
|
||||||
|
#include "../../../menu/menu_cbs.h"
|
||||||
|
|
||||||
|
#ifndef CXX_BUILD
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const QString FONT_FILTER = QStringLiteral("TrueType font (*.ttf)");
|
||||||
|
|
||||||
|
class FormLayout : public QFormLayout
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
FormLayout(QWidget *parent = 0);
|
||||||
|
void addUIntSpinBox(msg_hash_enums enum_idx);
|
||||||
|
void addSizeSpinBox(msg_hash_enums enum_idx, unsigned scale = 1024 * 1024);
|
||||||
|
void addFloatSpinBox(msg_hash_enums enum_idx);
|
||||||
|
void addDirectorySelector(msg_hash_enums enum_idx);
|
||||||
|
void addFileSelector(msg_hash_enums enum_idx);
|
||||||
|
void addFontSelector(msg_hash_enums enum_idx);
|
||||||
|
void addCheckBox(msg_hash_enums enum_idx);
|
||||||
|
void addUIntComboBox(msg_hash_enums enum_idx);
|
||||||
|
void addUIntRadioButtons(msg_hash_enums enum_idx);
|
||||||
|
void addStringComboBox(msg_hash_enums enum_idx);
|
||||||
|
void addStringLineEdit(msg_hash_enums enum_idx);
|
||||||
|
void addPasswordLineEdit(msg_hash_enums enum_idx);
|
||||||
|
void addFloatSliderAndSpinBox(msg_hash_enums enum_idx);
|
||||||
|
void addUIntColorButton(const QString &title, msg_hash_enums r, msg_hash_enums g, msg_hash_enums b);
|
||||||
|
bool addBindButton(msg_hash_enums enum_idx);
|
||||||
|
};
|
||||||
|
|
||||||
|
class SettingsGroup : public QGroupBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
SettingsGroup(const QString &title, QWidget *parent = 0);
|
||||||
|
SettingsGroup(QWidget *parent = 0);
|
||||||
|
void addWidget(QWidget *widget);
|
||||||
|
void addRow(QString label, QWidget *widget);
|
||||||
|
void addRow(QWidget *widget);
|
||||||
|
void addRow(QLayout *layout);
|
||||||
|
void addRow(QString label, QLayout *layout);
|
||||||
|
void addCheckBox(msg_hash_enums enum_idx);
|
||||||
|
void addFileSelector(msg_hash_enums enum_idx);
|
||||||
|
void addDirectorySelector(msg_hash_enums enum_idx);
|
||||||
|
void addFontSelector(msg_hash_enums enum_idx);
|
||||||
|
void addStringLineEdit(msg_hash_enums enum_idx);
|
||||||
|
void addPasswordLineEdit(msg_hash_enums enum_idx);
|
||||||
|
void addStringComboBox(msg_hash_enums enum_idx);
|
||||||
|
void addUIntSpinBox(msg_hash_enums enum_idx);
|
||||||
|
void addUIntComboBox(msg_hash_enums enum_idx);
|
||||||
|
void addUIntRadioButtons(msg_hash_enums enum_idx);
|
||||||
|
void addFloatSpinBox(msg_hash_enums enum_idx);
|
||||||
|
void addFloatSliderAndSpinBox(msg_hash_enums enum_idx);
|
||||||
|
void addUIntColorButton(const QString &title, msg_hash_enums r, msg_hash_enums g, msg_hash_enums b);
|
||||||
|
void addBindButton(msg_hash_enums enum_idx);
|
||||||
|
private:
|
||||||
|
FormLayout *m_layout;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CheckableSettingsGroup : public SettingsGroup
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
CheckableSettingsGroup(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
CheckableSettingsGroup(const char *setting, QWidget *parent = 0);
|
||||||
|
CheckableSettingsGroup(msg_hash_enums enum_idx, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onClicked(bool clicked);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
bool *m_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CheckBox : public QCheckBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
CheckBox(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
CheckBox(const char *setting, QWidget *parent = 0);
|
||||||
|
CheckBox(msg_hash_enums enum_idx, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onClicked(bool checked);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
bool *m_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CheckableIcon : public QToolButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
CheckableIcon(rarch_setting_t *setting, const QIcon &icon, QWidget *parent = 0);
|
||||||
|
CheckableIcon(const char *setting, const QIcon &icon, QWidget *parent = 0);
|
||||||
|
CheckableIcon(msg_hash_enums enum_idx, const QIcon &icon, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onToggled(bool checked);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
bool *m_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class StringLineEdit : public QLineEdit
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
StringLineEdit(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
StringLineEdit(const char *setting, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onEditingFinished();
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
char *m_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class PasswordLineEdit : public StringLineEdit
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
PasswordLineEdit(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
class StringComboBox : public QComboBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
StringComboBox(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
StringComboBox(const char *setting, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onCurrentTextChanged(const QString &text);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
char *m_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class UIntComboBox : public QComboBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
UIntComboBox(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
UIntComboBox(rarch_setting_t *setting, double min, double max, QWidget *parent = 0);
|
||||||
|
UIntComboBox(msg_hash_enums enum_idx, QWidget *parent = 0);
|
||||||
|
UIntComboBox(msg_hash_enums enum_idx, double min, double max, QWidget *parent = 0);
|
||||||
|
UIntComboBox(const char *setting, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onCurrentIndexChanged(int index);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
void populate(double min, double max);
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
unsigned *m_value;
|
||||||
|
QHash<unsigned, QString> m_hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
class UIntRadioButton : public QRadioButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
UIntRadioButton(const QString &text, rarch_setting_t *setting, unsigned value, QWidget *parent = 0);
|
||||||
|
UIntRadioButton(msg_hash_enums enum_idx, unsigned value, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onClicked(bool);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
unsigned *m_target;
|
||||||
|
unsigned m_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class UIntRadioButtons : public QGroupBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
UIntRadioButtons(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
UIntRadioButtons(const char *setting, QWidget *parent = 0);
|
||||||
|
UIntRadioButtons(msg_hash_enums enum_idx, QWidget *parent = 0);
|
||||||
|
signals:
|
||||||
|
void currentUIntChanged(unsigned value);
|
||||||
|
private slots:
|
||||||
|
void onButtonClicked(int id);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
unsigned *m_value;
|
||||||
|
QButtonGroup *m_buttonGroup;
|
||||||
|
};
|
||||||
|
|
||||||
|
class UIntSpinBox : public QSpinBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
UIntSpinBox(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
UIntSpinBox(msg_hash_enums enum_idx, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onValueChanged(int value);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
unsigned *m_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class SizeSpinBox : public QSpinBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
SizeSpinBox(rarch_setting_t *setting, unsigned scale = 1024*1024, QWidget *parent = 0);
|
||||||
|
SizeSpinBox(msg_hash_enums enum_idx, unsigned scale = 1024 * 1024, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onValueChanged(int value);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
size_t *m_value;
|
||||||
|
unsigned m_scale;
|
||||||
|
};
|
||||||
|
|
||||||
|
class IntSpinBox : public QSpinBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
IntSpinBox(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onValueChanged(int value);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
int *m_value;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FloatSpinBox : public QDoubleSpinBox
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
FloatSpinBox(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
FloatSpinBox(const char *setting, QWidget *parent = 0);
|
||||||
|
FloatSpinBox(msg_hash_enums enum_idx, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onValueChanged(double value);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
float *m_value;
|
||||||
|
static const QRegularExpression DECIMALS_REGEX;
|
||||||
|
};
|
||||||
|
|
||||||
|
class PathButton : public QPushButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
PathButton(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
PathButton(const char *setting, QWidget *parent = 0);
|
||||||
|
protected slots:
|
||||||
|
virtual void onClicked(bool checked = false) { Q_UNUSED( checked); }
|
||||||
|
protected:
|
||||||
|
QString m_filter;
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
char *m_value;
|
||||||
|
const char *m_dir;
|
||||||
|
};
|
||||||
|
|
||||||
|
class DirectoryButton : public PathButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
DirectoryButton(rarch_setting_t *setting, QWidget *parent = 0) :
|
||||||
|
PathButton(setting, parent) {}
|
||||||
|
private:
|
||||||
|
void onClicked(bool checked = false);
|
||||||
|
};
|
||||||
|
|
||||||
|
class FileButton : public PathButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
FileButton(rarch_setting_t *setting, QWidget *parent = 0) :
|
||||||
|
PathButton(setting, parent) {}
|
||||||
|
private:
|
||||||
|
void onClicked(bool checked = false);
|
||||||
|
};
|
||||||
|
|
||||||
|
class FontButton : public PathButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
FontButton(rarch_setting_t *setting, QWidget *parent = 0) :
|
||||||
|
PathButton(setting, parent) {}
|
||||||
|
private:
|
||||||
|
void onClicked(bool checked = false);
|
||||||
|
};
|
||||||
|
|
||||||
|
class DirectorySelector : public QHBoxLayout
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
DirectorySelector(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
class FileSelector : public QHBoxLayout
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
FileSelector(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
FileSelector(const char *setting, QWidget *parent = 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
class FontSelector : public QHBoxLayout
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
FontSelector(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
};
|
||||||
|
|
||||||
|
class FloatSlider : public QSlider
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
FloatSlider(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
FloatSlider(const char *setting, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onValueChanged(int value);
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
float *m_value;
|
||||||
|
QRegularExpression m_decimalsRegEx;
|
||||||
|
unsigned int m_precision;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FloatSliderAndSpinBox : public QHBoxLayout
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
FloatSliderAndSpinBox(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
FloatSliderAndSpinBox(const char *setting, QWidget *parent = 0);
|
||||||
|
FloatSliderAndSpinBox(msg_hash_enums enum_idx, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onSliderValueChanged(int value);
|
||||||
|
void onSpinBoxValueChanged(double value);
|
||||||
|
private:
|
||||||
|
FloatSlider *m_slider;
|
||||||
|
FloatSpinBox *m_spinBox;
|
||||||
|
};
|
||||||
|
|
||||||
|
class BindButton : public QPushButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
BindButton(rarch_setting_t *setting, QWidget *parent = 0);
|
||||||
|
BindButton(msg_hash_enums enum_idx, QWidget *parent = 0);
|
||||||
|
private slots:
|
||||||
|
void onClicked(bool checked);
|
||||||
|
private:
|
||||||
|
rarch_setting_t *m_setting;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ColorButton : public QToolButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
ColorButton(rarch_setting_t *red, rarch_setting_t *green, rarch_setting_t *blue, QWidget *parent = 0);
|
||||||
|
ColorButton(msg_hash_enums red, msg_hash_enums green, msg_hash_enums blue, QWidget *parent = 0);
|
||||||
|
protected slots:
|
||||||
|
virtual void onColorChanged(const QColor& color) { Q_UNUSED(color); }
|
||||||
|
protected:
|
||||||
|
virtual QColor color() { return QColor(); }
|
||||||
|
void paintEvent(QPaintEvent *event);
|
||||||
|
|
||||||
|
rarch_setting_t *m_red, *m_green, *m_blue;
|
||||||
|
QColorDialog *m_dialog;
|
||||||
|
};
|
||||||
|
|
||||||
|
class UIntColorButton : public ColorButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
UIntColorButton(msg_hash_enums red, msg_hash_enums green, msg_hash_enums blue, QWidget *parent = 0);
|
||||||
|
UIntColorButton(rarch_setting_t *red, rarch_setting_t *green, rarch_setting_t *blue, QWidget *parent = 0);
|
||||||
|
protected slots:
|
||||||
|
void onColorChanged(const QColor& color);
|
||||||
|
protected:
|
||||||
|
QColor color();
|
||||||
|
};
|
||||||
|
|
||||||
|
class FloatColorButton : public ColorButton
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit FloatColorButton(msg_hash_enums red, msg_hash_enums green, msg_hash_enums blue, QWidget *parent = 0);
|
||||||
|
protected slots:
|
||||||
|
void onColorChanged(const QColor& color);
|
||||||
|
protected:
|
||||||
|
QColor color();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -12,7 +12,6 @@ static const QString qt_theme_default_stylesheet = QStringLiteral(R"(
|
|||||||
ThumbnailWidget#thumbnailWidget, ThumbnailLabel#thumbnailGridLabel, QLabel#thumbnailQLabel {
|
ThumbnailWidget#thumbnailWidget, ThumbnailLabel#thumbnailGridLabel, QLabel#thumbnailQLabel {
|
||||||
background-color:#d4d4d4;
|
background-color:#d4d4d4;
|
||||||
}
|
}
|
||||||
|
|
||||||
QLabel#dropIndicator {
|
QLabel#dropIndicator {
|
||||||
font-size: 9pt;
|
font-size: 9pt;
|
||||||
color: darkgrey;
|
color: darkgrey;
|
||||||
@ -27,9 +26,13 @@ static const QString qt_theme_default_stylesheet = QStringLiteral(R"(
|
|||||||
QFrame#playlistWidget, QFrame#browserWidget, QFrame#logWidget {
|
QFrame#playlistWidget, QFrame#browserWidget, QFrame#logWidget {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
ListWidget {
|
QListWidget {
|
||||||
icon-size: 32px;
|
icon-size: 32px;
|
||||||
}
|
}
|
||||||
|
/* color of the icons on the settings dialog */
|
||||||
|
/* QLabel#iconColor {
|
||||||
|
color: black;
|
||||||
|
} */
|
||||||
)");
|
)");
|
||||||
|
|
||||||
static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
|
static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
|
||||||
@ -38,6 +41,9 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
|
|||||||
background-color:rgb(53,53,53);
|
background-color:rgb(53,53,53);
|
||||||
selection-background-color:%1;
|
selection-background-color:%1;
|
||||||
}
|
}
|
||||||
|
QWidget:disabled {
|
||||||
|
color:rgb(127,127,127);
|
||||||
|
}
|
||||||
QFrame#playlistWidget, QFrame#browserWidget, QStackedWidget#centralWidget, QFrame#logWidget {
|
QFrame#playlistWidget, QFrame#browserWidget, QStackedWidget#centralWidget, QFrame#logWidget {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
background-color:rgb(66,66,66);
|
background-color:rgb(66,66,66);
|
||||||
@ -46,7 +52,7 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
|
|||||||
border-right:1px solid rgba(125,125,125,50%);
|
border-right:1px solid rgba(125,125,125,50%);
|
||||||
border-bottom:1px solid rgba(25,25,25,75%);
|
border-bottom:1px solid rgba(25,25,25,75%);
|
||||||
}
|
}
|
||||||
ListWidget {
|
QListWidget {
|
||||||
icon-size: 32px;
|
icon-size: 32px;
|
||||||
}
|
}
|
||||||
QLabel#dropIndicator {
|
QLabel#dropIndicator {
|
||||||
@ -59,11 +65,42 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
|
|||||||
QTextEdit, LogTextEdit {
|
QTextEdit, LogTextEdit {
|
||||||
background-color:rgb(25,25,25);
|
background-color:rgb(25,25,25);
|
||||||
}
|
}
|
||||||
QSpinBox, QDoubleSpinBox, QCheckBox {
|
QSpinBox, QDoubleSpinBox, QCheckBox, QRadioButton {
|
||||||
background-color:rgb(25,25,25);
|
background-color:rgb(25,25,25);
|
||||||
}
|
}
|
||||||
QCheckBox:checked, QCheckBox:unchecked {
|
QCheckBox:checked, QCheckBox:unchecked, QRadioButton:checked, QRadioButton:unchecked {
|
||||||
background-color:rgb(53,53,53);
|
background-color:transparent;
|
||||||
|
}
|
||||||
|
/* Groupboxes for the settings window, can be restricted later with ViewOptionsDialog QGroupBox */
|
||||||
|
QGroupBox {
|
||||||
|
background-color:rgba(80,80,80,50%);
|
||||||
|
margin-top:27px;
|
||||||
|
border:1px solid rgba(25,25,25,127);
|
||||||
|
border-top-left-radius:0px;
|
||||||
|
border-top-right-radius:4px;
|
||||||
|
}
|
||||||
|
QGroupBox::title {
|
||||||
|
min-height:28px;
|
||||||
|
subcontrol-origin:margin;
|
||||||
|
subcontrol-position:left top;
|
||||||
|
padding:4px 6px 5px 6px;
|
||||||
|
margin-left:0px;
|
||||||
|
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgb(65,65,65),stop: 0.4 rgb(70,70,70),stop:1 rgb(90,90,90));
|
||||||
|
border:1px solid rgba(25,25,25,127);
|
||||||
|
border-bottom:1px solid rgb(65,65,65);
|
||||||
|
border-top-left-radius:4px;
|
||||||
|
border-top-right-radius:4px;
|
||||||
|
}
|
||||||
|
QGroupBox::indicator:checked {
|
||||||
|
background-color:%1;
|
||||||
|
border:4px solid rgb(45,45,45);
|
||||||
|
}
|
||||||
|
QGroupBox::indicator:unchecked {
|
||||||
|
background-color:rgba(25,25,25,50%);
|
||||||
|
}
|
||||||
|
QGroupBox::indicator {
|
||||||
|
width:16px;
|
||||||
|
height:16px;
|
||||||
}
|
}
|
||||||
QWidget#shaderParamsWidget {
|
QWidget#shaderParamsWidget {
|
||||||
background-color:rgb(25,25,25);
|
background-color:rgb(25,25,25);
|
||||||
@ -204,23 +241,6 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
|
|||||||
QDockWidget::float-button {
|
QDockWidget::float-button {
|
||||||
right:25px;
|
right:25px;
|
||||||
}
|
}
|
||||||
QGroupBox {
|
|
||||||
background-color:rgba(66,66,66,50%);
|
|
||||||
margin-top:27px;
|
|
||||||
border:1px solid rgba(25,25,25,127);
|
|
||||||
border-top-left-radius:4px;
|
|
||||||
border-top-right-radius:4px;
|
|
||||||
}
|
|
||||||
QGroupBox::title {
|
|
||||||
subcontrol-origin:margin;
|
|
||||||
subcontrol-position:left top;
|
|
||||||
padding:4px 6px;
|
|
||||||
margin-left:3px;
|
|
||||||
background-color:qlineargradient(x1:0,y1:1,x2:0,y2:0,stop:0 rgba(25,25,25,127),stop:1 rgba(53,53,53,75));
|
|
||||||
border:1px solid rgba(25,25,25,75);
|
|
||||||
border-top-left-radius:4px;
|
|
||||||
border-top-right-radius:4px;
|
|
||||||
}
|
|
||||||
QTabWidget::pane {
|
QTabWidget::pane {
|
||||||
background-color:rgba(66,66,66,50%);
|
background-color:rgba(66,66,66,50%);
|
||||||
}
|
}
|
||||||
@ -306,6 +326,11 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
|
|||||||
QPushButton[flat="true"] {
|
QPushButton[flat="true"] {
|
||||||
background-color:transparent;
|
background-color:transparent;
|
||||||
}
|
}
|
||||||
|
QPushButton[flat="true"]::menu-indicator {
|
||||||
|
position:relative;
|
||||||
|
bottom:4px;
|
||||||
|
right:4px;
|
||||||
|
}
|
||||||
QRadioButton::indicator {
|
QRadioButton::indicator {
|
||||||
width:18px;
|
width:18px;
|
||||||
height:18px;
|
height:18px;
|
||||||
@ -398,6 +423,9 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
|
|||||||
subcontrol-position:top;
|
subcontrol-position:top;
|
||||||
subcontrol-origin:margin;
|
subcontrol-origin:margin;
|
||||||
}
|
}
|
||||||
|
QSlider {
|
||||||
|
background:transparent;
|
||||||
|
}
|
||||||
QSlider::sub-page {
|
QSlider::sub-page {
|
||||||
background:%1;
|
background:%1;
|
||||||
}
|
}
|
||||||
@ -444,6 +472,9 @@ static const QString qt_theme_dark_stylesheet = QStringLiteral(R"(
|
|||||||
QStatusBar QLabel {
|
QStatusBar QLabel {
|
||||||
background-color:transparent;
|
background-color:transparent;
|
||||||
}
|
}
|
||||||
|
QLabel {
|
||||||
|
background-color:transparent;
|
||||||
|
}
|
||||||
QSizeGrip {
|
QSizeGrip {
|
||||||
background-color:solid;
|
background-color:solid;
|
||||||
}
|
}
|
||||||
|
@ -366,6 +366,11 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
QToolButton *searchResetButton = NULL;
|
QToolButton *searchResetButton = NULL;
|
||||||
QHBoxLayout *zoomLayout = new QHBoxLayout();
|
QHBoxLayout *zoomLayout = new QHBoxLayout();
|
||||||
QLabel *zoomLabel = new QLabel(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_ZOOM), m_zoomWidget);
|
QLabel *zoomLabel = new QLabel(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_ZOOM), m_zoomWidget);
|
||||||
|
QPushButton *thumbnailTypePushButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE), m_zoomWidget);
|
||||||
|
QMenu *thumbnailTypeMenu = new QMenu(thumbnailTypePushButton);
|
||||||
|
QAction *thumbnailTypeBoxartAction = NULL;
|
||||||
|
QAction *thumbnailTypeScreenshotAction = NULL;
|
||||||
|
QAction *thumbnailTypeTitleAction = NULL;
|
||||||
QPushButton *viewTypePushButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_VIEW), m_zoomWidget);
|
QPushButton *viewTypePushButton = new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_VIEW), m_zoomWidget);
|
||||||
QMenu *viewTypeMenu = new QMenu(viewTypePushButton);
|
QMenu *viewTypeMenu = new QMenu(viewTypePushButton);
|
||||||
QAction *viewTypeIconsAction = NULL;
|
QAction *viewTypeIconsAction = NULL;
|
||||||
@ -386,6 +391,15 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
m_gridProgressWidget = new QWidget();
|
m_gridProgressWidget = new QWidget();
|
||||||
gridProgressLabel = new QLabel(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_PROGRESS), m_gridProgressWidget);
|
gridProgressLabel = new QLabel(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_PROGRESS), m_gridProgressWidget);
|
||||||
|
|
||||||
|
thumbnailTypePushButton->setObjectName("thumbnailTypePushButton");
|
||||||
|
thumbnailTypePushButton->setFlat(true);
|
||||||
|
|
||||||
|
thumbnailTypeBoxartAction = thumbnailTypeMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_BOXART));
|
||||||
|
thumbnailTypeScreenshotAction = thumbnailTypeMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_SCREENSHOT));
|
||||||
|
thumbnailTypeTitleAction = thumbnailTypeMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_TITLE_SCREEN));
|
||||||
|
|
||||||
|
thumbnailTypePushButton->setMenu(thumbnailTypeMenu);
|
||||||
|
|
||||||
viewTypePushButton->setObjectName("viewTypePushButton");
|
viewTypePushButton->setObjectName("viewTypePushButton");
|
||||||
viewTypePushButton->setFlat(true);
|
viewTypePushButton->setFlat(true);
|
||||||
|
|
||||||
@ -444,6 +458,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
gridFooterLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Preferred));
|
gridFooterLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Preferred));
|
||||||
gridFooterLayout->addWidget(m_gridProgressWidget);
|
gridFooterLayout->addWidget(m_gridProgressWidget);
|
||||||
gridFooterLayout->addWidget(m_zoomWidget);
|
gridFooterLayout->addWidget(m_zoomWidget);
|
||||||
|
gridFooterLayout->addWidget(thumbnailTypePushButton);
|
||||||
gridFooterLayout->addWidget(viewTypePushButton);
|
gridFooterLayout->addWidget(viewTypePushButton);
|
||||||
|
|
||||||
static_cast<QVBoxLayout*>(m_playlistViewsAndFooter->layout())->addLayout(gridFooterLayout);
|
static_cast<QVBoxLayout*>(m_playlistViewsAndFooter->layout())->addLayout(gridFooterLayout);
|
||||||
@ -613,6 +628,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
connect(m_listWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(onPlaylistWidgetContextMenuRequested(const QPoint&)));
|
connect(m_listWidget, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(onPlaylistWidgetContextMenuRequested(const QPoint&)));
|
||||||
connect(m_launchWithComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onLaunchWithComboBoxIndexChanged(int)));
|
connect(m_launchWithComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onLaunchWithComboBoxIndexChanged(int)));
|
||||||
connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(onZoomValueChanged(int)));
|
connect(m_zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(onZoomValueChanged(int)));
|
||||||
|
connect(thumbnailTypeBoxartAction, SIGNAL(triggered()), this, SLOT(onBoxartThumbnailClicked()));
|
||||||
|
connect(thumbnailTypeScreenshotAction, SIGNAL(triggered()), this, SLOT(onScreenshotThumbnailClicked()));
|
||||||
|
connect(thumbnailTypeTitleAction, SIGNAL(triggered()), this, SLOT(onTitleThumbnailClicked()));
|
||||||
connect(viewTypeIconsAction, SIGNAL(triggered()), this, SLOT(onIconViewClicked()));
|
connect(viewTypeIconsAction, SIGNAL(triggered()), this, SLOT(onIconViewClicked()));
|
||||||
connect(viewTypeListAction, SIGNAL(triggered()), this, SLOT(onListViewClicked()));
|
connect(viewTypeListAction, SIGNAL(triggered()), this, SLOT(onListViewClicked()));
|
||||||
connect(m_dirModel, SIGNAL(directoryLoaded(const QString&)), this, SLOT(onFileSystemDirLoaded(const QString&)));
|
connect(m_dirModel, SIGNAL(directoryLoaded(const QString&)), this, SLOT(onFileSystemDirLoaded(const QString&)));
|
||||||
@ -830,6 +848,21 @@ void MainWindow::onListViewClicked()
|
|||||||
setCurrentViewType(VIEW_TYPE_LIST);
|
setCurrentViewType(VIEW_TYPE_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::onBoxartThumbnailClicked()
|
||||||
|
{
|
||||||
|
setCurrentThumbnailType(THUMBNAIL_TYPE_BOXART);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::onScreenshotThumbnailClicked()
|
||||||
|
{
|
||||||
|
setCurrentThumbnailType(THUMBNAIL_TYPE_SCREENSHOT);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::onTitleThumbnailClicked()
|
||||||
|
{
|
||||||
|
setCurrentThumbnailType(THUMBNAIL_TYPE_TITLE_SCREEN);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::setIconViewZoom(int zoomValue)
|
void MainWindow::setIconViewZoom(int zoomValue)
|
||||||
{
|
{
|
||||||
m_zoomSlider->setValue(zoomValue);
|
m_zoomSlider->setValue(zoomValue);
|
||||||
@ -1249,6 +1282,9 @@ void MainWindow::setTheme(Theme theme)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
m_viewOptionsDialog->repaintIcons();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::setDefaultCustomProperties()
|
void MainWindow::setDefaultCustomProperties()
|
||||||
@ -2983,6 +3019,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
|
|||||||
m_settings->setValue("view_type", getCurrentViewTypeString());
|
m_settings->setValue("view_type", getCurrentViewTypeString());
|
||||||
m_settings->setValue("file_browser_table_headers", m_fileTableView->horizontalHeader()->saveState());
|
m_settings->setValue("file_browser_table_headers", m_fileTableView->horizontalHeader()->saveState());
|
||||||
m_settings->setValue("icon_view_zoom", m_lastZoomSliderValue);
|
m_settings->setValue("icon_view_zoom", m_lastZoomSliderValue);
|
||||||
|
m_settings->setValue("icon_view_thumbnail_type", getCurrentThumbnailTypeString());
|
||||||
|
|
||||||
QMainWindow::closeEvent(event);
|
QMainWindow::closeEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,15 @@
|
|||||||
#include <QColorDialog>
|
#include <QColorDialog>
|
||||||
|
|
||||||
#include "viewoptionsdialog.h"
|
#include "viewoptionsdialog.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
#include <QBitmap>
|
||||||
|
#include <QStackedLayout>
|
||||||
|
#include <QScrollBar>
|
||||||
|
|
||||||
|
#include "options/options.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "../ui_qt.h"
|
#include "../ui_qt.h"
|
||||||
|
|
||||||
#ifndef CXX_BUILD
|
#ifndef CXX_BUILD
|
||||||
@ -24,8 +33,187 @@ extern "C" {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
|
||||||
|
QPixmap getColorizedPixmap(const QPixmap& oldPixmap, const QColor& color)
|
||||||
|
{
|
||||||
|
QPixmap pixmap = oldPixmap;
|
||||||
|
QBitmap mask = pixmap.createMaskFromColor(Qt::transparent, Qt::MaskInColor);
|
||||||
|
pixmap.fill(color);
|
||||||
|
pixmap.setMask(mask);
|
||||||
|
return pixmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
QColor getLabelColor(const QString& objectName)
|
||||||
|
{
|
||||||
|
QLabel dummyColor;
|
||||||
|
dummyColor.setObjectName(objectName);
|
||||||
|
dummyColor.ensurePolished();
|
||||||
|
return dummyColor.palette().color(QPalette::Foreground);
|
||||||
|
}
|
||||||
|
|
||||||
ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) :
|
ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) :
|
||||||
QDialog(mainwindow)
|
QDialog(mainwindow)
|
||||||
|
, m_optionsList(new QListWidget(this))
|
||||||
|
, m_optionsStack(new QStackedWidget(this))
|
||||||
|
{
|
||||||
|
QGridLayout *layout = new QGridLayout(this);
|
||||||
|
QLabel *m_headerLabel = new QLabel(this);
|
||||||
|
// Header label with large font and a bit of spacing (align with group boxes)
|
||||||
|
QFont headerLabelFont = m_headerLabel->font();
|
||||||
|
const int pointSize = headerLabelFont.pointSize();
|
||||||
|
QHBoxLayout *headerHLayout = new QHBoxLayout;
|
||||||
|
const int leftMargin = QApplication::style()->pixelMetric(QStyle::PM_LayoutLeftMargin);
|
||||||
|
int width;
|
||||||
|
|
||||||
|
headerLabelFont.setBold(true);
|
||||||
|
|
||||||
|
// Paranoia: Should a font be set in pixels...
|
||||||
|
if (pointSize > 0)
|
||||||
|
headerLabelFont.setPointSize(pointSize + 2);
|
||||||
|
|
||||||
|
m_headerLabel->setFont(headerLabelFont);
|
||||||
|
|
||||||
|
headerHLayout->addSpacerItem(new QSpacerItem(leftMargin, 0, QSizePolicy::Fixed, QSizePolicy::Ignored));
|
||||||
|
headerHLayout->addWidget(m_headerLabel);
|
||||||
|
|
||||||
|
addCategory(new DriversCategory(this));
|
||||||
|
addCategory(new VideoCategory(this));
|
||||||
|
addCategory(new AudioCategory(this));
|
||||||
|
addCategory(new InputCategory(this));
|
||||||
|
addCategory(new LatencyCategory(this));
|
||||||
|
addCategory(new CoreCategory(this));
|
||||||
|
addCategory(new ConfigurationCategory(this));
|
||||||
|
addCategory(new SavingCategory(this));
|
||||||
|
addCategory(new LoggingCategory(this));
|
||||||
|
addCategory(new FrameThrottleCategory(this));
|
||||||
|
addCategory(new RecordingCategory(this));
|
||||||
|
addCategory(new OnscreenDisplayCategory(this));
|
||||||
|
addCategory(new UserInterfaceCategory(mainwindow, this));
|
||||||
|
addCategory(new AchievementsCategory(this));
|
||||||
|
addCategory(new NetworkCategory(this));
|
||||||
|
addCategory(new PlaylistsCategory(this));
|
||||||
|
addCategory(new UserCategory(this));
|
||||||
|
addCategory(new DirectoryCategory(this));
|
||||||
|
|
||||||
|
width = m_optionsList->sizeHintForColumn(0) + m_optionsList->frameWidth() * 2 + 5;
|
||||||
|
width += m_optionsList->verticalScrollBar()->sizeHint().width();
|
||||||
|
|
||||||
|
m_optionsList->setMaximumWidth(width);
|
||||||
|
m_optionsList->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
|
||||||
|
|
||||||
|
setWindowTitle(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_TITLE));
|
||||||
|
|
||||||
|
layout->addWidget(m_optionsList, 0, 0, 2, 1);
|
||||||
|
layout->addLayout(headerHLayout, 0, 1);
|
||||||
|
layout->addWidget(m_optionsStack, 1, 1);
|
||||||
|
|
||||||
|
connect(m_optionsList, SIGNAL(currentRowChanged(int)), m_optionsStack, SLOT(setCurrentIndex(int)));
|
||||||
|
connect(m_optionsList, SIGNAL(currentTextChanged(const QString&)), m_headerLabel, SLOT(setText(const QString&)));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(rejected()), this, SLOT(onRejected()));
|
||||||
|
}
|
||||||
|
|
||||||
|
QIcon getIcon(OptionsCategory *category) {
|
||||||
|
QPixmap pixmap = QPixmap(QString(config_get_ptr()->paths.directory_assets) + "/xmb/monochrome/png/" + category->categoryIconName() + ".png");
|
||||||
|
return QIcon(getColorizedPixmap(pixmap, getLabelColor("iconColor")));
|
||||||
|
}
|
||||||
|
|
||||||
|
void ViewOptionsDialog::addCategory(OptionsCategory *category)
|
||||||
|
{
|
||||||
|
QTabWidget *tabWidget = new QTabWidget();
|
||||||
|
|
||||||
|
m_categoryList.append(category);
|
||||||
|
|
||||||
|
for (OptionsPage* page : category->pages())
|
||||||
|
{
|
||||||
|
QWidget *widget = page->widget();
|
||||||
|
widget->setAutoFillBackground(false);
|
||||||
|
tabWidget->addTab(widget, page->displayName());
|
||||||
|
}
|
||||||
|
|
||||||
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
|
||||||
|
tabWidget->setTabBarAutoHide(true);
|
||||||
|
#else
|
||||||
|
/* TODO remove the tabBar's space */
|
||||||
|
if (tabWidget->count() < 2)
|
||||||
|
tabWidget->tabBar()->hide();
|
||||||
|
#endif
|
||||||
|
m_optionsList->addItem(new QListWidgetItem(getIcon(category), category->displayName()));
|
||||||
|
m_optionsStack->addWidget(tabWidget);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ViewOptionsDialog::repaintIcons()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < m_categoryList.size(); i++)
|
||||||
|
{
|
||||||
|
m_optionsList->item(i)->setIcon(getIcon(m_categoryList.at(i)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) :
|
||||||
|
QDialog(mainwindow)
|
||||||
|
, m_viewOptionsWidget(new ViewOptionsWidget(mainwindow))
|
||||||
|
{
|
||||||
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
|
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||||
|
|
||||||
|
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||||
|
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(accepted()), m_viewOptionsWidget, SLOT(onAccepted()));
|
||||||
|
connect(this, SIGNAL(rejected()), m_viewOptionsWidget, SLOT(onRejected()));
|
||||||
|
|
||||||
|
setWindowTitle(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_TITLE));
|
||||||
|
|
||||||
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
|
layout->addWidget(m_viewOptionsWidget);
|
||||||
|
layout->addWidget(buttonBox);
|
||||||
|
|
||||||
|
setLayout(layout);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void ViewOptionsDialog::showDialog()
|
||||||
|
{
|
||||||
|
#ifndef HAVE_MENU
|
||||||
|
m_viewOptionsWidget->loadViewOptions();
|
||||||
|
#else
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < m_categoryList.size(); i++)
|
||||||
|
{
|
||||||
|
m_categoryList.at(i)->load();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
show();
|
||||||
|
activateWindow();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ViewOptionsDialog::hideDialog()
|
||||||
|
{
|
||||||
|
reject();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ViewOptionsDialog::onRejected()
|
||||||
|
{
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < m_categoryList.size(); i++)
|
||||||
|
{
|
||||||
|
m_categoryList.at(i)->apply();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewOptionsWidget::ViewOptionsWidget(MainWindow *mainwindow, QWidget *parent) :
|
||||||
|
QWidget(parent)
|
||||||
,m_mainwindow(mainwindow)
|
,m_mainwindow(mainwindow)
|
||||||
,m_settings(mainwindow->settings())
|
,m_settings(mainwindow->settings())
|
||||||
,m_saveGeometryCheckBox(new QCheckBox(this))
|
,m_saveGeometryCheckBox(new QCheckBox(this))
|
||||||
@ -33,7 +221,6 @@ ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) :
|
|||||||
,m_saveLastTabCheckBox(new QCheckBox(this))
|
,m_saveLastTabCheckBox(new QCheckBox(this))
|
||||||
,m_showHiddenFilesCheckBox(new QCheckBox(this))
|
,m_showHiddenFilesCheckBox(new QCheckBox(this))
|
||||||
,m_themeComboBox(new QComboBox(this))
|
,m_themeComboBox(new QComboBox(this))
|
||||||
,m_thumbnailComboBox(new QComboBox(this))
|
|
||||||
,m_thumbnailCacheSpinBox(new QSpinBox(this))
|
,m_thumbnailCacheSpinBox(new QSpinBox(this))
|
||||||
,m_startupPlaylistComboBox(new QComboBox(this))
|
,m_startupPlaylistComboBox(new QComboBox(this))
|
||||||
,m_highlightColorPushButton(new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_CHOOSE), this))
|
,m_highlightColorPushButton(new QPushButton(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_CHOOSE), this))
|
||||||
@ -44,19 +231,13 @@ ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) :
|
|||||||
/* ,m_allPlaylistsListMaxCountSpinBox(new QSpinBox(this)) */
|
/* ,m_allPlaylistsListMaxCountSpinBox(new QSpinBox(this)) */
|
||||||
/* ,m_allPlaylistsGridMaxCountSpinBox(new QSpinBox(this)) */
|
/* ,m_allPlaylistsGridMaxCountSpinBox(new QSpinBox(this)) */
|
||||||
{
|
{
|
||||||
QFormLayout *form = new QFormLayout();
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
QFormLayout *form = new QFormLayout;
|
||||||
|
|
||||||
setWindowTitle(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_TITLE));
|
|
||||||
|
|
||||||
m_themeComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_SYSTEM_DEFAULT), MainWindow::THEME_SYSTEM_DEFAULT);
|
m_themeComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_SYSTEM_DEFAULT), MainWindow::THEME_SYSTEM_DEFAULT);
|
||||||
m_themeComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_DARK), MainWindow::THEME_DARK);
|
m_themeComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_DARK), MainWindow::THEME_DARK);
|
||||||
m_themeComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_CUSTOM), MainWindow::THEME_CUSTOM);
|
m_themeComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_CUSTOM), MainWindow::THEME_CUSTOM);
|
||||||
|
|
||||||
m_thumbnailComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_BOXART), THUMBNAIL_TYPE_BOXART);
|
|
||||||
m_thumbnailComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_SCREENSHOT), THUMBNAIL_TYPE_SCREENSHOT);
|
|
||||||
m_thumbnailComboBox->addItem(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_TITLE_SCREEN), THUMBNAIL_TYPE_TITLE_SCREEN);
|
|
||||||
|
|
||||||
m_thumbnailCacheSpinBox->setSuffix(" MB");
|
m_thumbnailCacheSpinBox->setSuffix(" MB");
|
||||||
m_thumbnailCacheSpinBox->setRange(0, 99999);
|
m_thumbnailCacheSpinBox->setRange(0, 99999);
|
||||||
|
|
||||||
@ -66,14 +247,6 @@ ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) :
|
|||||||
form->setFormAlignment(Qt::AlignCenter);
|
form->setFormAlignment(Qt::AlignCenter);
|
||||||
form->setLabelAlignment(Qt::AlignCenter);
|
form->setLabelAlignment(Qt::AlignCenter);
|
||||||
|
|
||||||
setLayout(new QVBoxLayout(this));
|
|
||||||
|
|
||||||
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
|
||||||
connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
|
||||||
|
|
||||||
connect(this, SIGNAL(accepted()), this, SLOT(onAccepted()));
|
|
||||||
connect(this, SIGNAL(rejected()), this, SLOT(onRejected()));
|
|
||||||
|
|
||||||
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_GEOMETRY), m_saveGeometryCheckBox);
|
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_GEOMETRY), m_saveGeometryCheckBox);
|
||||||
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_DOCK_POSITIONS), m_saveDockPositionsCheckBox);
|
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_DOCK_POSITIONS), m_saveDockPositionsCheckBox);
|
||||||
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_LAST_TAB), m_saveLastTabCheckBox);
|
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_LAST_TAB), m_saveLastTabCheckBox);
|
||||||
@ -82,29 +255,23 @@ ViewOptionsDialog::ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent) :
|
|||||||
/* form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_LIST_MAX_COUNT), m_allPlaylistsListMaxCountSpinBox); */
|
/* form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_LIST_MAX_COUNT), m_allPlaylistsListMaxCountSpinBox); */
|
||||||
/* form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_GRID_MAX_COUNT), m_allPlaylistsGridMaxCountSpinBox); */
|
/* form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_GRID_MAX_COUNT), m_allPlaylistsGridMaxCountSpinBox); */
|
||||||
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_STARTUP_PLAYLIST), m_startupPlaylistComboBox);
|
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_STARTUP_PLAYLIST), m_startupPlaylistComboBox);
|
||||||
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE), m_thumbnailComboBox);
|
|
||||||
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT), m_thumbnailCacheSpinBox);
|
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT), m_thumbnailCacheSpinBox);
|
||||||
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME), m_themeComboBox);
|
form->addRow(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME), m_themeComboBox);
|
||||||
form->addRow(m_highlightColorLabel, m_highlightColorPushButton);
|
form->addRow(m_highlightColorLabel, m_highlightColorPushButton);
|
||||||
|
|
||||||
qobject_cast<QVBoxLayout*>(layout())->addLayout(form);
|
layout->addLayout(form);
|
||||||
layout()->addItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding));
|
|
||||||
layout()->addWidget(buttonBox);
|
layout->addItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding));
|
||||||
|
|
||||||
|
setLayout(layout);
|
||||||
|
|
||||||
loadViewOptions();
|
loadViewOptions();
|
||||||
|
|
||||||
connect(m_themeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onThemeComboBoxIndexChanged(int)));
|
connect(m_themeComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onThemeComboBoxIndexChanged(int)));
|
||||||
connect(m_thumbnailComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(onThumbnailComboBoxIndexChanged(int)));
|
|
||||||
connect(m_highlightColorPushButton, SIGNAL(clicked()), this, SLOT(onHighlightColorChoose()));
|
connect(m_highlightColorPushButton, SIGNAL(clicked()), this, SLOT(onHighlightColorChoose()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewOptionsDialog::onThumbnailComboBoxIndexChanged(int index)
|
void ViewOptionsWidget::onThemeComboBoxIndexChanged(int)
|
||||||
{
|
|
||||||
ThumbnailType type = static_cast<ThumbnailType>(m_thumbnailComboBox->currentData().value<int>());
|
|
||||||
m_mainwindow->setCurrentThumbnailType(type);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ViewOptionsDialog::onThemeComboBoxIndexChanged(int)
|
|
||||||
{
|
{
|
||||||
MainWindow::Theme theme = static_cast<MainWindow::Theme>(m_themeComboBox->currentData(Qt::UserRole).toInt());
|
MainWindow::Theme theme = static_cast<MainWindow::Theme>(m_themeComboBox->currentData(Qt::UserRole).toInt());
|
||||||
|
|
||||||
@ -137,7 +304,7 @@ void ViewOptionsDialog::onThemeComboBoxIndexChanged(int)
|
|||||||
showOrHideHighlightColor();
|
showOrHideHighlightColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewOptionsDialog::onHighlightColorChoose()
|
void ViewOptionsWidget::onHighlightColorChoose()
|
||||||
{
|
{
|
||||||
QPixmap highlightPixmap(m_highlightColorPushButton->iconSize());
|
QPixmap highlightPixmap(m_highlightColorPushButton->iconSize());
|
||||||
QColor currentHighlightColor = m_settings->value("highlight_color", QApplication::palette().highlight().color()).value<QColor>();
|
QColor currentHighlightColor = m_settings->value("highlight_color", QApplication::palette().highlight().color()).value<QColor>();
|
||||||
@ -155,14 +322,13 @@ void ViewOptionsDialog::onHighlightColorChoose()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewOptionsDialog::loadViewOptions()
|
void ViewOptionsWidget::loadViewOptions()
|
||||||
{
|
{
|
||||||
QColor highlightColor = m_settings->value("highlight_color", QApplication::palette().highlight().color()).value<QColor>();
|
QColor highlightColor = m_settings->value("highlight_color", QApplication::palette().highlight().color()).value<QColor>();
|
||||||
QPixmap highlightPixmap(m_highlightColorPushButton->iconSize());
|
QPixmap highlightPixmap(m_highlightColorPushButton->iconSize());
|
||||||
QVector<QPair<QString, QString> > playlists = m_mainwindow->getPlaylists();
|
QVector<QPair<QString, QString> > playlists = m_mainwindow->getPlaylists();
|
||||||
QString initialPlaylist = m_settings->value("initial_playlist", m_mainwindow->getSpecialPlaylistPath(SPECIAL_PLAYLIST_HISTORY)).toString();
|
QString initialPlaylist = m_settings->value("initial_playlist", m_mainwindow->getSpecialPlaylistPath(SPECIAL_PLAYLIST_HISTORY)).toString();
|
||||||
int themeIndex = 0;
|
int themeIndex = 0;
|
||||||
int thumbnailIndex = 0;
|
|
||||||
int playlistIndex = 0;
|
int playlistIndex = 0;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -180,11 +346,6 @@ void ViewOptionsDialog::loadViewOptions()
|
|||||||
if (m_themeComboBox->count() > themeIndex)
|
if (m_themeComboBox->count() > themeIndex)
|
||||||
m_themeComboBox->setCurrentIndex(themeIndex);
|
m_themeComboBox->setCurrentIndex(themeIndex);
|
||||||
|
|
||||||
thumbnailIndex = m_thumbnailComboBox->findData(m_mainwindow->getThumbnailTypeFromString(m_settings->value("icon_view_thumbnail_type", "boxart").toString()));
|
|
||||||
|
|
||||||
if (m_thumbnailComboBox->count() > thumbnailIndex)
|
|
||||||
m_thumbnailComboBox->setCurrentIndex(thumbnailIndex);
|
|
||||||
|
|
||||||
if (highlightColor.isValid())
|
if (highlightColor.isValid())
|
||||||
{
|
{
|
||||||
m_highlightColor = highlightColor;
|
m_highlightColor = highlightColor;
|
||||||
@ -209,7 +370,7 @@ void ViewOptionsDialog::loadViewOptions()
|
|||||||
m_startupPlaylistComboBox->setCurrentIndex(playlistIndex);
|
m_startupPlaylistComboBox->setCurrentIndex(playlistIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewOptionsDialog::showOrHideHighlightColor()
|
void ViewOptionsWidget::showOrHideHighlightColor()
|
||||||
{
|
{
|
||||||
if (m_mainwindow->theme() == MainWindow::THEME_DARK)
|
if (m_mainwindow->theme() == MainWindow::THEME_DARK)
|
||||||
{
|
{
|
||||||
@ -223,7 +384,7 @@ void ViewOptionsDialog::showOrHideHighlightColor()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewOptionsDialog::saveViewOptions()
|
void ViewOptionsWidget::saveViewOptions()
|
||||||
{
|
{
|
||||||
m_settings->setValue("save_geometry", m_saveGeometryCheckBox->isChecked());
|
m_settings->setValue("save_geometry", m_saveGeometryCheckBox->isChecked());
|
||||||
m_settings->setValue("save_dock_positions", m_saveDockPositionsCheckBox->isChecked());
|
m_settings->setValue("save_dock_positions", m_saveDockPositionsCheckBox->isChecked());
|
||||||
@ -235,7 +396,6 @@ void ViewOptionsDialog::saveViewOptions()
|
|||||||
/* m_settings->setValue("all_playlists_list_max_count", m_allPlaylistsListMaxCountSpinBox->value()); */
|
/* m_settings->setValue("all_playlists_list_max_count", m_allPlaylistsListMaxCountSpinBox->value()); */
|
||||||
/* m_settings->setValue("all_playlists_grid_max_count", m_allPlaylistsGridMaxCountSpinBox->value()); */
|
/* m_settings->setValue("all_playlists_grid_max_count", m_allPlaylistsGridMaxCountSpinBox->value()); */
|
||||||
m_settings->setValue("initial_playlist", m_startupPlaylistComboBox->currentData(Qt::UserRole).toString());
|
m_settings->setValue("initial_playlist", m_startupPlaylistComboBox->currentData(Qt::UserRole).toString());
|
||||||
m_settings->setValue("icon_view_thumbnail_type", m_mainwindow->getCurrentThumbnailTypeString());
|
|
||||||
m_settings->setValue("thumbnail_cache_limit", m_thumbnailCacheSpinBox->value());
|
m_settings->setValue("thumbnail_cache_limit", m_thumbnailCacheSpinBox->value());
|
||||||
|
|
||||||
if (!m_mainwindow->customThemeString().isEmpty())
|
if (!m_mainwindow->customThemeString().isEmpty())
|
||||||
@ -246,29 +406,12 @@ void ViewOptionsDialog::saveViewOptions()
|
|||||||
m_mainwindow->setThumbnailCacheLimit(m_thumbnailCacheSpinBox->value());
|
m_mainwindow->setThumbnailCacheLimit(m_thumbnailCacheSpinBox->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewOptionsDialog::onAccepted()
|
void ViewOptionsWidget::onAccepted()
|
||||||
{
|
{
|
||||||
MainWindow::Theme newTheme = static_cast<MainWindow::Theme>(m_themeComboBox->currentData(Qt::UserRole).toInt());
|
|
||||||
|
|
||||||
m_mainwindow->setTheme(newTheme);
|
|
||||||
|
|
||||||
saveViewOptions();
|
saveViewOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewOptionsDialog::onRejected()
|
void ViewOptionsWidget::onRejected()
|
||||||
{
|
{
|
||||||
loadViewOptions();
|
loadViewOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewOptionsDialog::showDialog()
|
|
||||||
{
|
|
||||||
loadViewOptions();
|
|
||||||
setWindowFlags(windowFlags() | Qt::Tool);
|
|
||||||
show();
|
|
||||||
activateWindow();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ViewOptionsDialog::hideDialog()
|
|
||||||
{
|
|
||||||
reject();
|
|
||||||
}
|
|
||||||
|
@ -12,23 +12,27 @@ class QColor;
|
|||||||
class QLabel;
|
class QLabel;
|
||||||
class QSpinBox;
|
class QSpinBox;
|
||||||
|
|
||||||
class ViewOptionsDialog : public QDialog
|
#ifdef HAVE_MENU
|
||||||
|
class QWidget;
|
||||||
|
class OptionsCategory;
|
||||||
|
class QListWidget;
|
||||||
|
class QStackedWidget;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
class ViewOptionsWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ViewOptionsDialog(MainWindow *mainwindow, QWidget *parent = 0);
|
ViewOptionsWidget(MainWindow *mainwindow, QWidget *parent = 0);
|
||||||
public slots:
|
public slots:
|
||||||
void showDialog();
|
|
||||||
void hideDialog();
|
|
||||||
void onAccepted();
|
void onAccepted();
|
||||||
void onRejected();
|
void onRejected();
|
||||||
private slots:
|
|
||||||
void onThemeComboBoxIndexChanged(int index);
|
|
||||||
void onThumbnailComboBoxIndexChanged(int index);
|
|
||||||
void onHighlightColorChoose();
|
|
||||||
private:
|
|
||||||
void loadViewOptions();
|
void loadViewOptions();
|
||||||
void saveViewOptions();
|
void saveViewOptions();
|
||||||
|
private slots:
|
||||||
|
void onThemeComboBoxIndexChanged(int index);
|
||||||
|
void onHighlightColorChoose();
|
||||||
|
private:
|
||||||
void showOrHideHighlightColor();
|
void showOrHideHighlightColor();
|
||||||
|
|
||||||
MainWindow *m_mainwindow;
|
MainWindow *m_mainwindow;
|
||||||
@ -38,7 +42,6 @@ private:
|
|||||||
QCheckBox *m_saveLastTabCheckBox;
|
QCheckBox *m_saveLastTabCheckBox;
|
||||||
QCheckBox *m_showHiddenFilesCheckBox;
|
QCheckBox *m_showHiddenFilesCheckBox;
|
||||||
QComboBox *m_themeComboBox;
|
QComboBox *m_themeComboBox;
|
||||||
QComboBox *m_thumbnailComboBox;
|
|
||||||
QSpinBox *m_thumbnailCacheSpinBox;
|
QSpinBox *m_thumbnailCacheSpinBox;
|
||||||
QComboBox *m_startupPlaylistComboBox;
|
QComboBox *m_startupPlaylistComboBox;
|
||||||
QPushButton *m_highlightColorPushButton;
|
QPushButton *m_highlightColorPushButton;
|
||||||
@ -50,4 +53,31 @@ private:
|
|||||||
QSpinBox *m_allPlaylistsGridMaxCountSpinBox;
|
QSpinBox *m_allPlaylistsGridMaxCountSpinBox;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ViewOptionsDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
ViewOptionsDialog(MainWindow *window, QWidget *parent = 0);
|
||||||
|
// Make sure the settings dialog starts up as small as possible.
|
||||||
|
QSize sizeHint() const final { return minimumSize(); }
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
void repaintIcons();
|
||||||
|
#endif
|
||||||
|
public slots:
|
||||||
|
void showDialog();
|
||||||
|
void hideDialog();
|
||||||
|
private slots:
|
||||||
|
void onRejected();
|
||||||
|
private:
|
||||||
|
#ifdef HAVE_MENU
|
||||||
|
void addCategory(QWidget *widget, QString name, QString icon);
|
||||||
|
void addCategory(OptionsCategory *category);
|
||||||
|
QVector<OptionsCategory*> m_categoryList;
|
||||||
|
QListWidget *m_optionsList;
|
||||||
|
QStackedWidget *m_optionsStack;
|
||||||
|
#else
|
||||||
|
ViewOptionsWidget *m_viewOptionsWidget;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -447,6 +447,9 @@ public slots:
|
|||||||
void showWelcomeScreen();
|
void showWelcomeScreen();
|
||||||
void onIconViewClicked();
|
void onIconViewClicked();
|
||||||
void onListViewClicked();
|
void onListViewClicked();
|
||||||
|
void onBoxartThumbnailClicked();
|
||||||
|
void onScreenshotThumbnailClicked();
|
||||||
|
void onTitleThumbnailClicked();
|
||||||
void onTabWidgetIndexChanged(int index);
|
void onTabWidgetIndexChanged(int index);
|
||||||
void deleteCurrentPlaylistItem();
|
void deleteCurrentPlaylistItem();
|
||||||
void onFileDropWidgetContextMenuRequested(const QPoint &pos);
|
void onFileDropWidgetContextMenuRequested(const QPoint &pos);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user