compiling and various updates
This commit is contained in:
+2
-1
@@ -15,4 +15,5 @@ installer/*.exe
|
|||||||
build_scripts/win/__pycache__
|
build_scripts/win/__pycache__
|
||||||
build_scripts/win/current_build.bat
|
build_scripts/win/current_build.bat
|
||||||
AdvancedSettings_resource.rc
|
AdvancedSettings_resource.rc
|
||||||
.qtc_clangd/
|
.qtc_clangd/
|
||||||
|
out/
|
||||||
|
|||||||
+321
-226
@@ -4,20 +4,35 @@ project(AdvancedSettings VERSION 5.7.4 LANGUAGES CXX)
|
|||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_CXX_STANDARD 20)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
#set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
|
||||||
|
|
||||||
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
|
|
||||||
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui Multimedia Qml Quick WebSockets Widgets QuickControls2 QuickDialogs2 Svg)
|
|
||||||
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS DBus)
|
|
||||||
|
|
||||||
qt_standard_project_setup()
|
|
||||||
|
|
||||||
if(QT_KNOWN_POLICY_QTP0001)
|
#find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
|
||||||
qt_policy(SET QTP0001 NEW)
|
#find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui Multimedia Qml Quick WebSockets Widgets QuickControls2 QuickDialogs2 Svg)
|
||||||
endif()
|
#find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS DBus)
|
||||||
|
find_package(Qt6 REQUIRED COMPONENTS Gui Multimedia Qml Quick WebSockets Widgets QuickControls2 QuickDialogs2 Svg Qml Core5Compat)
|
||||||
|
find_package(Vulkan REQUIRED)
|
||||||
|
|
||||||
|
qt_standard_project_setup(REQUIRES 6.8)
|
||||||
|
|
||||||
|
#qt_standard_project_setup should cover these
|
||||||
|
#include(GNUInstallDirs)
|
||||||
|
#set(CMAKE_AUTOMOC ON)
|
||||||
|
#set(CMAKE_AUTOUIC ON)
|
||||||
|
|
||||||
|
qt6_policy(SET QTP0001 NEW)
|
||||||
|
qt6_policy(SET QTP0004 NEW)
|
||||||
|
|
||||||
|
|
||||||
|
list(APPEND QML_IMPORT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/src/res/qml")
|
||||||
|
message(STATUS "QML_IMPORT_PATH ${QML_IMPORT_PATH}")
|
||||||
|
|
||||||
|
|
||||||
# ability to just put .qrc files into the source list
|
# ability to just put .qrc files into the source list
|
||||||
set(CMAKE_AUTORCC ON)
|
#set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
|
||||||
set(SRCS
|
set(SRCS
|
||||||
src/alarm_clock/vr_alarm.cpp
|
src/alarm_clock/vr_alarm.cpp
|
||||||
@@ -95,7 +110,7 @@ set(HEADERS
|
|||||||
src/quaternion/quaternion.h
|
src/quaternion/quaternion.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(QML_FILES
|
set(QML_FILERC
|
||||||
src/res/qml/utilities_page/keyboard_utils/KeyboardGroupBox.qml
|
src/res/qml/utilities_page/keyboard_utils/KeyboardGroupBox.qml
|
||||||
src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml
|
src/res/qml/utilities_page/media_keys/MediaControllerKeys.qml
|
||||||
src/res/qml/utilities_page/media_keys/MediaButton.qml
|
src/res/qml/utilities_page/media_keys/MediaButton.qml
|
||||||
@@ -171,22 +186,80 @@ set(QML_FILES
|
|||||||
src/res/qml/StatisticsPage.qml
|
src/res/qml/StatisticsPage.qml
|
||||||
)
|
)
|
||||||
|
|
||||||
set(RESOURCES src/res/resources.qrc)
|
set(ResourcesRC
|
||||||
|
src/res/img/alarm/alarm_activated.png
|
||||||
|
src/res/img/audio/media_keys/outline_play_pause_white_24dp.svg
|
||||||
|
src/res/img/audio/media_keys/outline_skip_next_white_24dp.svg
|
||||||
|
src/res/img/audio/media_keys/outline_skip_previous_white_24dp.svg
|
||||||
|
src/res/img/audio/media_keys/outline_stop_white_24dp.svg
|
||||||
|
src/res/img/audio/microphone/mic_off.svg
|
||||||
|
src/res/img/audio/microphone/mic_on.svg
|
||||||
|
src/res/img/audio/microphone/ptm_notification.png
|
||||||
|
src/res/img/audio/microphone/ptt_notification.png
|
||||||
|
src/res/img/audio/microphone/ptt_notification.svg
|
||||||
|
src/res/img/audio/speaker/speaker_off.svg
|
||||||
|
src/res/img/audio/speaker/speaker_on.svg
|
||||||
|
src/res/img/battery/battery_0.png
|
||||||
|
src/res/img/battery/battery_1.png
|
||||||
|
src/res/img/battery/battery_2.png
|
||||||
|
src/res/img/battery/battery_3.png
|
||||||
|
src/res/img/battery/battery_4.png
|
||||||
|
src/res/img/battery/battery_5.png
|
||||||
|
src/res/img/chaperone/centermark.png
|
||||||
|
src/res/img/chaperone/centermarkl1.png
|
||||||
|
src/res/img/chaperone/centermarkl2.png
|
||||||
|
src/res/img/chaperone/centermarkl3.png
|
||||||
|
src/res/img/chaperone/centermarkr1.png
|
||||||
|
src/res/img/chaperone/centermarkr2.png
|
||||||
|
src/res/img/chaperone/centermarkr3.png
|
||||||
|
src/res/img/common/backarrow.svg
|
||||||
|
src/res/img/common/check.svg
|
||||||
|
src/res/img/icons/advicon256px.ico
|
||||||
|
src/res/img/icons/thumbicon.png
|
||||||
|
src/res/img/main_menu_icons/audio_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/bindings_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/chaperone_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/motion_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/offsets_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/rotation_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/settings_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/space_fix_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/statistics_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/steamvr_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/utilities_tab_icon.svg
|
||||||
|
src/res/img/main_menu_icons/video_tab_icon.svg
|
||||||
|
src/res/img/rotation/autoturn.png
|
||||||
|
src/res/img/rotation/noautoturn.png
|
||||||
|
src/res/img/rotation/noautoturn.svg
|
||||||
|
src/res/img/video/color.png
|
||||||
|
src/res/img/video/dimmer.png
|
||||||
|
src/res/sounds/alarm01.wav
|
||||||
|
src/res/sounds/click.wav
|
||||||
|
src/res/sounds/focus.wav
|
||||||
|
)
|
||||||
|
|
||||||
# make alias path relative to src/res/qml
|
#set_source_files_properties(src/res/qml/common/MyResources.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
||||||
foreach(qml_file ${QML_FILES})
|
#qt_add_executable(AdvancedSettings WIN32 MACOSX_BUNDLE ${SRCS} ${HEADERS})
|
||||||
cmake_path(RELATIVE_PATH qml_file BASE_DIRECTORY src/res/qml OUTPUT_VARIABLE qml_alias)
|
qt_add_executable(AdvancedSettings
|
||||||
set_source_files_properties(${qml_file} PROPERTIES QT_RESOURCE_ALIAS ${qml_alias})
|
${SRCS}
|
||||||
endforeach()
|
${HEADERS}
|
||||||
|
)
|
||||||
|
#src/res/resources.qrc
|
||||||
|
|
||||||
set_source_files_properties(src/res/qml/common/MyResources.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
qt_add_qml_module(AdvancedSettings
|
||||||
|
URI AdvancedSettings
|
||||||
qt_add_executable(AdvancedSettings WIN32 MACOSX_BUNDLE ${SRCS} ${RESOURCES} ${HEADERS})
|
QML_FILES
|
||||||
|
${QML_FILERC}
|
||||||
|
RESOURCES
|
||||||
|
${ResourcesRC}
|
||||||
|
VERSION ${PROJECT_VERSION}
|
||||||
|
)
|
||||||
|
|
||||||
target_include_directories(AdvancedSettings PUBLIC
|
target_include_directories(AdvancedSettings PUBLIC
|
||||||
src
|
|
||||||
third-party/nlohmann
|
third-party/nlohmann
|
||||||
third-party/openvr/headers)
|
third-party/openvr/headers
|
||||||
|
${Vulkan_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
# Avoid collision between executable name and QML module directory (QTBUG-98568).
|
# Avoid collision between executable name and QML module directory (QTBUG-98568).
|
||||||
if(NOT WIN32 AND NOT APPLE)
|
if(NOT WIN32 AND NOT APPLE)
|
||||||
@@ -197,21 +270,27 @@ target_compile_definitions(AdvancedSettings PRIVATE
|
|||||||
APPLICATION_VERSION=\"${PROJECT_VERSION}\"
|
APPLICATION_VERSION=\"${PROJECT_VERSION}\"
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(OPENVR_LIBRARIES
|
#find_library(OPENVR_LIBRARIES
|
||||||
NAMES
|
# NAMES
|
||||||
openvr_api
|
# openvr_api
|
||||||
PATHS
|
# PATHS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/openvr/bin
|
# ${CMAKE_CURRENT_SOURCE_DIR}/third-party/openvr/bin
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/third-party/openvr/lib
|
# ${CMAKE_CURRENT_SOURCE_DIR}/third-party/openvr/lib
|
||||||
PATH_SUFFIXES
|
# PATH_SUFFIXES
|
||||||
linux64
|
# linux64
|
||||||
win64
|
# win64
|
||||||
NO_DEFAULT_PATH
|
# NO_DEFAULT_PATH
|
||||||
NO_CMAKE_FIND_ROOT_PATH)
|
# NO_CMAKE_FIND_ROOT_PATH)
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
target_link_directories(AdvancedSettings PRIVATE
|
||||||
|
${CMAKE_SOURCE_DIR}/third-party/openvr/lib/win64
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(AdvancedSettings PRIVATE
|
target_link_libraries(AdvancedSettings PRIVATE
|
||||||
Qt::Core
|
|
||||||
Qt::Gui
|
Qt::Gui
|
||||||
|
Qt6::Core5Compat
|
||||||
# For QRhi
|
# For QRhi
|
||||||
Qt::GuiPrivate
|
Qt::GuiPrivate
|
||||||
Qt::Multimedia
|
Qt::Multimedia
|
||||||
@@ -222,227 +301,243 @@ target_link_libraries(AdvancedSettings PRIVATE
|
|||||||
Qt::QuickControls2
|
Qt::QuickControls2
|
||||||
Qt::QuickDialogs2
|
Qt::QuickDialogs2
|
||||||
Qt::Svg
|
Qt::Svg
|
||||||
${OPENVR_LIBRARIES}
|
Qt::Qml
|
||||||
|
openvr_api
|
||||||
|
|
||||||
|
)
|
||||||
|
#${OPENVR_LIBRARIES}
|
||||||
|
|
||||||
|
#qt6_add_resources(RESOURCES src/res/resources.qrc)
|
||||||
|
#target_sources(AdvancedSettings PRIVATE ${RESOURCES})
|
||||||
|
|
||||||
|
#qt_add_qml_module(AdvancedSettings
|
||||||
|
# URI AdvancedSettings
|
||||||
|
# VERSION ${PROJECT_VERSION}
|
||||||
|
# QML_FILES ${QML_FILES}
|
||||||
|
#)
|
||||||
|
|
||||||
|
set(COPY_DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
|
||||||
|
set_target_properties(AdvancedSettings PROPERTIES
|
||||||
|
RUNTIME_OUTPUT_DIRECTORY "${COPY_DEST_DIR}"
|
||||||
)
|
)
|
||||||
|
|
||||||
qt_add_qml_module(AdvancedSettings
|
# resCopy
|
||||||
URI AdvancedSettings
|
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||||
VERSION ${PROJECT_VERSION}
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||||
QML_FILES ${QML_FILES}
|
"${CMAKE_SOURCE_DIR}/src/res" "${COPY_DEST_DIR}/res"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# readmeCopy
|
||||||
|
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
|
"${CMAKE_SOURCE_DIR}/Readme.md" "${COPY_DEST_DIR}/Readme.md"
|
||||||
|
)
|
||||||
|
|
||||||
if(GCC)
|
# licenseCopy
|
||||||
target_compile_options(AdvancedSettings
|
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||||
-Wcast-align
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
-Wconversion
|
"${CMAKE_SOURCE_DIR}/LICENSE" "${COPY_DEST_DIR}/LICENSE"
|
||||||
-Wdouble-promotion
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
-Wduplicated-branches
|
"${CMAKE_SOURCE_DIR}/third-party/openvr/LICENSE-VALVE" "${COPY_DEST_DIR}/LICENSE-VALVE"
|
||||||
-Wduplicated-cond
|
#COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
-Wextra
|
#"${CMAKE_SOURCE_DIR}/third-party/magic_enum/LICENSE" "${COPY_DEST_DIR}/LICENSE-MAGIC-ENUM"
|
||||||
-Wformat=2
|
)
|
||||||
-Wlogical-op
|
|
||||||
-Wno-sign-conversion
|
# packageFoldersCopy
|
||||||
-Wnon-virtual-dtor
|
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||||
-Wnull-dereference
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||||
-Wold-style-cast
|
"${CMAKE_SOURCE_DIR}/src/package_files/default_action_manifests"
|
||||||
-Woverloaded-virtual
|
"${COPY_DEST_DIR}/default_action_manifests"
|
||||||
-Wpedantic
|
)
|
||||||
-Wrestrict
|
|
||||||
-Wshadow
|
# packageFilesCopy
|
||||||
-Wunused
|
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||||
-Wzero-as-null-pointer-constant
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
-flto
|
"${CMAKE_SOURCE_DIR}/src/package_files/action_manifest.json" "${COPY_DEST_DIR}/action_manifest.json"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"${CMAKE_SOURCE_DIR}/src/package_files/manifest.vrmanifest" "${COPY_DEST_DIR}/manifest.vrmanifest"
|
||||||
|
)
|
||||||
|
if (WIN32)
|
||||||
|
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"${CMAKE_SOURCE_DIR}/src/package_files/qt.conf" "${COPY_DEST_DIR}/qt.conf"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"${CMAKE_SOURCE_DIR}/src/package_files/restartvrserver.bat" "${COPY_DEST_DIR}/restartvrserver.bat"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"${CMAKE_SOURCE_DIR}/src/package_files/startdesktopmode.bat" "${COPY_DEST_DIR}/startdesktopmode.bat"
|
||||||
)
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if(warnings_as_errors)
|
# openvrApiCopy
|
||||||
target_compile_options(AdvancedSettings
|
if (WIN32)
|
||||||
-Werror
|
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||||
)
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
endif()
|
"${CMAKE_SOURCE_DIR}/third-party/openvr/bin/win64/openvr_api.dll" "${COPY_DEST_DIR}/openvr_api.dll"
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
||||||
target_compile_options(AdvancedSettings
|
|
||||||
--system-header-prefix=qt
|
|
||||||
--system-header-prefix=third-party
|
|
||||||
-Wcast-align
|
|
||||||
-Wconversion
|
|
||||||
-Wdouble-promotion
|
|
||||||
-Wextra
|
|
||||||
-Wextra-semi
|
|
||||||
-Wformat=2
|
|
||||||
-Wmissing-variable-declarations
|
|
||||||
-Wmost
|
|
||||||
-Wno-sign-conversion
|
|
||||||
-Wnon-virtual-dtor
|
|
||||||
-Wold-style-cast
|
|
||||||
-Woverloaded-virtual
|
|
||||||
-Wpedantic
|
|
||||||
-Wshadow
|
|
||||||
-Wunused
|
|
||||||
-Wzero-as-null-pointer-constant
|
|
||||||
-flto
|
|
||||||
)
|
)
|
||||||
if(warnings_as_errors)
|
else ()
|
||||||
target_compile_options(AdvancedSettings
|
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||||
-Werror
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
)
|
"${CMAKE_SOURCE_DIR}/third-party/openvr/lib/linux64/libopenvr_api.so" "${COPY_DEST_DIR}/libopenvr_api.so"
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(debugSymbolsAndLogs)
|
|
||||||
target_compile_definitions(AdvancedSettings PRIVATE
|
|
||||||
ENABLE_DEBUG_LOGGING
|
|
||||||
)
|
)
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
# opensslCopy
|
||||||
cmake_path(GET QT_DIR PARENT_PATH QT_ROOT)
|
if (WIN32)
|
||||||
cmake_path(GET QT_ROOT PARENT_PATH QT_ROOT)
|
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||||
cmake_path(GET QT_ROOT PARENT_PATH QT_ROOT)
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"${CMAKE_SOURCE_DIR}/third-party/openssl/libcrypto-1_1-x64.dll" "${COPY_DEST_DIR}/libcrypto-1_1-x64.dll"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"${CMAKE_SOURCE_DIR}/third-party/openssl/libssl-1_1-x64.dll" "${COPY_DEST_DIR}/libssl-1_1-x64.dll"
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||||
|
"${CMAKE_SOURCE_DIR}/third-party/openssl/LICENSE-OPENSSL" "${COPY_DEST_DIR}/LICENSE-OPENSSL"
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
cmake_path(NATIVE_PATH QT_ROOT NORMALIZE NATIVE_QT_ROOT)
|
target_include_directories(AdvancedSettings PRIVATE
|
||||||
cmake_path(NATIVE_PATH QT_DIR NORMALIZE NATIVE_QT_DIR)
|
third-party/openvr/headers
|
||||||
cmake_path(NATIVE_PATH PROJECT_SOURCE_DIR NORMALIZE NATIVE_PROJECT_SOURCE_DIR)
|
third-party/policyconfig
|
||||||
|
)
|
||||||
|
|
||||||
# Needs to be executed: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
|
if (WIN32)
|
||||||
configure_file(build_scripts/win/env.ps1.in env.ps1)
|
target_sources(AdvancedSettings PRIVATE
|
||||||
configure_file(build_scripts/win/env.sh.in env.sh @ONLY)
|
src/keyboard_input/input_sender_win.cpp
|
||||||
|
src/media_keys/media_keys_win.cpp
|
||||||
# Adds default qt plugins path
|
src/tabcontrollers/audiomanager/AudioManagerWindows.cpp
|
||||||
configure_file(build_scripts/win/qt.conf.in qt.conf ESCAPE_QUOTES)
|
src/tabcontrollers/audiomanager/AudioManagerWindows.h
|
||||||
|
|
||||||
target_sources(AdvancedSettings PUBLIC
|
|
||||||
src/keyboard_input/input_sender_win.cpp
|
|
||||||
src/media_keys/media_keys_win.cpp
|
|
||||||
src/tabcontrollers/audiomanager/AudioManagerWindows.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(AdvancedSettings PRIVATE
|
target_link_libraries(AdvancedSettings PRIVATE
|
||||||
ole32
|
ole32
|
||||||
user32
|
user32
|
||||||
)
|
)
|
||||||
target_include_directories(AdvancedSettings PUBLIC third-party/policyconfig)
|
|
||||||
|
|
||||||
target_compile_definitions(AdvancedSettings PRIVATE
|
if (MSVC)
|
||||||
_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
|
target_compile_definitions(AdvancedSettings PRIVATE
|
||||||
|
_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
|
||||||
)
|
)
|
||||||
if(MSVC)
|
target_compile_options(AdvancedSettings PRIVATE
|
||||||
target_compile_options(AdvancedSettings PUBLIC
|
/GL /Gw /W4 /permissive- /w14254 /w14263 /w14265 /w14287 /w14296 /w14311
|
||||||
/Gw
|
/w14545 /w14546 /w14547 /w14549 /w14555 /w14640 /w14826 /w14905 /w14906
|
||||||
/W4
|
/w14928 /wd4127 /we4289 /Zc:__cplusplus
|
||||||
/permissive-
|
|
||||||
/w14254
|
|
||||||
/w14263
|
|
||||||
/w14265
|
|
||||||
/w14287
|
|
||||||
/w14296
|
|
||||||
/w14311
|
|
||||||
/w14545
|
|
||||||
/w14546
|
|
||||||
/w14547
|
|
||||||
/w14549
|
|
||||||
/w14555
|
|
||||||
/w14640
|
|
||||||
/w14826
|
|
||||||
/w14905
|
|
||||||
/w14906
|
|
||||||
/w14928
|
|
||||||
/wd4127
|
|
||||||
/we4289
|
|
||||||
)
|
)
|
||||||
|
if (warnings_as_errors)
|
||||||
|
target_compile_options(AdvancedSettings PRIVATE /WX)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
elseif (UNIX)
|
||||||
|
if (NOT APPLE AND NOT noX11)
|
||||||
|
target_sources(AdvancedSettings PRIVATE
|
||||||
|
src/keyboard_input/input_sender_X11.cpp
|
||||||
|
)
|
||||||
|
find_package(X11 REQUIRED)
|
||||||
|
target_link_libraries(AdvancedSettings PRIVATE ${X11_LIBRARIES})
|
||||||
|
elseif (NOT APPLE AND noX11)
|
||||||
|
target_sources(AdvancedSettings PRIVATE
|
||||||
|
src/keyboard_input/input_sender_dummy.cpp
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if(warnings_as_errors)
|
if (NOT APPLE AND NOT noDBUS)
|
||||||
target_compile_options(AdvancedSettings
|
target_sources(AdvancedSettings PRIVATE
|
||||||
/WX
|
src/media_keys/media_keys_dbus.cpp
|
||||||
)
|
|
||||||
endif()
|
|
||||||
elseif(win32-clang-msvc)
|
|
||||||
target_compile_options(AdvancedSettings
|
|
||||||
-Wcast-align
|
|
||||||
-Wdouble-promotion
|
|
||||||
-Wextra
|
|
||||||
-Wformat=2
|
|
||||||
-Wmissing-variable-declarations
|
|
||||||
-Wmost
|
|
||||||
-Wnon-virtual-dtor
|
|
||||||
-Wold-style-cast
|
|
||||||
-Woverloaded-virtual
|
|
||||||
-Wshadow
|
|
||||||
-Wunused
|
|
||||||
-flto
|
|
||||||
/Gw
|
|
||||||
/W4
|
|
||||||
/imsvc /imsvc /imsvc
|
|
||||||
/w14254
|
|
||||||
/w14263
|
|
||||||
/w14265
|
|
||||||
/w14287
|
|
||||||
/w14296
|
|
||||||
/w14311
|
|
||||||
/w14545
|
|
||||||
/w14546
|
|
||||||
/w14547
|
|
||||||
/w14549
|
|
||||||
/w14555
|
|
||||||
/w14640
|
|
||||||
/w14826
|
|
||||||
/w14905
|
|
||||||
/w14906
|
|
||||||
/w14928
|
|
||||||
/wd4127
|
|
||||||
/we4289
|
|
||||||
)
|
)
|
||||||
endif()
|
find_package(Qt6 OPTIONAL_COMPONENTS DBus)
|
||||||
|
target_link_libraries(AdvancedSettings PRIVATE Qt6::DBus)
|
||||||
|
elseif (NOT APPLE AND noDBUS)
|
||||||
|
target_sources(AdvancedSettings PRIVATE
|
||||||
|
src/media_keys/media_keys_dummy.cpp
|
||||||
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
elseif(UNIX AND NOT MACOS)
|
if (NOT APPLE AND NOT noPulse)
|
||||||
if(noX11)
|
target_sources(AdvancedSettings PRIVATE
|
||||||
target_sources(AdvancedSettings PUBLIC
|
src/tabcontrollers/audiomanager/AudioManagerPulse.cpp
|
||||||
src/keyboard_input/input_sender_dummy.cpp
|
src/tabcontrollers/audiomanager/AudioManagerPulse.h
|
||||||
|
src/tabcontrollers/audiomanager/AudioManagerPulse_internal.h
|
||||||
)
|
)
|
||||||
else()
|
target_link_libraries(AdvancedSettings PRIVATE pulse)
|
||||||
target_sources(AdvancedSettings PUBLIC
|
elseif (NOT APPLE AND noPulse)
|
||||||
src/keyboard_input/input_sender_X11.cpp
|
target_sources(AdvancedSettings PRIVATE
|
||||||
|
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
|
||||||
|
src/tabcontrollers/audiomanager/AudioManagerDummy.h
|
||||||
)
|
)
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(AdvancedSettings PRIVATE
|
if (APPLE)
|
||||||
Xtst
|
target_sources(AdvancedSettings PRIVATE
|
||||||
X11
|
src/keyboard_input/input_sender_dummy.cpp
|
||||||
|
src/media_keys/media_keys_dummy.cpp
|
||||||
|
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
|
||||||
|
src/tabcontrollers/audiomanager/AudioManagerDummy.h
|
||||||
)
|
)
|
||||||
endif()
|
endif ()
|
||||||
|
|
||||||
if(noDBUS)
|
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||||
target_sources(AdvancedSettings PUBLIC
|
target_compile_options(AdvancedSettings PRIVATE
|
||||||
src/media_keys/media_keys_dummy.cpp
|
-Wcast-align
|
||||||
)
|
-Wconversion
|
||||||
else()
|
-Wdouble-promotion
|
||||||
target_sources(AdvancedSettings PUBLIC
|
-Wduplicated-branches
|
||||||
src/media_keys/media_keys_dbus.cpp
|
-Wduplicated-cond
|
||||||
|
-Wextra
|
||||||
|
-Wformat=2
|
||||||
|
-Wlogical-op
|
||||||
|
-Wno-sign-conversion
|
||||||
|
-Wnon-virtual-dtor
|
||||||
|
-Wnull-dereference
|
||||||
|
-Wold-style-cast
|
||||||
|
-Woverloaded-virtual
|
||||||
|
-Wpedantic
|
||||||
|
-Wrestrict
|
||||||
|
-Wshadow
|
||||||
|
-Wunused
|
||||||
|
-Wzero-as-null-pointer-constant
|
||||||
|
#-flto
|
||||||
)
|
)
|
||||||
|
if (warnings_as_errors)
|
||||||
|
target_compile_options(AdvancedSettings PRIVATE -Werror)
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
target_link_libraries(AdvancedSettings PRIVATE
|
if (debugSymbolsAndLogs)
|
||||||
Qt::DBus
|
target_compile_definitions(AdvancedSettings PRIVATE ENABLE_DEBUG_LOGGING)
|
||||||
)
|
endif ()
|
||||||
endif()
|
|
||||||
|
|
||||||
if(noPulse)
|
install(TARGETS AdvancedSettings
|
||||||
target_sources(AdvancedSettings PUBLIC
|
BUNDLE DESTINATION .
|
||||||
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
else()
|
|
||||||
target_sources(AdvancedSettings PUBLIC
|
|
||||||
src/tabcontrollers/audiomanager/AudioManagerPulse.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(AdvancedSettings PRIVATE
|
#qt_generate_deploy_qml_app_script(
|
||||||
pulse
|
# TARGET AdvancedSettings
|
||||||
)
|
# OUTPUT_SCRIPT deploy_script
|
||||||
endif()
|
#)
|
||||||
elseif(MACOS)
|
#install(SCRIPT ${deploy_script})
|
||||||
target_sources(AdvancedSettings PUBLIC
|
if (WIN32)
|
||||||
src/keyboard_input/input_sender_dummy.cpp
|
qt_generate_deploy_qml_app_script(
|
||||||
src/media_keys/media_keys_dummy.cpp
|
TARGET AdvancedSettings
|
||||||
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
|
OUTPUT_SCRIPT deploy_script
|
||||||
)
|
MACOS_BUNDLE_POST_BUILD
|
||||||
endif()
|
NO_UNSUPPORTED_PLATFORM_ERROR
|
||||||
|
DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM
|
||||||
|
)
|
||||||
|
install(SCRIPT ${deploy_script})
|
||||||
|
message(STATUS "Deploy Script ${deploy_script}")
|
||||||
|
install(SCRIPT ${deploy_script})
|
||||||
|
|
||||||
|
# message(STATUS "Path to qml: ${CMAKE_SOURCE_DIR}/src/res/qml")
|
||||||
|
#This should be re-dundant but for some reason Visual Studio really wants this
|
||||||
|
#set(WINDEPLOYQT_BUILD_TARGET "$<$<CONFIG:Debug>:--debug>$<$<NOT:$<CONFIG:Debug>>:--release>")
|
||||||
|
#add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||||
|
# COMMAND "${Qt6_DIR}/../../../bin/windeployqt6.exe"
|
||||||
|
# --dir "${COPY_DEST_DIR}/qtdata"
|
||||||
|
# --libdir "${COPY_DEST_DIR}"
|
||||||
|
# --plugindir "${COPY_DEST_DIR}/qtdata/plugins"
|
||||||
|
# --no-system-d3d-compiler
|
||||||
|
# --no-opengl-sw
|
||||||
|
# ${WINDEPLOYQT_BUILD_TARGET}
|
||||||
|
# --qmldir "${CMAKE_SOURCE_DIR}/src/res/qml"
|
||||||
|
# "${COPY_DEST_DIR}/AdvancedSettings.exe"
|
||||||
|
#)
|
||||||
|
endif ()
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "x64-Debug",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "Debug",
|
||||||
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": "",
|
||||||
|
"variables": [
|
||||||
|
{
|
||||||
|
"name": "CMAKE_INSTALL_PREFIX",
|
||||||
|
"value": "D:/Code/ovras/OpenVR-AdvancedSettings/out/build/x64-Debug/Debug",
|
||||||
|
"type": "PATH"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x64-Release",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "RelWithDebInfo",
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "",
|
||||||
|
"buildCommandArgs": "",
|
||||||
|
"ctestCommandArgs": "",
|
||||||
|
"inheritEnvironments": [ "msvc_x64_x64" ]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -25,7 +25,7 @@ VrAlarm::VrAlarm()
|
|||||||
ovr_overlay_wrapper::hideOverlay( m_alarmOverlayHandle );
|
ovr_overlay_wrapper::hideOverlay( m_alarmOverlayHandle );
|
||||||
|
|
||||||
// Only need to set it once, no need to keep it in memory
|
// Only need to set it once, no need to keep it in memory
|
||||||
QImage alarmIcon( QString( ":/alarm/alarm_activated.png" ) );
|
QImage alarmIcon( ":qt/qml/AdvancedSettings/src/res/img/alarm/alarm_activated.png" );
|
||||||
ovr_overlay_wrapper::setOverlayFromQImage( m_alarmOverlayHandle,
|
ovr_overlay_wrapper::setOverlayFromQImage( m_alarmOverlayHandle,
|
||||||
alarmIcon );
|
alarmIcon );
|
||||||
|
|
||||||
|
|||||||
+12
-6
@@ -46,20 +46,25 @@ int main( int argc, char* argv[] )
|
|||||||
|
|
||||||
openvr_init::initializeOpenVR(
|
openvr_init::initializeOpenVR(
|
||||||
openvr_init::OpenVrInitializationType::Overlay );
|
openvr_init::OpenVrInitializationType::Overlay );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
QQmlEngine qmlEngine;
|
QQmlEngine qmlEngine;
|
||||||
|
|
||||||
|
// Just error checking to ensure QRC works properly
|
||||||
|
//qDebug() << "list of qmldirs";
|
||||||
|
//QDirIterator it( ":", QDirIterator::Subdirectories );
|
||||||
|
//while ( it.hasNext() )
|
||||||
|
//{
|
||||||
|
// qDebug() << it.next();
|
||||||
|
//}
|
||||||
|
|
||||||
std::unique_ptr<advsettings::OverlayController> controller(
|
std::unique_ptr<advsettings::OverlayController> controller(
|
||||||
new advsettings::OverlayController( commandLineArgs.desktopMode,
|
new advsettings::OverlayController( commandLineArgs.desktopMode,
|
||||||
commandLineArgs.forceNoSound,
|
commandLineArgs.forceNoSound,
|
||||||
qmlEngine ) );
|
qmlEngine ) );
|
||||||
|
//const auto url
|
||||||
const auto url
|
// = QUrl( ":/qt/qml/AdvancedSettings/src/res/qml/common/mainwidget.qml" );
|
||||||
= QUrl( "qrc:/qt/qml/AdvancedSettings/common/mainwidget.qml" );
|
QQmlComponent component( &qmlEngine, ":/qt/qml/AdvancedSettings/src/res/qml/common/mainwidget.qml" );
|
||||||
|
|
||||||
QQmlComponent component( &qmlEngine, url );
|
|
||||||
auto errors = component.errors();
|
auto errors = component.errors();
|
||||||
for ( auto& e : errors )
|
for ( auto& e : errors )
|
||||||
{
|
{
|
||||||
@@ -98,6 +103,7 @@ int main( int argc, char* argv[] )
|
|||||||
|| settings::getSetting(
|
|| settings::getSetting(
|
||||||
settings::BoolSetting::APPLICATION_desktopModeToggle ) )
|
settings::BoolSetting::APPLICATION_desktopModeToggle ) )
|
||||||
{
|
{
|
||||||
|
qDebug() << "Desktop MODE!";
|
||||||
auto m_pWindow = new QQuickWindow();
|
auto m_pWindow = new QQuickWindow();
|
||||||
qobject_cast<QQuickItem*>( quickObj )
|
qobject_cast<QQuickItem*>( quickObj )
|
||||||
->setParentItem( m_pWindow->contentItem() );
|
->setParentItem( m_pWindow->contentItem() );
|
||||||
|
|||||||
@@ -77,13 +77,13 @@ OverlayController::OverlayController( bool desktopMode,
|
|||||||
qInfo() << "VR Runtime Path: " << m_runtimePathUrl.toLocalFile();
|
qInfo() << "VR Runtime Path: " << m_runtimePathUrl.toLocalFile();
|
||||||
|
|
||||||
const double initVol = soundVolume();
|
const double initVol = soundVolume();
|
||||||
m_activationSoundEffect.setSource( QUrl( "qrc:/sounds/click.wav" ) );
|
m_activationSoundEffect.setSource( QUrl( ":/qt/qml/AdvancedSettings/src/res/sounds/click.wav" ) );
|
||||||
m_activationSoundEffect.setVolume( initVol );
|
m_activationSoundEffect.setVolume( initVol );
|
||||||
|
|
||||||
m_focusChangedSoundEffect.setSource( QUrl( "qrc:/sounds/focus.wav" ) );
|
m_focusChangedSoundEffect.setSource( QUrl( ":/qt/qml/AdvancedSettings/src/res/sounds/focus.wav" ) );
|
||||||
m_focusChangedSoundEffect.setVolume( initVol );
|
m_focusChangedSoundEffect.setVolume( initVol );
|
||||||
|
|
||||||
m_alarm01SoundEffect.setSource( QUrl( "qrc:/sounds/alarm01.wav" ) );
|
m_alarm01SoundEffect.setSource( QUrl( ":/qt/qml/AdvancedSettings/src/res/sounds/alarm01.wav" ) );
|
||||||
m_alarm01SoundEffect.setVolume( 1.0 );
|
m_alarm01SoundEffect.setVolume( 1.0 );
|
||||||
|
|
||||||
// If we have desktop mode flag ignore waht toggle says otherwise we use
|
// If we have desktop mode flag ignore waht toggle says otherwise we use
|
||||||
@@ -362,6 +362,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
|||||||
{
|
{
|
||||||
if ( !m_desktopMode )
|
if ( !m_desktopMode )
|
||||||
{
|
{
|
||||||
|
qDebug() << "not desktop mode";
|
||||||
vr::VROverlayError overlayError
|
vr::VROverlayError overlayError
|
||||||
= vr::VROverlay()->CreateDashboardOverlay(
|
= vr::VROverlay()->CreateDashboardOverlay(
|
||||||
key.c_str(),
|
key.c_str(),
|
||||||
@@ -390,7 +391,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
|||||||
true );
|
true );
|
||||||
|
|
||||||
{
|
{
|
||||||
QImage thumbiconImg( QString( ":/icons/thumbicon.png" ) );
|
QImage thumbiconImg( ":qt/qml/AdvancedSettings/src/res/img/icons/thumbicon.png");
|
||||||
ovr_overlay_wrapper::setOverlayFromQImage(
|
ovr_overlay_wrapper::setOverlayFromQImage(
|
||||||
m_ulOverlayThumbnailHandle, thumbiconImg );
|
m_ulOverlayThumbnailHandle, thumbiconImg );
|
||||||
}
|
}
|
||||||
@@ -422,7 +423,6 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
|||||||
|
|
||||||
if ( !m_renderControl.initialize() )
|
if ( !m_renderControl.initialize() )
|
||||||
throw std::runtime_error( "could not initialize m_renderControl" );
|
throw std::runtime_error( "could not initialize m_renderControl" );
|
||||||
|
|
||||||
QRhi* rhi = this->rhi();
|
QRhi* rhi = this->rhi();
|
||||||
|
|
||||||
qInfo() << "Started with" << rhi->backendName();
|
qInfo() << "Started with" << rhi->backendName();
|
||||||
@@ -533,6 +533,15 @@ void OverlayController::SetOverlayFromQRhiTexture( QRhiTexture& tex )
|
|||||||
vrTex.eColorSpace = vr::ColorSpace_Auto;
|
vrTex.eColorSpace = vr::ColorSpace_Auto;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case QRhi::D3D11:
|
||||||
|
{
|
||||||
|
qInfo() << "YEPPPERS HERE WE GO!";
|
||||||
|
vrTex.handle = reinterpret_cast<void*>( tex.nativeTexture().object );
|
||||||
|
vrTex.eType = vr::TextureType_DirectX;
|
||||||
|
vrTex.eColorSpace = vr::ColorSpace_Auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
break;
|
||||||
#if QT_CONFIG( vulkan )
|
#if QT_CONFIG( vulkan )
|
||||||
case QRhi::Vulkan:
|
case QRhi::Vulkan:
|
||||||
{
|
{
|
||||||
|
|||||||
+16
-17
@@ -1,7 +1,7 @@
|
|||||||
import QtQuick 2.7
|
import QtQuick
|
||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts
|
||||||
import ovras.advsettings 1.0
|
import ovras.advsettings
|
||||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
import "common"
|
import "common"
|
||||||
import "utilities_page"
|
import "utilities_page"
|
||||||
@@ -33,7 +33,7 @@ MyStackViewPage {
|
|||||||
text: " SteamVR"
|
text: " SteamVR"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(steamVRPage)
|
mainView.push(steamVRPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ MyStackViewPage {
|
|||||||
text: " Chaperone"
|
text: " Chaperone"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(chaperonePage)
|
mainView.push(chaperonePage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ MyStackViewPage {
|
|||||||
text: " Offsets"
|
text: " Offsets"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(playspacePage)
|
mainView.push(playspacePage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ MyStackViewPage {
|
|||||||
text: " Motion"
|
text: " Motion"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(motionPage)
|
mainView.push(motionPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -80,7 +80,7 @@ MyStackViewPage {
|
|||||||
text: " Rotation"
|
text: " Rotation"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(rotationPage)
|
mainView.push(rotationPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -92,7 +92,7 @@ MyStackViewPage {
|
|||||||
text: " Space Fix"
|
text: " Space Fix"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(fixFloorPage)
|
mainView.push(fixFloorPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -104,7 +104,7 @@ MyStackViewPage {
|
|||||||
text: " Audio"
|
text: " Audio"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(audioPage)
|
mainView.push(audioPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ MyStackViewPage {
|
|||||||
text: " Video"
|
text: " Video"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(videoPage)
|
mainView.push(videoPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ MyStackViewPage {
|
|||||||
text: " Utilities"
|
text: " Utilities"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(utilitiesPage)
|
mainView.push(utilitiesPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ MyStackViewPage {
|
|||||||
text: " Statistics"
|
text: " Statistics"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(statisticsPage)
|
mainView.push(statisticsPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ MyStackViewPage {
|
|||||||
text: " Settings"
|
text: " Settings"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(settingsPage)
|
mainView.push(settingsPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -470,9 +470,8 @@ MyStackViewPage {
|
|||||||
summaryMicMuteToggle.checked = AudioTabController.micMuted
|
summaryMicMuteToggle.checked = AudioTabController.micMuted
|
||||||
summaryPttToggle.checked = AudioTabController.pttEnabled
|
summaryPttToggle.checked = AudioTabController.pttEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: OverlayController
|
target: OverlayController
|
||||||
function onNewVersionDetectedChanged() {
|
function onNewVersionDetectedChanged() {
|
||||||
if (OverlayController.newVersionDetected)
|
if (OverlayController.newVersionDetected)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -494,7 +494,7 @@ MyStackViewPage {
|
|||||||
text: "Proximity Warning Settings"
|
text: "Proximity Warning Settings"
|
||||||
Layout.preferredWidth: 350
|
Layout.preferredWidth: 350
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(chaperoneWarningsPage)
|
mainView.push(chaperoneWarningsPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -506,7 +506,7 @@ MyStackViewPage {
|
|||||||
Layout.preferredWidth: 400
|
Layout.preferredWidth: 400
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(chaperoneAdditionalPage)
|
mainView.push(chaperoneAdditionalPage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-5
@@ -40,7 +40,7 @@ GroupBox {
|
|||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 200
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if(checked){
|
if(checked){
|
||||||
MyResources.playActivationSound()
|
OverlayController.playActivationSound()
|
||||||
ChaperoneTabController.setCollisionBoundStyle(0)
|
ChaperoneTabController.setCollisionBoundStyle(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ GroupBox {
|
|||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 200
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if(checked){
|
if(checked){
|
||||||
MyResources.playActivationSound()
|
OverlayController.playActivationSound()
|
||||||
ChaperoneTabController.setCollisionBoundStyle(1)
|
ChaperoneTabController.setCollisionBoundStyle(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -64,7 +64,7 @@ GroupBox {
|
|||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 200
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if(checked){
|
if(checked){
|
||||||
MyResources.playActivationSound()
|
OverlayController.playActivationSound()
|
||||||
ChaperoneTabController.setCollisionBoundStyle(2)
|
ChaperoneTabController.setCollisionBoundStyle(2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,7 +76,7 @@ GroupBox {
|
|||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 200
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if(checked){
|
if(checked){
|
||||||
MyResources.playActivationSound()
|
OverlayController.playActivationSound()
|
||||||
ChaperoneTabController.setCollisionBoundStyle(3)
|
ChaperoneTabController.setCollisionBoundStyle(3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ GroupBox {
|
|||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 200
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
if(checked){
|
if(checked){
|
||||||
MyResources.playActivationSound()
|
OverlayController.playActivationSound()
|
||||||
ChaperoneTabController.setCollisionBoundStyle(4)
|
ChaperoneTabController.setCollisionBoundStyle(4)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -124,4 +124,7 @@ GroupBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: OverlayController
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,11 +63,14 @@ ComboBox {
|
|||||||
|
|
||||||
onActivated: {
|
onActivated: {
|
||||||
if (activeFocus) {
|
if (activeFocus) {
|
||||||
MyResources.playActivationSound()
|
OverlayController.playActivationSound()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
popup.background.color = "#2a2e35"
|
popup.background.color = "#2a2e35"
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: OverlayController
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,10 @@ Button {
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (activationSoundEnabled) {
|
if (activationSoundEnabled) {
|
||||||
MyResources.playActivationSound()
|
OverlayController.playActivationSound()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: OverlayController
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playActivationSound()
|
OverlayController.playActivationSound()
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: OverlayController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ RadioButton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playActivationSound()
|
OverlayController.playActivationSound()
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: OverlayController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,7 @@ QtObject {
|
|||||||
function playFocusChangedSound() {
|
function playFocusChangedSound() {
|
||||||
OverlayController.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: OverlayController
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ Slider {
|
|||||||
|
|
||||||
onValueChanged: {
|
onValueChanged: {
|
||||||
if (activeFocus) {
|
if (activeFocus) {
|
||||||
//MyResources.playActivationSound()
|
//OverlayController.playActivationSound()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
// Needed for MyResources in the default folder.
|
// Needed for OverlayController in the default folder.
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
@@ -45,7 +45,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
stackView.pop()
|
stackView.pop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,4 +90,7 @@ Rectangle {
|
|||||||
content.Layout.rightMargin = 40
|
content.Layout.rightMargin = 40
|
||||||
content.Layout.bottomMargin = 40
|
content.Layout.bottomMargin = 40
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: OverlayController
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
// Needed for MyResources in the default folder.
|
// Needed for OverlayControllers in the default folder.
|
||||||
import ".."
|
import ".."
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
@@ -60,6 +60,9 @@ CheckBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playActivationSound()
|
OverlayController.playActivationSound()
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: OverlayController
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import QtQuick 2.7
|
import QtQuick
|
||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts 1.0
|
import QtQuick.Layouts
|
||||||
import ".."
|
import ".."
|
||||||
import "../utilities_page"
|
import "../utilities_page"
|
||||||
import "../audio_page"
|
import "../audio_page"
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ MyStackViewPage {
|
|||||||
Layout.preferredWidth: 350
|
Layout.preferredWidth: 350
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
MyResources.playFocusChangedSound()
|
OverlayController.playFocusChangedSound()
|
||||||
mainView.push(steamVRTXRXPage)
|
mainView.push(steamVRTXRXPage)
|
||||||
SteamVRTabController.updateRXTXList()
|
SteamVRTabController.updateRXTXList()
|
||||||
}
|
}
|
||||||
@@ -50,4 +50,7 @@ MyStackViewPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Connections {
|
||||||
|
target: OverlayController
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,79 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
|
<qresource prefix="/qt">
|
||||||
|
<file>qml/ChaperoneWarningsPage.qml</file>
|
||||||
|
<file>qml/FixFloorPage.qml</file>
|
||||||
|
<file>qml/PlayspacePage.qml</file>
|
||||||
|
<file>qml/RootPage.qml</file>
|
||||||
|
<file>qml/SettingsPage.qml</file>
|
||||||
|
<file>qml/StatisticsPage.qml</file>
|
||||||
|
<file>qml/audio_page/AudioPage.qml</file>
|
||||||
|
<file>qml/audio_page/device_selector/AudioDeviceSelector.qml</file>
|
||||||
|
<file>qml/audio_page/device_selector/MicDeviceSelector.qml</file>
|
||||||
|
<file>qml/audio_page/device_selector/MicVolumeSlider.qml</file>
|
||||||
|
<file>qml/audio_page/device_selector/MirrorDeviceSelector.qml</file>
|
||||||
|
<file>qml/audio_page/device_selector/MirrorVolumeSlider.qml</file>
|
||||||
|
<file>qml/audio_page/dialog_boxes/AudioDeleteProfileDialog.qml</file>
|
||||||
|
<file>qml/audio_page/dialog_boxes/AudioMessageDialog.qml</file>
|
||||||
|
<file>qml/audio_page/dialog_boxes/AudioNewProfileDialog.qml</file>
|
||||||
|
<file>qml/audio_page/profiles/ProfileButtons.qml</file>
|
||||||
|
<file>qml/audio_page/proximity/ProximityToggle.qml</file>
|
||||||
|
<file>qml/audio_page/push_to_talk/PttButtons.qml</file>
|
||||||
|
<file>qml/chaperone_page/ChaperonePage.qml</file>
|
||||||
|
<file>qml/chaperone_page/change_orientation/ChangeOrientationGroupBox.qml</file>
|
||||||
|
<file>qml/chaperone_page/chaperone_additional/ChaperoneAdditionalPage.qml</file>
|
||||||
|
<file>qml/chaperone_page/chaperone_additional/chaperoneboundscolor/ChaperoneBoundsColorGroupBox.qml</file>
|
||||||
|
<file>qml/chaperone_page/chaperone_additional/chaperonemisc/ChaperoneMiscGroupBox.qml</file>
|
||||||
|
<file>qml/chaperone_page/chaperone_additional/chaperonetype/ChaperoneTypeGroupBox.qml</file>
|
||||||
|
<file>qml/common/FullWidthSliderBox.qml</file>
|
||||||
|
<file>qml/common/HourComboBox.qml</file>
|
||||||
|
<file>qml/common/LineSeparator.qml</file>
|
||||||
|
<file>qml/common/mainwidget.qml</file>
|
||||||
|
<file>qml/common/MinuteSecondComboBox.qml</file>
|
||||||
|
<file>qml/common/MyComboBox.qml</file>
|
||||||
|
<file>qml/common/MyDialogOkCancelPopup.qml</file>
|
||||||
|
<file>qml/common/MyDialogOkPopup.qml</file>
|
||||||
|
<file>qml/common/MyPushButton.qml</file>
|
||||||
|
<file>qml/common/MyPushButton2.qml</file>
|
||||||
|
<file>qml/common/MyRadioButton.qml</file>
|
||||||
|
<file>qml/common/MyResources.qml</file>
|
||||||
|
<file>qml/common/MySlider.qml</file>
|
||||||
|
<file>qml/common/MyStackViewPage.qml</file>
|
||||||
|
<file>qml/common/MyText.qml</file>
|
||||||
|
<file>qml/common/MyTextField.qml</file>
|
||||||
|
<file>qml/common/MyToggleButton.qml</file>
|
||||||
|
<file>qml/common/TimeAssembly.qml</file>
|
||||||
|
<file>qml/motion_page/MotionPage.qml</file>
|
||||||
|
<file>qml/motion_page/gravity/GravityGroupBox.qml</file>
|
||||||
|
<file>qml/motion_page/height_toggle/HeightToggleGroupBox.qml</file>
|
||||||
|
<file>qml/motion_page/space_drag/SpaceDragGroupBox.qml</file>
|
||||||
|
<file>qml/rotation_page/RotationPage.qml</file>
|
||||||
|
<file>qml/rotation_page/redirected/AutoTurnGroupBox.qml</file>
|
||||||
|
<file>qml/rotation_page/redirected/RedirectedGroupBox.qml</file>
|
||||||
|
<file>qml/rotation_page/snap_turn/SnapTurnGroupBox.qml</file>
|
||||||
|
<file>qml/rotation_page/space_turn/SpaceTurnGroupBox.qml</file>
|
||||||
|
<file>qml/rotation_page/view_ratchet/ViewRatchetGroupBox.qml</file>
|
||||||
|
<file>qml/steamvr_page/SteamVRPage.qml</file>
|
||||||
|
<file>qml/steamvr_page/camera/CameraGroupBox.qml</file>
|
||||||
|
<file>qml/steamvr_page/steamvrbind/SteamVRBindGroupBox.qml</file>
|
||||||
|
<file>qml/steamvr_page/steamvrmisc/SteamVRMiscGroupBox.qml</file>
|
||||||
|
<file>qml/steamvr_page/steamvr_additional/SteamVRTXRXPage.qml</file>
|
||||||
|
<file>qml/utilities_page/UtilitiesPage.qml</file>
|
||||||
|
<file>qml/utilities_page/alarm_clock/AlarmGroupBox.qml</file>
|
||||||
|
<file>qml/utilities_page/keyboard_utils/KeyboardGroupBox.qml</file>
|
||||||
|
<file>qml/utilities_page/media_keys/MediaButton.qml</file>
|
||||||
|
<file>qml/utilities_page/media_keys/MediaControllerKeys.qml</file>
|
||||||
|
<file>qml/utilities_page/misc/MiscBox.qml</file>
|
||||||
|
<file>qml/video_page/VideoPage.qml</file>
|
||||||
|
<file>qml/video_page/brightness/BrightnessGroupBox.qml</file>
|
||||||
|
<file>qml/video_page/color/ColorGroupBox.qml</file>
|
||||||
|
<file>qml/video_page/dialogboxes/VideoDeleteProfileDialog.qml</file>
|
||||||
|
<file>qml/video_page/dialogboxes/VideoMessageDialog.qml</file>
|
||||||
|
<file>qml/video_page/dialogboxes/VideoNewProfileDialog.qml</file>
|
||||||
|
<file>qml/video_page/miscvid/VideoMiscGroupBox.qml</file>
|
||||||
|
<file>qml/video_page/overlaycolorbright/OverlayMethodGroupBox.qml</file>
|
||||||
|
<file>qml/video_page/profiles/VideoProfileGroupBox.qml</file>
|
||||||
|
<file>qml/video_page/supersampling/SuperSamplingGroupBox.qml</file>
|
||||||
|
</qresource>
|
||||||
<qresource prefix="/common">
|
<qresource prefix="/common">
|
||||||
<file alias="backarrow">img/common/backarrow.svg</file>
|
<file alias="backarrow">img/common/backarrow.svg</file>
|
||||||
<file alias="box_checkmark">img/common/check.svg</file>
|
<file alias="box_checkmark">img/common/check.svg</file>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "../settings/settings.h"
|
#include "../settings/settings.h"
|
||||||
#include "../settings/settings_object.h"
|
#include "../settings/settings_object.h"
|
||||||
#include "../utils/update_rate.h"
|
#include "../utils/update_rate.h"
|
||||||
#include "openvr/ovr_overlay_wrapper.h"
|
#include "../openvr/ovr_overlay_wrapper.h"
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# include "audiomanager/AudioManagerWindows.h"
|
# include "audiomanager/AudioManagerWindows.h"
|
||||||
#elif __linux__
|
#elif __linux__
|
||||||
@@ -89,9 +89,9 @@ void AudioTabController::initStage2( OverlayController* var_parent )
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_pushToTalkValues.pushToTalkImg.reset(
|
m_pushToTalkValues.pushToTalkImg.reset(
|
||||||
new QImage( QString( ":/microphone/ptt_notification.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/microphone/ptt_notification.png" ) );
|
||||||
m_pushToTalkValues.pushToMuteImg.reset(
|
m_pushToTalkValues.pushToMuteImg.reset(
|
||||||
new QImage( QString( ":/microphone/ptm_notification.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/microphone/ptm_notification.png" ) );
|
||||||
|
|
||||||
auto* pushToImg = m_pushToTalkValues.pushToTalkImg.get();
|
auto* pushToImg = m_pushToTalkValues.pushToTalkImg.get();
|
||||||
if ( settings::getSetting( settings::BoolSetting::AUDIO_micReversePtt ) )
|
if ( settings::getSetting( settings::BoolSetting::AUDIO_micReversePtt ) )
|
||||||
|
|||||||
@@ -1620,19 +1620,19 @@ void ChaperoneTabController::initCenterMarkerOverlay()
|
|||||||
if ( overlayError == ovr_overlay_wrapper::OverlayError::NoError )
|
if ( overlayError == ovr_overlay_wrapper::OverlayError::NoError )
|
||||||
{
|
{
|
||||||
m_floorMarkers[-3] = std::unique_ptr<QImage>(
|
m_floorMarkers[-3] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/chaperone/centermarkl3.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkl3.png" ) );
|
||||||
m_floorMarkers[-2] = std::unique_ptr<QImage>(
|
m_floorMarkers[-2] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/chaperone/centermarkl2.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkl2.png" ) );
|
||||||
m_floorMarkers[-1] = std::unique_ptr<QImage>(
|
m_floorMarkers[-1] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/chaperone/centermarkl1.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkl1.png" ) );
|
||||||
m_floorMarkers[0] = std::unique_ptr<QImage>(
|
m_floorMarkers[0] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/chaperone/centermark.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermark.png" ) );
|
||||||
m_floorMarkers[1] = std::unique_ptr<QImage>(
|
m_floorMarkers[1] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/chaperone/centermarkr1.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkr1.png" ) );
|
||||||
m_floorMarkers[2] = std::unique_ptr<QImage>(
|
m_floorMarkers[2] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/chaperone/centermarkr2.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkr2.png" ) );
|
||||||
m_floorMarkers[3] = std::unique_ptr<QImage>(
|
m_floorMarkers[3] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/chaperone/centermarkr3.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkr3.png" ) );
|
||||||
ovr_overlay_wrapper::setOverlayFromQImage(
|
ovr_overlay_wrapper::setOverlayFromQImage(
|
||||||
m_chaperoneFloorOverlayHandle, *m_floorMarkers[0], "" );
|
m_chaperoneFloorOverlayHandle, *m_floorMarkers[0], "" );
|
||||||
ovr_overlay_wrapper::setOverlayWidthInMeters(
|
ovr_overlay_wrapper::setOverlayWidthInMeters(
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ void RotationTabController::initStage2( OverlayController* var_parent )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_autoturnValues.autoturnImg.reset(
|
m_autoturnValues.autoturnImg.reset(
|
||||||
new QImage( QString( ":/rotation/autoturn.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/rotation/autoturn.png" ) );
|
||||||
m_autoturnValues.noautoturnImg.reset(
|
m_autoturnValues.noautoturnImg.reset(
|
||||||
new QImage( QString( ":/rotation/noautoturn.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/rotation/noautoturn.png" ) );
|
||||||
|
|
||||||
ovr_overlay_wrapper::setOverlayFromQImage( m_autoturnValues.overlayHandle,
|
ovr_overlay_wrapper::setOverlayFromQImage( m_autoturnValues.overlayHandle,
|
||||||
*m_autoturnValues.autoturnImg );
|
*m_autoturnValues.autoturnImg );
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "../keyboard_input/input_sender.h"
|
#include "../keyboard_input/input_sender.h"
|
||||||
#include "../settings/settings.h"
|
#include "../settings/settings.h"
|
||||||
#include "../utils/update_rate.h"
|
#include "../utils/update_rate.h"
|
||||||
#include "openvr/ovr_overlay_wrapper.h"
|
#include "../openvr/ovr_overlay_wrapper.h"
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <qimage.h>
|
#include <qimage.h>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
@@ -260,17 +260,17 @@ vr::VROverlayHandle_t UtilitiesTabController::createBatteryOverlay(
|
|||||||
if ( overlayError == vr::VROverlayError_None )
|
if ( overlayError == vr::VROverlayError_None )
|
||||||
{
|
{
|
||||||
m_batteryImgs[0] = std::unique_ptr<QImage>(
|
m_batteryImgs[0] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/battery/battery_0.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_0.png" ) );
|
||||||
m_batteryImgs[1] = std::unique_ptr<QImage>(
|
m_batteryImgs[1] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/battery/battery_1.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_1.png" ) );
|
||||||
m_batteryImgs[2] = std::unique_ptr<QImage>(
|
m_batteryImgs[2] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/battery/battery_2.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_2.png" ) );
|
||||||
m_batteryImgs[3] = std::unique_ptr<QImage>(
|
m_batteryImgs[3] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/battery/battery_3.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_3.png" ) );
|
||||||
m_batteryImgs[4] = std::unique_ptr<QImage>(
|
m_batteryImgs[4] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/battery/battery_4.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_4.png" ) );
|
||||||
m_batteryImgs[5] = std::unique_ptr<QImage>(
|
m_batteryImgs[5] = std::unique_ptr<QImage>(
|
||||||
new QImage( QString( ":/battery/battery_5.png" ) ) );
|
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_5.png" ) );
|
||||||
ovr_overlay_wrapper::setOverlayFromQImage( handle, *m_batteryImgs[0] );
|
ovr_overlay_wrapper::setOverlayFromQImage( handle, *m_batteryImgs[0] );
|
||||||
vr::VROverlay()->SetOverlayWidthInMeters( handle, 0.045f );
|
vr::VROverlay()->SetOverlayWidthInMeters( handle, 0.045f );
|
||||||
vr::HmdMatrix34_t notificationTransform;
|
vr::HmdMatrix34_t notificationTransform;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ void VideoTabController::initBrightnessOverlay()
|
|||||||
notifKey.c_str(), notifKey.c_str(), &m_brightnessOverlayHandle );
|
notifKey.c_str(), notifKey.c_str(), &m_brightnessOverlayHandle );
|
||||||
if ( overlayError == vr::VROverlayError_None )
|
if ( overlayError == vr::VROverlayError_None )
|
||||||
{
|
{
|
||||||
QImage notifIcon( QString( ":/video/dimmer.png" ) );
|
QImage notifIcon( ":qt/qml/AdvancedSettings/src/res/img/video/dimmer.png" );
|
||||||
ovr_overlay_wrapper::setOverlayFromQImage( m_brightnessOverlayHandle,
|
ovr_overlay_wrapper::setOverlayFromQImage( m_brightnessOverlayHandle,
|
||||||
notifIcon );
|
notifIcon );
|
||||||
vr::VROverlay()->SetOverlayWidthInMeters( m_brightnessOverlayHandle,
|
vr::VROverlay()->SetOverlayWidthInMeters( m_brightnessOverlayHandle,
|
||||||
@@ -86,7 +86,7 @@ void VideoTabController::initColorOverlay()
|
|||||||
notifKey.c_str(), notifKey.c_str(), &m_colorOverlayHandle );
|
notifKey.c_str(), notifKey.c_str(), &m_colorOverlayHandle );
|
||||||
if ( overlayError == vr::VROverlayError_None )
|
if ( overlayError == vr::VROverlayError_None )
|
||||||
{
|
{
|
||||||
QImage notifIcon( QString( ":/video/color.png" ) );
|
QImage notifIcon(":qt/qml/AdvancedSettings/src/res/img/video/color.png");
|
||||||
ovr_overlay_wrapper::setOverlayFromQImage( m_colorOverlayHandle,
|
ovr_overlay_wrapper::setOverlayFromQImage( m_colorOverlayHandle,
|
||||||
notifIcon );
|
notifIcon );
|
||||||
vr::VROverlay()->SetOverlayWidthInMeters( m_colorOverlayHandle,
|
vr::VROverlay()->SetOverlayWidthInMeters( m_colorOverlayHandle,
|
||||||
|
|||||||
Reference in New Issue
Block a user