Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d4db7ef4b | ||
|
|
8d661d2b31 | ||
|
|
9ecdda1572 | ||
|
|
93c0851055 | ||
|
|
1152cfee1f | ||
|
|
44a05dfd57 | ||
|
|
383f153c54 | ||
|
|
ca0ec3e07d |
@@ -16,3 +16,4 @@ build_scripts/win/__pycache__
|
||||
build_scripts/win/current_build.bat
|
||||
AdvancedSettings_resource.rc
|
||||
.qtc_clangd/
|
||||
out/
|
||||
|
||||
+543
@@ -0,0 +1,543 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(AdvancedSettings VERSION 5.7.4 LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
#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)
|
||||
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
|
||||
#set(CMAKE_AUTORCC ON)
|
||||
|
||||
|
||||
set(SRCS
|
||||
src/alarm_clock/vr_alarm.cpp
|
||||
src/keyboard_input/input_parser.cpp
|
||||
src/keyboard_input/keyboard_input.cpp
|
||||
src/main.cpp
|
||||
src/openvr/ivrinput.cpp
|
||||
src/openvr/lh_console_util.cpp
|
||||
src/openvr/openvr_init.cpp
|
||||
src/openvr/ovr_application_wrapper.cpp
|
||||
src/openvr/ovr_overlay_wrapper.cpp
|
||||
src/openvr/ovr_settings_wrapper.cpp
|
||||
src/openvr/ovr_system_wrapper.cpp
|
||||
src/overlaycontroller.cpp
|
||||
src/settings/settings.cpp
|
||||
src/settings/settings_object.cpp
|
||||
src/tabcontrollers/AudioTabController.cpp
|
||||
src/tabcontrollers/ChaperoneTabController.cpp
|
||||
src/tabcontrollers/FixFloorTabController.cpp
|
||||
src/tabcontrollers/MoveCenterTabController.cpp
|
||||
src/tabcontrollers/RotationTabController.cpp
|
||||
src/tabcontrollers/SettingsTabController.cpp
|
||||
src/tabcontrollers/StatisticsTabController.cpp
|
||||
src/tabcontrollers/SteamVRTabController.cpp
|
||||
src/tabcontrollers/UtilitiesTabController.cpp
|
||||
src/tabcontrollers/VideoTabController.cpp
|
||||
src/utils/ChaperoneUtils.cpp
|
||||
src/utils/FrameRateUtils.cpp
|
||||
src/utils/paths.cpp
|
||||
src/utils/setup.cpp
|
||||
src/utils/update_rate.cpp
|
||||
)
|
||||
|
||||
set(HEADERS
|
||||
src/alarm_clock/vr_alarm.h
|
||||
src/keyboard_input/input_parser.h
|
||||
src/keyboard_input/keyboard_input.h
|
||||
#TODO, check if we need this
|
||||
#src/keyboard_input/keyboard_sender.h
|
||||
src/openvr/ivrinput.h
|
||||
src/openvr/ivrinput_action.h
|
||||
src/openvr/ivrinput_input_source.h
|
||||
src/openvr/ivrinput_manifest.h
|
||||
src/openvr/lh_console_util.h
|
||||
src/openvr/openvr_init.h
|
||||
src/openvr/ovr_application_wrapper.h
|
||||
src/openvr/ovr_overlay_wrapper.h
|
||||
src/openvr/ovr_settings_wrapper.h
|
||||
src/openvr/ovr_system_wrapper.h
|
||||
src/overlaycontroller.h
|
||||
src/settings/settings.h
|
||||
src/settings/settings_object.h
|
||||
src/settings/internal/bool_setting_value.h
|
||||
src/settings/internal/double_setting_value.h
|
||||
src/settings/internal/setting_value.h
|
||||
src/settings/internal/settings_controller.h
|
||||
src/settings/internal/settings_object_data.h
|
||||
src/settings/internal/specific_setting_value.h
|
||||
src/tabcontrollers/AudioTabController.h
|
||||
src/tabcontrollers/ChaperoneTabController.h
|
||||
src/tabcontrollers/FixFloorTabController.h
|
||||
src/tabcontrollers/MoveCenterTabController.h
|
||||
src/tabcontrollers/RotationTabController.h
|
||||
src/tabcontrollers/SettingsTabController.h
|
||||
src/tabcontrollers/StatisticsTabController.h
|
||||
src/tabcontrollers/SteamVRTabController.h
|
||||
src/tabcontrollers/UtilitiesTabController.h
|
||||
src/tabcontrollers/VideoTabController.h
|
||||
src/utils/ChaperoneUtils.h
|
||||
src/utils/FrameRateUtils.h
|
||||
src/utils/paths.h
|
||||
src/utils/setup.h
|
||||
src/utils/update_rate.h
|
||||
src/utils/Matrix.h
|
||||
src/quaternion/quaternion.h
|
||||
)
|
||||
|
||||
set(QML_FILERC
|
||||
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/MediaButton.qml
|
||||
src/res/qml/utilities_page/misc/MiscBox.qml
|
||||
src/res/qml/utilities_page/alarm_clock/AlarmGroupBox.qml
|
||||
src/res/qml/utilities_page/UtilitiesPage.qml
|
||||
src/res/qml/motion_page/space_drag/SpaceDragGroupBox.qml
|
||||
src/res/qml/motion_page/height_toggle/HeightToggleGroupBox.qml
|
||||
src/res/qml/motion_page/gravity/GravityGroupBox.qml
|
||||
src/res/qml/motion_page/MotionPage.qml
|
||||
src/res/qml/PlayspacePage.qml
|
||||
src/res/qml/SettingsPage.qml
|
||||
src/res/qml/ChaperoneWarningsPage.qml
|
||||
src/res/qml/chaperone_page/ChaperonePage.qml
|
||||
src/res/qml/chaperone_page/change_orientation/ChangeOrientationGroupBox.qml
|
||||
src/res/qml/chaperone_page/chaperone_additional/ChaperoneAdditionalPage.qml
|
||||
src/res/qml/chaperone_page/chaperone_additional/chaperonemisc/ChaperoneMiscGroupBox.qml
|
||||
src/res/qml/chaperone_page/chaperone_additional/chaperonetype/ChaperoneTypeGroupBox.qml
|
||||
src/res/qml/chaperone_page/chaperone_additional/chaperoneboundscolor/ChaperoneBoundsColorGroupBox.qml
|
||||
src/res/qml/RootPage.qml
|
||||
src/res/qml/steamvr_page/steamvrmisc/SteamVRMiscGroupBox.qml
|
||||
src/res/qml/steamvr_page/SteamVRPage.qml
|
||||
src/res/qml/steamvr_page/camera/CameraGroupBox.qml
|
||||
src/res/qml/steamvr_page/steamvr_additional/SteamVRTXRXPage.qml
|
||||
src/res/qml/steamvr_page/steamvrbind/SteamVRBindGroupBox.qml
|
||||
src/res/qml/audio_page/device_selector/MicDeviceSelector.qml
|
||||
src/res/qml/audio_page/device_selector/AudioDeviceSelector.qml
|
||||
src/res/qml/audio_page/device_selector/MirrorDeviceSelector.qml
|
||||
src/res/qml/audio_page/device_selector/MirrorVolumeSlider.qml
|
||||
src/res/qml/audio_page/device_selector/MicVolumeSlider.qml
|
||||
src/res/qml/audio_page/dialog_boxes/AudioDeleteProfileDialog.qml
|
||||
src/res/qml/audio_page/dialog_boxes/AudioNewProfileDialog.qml
|
||||
src/res/qml/audio_page/dialog_boxes/AudioMessageDialog.qml
|
||||
src/res/qml/audio_page/proximity/ProximityToggle.qml
|
||||
src/res/qml/audio_page/profiles/ProfileButtons.qml
|
||||
src/res/qml/audio_page/AudioPage.qml
|
||||
src/res/qml/audio_page/push_to_talk/PttButtons.qml
|
||||
src/res/qml/FixFloorPage.qml
|
||||
src/res/qml/common/MySlider.qml
|
||||
src/res/qml/common/MyResources.qml
|
||||
src/res/qml/common/MyPushButton.qml
|
||||
src/res/qml/common/HourComboBox.qml
|
||||
src/res/qml/common/MyText.qml
|
||||
src/res/qml/common/MyToggleButton.qml
|
||||
src/res/qml/common/MinuteSecondComboBox.qml
|
||||
src/res/qml/common/MyComboBox.qml
|
||||
src/res/qml/common/MyTextField.qml
|
||||
src/res/qml/common/TimeAssembly.qml
|
||||
src/res/qml/common/MyDialogOkPopup.qml
|
||||
src/res/qml/common/mainwidget.qml
|
||||
src/res/qml/common/LineSeparator.qml
|
||||
src/res/qml/common/MyPushButton2.qml
|
||||
src/res/qml/common/MyStackViewPage.qml
|
||||
src/res/qml/common/MyRadioButton.qml
|
||||
src/res/qml/common/FullWidthSliderBox.qml
|
||||
src/res/qml/common/MyDialogOkCancelPopup.qml
|
||||
src/res/qml/rotation_page/view_ratchet/ViewRatchetGroupBox.qml
|
||||
src/res/qml/rotation_page/redirected/RedirectedGroupBox.qml
|
||||
src/res/qml/rotation_page/redirected/AutoTurnGroupBox.qml
|
||||
src/res/qml/rotation_page/snap_turn/SnapTurnGroupBox.qml
|
||||
src/res/qml/rotation_page/space_turn/SpaceTurnGroupBox.qml
|
||||
src/res/qml/rotation_page/RotationPage.qml
|
||||
src/res/qml/video_page/brightness/BrightnessGroupBox.qml
|
||||
src/res/qml/video_page/profiles/VideoProfileGroupBox.qml
|
||||
src/res/qml/video_page/overlaycolorbright/OverlayMethodGroupBox.qml
|
||||
src/res/qml/video_page/miscvid/VideoMiscGroupBox.qml
|
||||
src/res/qml/video_page/supersampling/SuperSamplingGroupBox.qml
|
||||
src/res/qml/video_page/color/ColorGroupBox.qml
|
||||
src/res/qml/video_page/VideoPage.qml
|
||||
src/res/qml/video_page/dialogboxes/VideoNewProfileDialog.qml
|
||||
src/res/qml/video_page/dialogboxes/VideoMessageDialog.qml
|
||||
src/res/qml/video_page/dialogboxes/VideoDeleteProfileDialog.qml
|
||||
src/res/qml/StatisticsPage.qml
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
#set_source_files_properties(src/res/qml/common/MyResources.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
|
||||
#qt_add_executable(AdvancedSettings WIN32 MACOSX_BUNDLE ${SRCS} ${HEADERS})
|
||||
qt_add_executable(AdvancedSettings
|
||||
${SRCS}
|
||||
${HEADERS}
|
||||
)
|
||||
#src/res/resources.qrc
|
||||
|
||||
qt_add_qml_module(AdvancedSettings
|
||||
URI AdvancedSettings
|
||||
QML_FILES
|
||||
${QML_FILERC}
|
||||
RESOURCES
|
||||
${ResourcesRC}
|
||||
VERSION ${PROJECT_VERSION}
|
||||
)
|
||||
|
||||
target_include_directories(AdvancedSettings PUBLIC
|
||||
third-party/nlohmann
|
||||
third-party/openvr/headers
|
||||
${Vulkan_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
# Avoid collision between executable name and QML module directory (QTBUG-98568).
|
||||
if(NOT WIN32 AND NOT APPLE)
|
||||
set_property(TARGET AdvancedSettings PROPERTY OUTPUT_NAME AdvancedSettings_app)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(AdvancedSettings PRIVATE
|
||||
APPLICATION_VERSION=\"${PROJECT_VERSION}\"
|
||||
)
|
||||
|
||||
#find_library(OPENVR_LIBRARIES
|
||||
# NAMES
|
||||
# openvr_api
|
||||
# PATHS
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/third-party/openvr/bin
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/third-party/openvr/lib
|
||||
# PATH_SUFFIXES
|
||||
# linux64
|
||||
# win64
|
||||
# NO_DEFAULT_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
|
||||
Qt::Gui
|
||||
Qt6::Core5Compat
|
||||
# For QRhi
|
||||
Qt::GuiPrivate
|
||||
Qt::Multimedia
|
||||
Qt::Qml
|
||||
Qt::Quick
|
||||
Qt::WebSockets
|
||||
Qt::Widgets
|
||||
Qt::QuickControls2
|
||||
Qt::QuickDialogs2
|
||||
Qt::Svg
|
||||
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}"
|
||||
)
|
||||
|
||||
# resCopy
|
||||
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${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"
|
||||
)
|
||||
|
||||
# licenseCopy
|
||||
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${CMAKE_SOURCE_DIR}/LICENSE" "${COPY_DEST_DIR}/LICENSE"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${CMAKE_SOURCE_DIR}/third-party/openvr/LICENSE-VALVE" "${COPY_DEST_DIR}/LICENSE-VALVE"
|
||||
#COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
#"${CMAKE_SOURCE_DIR}/third-party/magic_enum/LICENSE" "${COPY_DEST_DIR}/LICENSE-MAGIC-ENUM"
|
||||
)
|
||||
|
||||
# packageFoldersCopy
|
||||
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||
"${CMAKE_SOURCE_DIR}/src/package_files/default_action_manifests"
|
||||
"${COPY_DEST_DIR}/default_action_manifests"
|
||||
)
|
||||
|
||||
# packageFilesCopy
|
||||
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${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 ()
|
||||
|
||||
# openvrApiCopy
|
||||
if (WIN32)
|
||||
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
"${CMAKE_SOURCE_DIR}/third-party/openvr/bin/win64/openvr_api.dll" "${COPY_DEST_DIR}/openvr_api.dll"
|
||||
)
|
||||
else ()
|
||||
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||
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 ()
|
||||
|
||||
# opensslCopy
|
||||
if (WIN32)
|
||||
add_custom_command(TARGET AdvancedSettings POST_BUILD
|
||||
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 ()
|
||||
|
||||
target_include_directories(AdvancedSettings PRIVATE
|
||||
third-party/openvr/headers
|
||||
third-party/policyconfig
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
target_sources(AdvancedSettings PRIVATE
|
||||
src/keyboard_input/input_sender_win.cpp
|
||||
src/media_keys/media_keys_win.cpp
|
||||
src/tabcontrollers/audiomanager/AudioManagerWindows.cpp
|
||||
src/tabcontrollers/audiomanager/AudioManagerWindows.h
|
||||
)
|
||||
|
||||
target_link_libraries(AdvancedSettings PRIVATE
|
||||
ole32
|
||||
user32
|
||||
)
|
||||
|
||||
if (MSVC)
|
||||
target_compile_definitions(AdvancedSettings PRIVATE
|
||||
_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
|
||||
)
|
||||
target_compile_options(AdvancedSettings PRIVATE
|
||||
/GL /Gw /W4 /permissive- /w14254 /w14263 /w14265 /w14287 /w14296 /w14311
|
||||
/w14545 /w14546 /w14547 /w14549 /w14555 /w14640 /w14826 /w14905 /w14906
|
||||
/w14928 /wd4127 /we4289 /Zc:__cplusplus
|
||||
)
|
||||
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 (NOT APPLE AND NOT noDBUS)
|
||||
target_sources(AdvancedSettings PRIVATE
|
||||
src/media_keys/media_keys_dbus.cpp
|
||||
)
|
||||
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 ()
|
||||
|
||||
if (NOT APPLE AND NOT noPulse)
|
||||
target_sources(AdvancedSettings PRIVATE
|
||||
src/tabcontrollers/audiomanager/AudioManagerPulse.cpp
|
||||
src/tabcontrollers/audiomanager/AudioManagerPulse.h
|
||||
src/tabcontrollers/audiomanager/AudioManagerPulse_internal.h
|
||||
)
|
||||
target_link_libraries(AdvancedSettings PRIVATE pulse)
|
||||
elseif (NOT APPLE AND noPulse)
|
||||
target_sources(AdvancedSettings PRIVATE
|
||||
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
|
||||
src/tabcontrollers/audiomanager/AudioManagerDummy.h
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
target_sources(AdvancedSettings PRIVATE
|
||||
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 ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
target_compile_options(AdvancedSettings PRIVATE
|
||||
-Wcast-align
|
||||
-Wconversion
|
||||
-Wdouble-promotion
|
||||
-Wduplicated-branches
|
||||
-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 ()
|
||||
|
||||
if (debugSymbolsAndLogs)
|
||||
target_compile_definitions(AdvancedSettings PRIVATE ENABLE_DEBUG_LOGGING)
|
||||
endif ()
|
||||
|
||||
install(TARGETS AdvancedSettings
|
||||
BUNDLE DESTINATION .
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
|
||||
#qt_generate_deploy_qml_app_script(
|
||||
# TARGET AdvancedSettings
|
||||
# OUTPUT_SCRIPT deploy_script
|
||||
#)
|
||||
#install(SCRIPT ${deploy_script})
|
||||
if (WIN32)
|
||||
qt_generate_deploy_qml_app_script(
|
||||
TARGET AdvancedSettings
|
||||
OUTPUT_SCRIPT deploy_script
|
||||
MACOS_BUNDLE_POST_BUILD
|
||||
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" ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,129 +0,0 @@
|
||||
QT += core gui qml quick multimedia widgets websockets
|
||||
CONFIG += c++1z file_copies optimize_full
|
||||
|
||||
DEFINES += ELPP_THREAD_SAFE ELPP_QT_LOGGING ELPP_NO_DEFAULT_LOG_FILE
|
||||
|
||||
VERSION = "$$cat($$PWD/build_scripts/compile_version_string.txt)"
|
||||
DEFINES += APPLICATION_VERSION=\\\"$$VERSION\\\"
|
||||
# Qmake can't handle non-integers in the version string,
|
||||
# so we take out anything after the dash.
|
||||
SPLIT_VERSION_STRING = $$split(VERSION, -)
|
||||
NUMERICAL_VERSION_NUMBER = $$member(SPLIT_VERSION_STRING, 0, 0)
|
||||
VERSION = $$NUMERICAL_VERSION_NUMBER
|
||||
|
||||
# Keep the literal version number in the description field for debugging.
|
||||
QMAKE_TARGET_DESCRIPTION = "$$cat($$PWD/build_scripts/compile_version_string.txt)"
|
||||
|
||||
lessThan(QT_MAJOR_VERSION, 5): error("requires Qt 5.12 or higher")
|
||||
lessThan(QT_MINOR_VERSION, 12): error("requires Qt 5.12 or higher")
|
||||
|
||||
TARGET = AdvancedSettings
|
||||
TEMPLATE = app
|
||||
|
||||
win32:DESTDIR = bin/win64/AdvancedSettings
|
||||
unix:DESTDIR = bin/linux/AdvancedSettings
|
||||
|
||||
include_dir = $$PWD/build_scripts/qt/
|
||||
|
||||
win32-msvc {
|
||||
include($$include_dir/compilers/msvc.pri)
|
||||
}
|
||||
win32-clang-msvc{
|
||||
include($$include_dir/compilers/clang-msvc.pri)
|
||||
}
|
||||
*g++* {
|
||||
include($$include_dir/compilers/gcc.pri)
|
||||
}
|
||||
#Look for anything clang that is not clang-msvc, since it does not
|
||||
#allow all the same switches as regular clang.
|
||||
*clang|*clang-g++|*clang-libc++ {
|
||||
include($$include_dir/compilers/clang.pri)
|
||||
}
|
||||
|
||||
include($$include_dir/sources.pri)
|
||||
|
||||
include($$include_dir/resources.pri)
|
||||
|
||||
# Copy extra files
|
||||
COPIES += resCopy readmeCopy licenseCopy packageFoldersCopy openvrApiCopy packageFilesCopy
|
||||
COPY_DEST_DIR = $$OUT_PWD/$$DESTDIR
|
||||
|
||||
resCopy.files = $$files(src/res)
|
||||
resCopy.path = $$COPY_DEST_DIR
|
||||
|
||||
readmeCopy.files = Readme.md
|
||||
readmeCopy.path = $$COPY_DEST_DIR
|
||||
|
||||
licenseCopy.files = LICENSE \
|
||||
third-party/openvr/LICENSE-VALVE \
|
||||
third-party/easylogging++/LICENSE-MIT
|
||||
licenseCopy.path = $$COPY_DEST_DIR
|
||||
|
||||
packageFoldersCopy.files = src/package_files/default_action_manifests
|
||||
packageFoldersCopy.path = $$COPY_DEST_DIR
|
||||
|
||||
packageFilesCopy.files = src/package_files/action_manifest.json src/package_files/manifest.vrmanifest
|
||||
win32:packageFilesCopy.files += src/package_files/qt.conf src/package_files/restartvrserver.bat src/package_files/startdesktopmode.bat
|
||||
packageFilesCopy.path = $$COPY_DEST_DIR
|
||||
|
||||
win32:openvrApiCopy.files = third-party/openvr/bin/win64/openvr_api.dll
|
||||
unix:openvrApiCopy.files = third-party/openvr/lib/linux64/libopenvr_api.so
|
||||
openvrApiCopy.path = $$COPY_DEST_DIR
|
||||
|
||||
# Deploy openssl when on win32
|
||||
win32 {
|
||||
COPIES += opensslCopy
|
||||
opensslCopy.files = third-party/openssl/libcrypto-1_1-x64.dll
|
||||
opensslCopy.files += third-party/openssl/libssl-1_1-x64.dll
|
||||
opensslCopy.files += third-party/openssl/LICENSE-OPENSSL
|
||||
opensslCopy.path = $$COPY_DEST_DIR
|
||||
}
|
||||
|
||||
# Deploy resources and DLLs to exe dir on Windows
|
||||
win32 {
|
||||
WINDEPLOYQT_LOCATION = $$dirname(QMAKE_QMAKE)/windeployqt.exe
|
||||
|
||||
CONFIG( debug, debug|release ) {
|
||||
WINDEPLOYQT_BUILD_TARGET += "--debug"
|
||||
} else {
|
||||
WINDEPLOYQT_BUILD_TARGET += "--release"
|
||||
}
|
||||
|
||||
WINDEPLOYQT_OPTIONS = --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 $$PWD/src/res/qml \
|
||||
$$COPY_DEST_DIR/AdvancedSettings.exe
|
||||
WINDEPLOYQT_FULL_LINE = "$$WINDEPLOYQT_LOCATION $$WINDEPLOYQT_OPTIONS"
|
||||
|
||||
# Force windeployqt to run in cmd, because powershell has different syntax
|
||||
# for running executables.
|
||||
QMAKE_POST_LINK = cmd /c $$WINDEPLOYQT_FULL_LINE
|
||||
}
|
||||
|
||||
# Add make install support
|
||||
unix {
|
||||
isEmpty(PREFIX){
|
||||
PREFIX = /opt/OpenVR-AdvancedSettings
|
||||
}
|
||||
|
||||
message(PREFIX value is: \'$$PREFIX\'. `make install` will install to this location.)
|
||||
|
||||
application.path = $$PREFIX
|
||||
application.files = $$COPY_DEST_DIR
|
||||
|
||||
INSTALLS += application
|
||||
}
|
||||
|
||||
debugSymbolsAndLogs {
|
||||
message(Debug symbols and logging enabled.)
|
||||
CONFIG += force_debug_info
|
||||
DEFINES += ENABLE_DEBUG_LOGGING
|
||||
}
|
||||
|
||||
warnings_as_errors {
|
||||
message(Warnings as errors enabled.)
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
QMAKE_CXXFLAGS += -Wextra
|
||||
|
||||
QMAKE_CXXFLAGS += -Wshadow
|
||||
|
||||
QMAKE_CXXFLAGS += -Wold-style-cast
|
||||
|
||||
QMAKE_CXXFLAGS += -Wnon-virtual-dtor
|
||||
|
||||
QMAKE_CXXFLAGS += -Wcast-align -Wunused -Woverloaded-virtual -Wformat=2
|
||||
|
||||
QMAKE_CXXFLAGS += -Wdouble-promotion
|
||||
|
||||
# Enable Link Time Optimization
|
||||
QMAKE_CXXFLAGS += -flto
|
||||
# Clang LTO requires the gold linker instead of ld
|
||||
QMAKE_LFLAGS += -flto -fuse-ld=gold
|
||||
@@ -1,18 +0,0 @@
|
||||
include(common-msvc.pri)
|
||||
|
||||
#win32-clang-msvc is unable to correctly build the first time
|
||||
#with warnings as errors on. There seems to be an issue with the moc_predefs.h
|
||||
#file not being built correctly when /WX is on. Until the issue is fixed,
|
||||
#win32-clang-msvc is built without /WX.
|
||||
|
||||
#clang-msvc does not enable the c++17 flag with qmake's c++1z flag.
|
||||
QMAKE_CXXFLAGS += /std:c++17
|
||||
|
||||
include(clang-gcc-common-switches.pri)
|
||||
|
||||
QMAKE_CXXFLAGS += -Wmost
|
||||
|
||||
QMAKE_CXXFLAGS += -Weffc++ -Wmissing-variable-declarations
|
||||
|
||||
#clang-msvc spams warnings on -Wconversion and -Wsign-conversion
|
||||
# from the moc .cpp files including Qt stuff.
|
||||
@@ -1,62 +0,0 @@
|
||||
# comments are the value of CLANG_VERSION
|
||||
CLANG_VERSION = $$system("clang++ --version | grep 'clang version'")
|
||||
# clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
|
||||
CLANG_VERSION = $$split(CLANG_VERSION, ' ')
|
||||
# CLANG_VERSION is now a list, this is shown as spaces in QMAKE
|
||||
# clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
|
||||
CLANG_VERSION = $$member(CLANG_VERSION, 2)
|
||||
# 6.0.0-1ubuntu2
|
||||
CLANG_VERSION = $$split(CLANG_VERSION, '.')
|
||||
# 6 0 0-1ubuntu2
|
||||
CLANG_VERSION = $$member(CLANG_VERSION, 0)
|
||||
# 6
|
||||
|
||||
greaterThan(CLANG_VERSION, 4) {
|
||||
message('clang++' version is above 4. Using regular clang++.)
|
||||
QMAKE_CXX = clang++
|
||||
QMAKE_LINK = clang++
|
||||
}
|
||||
else {
|
||||
message('clang++' version is not above 4. Attempting to use highest specific version.)
|
||||
system("clang++-5 --version") {
|
||||
QMAKE_CXX = clang++-5
|
||||
QMAKE_LINK = clang++-5
|
||||
message('clang++-5' found.)
|
||||
}
|
||||
system("clang++-6 --version") {
|
||||
QMAKE_CXX = clang++-6
|
||||
QMAKE_LINK = clang++-6
|
||||
message('clang++-6' found.)
|
||||
}
|
||||
system("clang++-7 --version") {
|
||||
QMAKE_CXX = clang++-7
|
||||
QMAKE_LINK = clang++-7
|
||||
message('clang++-7' found.)
|
||||
}
|
||||
system("clang++-8 --version") {
|
||||
QMAKE_CXX = clang++-8
|
||||
QMAKE_LINK = clang++-8
|
||||
message('clang++-8' found.)
|
||||
}
|
||||
}
|
||||
|
||||
system("$$QMAKE_CXX --version")
|
||||
|
||||
include(clang-gcc-common-switches.pri)
|
||||
|
||||
QMAKE_CXXFLAGS += -Wmost
|
||||
|
||||
QMAKE_CXXFLAGS += -Wpedantic
|
||||
|
||||
warnings_as_errors {
|
||||
QMAKE_CXXFLAGS += -Werror
|
||||
}
|
||||
|
||||
#All includes from the third-party directory will not warn.
|
||||
QMAKE_CXXFLAGS += --system-header-prefix=third-party
|
||||
QMAKE_CXXFLAGS += --system-header-prefix=qt
|
||||
|
||||
# Sign conversion warns on auto generated Qt MOC files.
|
||||
QMAKE_CXXFLAGS += -Weffc++ -Wconversion -Wno-sign-conversion
|
||||
|
||||
QMAKE_CXXFLAGS += -Wextra-semi -Wzero-as-null-pointer-constant -Wmissing-variable-declarations
|
||||
@@ -1,49 +0,0 @@
|
||||
#Removing -W3 from both FLAGS is necessary, otherwise compiler will give
|
||||
#D9025: overriding '/W4' with '/W3'
|
||||
QMAKE_CFLAGS_WARN_ON -= -W3
|
||||
QMAKE_CXXFLAGS_WARN_ON -= -W3
|
||||
#C4127 is a warning in qvarlengtharray.h that can not be turned off
|
||||
#on the current version of MSVC.
|
||||
QMAKE_CXXFLAGS += /W4 /wd4127
|
||||
# The codecvt header being used in AudioManagerWindows.cpp is deprecated by the standard,
|
||||
# but no suitable replacement has been standardized yet. It is possible to use the Windows
|
||||
# specific MultiByteToWideChar() and WideCharToMultiByte() from <Windows.h>
|
||||
DEFINES += _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
|
||||
|
||||
# Enables Whole Program Optimization
|
||||
QMAKE_CXXFLAGS += /Gw
|
||||
|
||||
# 'operator': conversion from 'type1:field_bits' to 'type2:field_bits', possible loss of data
|
||||
QMAKE_CXXFLAGS += /w14254
|
||||
# 'function': member function does not override any base class virtual member function
|
||||
QMAKE_CXXFLAGS += /w14263
|
||||
# 'classname': class has virtual functions, but destructor is not virtual instances of this class may not be destructed correctly
|
||||
QMAKE_CXXFLAGS += /w14265
|
||||
# 'operator': unsigned/negative constant mismatch
|
||||
QMAKE_CXXFLAGS += /w14287
|
||||
# nonstandard extension used: 'variable': loop control variable declared in the for-loop is used outside the for-loop scope
|
||||
QMAKE_CXXFLAGS += /we4289
|
||||
# 'operator': expression is always 'boolean_value'
|
||||
QMAKE_CXXFLAGS += /w14296
|
||||
# 'variable': pointer truncation from 'type1' to 'type2'
|
||||
QMAKE_CXXFLAGS += /w14311
|
||||
# expression before comma evaluates to a function which is missing an argument list
|
||||
QMAKE_CXXFLAGS += /w14545
|
||||
# function call before comma missing argument list
|
||||
QMAKE_CXXFLAGS += /w14546
|
||||
# 'operator': operator before comma has no effect; expected operator with side-effect
|
||||
QMAKE_CXXFLAGS += /w14547
|
||||
# 'operator': operator before comma has no effect; did you intend 'operator'?
|
||||
QMAKE_CXXFLAGS += /w14549
|
||||
# expression has no effect; expected expression with side-effect
|
||||
QMAKE_CXXFLAGS += /w14555
|
||||
# Enable warning on thread un-safe static member initialization
|
||||
QMAKE_CXXFLAGS += /w14640
|
||||
# Conversion from 'type1' to 'type_2' is sign-extended. This may cause unexpected runtime behavior.
|
||||
QMAKE_CXXFLAGS += /w14826
|
||||
# wide string literal cast to 'LPSTR'
|
||||
QMAKE_CXXFLAGS += /w14905
|
||||
# string literal cast to 'LPWSTR'
|
||||
QMAKE_CXXFLAGS += /w14906
|
||||
# illegal copy-initialization; more than one user-defined conversion has been implicitly applied
|
||||
QMAKE_CXXFLAGS += /w14928
|
||||
@@ -1,44 +0,0 @@
|
||||
GCC_VERSION = $$system("g++ -dumpversion")
|
||||
greaterThan(GCC_VERSION, 6) {
|
||||
message('g++' version is above 6. Using regular g++.)
|
||||
}
|
||||
else {
|
||||
message('g++' version is not above 6. Attempting to use highest specific version.)
|
||||
system(g++-7 --version) {
|
||||
message('g++-7' found.)
|
||||
QMAKE_CXX = g++-7
|
||||
QMAKE_LINK = g++-7
|
||||
}
|
||||
system(g++-8 --version) {
|
||||
message('g++-8' found.)
|
||||
QMAKE_CXX = g++-8
|
||||
QMAKE_LINK = g++-8
|
||||
}
|
||||
system(g++-9 --version) {
|
||||
message('g++-9' found.)
|
||||
QMAKE_CXX = g++-9
|
||||
QMAKE_LINK = g++-9
|
||||
}
|
||||
}
|
||||
|
||||
system("$$QMAKE_CXX --version")
|
||||
|
||||
include(clang-gcc-common-switches.pri)
|
||||
|
||||
QMAKE_CXXFLAGS += -Wpedantic
|
||||
|
||||
warnings_as_errors {
|
||||
QMAKE_CXXFLAGS += -Werror
|
||||
}
|
||||
|
||||
# GCC only switches
|
||||
QMAKE_CXXFLAGS += -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wrestrict -Wnull-dereference
|
||||
|
||||
# Sign conversion warns on auto generated Qt MOC files.
|
||||
QMAKE_CXXFLAGS += -Wconversion -Wno-sign-conversion
|
||||
|
||||
QMAKE_CXXFLAGS += -Wzero-as-null-pointer-constant
|
||||
|
||||
# Qmake will append this even though higher optimization levels are used.
|
||||
QMAKE_LFLAGS_RELEASE -= -Wl,-O1
|
||||
QMAKE_LFLAGS += -Wl,-O3 -O3
|
||||
@@ -1,69 +0,0 @@
|
||||
project_dir = $$PWD/../../
|
||||
|
||||
win32:LIBS += -L"$$project_dir/third-party/openvr/lib/win64" -luser32 -lole32
|
||||
unix:LIBS += -L"$$project_dir/third-party/openvr/lib/linux64"
|
||||
LIBS += -lopenvr_api
|
||||
|
||||
RESOURCES += src/res/resources.qrc
|
||||
|
||||
DISTFILES += \
|
||||
src/res/sounds/alarm01.wav \
|
||||
src/res/sounds/click.wav \
|
||||
src/res/sounds/focus.wav \
|
||||
src/res/img/audio/microphone/ptt_notification.png \
|
||||
src/res/img/audio/microphone/ptt_notification.svg \
|
||||
src/res/img/battery/* \
|
||||
src/res/img/icons/* \
|
||||
src/res/img/alarm/* \
|
||||
src/res/img/video/* \
|
||||
src/res/img/chaperone/* \
|
||||
src/res/qml/qmldir \
|
||||
src/res/qml/audio_page/* \
|
||||
src/res/qml/ChaperonePage.qml \
|
||||
src/res/qml/ChaperoneWarningsPage.qml \
|
||||
src/res/qml/chaperone_page/* \
|
||||
src/res/qml/chaperone_page/change_orientation/* \
|
||||
src/res/qml/chaperone_page/chaperone_additional/* \
|
||||
src/res/qml/chaperone_page/chaperone_additional/chaperoneboundscolor/* \
|
||||
src/res/qml/chaperone_page/chaperone_additional/chaperonetype/* \
|
||||
src/res/qml/chaperone_page/chaperone_additional/chaperonemisc/* \
|
||||
src/res/qml/FixFloorPage.qml \
|
||||
src/res/qml/PlayspacePage.qml \
|
||||
src/res/qml/motion_page/* \
|
||||
src/res/qml/motion_page/gravity/* \
|
||||
src/res/qml/motion_page/height_toggle/* \
|
||||
src/res/qml/motion_page/space_drag/* \
|
||||
src/res/qml/RootPage.qml \
|
||||
src/res/qml/SettingsPage.qml \
|
||||
src/res/qml/StatisticsPage.qml \
|
||||
src/res/qml/steamvr_page/SteamVRPage.qml \
|
||||
src/res/qml/steamvr_page/steamvr_additional/* \
|
||||
src/res/qml/steamvr_page/camera/* \
|
||||
src/res/qml/steamvr_page/steamvrmisc/* \
|
||||
src/res/qml/steamvr_page/steamvrbind/* \
|
||||
src/res/qml/utilities_page/* \
|
||||
src/res/qml/utilities_page/media_keys/* \
|
||||
src/res/qml/utilities_page/keyboard_utils/* \
|
||||
src/res/qml/utilities_page/alarm_clock/* \
|
||||
src/res/qml/utilities_page/misc/* \
|
||||
src/res/qml/audio_page/dialog_boxes/* \
|
||||
src/res/qml/audio_page/device_selector/* \
|
||||
src/res/qml/audio_page/proximity/* \
|
||||
src/res/qml/audio_page/push_to_talk/* \
|
||||
src/res/qml/audio_page/profiles/* \
|
||||
src/res/qml/video_page/* \
|
||||
src/res/qml/video_page/brightness/* \
|
||||
src/res/qml/video_page/color/* \
|
||||
src/res/qml/video_page/supersampling/* \
|
||||
src/res/qml/video_page/miscvid/* \
|
||||
src/res/qml/video_page/profiles/* \
|
||||
src/res/qml/video_page/dialogboxes/* \
|
||||
src/res/qml/video_page/overlaycolorbright/* \
|
||||
src/res/qml/rotation_page/* \
|
||||
src/res/qml/rotation_page/redirected/* \
|
||||
src/res/qml/rotation_page/snap_turn/* \
|
||||
src/res/qml/rotation_page/space_turn/* \
|
||||
src/res/qml/rotation_page/view_ratchet/* \
|
||||
src/res/qml/common/*
|
||||
|
||||
win32:RC_ICONS += src/res/img/icons/advicon256px.ico
|
||||
@@ -1,157 +0,0 @@
|
||||
SOURCES += src/main.cpp\
|
||||
src/overlaycontroller.cpp \
|
||||
src/tabcontrollers/AudioTabController.cpp \
|
||||
src/tabcontrollers/ChaperoneTabController.cpp \
|
||||
src/tabcontrollers/FixFloorTabController.cpp \
|
||||
src/tabcontrollers/MoveCenterTabController.cpp \
|
||||
src/tabcontrollers/SettingsTabController.cpp \
|
||||
src/tabcontrollers/StatisticsTabController.cpp \
|
||||
src/tabcontrollers/SteamVRTabController.cpp \
|
||||
src/tabcontrollers/UtilitiesTabController.cpp \
|
||||
src/tabcontrollers/VideoTabController.cpp \
|
||||
src/tabcontrollers/RotationTabController.cpp\
|
||||
src/utils/ChaperoneUtils.cpp \
|
||||
src/openvr/openvr_init.cpp \
|
||||
src/openvr/ivrinput.cpp \
|
||||
src/openvr/ovr_settings_wrapper.cpp \
|
||||
src/openvr/ovr_overlay_wrapper.cpp \
|
||||
src/openvr/ovr_system_wrapper.cpp \
|
||||
src/openvr/lh_console_util.cpp \
|
||||
src/openvr/ovr_application_wrapper.cpp \
|
||||
src/utils/setup.cpp \
|
||||
src/utils/paths.cpp \
|
||||
src/utils/FrameRateUtils.cpp \
|
||||
src/keyboard_input/keyboard_input.cpp \
|
||||
src/keyboard_input/input_parser.cpp \
|
||||
src/settings/settings.cpp \
|
||||
src/settings/settings_object.cpp \
|
||||
src/alarm_clock/vr_alarm.cpp \
|
||||
src/utils/update_rate.cpp \
|
||||
|
||||
|
||||
|
||||
HEADERS += src/overlaycontroller.h \
|
||||
src/tabcontrollers/AudioTabController.h \
|
||||
src/tabcontrollers/ChaperoneTabController.h \
|
||||
src/tabcontrollers/FixFloorTabController.h \
|
||||
src/tabcontrollers/MoveCenterTabController.h \
|
||||
src/tabcontrollers/SettingsTabController.h \
|
||||
src/tabcontrollers/StatisticsTabController.h \
|
||||
src/tabcontrollers/SteamVRTabController.h \
|
||||
src/tabcontrollers/UtilitiesTabController.h \
|
||||
src/tabcontrollers/VideoTabController.h \
|
||||
src/tabcontrollers/audiomanager/AudioManager.h \
|
||||
src/tabcontrollers/RotationTabController.h\
|
||||
src/keyboard_input/keyboard_input.h \
|
||||
src/media_keys/media_keys.h \
|
||||
src/utils/Matrix.h \
|
||||
src/utils/ChaperoneUtils.h \
|
||||
src/quaternion/quaternion.h \
|
||||
src/openvr/openvr_init.h \
|
||||
src/openvr/ivrinput_action.h \
|
||||
src/openvr/ivrinput_manifest.h \
|
||||
src/openvr/ivrinput_action_set.h \
|
||||
src/openvr/ivrinput_input_source.h \
|
||||
src/openvr/ivrinput.h \
|
||||
src/openvr/ovr_settings_wrapper.h \
|
||||
src/openvr/ovr_overlay_wrapper.h \
|
||||
src/openvr/ovr_system_wrapper.h \
|
||||
src/openvr/ovr_application_wrapper.h \
|
||||
src/openvr/lh_console_util.h \
|
||||
src/utils/setup.h \
|
||||
src/utils/paths.h \
|
||||
src/utils/FrameRateUtils.h \
|
||||
src/keyboard_input/input_parser.h \
|
||||
src/keyboard_input/input_sender.h \
|
||||
src/settings/settings.h \
|
||||
src/settings/internal/setting_value.h \
|
||||
src/settings/internal/settings_internal.h \
|
||||
src/settings/internal/settings_controller.h \
|
||||
src/settings/internal/specific_setting_value.h \
|
||||
src/settings/settings_object.h \
|
||||
src/settings/internal/settings_object_data.h \
|
||||
src/alarm_clock/vr_alarm.h \
|
||||
src/settings/internal/settings_object_data.h \
|
||||
src/settings/internal/settings_object_data.h \
|
||||
src/utils/update_rate.h \
|
||||
|
||||
|
||||
win32 {
|
||||
SOURCES += src/tabcontrollers/audiomanager/AudioManagerWindows.cpp \
|
||||
src/keyboard_input/input_sender_win.cpp \
|
||||
src/media_keys/media_keys_win.cpp
|
||||
HEADERS += src/tabcontrollers/audiomanager/AudioManagerWindows.h
|
||||
}
|
||||
|
||||
unix:!macx {
|
||||
!noX11 {
|
||||
message(X11 features enabled.)
|
||||
SOURCES += src/keyboard_input/input_sender_X11.cpp
|
||||
CONFIG += x11
|
||||
LIBS += -lXtst
|
||||
}
|
||||
else {
|
||||
message(X11 features disabled.)
|
||||
SOURCES += src/keyboard_input/input_sender_dummy.cpp
|
||||
}
|
||||
|
||||
!noDBUS {
|
||||
message(DBUS features enabled.)
|
||||
SOURCES += src/media_keys/media_keys_dbus.cpp
|
||||
QT += dbus
|
||||
}
|
||||
else {
|
||||
message(DBUS features disabled.)
|
||||
SOURCES += src/media_keys/media_keys_dummy.cpp
|
||||
}
|
||||
|
||||
!noPulse {
|
||||
message(PulseAudio features enabled.)
|
||||
SOURCES += src/tabcontrollers/audiomanager/AudioManagerPulse.cpp
|
||||
HEADERS += src/tabcontrollers/audiomanager/AudioManagerPulse.h \
|
||||
src/tabcontrollers/audiomanager/AudioManagerPulse_internal.h
|
||||
LIBS += -lpulse
|
||||
}
|
||||
else {
|
||||
message(PulseAudio features disabled.)
|
||||
SOURCES += src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
|
||||
HEADERS += src/tabcontrollers/audiomanager/AudioManagerDummy.h
|
||||
}
|
||||
}
|
||||
|
||||
macx {
|
||||
SOURCES += src/keyboard_input/input_sender_dummy.cpp \
|
||||
src/media_keys/media_keys_dummy.cpp \
|
||||
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
|
||||
HEADERS += src/tabcontrollers/audiomanager/AudioManagerDummy.h
|
||||
|
||||
}
|
||||
|
||||
win32-msvc {
|
||||
INCLUDEPATH += third-party/openvr/headers \
|
||||
third-party/easylogging++ \
|
||||
third-party/policyconfig
|
||||
}
|
||||
|
||||
win32-clang-msvc {
|
||||
QMAKE_CXXFLAGS += /imsvc "$$PWD/../../third-party/openvr/headers"
|
||||
QMAKE_CXXFLAGS += /imsvc "$$PWD/../../third-party/easylogging++"
|
||||
QMAKE_CXXFLAGS += /imsvc "$$PWD/../../third-party/policyconfig"
|
||||
}
|
||||
|
||||
# Anything g++ or clang
|
||||
# In order to suppress warnings in third party headers
|
||||
*clang|*clang-g++|*clang-libc++|*g++* {
|
||||
#Force Linux to look into the current dir for the OpenVR lib
|
||||
QMAKE_LFLAGS += '-Wl,-rpath,\'\$$ORIGIN\''
|
||||
|
||||
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]
|
||||
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]/QtCore
|
||||
QMAKE_CXXFLAGS += -isystem $$[QT_INSTALL_HEADERS]/QtGui
|
||||
|
||||
QMAKE_CXXFLAGS += -isystem $$PWD/../../third-party/openvr/headers
|
||||
QMAKE_CXXFLAGS += -isystem $$PWD/../../third-party/easylogging++
|
||||
}
|
||||
|
||||
# easylogging++ used to be a header only lib. Now requires easylogging++.cc
|
||||
SOURCES += third-party/easylogging++/easylogging++.cc
|
||||
@@ -0,0 +1,5 @@
|
||||
if ($null -ne $env:_SAVED_PATH) {
|
||||
$env:PATH=$env:_SAVED_PATH;
|
||||
}
|
||||
$env:_SAVED_PATH=$env:PATH;
|
||||
$env:PATH+=";@NATIVE_QT_ROOT@\bin;@NATIVE_PROJECT_SOURCE_DIR@\third-party\openvr\bin\win64";
|
||||
@@ -0,0 +1,9 @@
|
||||
export _SAVED_PATH="${_SAVED_PATH:-}"
|
||||
if [ ! -z "$_SAVED_PATH" ]; then
|
||||
export PATH="$_SAVED_PATH"
|
||||
fi
|
||||
export _SAVED_PATH="$PATH"
|
||||
export PATH="$PATH:$(echo "@NATIVE_QT_ROOT@"|sed -E 's/(\w):/\/\L\1/')/bin:$(echo "@PROJECT_SOURCE_DIR@"|sed -E 's/(\w):/\/\L\1/')/third-party/openvr/bin/win64"
|
||||
|
||||
echo $_SAVED_PATH
|
||||
echo $PATH
|
||||
@@ -0,0 +1,2 @@
|
||||
[Paths]
|
||||
Plugins=@QT_ROOT@\\plugins
|
||||
@@ -0,0 +1,8 @@
|
||||
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}")
|
||||
set(CPACK_PACKAGE_VENDOR "OVRAS Team")
|
||||
|
||||
# NSIS installer config
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/src/res/img/icons/advicon256px.ico")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME} ${CMAKE_VERSION}")
|
||||
set(CPACK_NSIS_MODIFY_PATH OFF)
|
||||
Symlink
+1
@@ -0,0 +1 @@
|
||||
build/compile_commands.json
|
||||
@@ -1,8 +1,12 @@
|
||||
#include <easylogging++.h>
|
||||
#include "../tabcontrollers/UtilitiesTabController.h"
|
||||
#include "vr_alarm.h"
|
||||
#include "../openvr/ovr_overlay_wrapper.h"
|
||||
#include "../utils/update_rate.h"
|
||||
#include <thread>
|
||||
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
#include <QImage>
|
||||
|
||||
namespace alarm_clock
|
||||
{
|
||||
@@ -20,8 +24,10 @@ VrAlarm::VrAlarm()
|
||||
|
||||
ovr_overlay_wrapper::hideOverlay( m_alarmOverlayHandle );
|
||||
|
||||
const auto filename = "/res/img/alarm/alarm_activated.png";
|
||||
ovr_overlay_wrapper::setOverlayFromFile( m_alarmOverlayHandle, filename );
|
||||
// Only need to set it once, no need to keep it in memory
|
||||
QImage alarmIcon( ":qt/qml/AdvancedSettings/src/res/img/alarm/alarm_activated.png" );
|
||||
ovr_overlay_wrapper::setOverlayFromQImage( m_alarmOverlayHandle,
|
||||
alarmIcon );
|
||||
|
||||
ovr_overlay_wrapper::setOverlayWidthInMeters( m_alarmOverlayHandle, 0.3f );
|
||||
|
||||
@@ -76,13 +82,14 @@ void VrAlarm::checkAlarmStatus()
|
||||
&& timeToAlarmActivation > 0;
|
||||
if ( activateAlarm )
|
||||
{
|
||||
LOG( INFO ) << "Alarm fired at " << m_alarm.hour() << ":"
|
||||
<< m_alarm.minute() << ":" << m_alarm.second() << ".";
|
||||
qInfo() << "Alarm fired at " << m_alarm.hour() << ":"
|
||||
<< m_alarm.minute() << ":" << m_alarm.second() << ".";
|
||||
showAlarmNotification();
|
||||
setAlarmEnabled( false );
|
||||
|
||||
std::thread t(
|
||||
[]( vr::VROverlayHandle_t overlayHandle ) {
|
||||
[]( vr::VROverlayHandle_t overlayHandle )
|
||||
{
|
||||
// This will freeze the overlay for 3 seconds
|
||||
std::this_thread::sleep_for( std::chrono::seconds( 3 ) );
|
||||
ovr_overlay_wrapper::hideOverlay( overlayHandle );
|
||||
@@ -102,9 +109,9 @@ void VrAlarm::setAlarmTime( const int hour, const int minute, const int second )
|
||||
{
|
||||
if ( !QTime::isValid( hour, minute, second ) )
|
||||
{
|
||||
LOG( ERROR ) << "setAlarmTime passed invalid time values: '" << hour
|
||||
<< "' hours, '" << minute << "' minutes, '" << second
|
||||
<< "' seconds.";
|
||||
qCritical() << "setAlarmTime passed invalid time values: '" << hour
|
||||
<< "' hours, '" << minute << "' minutes, '" << second
|
||||
<< "' seconds.";
|
||||
}
|
||||
|
||||
setSetting( IntSetting::UTILITY_alarmHour, hour );
|
||||
@@ -119,20 +126,20 @@ void VrAlarm::modAlarmTime( const int hour, const int minute, const int second )
|
||||
{
|
||||
if ( hour > 22 || hour < -22 )
|
||||
{
|
||||
LOG( ERROR ) << "modAlarmTime called with incorrect hour value: '"
|
||||
<< hour << "'. Values not applied.";
|
||||
qCritical() << "modAlarmTime called with incorrect hour value: '"
|
||||
<< hour << "'. Values not applied.";
|
||||
return;
|
||||
}
|
||||
if ( minute > 58 || minute < -58 )
|
||||
{
|
||||
LOG( ERROR ) << "modAlarmTime called with incorrect minute value: '"
|
||||
<< minute << "'. Values not applied.";
|
||||
qCritical() << "modAlarmTime called with incorrect minute value: '"
|
||||
<< minute << "'. Values not applied.";
|
||||
return;
|
||||
}
|
||||
if ( second > 58 || minute < -58 )
|
||||
{
|
||||
LOG( ERROR ) << "modAlarmTime called with incorrect second value: '"
|
||||
<< second << "'. Values not applied.";
|
||||
qCritical() << "modAlarmTime called with incorrect second value: '"
|
||||
<< second << "'. Values not applied.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#include "input_parser.h"
|
||||
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
|
||||
std::optional<Token> getModifier( const char& character ) noexcept
|
||||
{
|
||||
switch ( character )
|
||||
@@ -50,7 +53,7 @@ std::optional<Token> getFunctionNumber( const char& character ) noexcept
|
||||
return Token::KEY_F9;
|
||||
|
||||
default:
|
||||
LOG( INFO ) << "Unknown function key number: " << character;
|
||||
qInfo() << "Unknown function key number: " << character;
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
@@ -80,7 +83,7 @@ std::optional<Token> getFunctionNumberExtended( const char& character ) noexcept
|
||||
case '9':
|
||||
return Token::KEY_F19;
|
||||
default:
|
||||
LOG( INFO ) << "Unknown function key number: " << character;
|
||||
qInfo() << "Unknown function key number: " << character;
|
||||
return std::nullopt;
|
||||
}
|
||||
}
|
||||
@@ -210,7 +213,7 @@ std::vector<Token>
|
||||
|
||||
if ( !isupper( *ch ) || isspace( *ch ) )
|
||||
{
|
||||
LOG( INFO ) << "Unknown character found in sequence: " << *ch;
|
||||
qInfo() << "Unknown character found in sequence: " << *ch;
|
||||
continue;
|
||||
}
|
||||
// Everything below is upper case
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <vector>
|
||||
#include <cctype>
|
||||
#include <optional>
|
||||
#include <easylogging++.h>
|
||||
|
||||
enum class Token
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
#include "input_parser.h"
|
||||
#include <easylogging++.h>
|
||||
|
||||
enum class KeyStatus
|
||||
{
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#include <vector>
|
||||
#include <Windows.h>
|
||||
#include <cctype>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
|
||||
WORD convertToVirtualKeycode( const Token token )
|
||||
{
|
||||
@@ -183,13 +185,13 @@ void sendKeyboardInputRaw( std::vector<INPUT> inputs )
|
||||
0,
|
||||
nullptr ) )
|
||||
{
|
||||
LOG( ERROR )
|
||||
qCritical()
|
||||
<< "Error calling SendInput(): Could not get error message ("
|
||||
<< errCode << ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( ERROR ) << "Error calling SendInput(): " << err;
|
||||
qCritical() << "Error calling SendInput(): " << err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+39
-41
@@ -1,6 +1,11 @@
|
||||
#include "utils/setup.h"
|
||||
#include "settings/settings.h"
|
||||
#include "openvr/ovr_settings_wrapper.h"
|
||||
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
#include <memory>
|
||||
|
||||
#ifdef _WIN64
|
||||
# include <windows.h>
|
||||
extern "C" __declspec( dllexport ) DWORD NvOptimusEnablement = 0x00000001;
|
||||
@@ -8,16 +13,13 @@ extern "C" __declspec( dllexport ) DWORD AmdPowerXpressRequestHighPerformance
|
||||
= 0x00000001;
|
||||
#endif
|
||||
|
||||
INITIALIZE_EASYLOGGINGPP
|
||||
|
||||
int main( int argc, char* argv[] )
|
||||
{
|
||||
setUpLogging();
|
||||
|
||||
LOG( INFO ) << "Settings File: "
|
||||
<< settings::initializeAndGetSettingsPath();
|
||||
qInfo() << "Settings File: " << settings::initializeAndGetSettingsPath();
|
||||
|
||||
LOG( INFO ) << settings::getSettingsAndValues();
|
||||
qInfo() << settings::getSettingsAndValues();
|
||||
|
||||
QCoreApplication::setAttribute( Qt::AA_Use96Dpi );
|
||||
QCoreApplication::setAttribute( Qt::AA_UseDesktopOpenGL );
|
||||
@@ -30,8 +32,6 @@ int main( int argc, char* argv[] )
|
||||
mainEventLoop.setApplicationVersion(
|
||||
application_strings::applicationVersionString );
|
||||
|
||||
qInstallMessageHandler( mainQtMessageHandler );
|
||||
|
||||
const auto commandLineArgs
|
||||
= argument::returnCommandLineParser( mainEventLoop );
|
||||
|
||||
@@ -46,39 +46,35 @@ int main( int argc, char* argv[] )
|
||||
|
||||
openvr_init::initializeOpenVR(
|
||||
openvr_init::OpenVrInitializationType::Overlay );
|
||||
|
||||
try
|
||||
{
|
||||
QQmlEngine qmlEngine;
|
||||
|
||||
advsettings::OverlayController controller( commandLineArgs.desktopMode,
|
||||
commandLineArgs.forceNoSound,
|
||||
qmlEngine );
|
||||
|
||||
constexpr auto widgetPath = "res/qml/common/mainwidget.qml";
|
||||
const auto path = paths::binaryDirectoryFindFile( widgetPath );
|
||||
|
||||
if ( !path.has_value() )
|
||||
// Just error checking to ensure QRC works properly
|
||||
qDebug() << "list of qmldirs";
|
||||
QDirIterator it( ":", QDirIterator::Subdirectories );
|
||||
while ( it.hasNext() )
|
||||
{
|
||||
LOG( ERROR ) << "Unable to find file '" << widgetPath << "'.";
|
||||
throw std::runtime_error(
|
||||
"Unable to find critical file. See log for more information." );
|
||||
qDebug() << it.next();
|
||||
}
|
||||
|
||||
const auto url
|
||||
= QUrl::fromLocalFile( QString::fromStdString( ( *path ) ) );
|
||||
|
||||
QQmlComponent component( &qmlEngine, url );
|
||||
std::unique_ptr<advsettings::OverlayController> controller(
|
||||
new advsettings::OverlayController( commandLineArgs.desktopMode,
|
||||
commandLineArgs.forceNoSound,
|
||||
qmlEngine ) );
|
||||
//const auto url
|
||||
// = QUrl( ":/qt/qml/AdvancedSettings/src/res/qml/common/mainwidget.qml" );
|
||||
QQmlComponent component( &qmlEngine, ":/qt/qml/AdvancedSettings/src/res/qml/common/mainwidget.qml" );
|
||||
auto errors = component.errors();
|
||||
for ( auto& e : errors )
|
||||
{
|
||||
LOG( ERROR ) << "QML Error: " << e.toString().toStdString()
|
||||
<< std::endl;
|
||||
qCritical() << "QML Error: "
|
||||
<< e.toString().toStdString(); //<< std::endl;
|
||||
}
|
||||
auto quickObj = component.create();
|
||||
controller.SetWidget( qobject_cast<QQuickItem*>( quickObj ),
|
||||
application_strings::applicationDisplayName,
|
||||
application_strings::applicationKey );
|
||||
controller->SetWidget( qobject_cast<QQuickItem*>( quickObj ),
|
||||
application_strings::applicationDisplayName,
|
||||
application_strings::applicationKey );
|
||||
|
||||
// Attempts to install the application manifest on all "regular" starts.
|
||||
if ( !commandLineArgs.forceNoManifest )
|
||||
@@ -99,7 +95,7 @@ int main( int argc, char* argv[] )
|
||||
}
|
||||
catch ( std::exception& e )
|
||||
{
|
||||
LOG( ERROR ) << e.what();
|
||||
qCritical() << e.what();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,17 +103,19 @@ int main( int argc, char* argv[] )
|
||||
|| settings::getSetting(
|
||||
settings::BoolSetting::APPLICATION_desktopModeToggle ) )
|
||||
{
|
||||
auto m_pWindow = new QQuickWindow();
|
||||
qobject_cast<QQuickItem*>( quickObj )
|
||||
->setParentItem( m_pWindow->contentItem() );
|
||||
m_pWindow->setGeometry(
|
||||
0,
|
||||
0,
|
||||
static_cast<int>(
|
||||
qobject_cast<QQuickItem*>( quickObj )->width() ),
|
||||
static_cast<int>(
|
||||
qobject_cast<QQuickItem*>( quickObj )->height() ) );
|
||||
m_pWindow->show();
|
||||
//TODO TEMP
|
||||
//qDebug() << "Desktop MODE!";
|
||||
//auto m_pWindow = new QQuickWindow();
|
||||
//qobject_cast<QQuickItem*>( quickObj )
|
||||
// ->setParentItem( m_pWindow->contentItem() );
|
||||
//m_pWindow->setGeometry(
|
||||
// 0,
|
||||
// 0,
|
||||
// static_cast<int>(
|
||||
// qobject_cast<QQuickItem*>( quickObj )->width() ),
|
||||
// static_cast<int>(
|
||||
// qobject_cast<QQuickItem*>( quickObj )->height() ) );
|
||||
//m_pWindow->show();
|
||||
}
|
||||
if ( commandLineArgs.resetSettings )
|
||||
{
|
||||
@@ -129,7 +127,7 @@ int main( int argc, char* argv[] )
|
||||
}
|
||||
catch ( const std::exception& e )
|
||||
{
|
||||
LOG( FATAL ) << e.what();
|
||||
qFatal() << e.what();
|
||||
return ReturnErrorCode::GENERAL_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
#include <easylogging++.h>
|
||||
#include <vector>
|
||||
#include <QString>
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtDBus/QtDBus>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
|
||||
namespace keyboardinput
|
||||
{
|
||||
@@ -10,7 +12,7 @@ void callMethodForAllMediaPlayerAvailableServices( const QString& method )
|
||||
{
|
||||
if ( !QDBusConnection::sessionBus().isConnected() )
|
||||
{
|
||||
LOG( ERROR ) << "Media Keys: Unable to connect to DBUS session bus.";
|
||||
qCritical() << "Media Keys: Unable to connect to DBUS session bus.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -18,9 +20,9 @@ void callMethodForAllMediaPlayerAvailableServices( const QString& method )
|
||||
= QDBusConnection::sessionBus().interface()->registeredServiceNames();
|
||||
if ( !names.isValid() )
|
||||
{
|
||||
LOG( ERROR )
|
||||
qCritical()
|
||||
<< "Media Keys: Error getting DBUS registered service names:";
|
||||
LOG( ERROR ) << names.error().message();
|
||||
qCritical() << names.error().message();
|
||||
}
|
||||
|
||||
foreach ( QString name, names.value() )
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "media_keys.h"
|
||||
#include "src/keyboard_input/input_sender.h"
|
||||
#include <Windows.h>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
|
||||
namespace keyboardinput
|
||||
{
|
||||
@@ -45,13 +47,13 @@ void sendKeyboardInputRaw( std::vector<INPUT> inputs )
|
||||
0,
|
||||
nullptr ) )
|
||||
{
|
||||
LOG( ERROR )
|
||||
qCritical()
|
||||
<< "Error calling SendInput(): Could not get error message ("
|
||||
<< errCode << ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( ERROR ) << "Error calling SendInput(): " << err;
|
||||
qCritical() << "Error calling SendInput(): " << err;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
#include <openvr.h>
|
||||
#include <iostream>
|
||||
#include <array>
|
||||
#include <easylogging++.h>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
|
||||
namespace input
|
||||
{
|
||||
@@ -30,8 +31,8 @@ vr::InputDigitalActionData_t getDigitalActionData( DigitalAction& action )
|
||||
|
||||
if ( error != vr::EVRInputError::VRInputError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error getting IVRInput Digital Action Data for handle "
|
||||
<< action.name() << ". SteamVR Error: " << error;
|
||||
qCritical() << "Error getting IVRInput Digital Action Data for handle "
|
||||
<< action.name() << ". SteamVR Error: " << error;
|
||||
}
|
||||
|
||||
return handleData;
|
||||
@@ -60,8 +61,8 @@ vr::InputAnalogActionData_t getAnalogActionData( AnalogAction& action )
|
||||
|
||||
if ( error != vr::EVRInputError::VRInputError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error getting IVRInput Digital Action Data for handle "
|
||||
<< action.name() << ". SteamVR Error: " << error;
|
||||
qCritical() << "Error getting IVRInput Digital Action Data for handle "
|
||||
<< action.name() << ". SteamVR Error: " << error;
|
||||
}
|
||||
|
||||
return handleData;
|
||||
@@ -454,7 +455,7 @@ void SteamIVRInput::UpdateStates()
|
||||
|
||||
if ( error != vr::EVRInputError::VRInputError_None )
|
||||
{
|
||||
LOG( ERROR )
|
||||
qCritical()
|
||||
<< "Error during IVRInput action state update. OpenVR Error: "
|
||||
<< error;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <openvr.h>
|
||||
#include <easylogging++.h>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
|
||||
namespace input
|
||||
{
|
||||
@@ -30,8 +31,8 @@ public:
|
||||
|
||||
if ( error != vr::EVRInputError::VRInputError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error getting handle for '" << actionName
|
||||
<< "'. OpenVR Error: " << error;
|
||||
qCritical() << "Error getting handle for '" << actionName
|
||||
<< "'. OpenVR Error: " << error;
|
||||
}
|
||||
}
|
||||
/*!
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <openvr.h>
|
||||
#include <easylogging++.h>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
|
||||
namespace input
|
||||
{
|
||||
@@ -16,8 +17,8 @@ public:
|
||||
auto error = vr::VRInput()->GetActionSetHandle( setName, &handle );
|
||||
if ( error != vr::EVRInputError::VRInputError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error getting handle for '" << setName
|
||||
<< "'. OpenVR Error: " << error;
|
||||
qCritical() << "Error getting handle for '" << setName
|
||||
<< "'. OpenVR Error: " << error;
|
||||
}
|
||||
|
||||
m_activeActionSet.ulActionSet = handle;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <openvr.h>
|
||||
#include <easylogging++.h>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
|
||||
namespace input
|
||||
{
|
||||
@@ -17,9 +18,8 @@ public:
|
||||
|
||||
if ( error != vr::EVRInputError::VRInputError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error getting input handle for '"
|
||||
<< inputSourceName
|
||||
<< "'. OpenVR Input Error: " << error;
|
||||
qCritical() << "Error getting input handle for '" << inputSourceName
|
||||
<< "'. OpenVR Input Error: " << error;
|
||||
}
|
||||
}
|
||||
/*!
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include <openvr.h>
|
||||
#include <easylogging++.h>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
#include "../utils/paths.h"
|
||||
|
||||
namespace input
|
||||
@@ -19,8 +20,8 @@ public:
|
||||
|
||||
if ( !actionManifestPath.has_value() )
|
||||
{
|
||||
LOG( ERROR ) << "Could not find action manifest. Action manifests "
|
||||
"not initialized.";
|
||||
qCritical() << "Could not find action manifest. Action manifests "
|
||||
"not initialized.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -29,8 +30,8 @@ public:
|
||||
auto error = vr::VRInput()->SetActionManifestPath( validManifestPath );
|
||||
if ( error != vr::EVRInputError::VRInputError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error setting action manifest path: "
|
||||
<< validManifestPath << ". OpenVR Error: " << error;
|
||||
qCritical() << "Error setting action manifest path: "
|
||||
<< validManifestPath << ". OpenVR Error: " << error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "lh_console_util.h"
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
#include <QRegularExpression>
|
||||
|
||||
namespace lh_con_util
|
||||
{
|
||||
@@ -6,12 +9,12 @@ bool LHCUtil::FindAll()
|
||||
{
|
||||
if ( !FindAllRX() )
|
||||
{
|
||||
LOG( ERROR ) << "Find All Recievers Failed";
|
||||
qCritical() << "Find All Recievers Failed";
|
||||
return false;
|
||||
}
|
||||
if ( !FindAllTX() )
|
||||
{
|
||||
LOG( ERROR ) << "Find All Transmitters Failed";
|
||||
qCritical() << "Find All Transmitters Failed";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -26,7 +29,7 @@ bool LHCUtil::FindAllRX()
|
||||
|
||||
QString output = QString( lhProcess->readAllStandardOutput() );
|
||||
QStringList outputLines
|
||||
= output.split( QRegExp( "[\r\n]" ), QString::SkipEmptyParts );
|
||||
= output.split( QRegularExpression( "[\r\n]" ), Qt::SkipEmptyParts );
|
||||
bool RecieverStart = false;
|
||||
|
||||
for ( auto OutputLine : outputLines )
|
||||
@@ -44,7 +47,7 @@ bool LHCUtil::FindAllRX()
|
||||
}
|
||||
OutputLine.simplified().remove( " " );
|
||||
OutputLine.remove( 0, 1 );
|
||||
// LOG( WARNING ) << OutputLine << std::endl;
|
||||
// qWarning() << OutputLine << std::endl;
|
||||
RXTX_Pairs_.push_back( RXTX_Pair{ OutputLine, " ", true, false } );
|
||||
}
|
||||
}
|
||||
@@ -53,21 +56,21 @@ bool LHCUtil::FindAllRX()
|
||||
|
||||
bool LHCUtil::FindConnectedTX( QString RXSerial )
|
||||
{
|
||||
LOG( WARNING ) << RXSerial;
|
||||
qWarning() << RXSerial;
|
||||
QProcess* lhProcess = new QProcess();
|
||||
lhProcess->start( path_, QStringList() << "/serial" << RXSerial << "exit" );
|
||||
lhProcess->waitForFinished();
|
||||
|
||||
QString output = QString( lhProcess->readAllStandardOutput() );
|
||||
QStringList outputLines
|
||||
= output.split( QRegExp( "[\r\n]" ), QString::SkipEmptyParts );
|
||||
= output.split( QRegularExpression( "[\r\n]" ), Qt::SkipEmptyParts );
|
||||
// std::vector<std::string> OutputLines
|
||||
// = exec( ( "\"" + path_ + "\" /serial " + RXSerial + " exit" ).c_str()
|
||||
// );
|
||||
bool lhConFound = false;
|
||||
for ( auto outputLine : outputLines )
|
||||
{
|
||||
// LOG( WARNING ) << outputLine;
|
||||
// qWarning() << outputLine;
|
||||
if ( outputLine.contains( "Connected to receiver" ) )
|
||||
{
|
||||
auto splitList = outputLine.split( ":" );
|
||||
@@ -84,7 +87,7 @@ bool LHCUtil::FindConnectedTX( QString RXSerial )
|
||||
rxtx.TX_Serial = TXSerial;
|
||||
rxtx.Is_Paired = true;
|
||||
rxtx.Is_Init = true;
|
||||
LOG( WARNING )
|
||||
qWarning()
|
||||
<< "tx serial stored: " << TXSerial.toStdString();
|
||||
return true;
|
||||
}
|
||||
@@ -102,7 +105,7 @@ bool LHCUtil::FindConnectedTX( QString RXSerial )
|
||||
rxtx.TX_Serial = "";
|
||||
rxtx.Is_Paired = false;
|
||||
rxtx.Is_Init = true;
|
||||
LOG( WARNING ) << "tx oops";
|
||||
qWarning() << "tx oops";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QRegularExpression>
|
||||
#include <easylogging++.h>
|
||||
|
||||
namespace lh_con_util
|
||||
{
|
||||
|
||||
+20
-18
@@ -1,8 +1,10 @@
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <openvr.h>
|
||||
#include <QMessageBox>
|
||||
#include "openvr_init.h"
|
||||
#include <easylogging++.h>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
#include "../openvr/ivrinput_manifest.h"
|
||||
|
||||
namespace openvr_init
|
||||
@@ -29,17 +31,17 @@ bool initializeProperly( const OpenVrInitializationType initType )
|
||||
// In particular in some setups these errors are thrown while
|
||||
// nothing is wrong with their setup presumably this is some sort of
|
||||
// race condition
|
||||
LOG( WARNING ) << "HMD not Found During Startup";
|
||||
LOG( WARNING ) << "steamvr error: "
|
||||
+ std::string(
|
||||
vr::VR_GetVRInitErrorAsEnglishDescription(
|
||||
initError ) );
|
||||
qWarning() << "HMD not Found During Startup";
|
||||
qWarning() << "steamvr error: "
|
||||
+ std::string(
|
||||
vr::VR_GetVRInitErrorAsEnglishDescription(
|
||||
initError ) );
|
||||
return false;
|
||||
}
|
||||
LOG( ERROR ) << "Failed to initialize OpenVR: "
|
||||
+ std::string(
|
||||
vr::VR_GetVRInitErrorAsEnglishDescription(
|
||||
initError ) );
|
||||
qCritical() << "Failed to initialize OpenVR: "
|
||||
+ std::string(
|
||||
vr::VR_GetVRInitErrorAsEnglishDescription(
|
||||
initError ) );
|
||||
// Going to stop Exiting App, This may lead to crashes if OpenVR
|
||||
// actually fails to start, HOWEVER based on the HMD errors we are
|
||||
// probably pre-maturely killing ourselves from some sort of OpenVR race
|
||||
@@ -48,7 +50,7 @@ bool initializeProperly( const OpenVrInitializationType initType )
|
||||
return false;
|
||||
}
|
||||
|
||||
LOG( INFO ) << "OpenVR initialized successfully.";
|
||||
qInfo() << "OpenVR initialized successfully.";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -65,9 +67,9 @@ void initializeOpenVR( const OpenVrInitializationType initType, int count )
|
||||
// as of 5.8.1 Based on some information from valve, if ANY interface
|
||||
// fails to load we should have issues. we will re-initialize a few
|
||||
// times if that is the case and hope that fixes things
|
||||
LOG( WARNING ) << "OpenVR version is invalid: Interface version "
|
||||
<< interfaceAndVersion << " not found. attempt number: "
|
||||
<< std::to_string( trynumber );
|
||||
qWarning() << "OpenVR version is invalid: Interface version "
|
||||
<< interfaceAndVersion << " not found. attempt number: "
|
||||
<< std::to_string( trynumber );
|
||||
};
|
||||
|
||||
// Check whether OpenVR is too outdated
|
||||
@@ -121,16 +123,16 @@ void initializeOpenVR( const OpenVrInitializationType initType, int count )
|
||||
}
|
||||
if ( !success && count < 3 )
|
||||
{
|
||||
LOG( WARNING ) << "An error occured on initialization of "
|
||||
"openvr/steamvr attempting again "
|
||||
<< std::to_string( count + 1 ) << " of 3 Attempts";
|
||||
qWarning() << "An error occured on initialization of "
|
||||
"openvr/steamvr attempting again "
|
||||
<< std::to_string( count + 1 ) << " of 3 Attempts";
|
||||
std::this_thread::sleep_for( std::chrono::seconds( 5 ) );
|
||||
// 5.8.1 Unknown if VR shutdown needs to be callled if vr init fails
|
||||
initializeOpenVR( initType, ( count + 1 ) );
|
||||
}
|
||||
if ( count >= 3 )
|
||||
{
|
||||
LOG( ERROR ) << "initialization errors persist proceeding anyways";
|
||||
qCritical() << "initialization errors persist proceeding anyways";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "ovr_application_wrapper.h"
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
constexpr uint32_t bufferLen = 4096;
|
||||
namespace ovr_application_wrapper
|
||||
{
|
||||
@@ -12,9 +14,8 @@ std::string getSceneAppID()
|
||||
std::string keys = key;
|
||||
if ( error != vr::VRApplicationError_None )
|
||||
{
|
||||
LOG( WARNING ) << "Could not Get App ID by PID: "
|
||||
+ std::to_string( error );
|
||||
LOG( WARNING ) << "Attempting to find through Enumeration";
|
||||
qWarning() << "Could not Get App ID by PID: " + std::to_string( error );
|
||||
qWarning() << "Attempting to find through Enumeration";
|
||||
auto appCount = vr::VRApplications()->GetApplicationCount();
|
||||
const uint32_t bufferMax = vr::k_unMaxApplicationKeyLength;
|
||||
char cStringOut[bufferMax];
|
||||
@@ -25,17 +26,17 @@ std::string getSceneAppID()
|
||||
std::string appID( cStringOut );
|
||||
if ( appID.find( "steam.app" ) != std::string::npos )
|
||||
{
|
||||
LOG( WARNING ) << "Found App ID through Enumeration (only "
|
||||
"steam apps caught): "
|
||||
<< appID;
|
||||
qWarning() << "Found App ID through Enumeration (only "
|
||||
"steam apps caught): "
|
||||
<< appID;
|
||||
if ( error2 == vr::VRApplicationError_None )
|
||||
{
|
||||
return appID;
|
||||
}
|
||||
LOG( WARNING ) << "Error getting app id via Enum: " << error2;
|
||||
qWarning() << "Error getting app id via Enum: " << error2;
|
||||
}
|
||||
}
|
||||
LOG( ERROR ) << "Unable to Find App ID by PID or by Enumeration";
|
||||
qCritical() << "Unable to Find App ID by PID or by Enumeration";
|
||||
return "error";
|
||||
}
|
||||
return keys;
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <openvr.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <easylogging++.h>
|
||||
#include <utility>
|
||||
#include <map>
|
||||
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "ovr_overlay_wrapper.h"
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
#include <QImage>
|
||||
|
||||
namespace ovr_overlay_wrapper
|
||||
{
|
||||
@@ -11,10 +14,9 @@ OverlayError createOverlay( const std::string overlayKey,
|
||||
overlayKey.c_str(), overlayName.c_str(), overlayHandle );
|
||||
if ( oError != vr::VROverlayError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Could not create overlay: " << overlayName
|
||||
<< "because "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
qCritical() << "Could not create overlay: " << overlayName << "because "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
return OverlayError::UndefinedError;
|
||||
}
|
||||
return OverlayError::NoError;
|
||||
@@ -30,10 +32,10 @@ OverlayError setOverlayColor( vr::VROverlayHandle_t overlayHandle,
|
||||
= vr::VROverlay()->SetOverlayColor( overlayHandle, red, green, blue );
|
||||
if ( oError != vr::VROverlayError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error setting Overlay Color For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
qCritical() << "Error setting Overlay Color For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
return OverlayError::UndefinedError;
|
||||
}
|
||||
return OverlayError::NoError;
|
||||
@@ -47,10 +49,10 @@ OverlayError setOverlayAlpha( vr::VROverlayHandle_t overlayHandle,
|
||||
= vr::VROverlay()->SetOverlayAlpha( overlayHandle, alpha );
|
||||
if ( oError != vr::VROverlayError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error setting Overlay Alpha For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
qCritical() << "Error setting Overlay Alpha For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
return OverlayError::UndefinedError;
|
||||
}
|
||||
return OverlayError::NoError;
|
||||
@@ -64,10 +66,10 @@ OverlayError setOverlayWidthInMeters( vr::VROverlayHandle_t overlayHandle,
|
||||
overlayHandle, widthInMeters );
|
||||
if ( oError != vr::VROverlayError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error setting overlay width For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
qCritical() << "Error setting overlay width For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
return OverlayError::UndefinedError;
|
||||
}
|
||||
return OverlayError::NoError;
|
||||
@@ -81,34 +83,52 @@ OverlayError setOverlayFromFile( vr::VROverlayHandle_t overlayHandle,
|
||||
const auto overlayPath = paths::binaryDirectoryFindFile( fileName );
|
||||
if ( !overlayPath.has_value() )
|
||||
{
|
||||
LOG( ERROR ) << "File not Found: " << fileName << customErrorMsg;
|
||||
qCritical() << "File not Found: " << fileName << customErrorMsg;
|
||||
return OverlayError::UndefinedError;
|
||||
}
|
||||
vr::VROverlayError oError = vr::VROverlay()->SetOverlayFromFile(
|
||||
overlayHandle, overlayPath->c_str() );
|
||||
if ( oError != vr::VROverlayError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error setting Overlay from file For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum(
|
||||
oError )
|
||||
<< " " << customErrorMsg;
|
||||
qCritical() << "Error setting Overlay from file For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum(
|
||||
oError )
|
||||
<< " " << customErrorMsg;
|
||||
return OverlayError::UndefinedError;
|
||||
}
|
||||
return OverlayError::NoError;
|
||||
}
|
||||
}
|
||||
|
||||
OverlayError setOverlayFromQImage( vr::VROverlayHandle_t overlayHandle,
|
||||
QImage& image,
|
||||
std::string customErrorMsg )
|
||||
{
|
||||
image.convertTo( QImage::Format_RGBA8888 );
|
||||
vr::VROverlayError oError = vr::VROverlay()->SetOverlayRaw(
|
||||
overlayHandle, image.bits(), image.width(), image.height(), 4 );
|
||||
if ( oError != vr::VROverlayError_None )
|
||||
{
|
||||
qCritical() << "Error setting Overlay from" << image << "For"
|
||||
<< getOverlayKey( overlayHandle ) << "with error:"
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< customErrorMsg;
|
||||
return OverlayError::UndefinedError;
|
||||
}
|
||||
return OverlayError::NoError;
|
||||
}
|
||||
|
||||
OverlayError showOverlay( vr::VROverlayHandle_t overlayHandle,
|
||||
std::string customErrorMsg )
|
||||
{
|
||||
vr::VROverlayError oError = vr::VROverlay()->ShowOverlay( overlayHandle );
|
||||
if ( oError != vr::VROverlayError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error showing overlay For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
qCritical() << "Error showing overlay For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
return OverlayError::UndefinedError;
|
||||
}
|
||||
return OverlayError::NoError;
|
||||
@@ -120,10 +140,10 @@ OverlayError hideOverlay( vr::VROverlayHandle_t overlayHandle,
|
||||
vr::VROverlayError oError = vr::VROverlay()->HideOverlay( overlayHandle );
|
||||
if ( oError != vr::VROverlayError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error hiding overlay For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
qCritical() << "Error hiding overlay For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
return OverlayError::UndefinedError;
|
||||
}
|
||||
return OverlayError::NoError;
|
||||
@@ -139,10 +159,10 @@ OverlayError setOverlayTransformAbsolute(
|
||||
overlayHandle, trackingOrigin, trackingOriginToOverlayTransform );
|
||||
if ( oError != vr::VROverlayError_None )
|
||||
{
|
||||
LOG( ERROR ) << "Error setting Overlay Position For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
qCritical() << "Error setting Overlay Position For "
|
||||
<< getOverlayKey( overlayHandle ) << " with error: "
|
||||
<< vr::VROverlay()->GetOverlayErrorNameFromEnum( oError )
|
||||
<< " " << customErrorMsg;
|
||||
return OverlayError::UndefinedError;
|
||||
}
|
||||
return OverlayError::NoError;
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
#include <openvr.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <easylogging++.h>
|
||||
#include <utility>
|
||||
#include <string>
|
||||
#include <QImage>
|
||||
#include "../utils/paths.h"
|
||||
|
||||
/* Wrapper For OpenVR's IVR settings class, allows us to do our error logging
|
||||
@@ -43,6 +43,9 @@ OverlayError setOverlayWidthInMeters( vr::VROverlayHandle_t overlayHandle,
|
||||
OverlayError setOverlayFromFile( vr::VROverlayHandle_t overlayHandle,
|
||||
std::string fileName,
|
||||
std::string customErrorMsg = "" );
|
||||
OverlayError setOverlayFromQImage( vr::VROverlayHandle_t overlayHandle,
|
||||
QImage& image,
|
||||
std::string customErrorMsg = "" );
|
||||
OverlayError showOverlay( vr::VROverlayHandle_t overlayHandle,
|
||||
std::string customErrorMsg = "" );
|
||||
OverlayError hideOverlay( vr::VROverlayHandle_t overlayHandle,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "ovr_settings_wrapper.h"
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
|
||||
namespace ovr_settings_wrapper
|
||||
{
|
||||
@@ -19,9 +21,9 @@ SettingsError handleErrors( std::string settingsKey,
|
||||
{
|
||||
return SettingsError::UndefinedError;
|
||||
}
|
||||
LOG( ERROR ) << "Could not access \"" << settingsKey << "\" setting: "
|
||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum( error )
|
||||
<< " " << customErrorMsg;
|
||||
qCritical() << "Could not access \"" << settingsKey << "\" setting: "
|
||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum( error )
|
||||
<< " " << customErrorMsg;
|
||||
if ( error
|
||||
== vr::EVRSettingsError::VRSettingsError_UnsetSettingHasNoDefault )
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include <openvr.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <easylogging++.h>
|
||||
#include <utility>
|
||||
|
||||
/* Wrapper For OpenVR's IVR settings class, allows us to do our error logging
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#include "ovr_system_wrapper.h"
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
#include <vector>
|
||||
|
||||
namespace ovr_system_wrapper
|
||||
{
|
||||
@@ -8,11 +11,11 @@ SystemError handleTrackedPropertyErrors( vr::TrackedDeviceProperty tdp,
|
||||
{
|
||||
if ( error != vr::TrackedProp_Success )
|
||||
{
|
||||
LOG( ERROR ) << "Could not get Property with error \""
|
||||
<< vr::VRSystem()->GetPropErrorNameFromEnum( error )
|
||||
<< "\" property: "
|
||||
<< "todo"
|
||||
<< " " << customErrorMsg;
|
||||
qCritical() << "Could not get Property with error \""
|
||||
<< vr::VRSystem()->GetPropErrorNameFromEnum( error )
|
||||
<< "\" property: "
|
||||
<< "todo"
|
||||
<< " " << customErrorMsg;
|
||||
if ( tdp == vr::Prop_TrackedDeviceProperty_Max )
|
||||
{
|
||||
// Just for Error OPPS todo
|
||||
@@ -295,7 +298,7 @@ std::string getControllerName()
|
||||
}
|
||||
if ( !isLeftCon && !isRightCon && hasHMD )
|
||||
{
|
||||
LOG( WARNING ) << "WARNING: No Controllers assuming based on HMD";
|
||||
qWarning() << "WARNING: No Controllers assuming based on HMD";
|
||||
auto hmdName
|
||||
= getStringTrackedProperty( hmdIdx, vr::Prop_ControllerType_String )
|
||||
.second;
|
||||
@@ -309,27 +312,27 @@ std::string getControllerName()
|
||||
}
|
||||
if ( hmdName == "vive_pro" )
|
||||
{
|
||||
LOG( WARNING )
|
||||
qWarning()
|
||||
<< "Vive Pro Detected, Assuming Knuckles this may be wrong";
|
||||
return "knuckles";
|
||||
}
|
||||
if ( hmdName == "holographic_hmd" )
|
||||
{
|
||||
LOG( WARNING ) << "WMR detected, Assuming HP CONTROLLERS";
|
||||
qWarning() << "WMR detected, Assuming HP CONTROLLERS";
|
||||
return "hpmotioncontroller";
|
||||
}
|
||||
if ( hmdName == "rift" )
|
||||
{
|
||||
return "oculus_touch";
|
||||
}
|
||||
LOG( WARNING ) << "Headset Not recognized Assuming touch controllers "
|
||||
+ hmdName;
|
||||
qWarning() << "Headset Not recognized Assuming touch controllers "
|
||||
+ hmdName;
|
||||
return "oculus_touch";
|
||||
}
|
||||
if ( right != left )
|
||||
{
|
||||
LOG( WARNING ) << "WARNING: Left and Right Controllers are Different, "
|
||||
"Prioritizing right";
|
||||
qWarning() << "WARNING: Left and Right Controllers are Different, "
|
||||
"Prioritizing right";
|
||||
}
|
||||
if ( rightIdx == 999 )
|
||||
{
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
#include <openvr.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <easylogging++.h>
|
||||
#include <utility>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
/* Wrapper For OpenVR's IVR settings class, allows us to do our error logging
|
||||
* while also minimizing code
|
||||
|
||||
+157
-145
@@ -11,17 +11,26 @@
|
||||
#include <QtWidgets/QGraphicsSceneMouseEvent>
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QGraphicsEllipseItem>
|
||||
#include <QQuickGraphicsConfiguration>
|
||||
#include <QOpenGLExtraFunctions>
|
||||
#include <QCursor>
|
||||
#include <QProcess>
|
||||
#include <QMessageBox>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
#include <openvr.h>
|
||||
#include <easylogging++.h>
|
||||
#include "openvr/ovr_overlay_wrapper.h"
|
||||
#include "utils/Matrix.h"
|
||||
#include "keyboard_input/input_sender.h"
|
||||
#include "settings/settings.h"
|
||||
#include <qapplication.h>
|
||||
#include <qlogging.h>
|
||||
#include <qnamespace.h>
|
||||
#include <rhi/qrhi.h>
|
||||
#include <stdexcept>
|
||||
#include <d3d11.h>
|
||||
|
||||
// application namespace
|
||||
namespace advsettings
|
||||
@@ -60,61 +69,23 @@ OverlayController::OverlayController( bool desktopMode,
|
||||
// Throw Error If over 16k characters in path string
|
||||
if ( !pathIsGood )
|
||||
{
|
||||
LOG( ERROR ) << "Error Finding VR Runtime Path, Attempting Recovery: ";
|
||||
qCritical() << "Error Finding VR Runtime Path, Attempting Recovery: ";
|
||||
uint32_t maxLengthRe = requiredLength;
|
||||
LOG( INFO ) << "Open VR reporting Required path length of: "
|
||||
<< maxLengthRe;
|
||||
qInfo() << "Open VR reporting Required path length of: " << maxLengthRe;
|
||||
}
|
||||
|
||||
m_runtimePathUrl = QUrl::fromLocalFile( tempRuntimePath );
|
||||
LOG( INFO ) << "VR Runtime Path: " << m_runtimePathUrl.toLocalFile();
|
||||
qInfo() << "VR Runtime Path: " << m_runtimePathUrl.toLocalFile();
|
||||
|
||||
const double initVol = soundVolume();
|
||||
constexpr auto clickSoundURL = "res/sounds/click.wav";
|
||||
const auto activationSoundFile
|
||||
= paths::binaryDirectoryFindFile( clickSoundURL );
|
||||
m_activationSoundEffect.setSource( QUrl( ":/qt/qml/AdvancedSettings/src/res/sounds/click.wav" ) );
|
||||
m_activationSoundEffect.setVolume( initVol );
|
||||
|
||||
if ( activationSoundFile.has_value() )
|
||||
{
|
||||
m_activationSoundEffect.setSource( QUrl::fromLocalFile(
|
||||
QString::fromStdString( ( *activationSoundFile ) ) ) );
|
||||
m_activationSoundEffect.setVolume( initVol );
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( ERROR ) << "Could not find activation sound file "
|
||||
<< clickSoundURL;
|
||||
}
|
||||
constexpr auto focusChangedSoundURL = "res/sounds/focus.wav";
|
||||
const auto focusChangedSoundFile
|
||||
= paths::binaryDirectoryFindFile( focusChangedSoundURL );
|
||||
m_focusChangedSoundEffect.setSource( QUrl( ":/qt/qml/AdvancedSettings/src/res/sounds/focus.wav" ) );
|
||||
m_focusChangedSoundEffect.setVolume( initVol );
|
||||
|
||||
if ( focusChangedSoundFile.has_value() )
|
||||
{
|
||||
m_focusChangedSoundEffect.setSource( QUrl::fromLocalFile(
|
||||
QString::fromStdString( ( *focusChangedSoundFile ) ) ) );
|
||||
m_focusChangedSoundEffect.setVolume( initVol );
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( ERROR ) << "Could not find focus Changed sound file "
|
||||
<< focusChangedSoundURL;
|
||||
}
|
||||
|
||||
constexpr auto alarmFileName = "res/sounds/alarm01.wav";
|
||||
const auto alarm01SoundFile
|
||||
= paths::binaryDirectoryFindFile( alarmFileName );
|
||||
|
||||
if ( alarm01SoundFile.has_value() )
|
||||
{
|
||||
m_alarm01SoundEffect.setSource( QUrl::fromLocalFile(
|
||||
QString::fromStdString( ( *alarm01SoundFile ) ) ) );
|
||||
m_alarm01SoundEffect.setVolume( 1.0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( ERROR ) << "Could not find alarm01 sound file " << alarmFileName;
|
||||
}
|
||||
m_alarm01SoundEffect.setSource( QUrl( ":/qt/qml/AdvancedSettings/src/res/sounds/alarm01.wav" ) );
|
||||
m_alarm01SoundEffect.setVolume( 1.0 );
|
||||
|
||||
// If we have desktop mode flag ignore waht toggle says otherwise we use
|
||||
// toggle
|
||||
@@ -122,28 +93,7 @@ OverlayController::OverlayController( bool desktopMode,
|
||||
{
|
||||
m_desktopMode = desktopModeToggle();
|
||||
}
|
||||
|
||||
QSurfaceFormat format;
|
||||
// Qt's QOpenGLPaintDevice is not compatible with OpenGL versions >= 3.0
|
||||
// NVIDIA does not care, but unfortunately AMD does
|
||||
// Are subtle changes to the semantics of OpenGL functions actually covered
|
||||
// by the compatibility profile, and this is an AMD bug?
|
||||
format.setVersion( 2, 1 );
|
||||
// format.setProfile( QSurfaceFormat::CompatibilityProfile );
|
||||
format.setDepthBufferSize( 16 );
|
||||
format.setStencilBufferSize( 8 );
|
||||
format.setSamples( 16 );
|
||||
|
||||
m_openGLContext.setFormat( format );
|
||||
if ( !m_openGLContext.create() )
|
||||
{
|
||||
throw std::runtime_error( "Could not create OpenGL context" );
|
||||
}
|
||||
|
||||
// create an offscreen surface to attach the context and FBO to
|
||||
m_offscreenSurface.setFormat( m_openGLContext.format() );
|
||||
m_offscreenSurface.create();
|
||||
m_openGLContext.makeCurrent( &m_offscreenSurface );
|
||||
m_desktopMode = false;
|
||||
|
||||
if ( !vr::VROverlay() )
|
||||
{
|
||||
@@ -344,11 +294,11 @@ OverlayController::OverlayController( bool desktopMode,
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( INFO ) << "Version Check: Feature disabled. Not checking version.";
|
||||
qInfo() << "Version Check: Feature disabled. Not checking version.";
|
||||
}
|
||||
|
||||
LOG( INFO ) << "OPENSSL VERSION: "
|
||||
<< QSslSocket::sslLibraryBuildVersionString();
|
||||
qInfo() << "OPENSSL VERSION: "
|
||||
<< QSslSocket::sslLibraryBuildVersionString();
|
||||
}
|
||||
|
||||
OverlayController::~OverlayController()
|
||||
@@ -373,7 +323,7 @@ void OverlayController::exitApp()
|
||||
Shutdown();
|
||||
QApplication::exit();
|
||||
|
||||
LOG( INFO ) << "All systems exited.";
|
||||
qInfo() << "All systems exited.";
|
||||
exit( EXIT_SUCCESS );
|
||||
// Does not fallthrough
|
||||
}
|
||||
@@ -403,7 +353,9 @@ void OverlayController::Shutdown()
|
||||
m_pRenderTimer->stop();
|
||||
m_pRenderTimer.reset();
|
||||
}
|
||||
m_pFbo.reset();
|
||||
m_render_pass_descriptor.reset();
|
||||
m_render_target.reset();
|
||||
m_pFBTexture.reset();
|
||||
}
|
||||
|
||||
void OverlayController::SetWidget( QQuickItem* quickItem,
|
||||
@@ -412,6 +364,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
||||
{
|
||||
if ( !m_desktopMode )
|
||||
{
|
||||
qDebug() << "not desktop mode";
|
||||
vr::VROverlayError overlayError
|
||||
= vr::VROverlay()->CreateDashboardOverlay(
|
||||
key.c_str(),
|
||||
@@ -439,24 +392,17 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
||||
vr::VROverlayFlags_SendVRSmoothScrollEvents,
|
||||
true );
|
||||
|
||||
constexpr auto thumbiconFilename = "res/img/icons/thumbicon.png";
|
||||
const auto thumbIconPath
|
||||
= paths::binaryDirectoryFindFile( thumbiconFilename );
|
||||
if ( thumbIconPath.has_value() )
|
||||
{
|
||||
vr::VROverlay()->SetOverlayFromFile( m_ulOverlayThumbnailHandle,
|
||||
thumbIconPath->c_str() );
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( ERROR ) << "Could not find thumbnail icon \""
|
||||
<< thumbiconFilename << "\"";
|
||||
QImage thumbiconImg( ":qt/qml/AdvancedSettings/src/res/img/icons/thumbicon.png");
|
||||
ovr_overlay_wrapper::setOverlayFromQImage(
|
||||
m_ulOverlayThumbnailHandle, thumbiconImg );
|
||||
}
|
||||
|
||||
// Too many render calls in too short time overwhelm Qt and an
|
||||
// assertion gets thrown. Therefore we use an timer to delay render
|
||||
// calls
|
||||
m_pRenderTimer.reset( new QTimer() );
|
||||
m_pRenderTimer->moveToThread( qApp->thread() );
|
||||
m_pRenderTimer->setSingleShot( true );
|
||||
m_pRenderTimer->setInterval( 5 );
|
||||
connect( m_pRenderTimer.get(),
|
||||
@@ -464,22 +410,51 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
||||
this,
|
||||
SLOT( renderOverlay() ) );
|
||||
|
||||
QOpenGLFramebufferObjectFormat fboFormat;
|
||||
fboFormat.setAttachment(
|
||||
QOpenGLFramebufferObject::CombinedDepthStencil );
|
||||
fboFormat.setTextureTarget( GL_TEXTURE_2D );
|
||||
m_pFbo.reset( new QOpenGLFramebufferObject(
|
||||
static_cast<int>( quickItem->width() ),
|
||||
static_cast<int>( quickItem->height() ),
|
||||
fboFormat ) );
|
||||
#if QT_CONFIG( vulkan )
|
||||
if ( m_window.graphicsApi() == QSGRendererInterface::Vulkan )
|
||||
{
|
||||
m_vulkanInstance.reset( new QVulkanInstance );
|
||||
m_vulkanInstance->setExtensions(
|
||||
QQuickGraphicsConfiguration::preferredInstanceExtensions() );
|
||||
if ( !m_vulkanInstance->create() )
|
||||
throw std::runtime_error( "Cannot create vulkan instance" );
|
||||
|
||||
m_window.setRenderTarget( m_pFbo.get() );
|
||||
m_window.setVulkanInstance( m_vulkanInstance.get() );
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( !m_renderControl.initialize() )
|
||||
throw std::runtime_error( "could not initialize m_renderControl" );
|
||||
QRhi* rhi = this->rhi();
|
||||
|
||||
qInfo() << "Started with" << rhi->backendName();
|
||||
|
||||
m_pFBTexture.reset( rhi->newTexture(
|
||||
QRhiTexture::RGBA8,
|
||||
quickItem->size().toSize(),
|
||||
1,
|
||||
QRhiTexture::RenderTarget | QRhiTexture::UsedAsTransferSource ) );
|
||||
if ( !m_pFBTexture->create() )
|
||||
throw std::runtime_error( "RhiTexture not created" );
|
||||
|
||||
m_render_target.reset(
|
||||
rhi->newTextureRenderTarget( { m_pFBTexture.get() } ) );
|
||||
m_render_pass_descriptor.reset(
|
||||
m_render_target->newCompatibleRenderPassDescriptor() );
|
||||
m_render_target->setRenderPassDescriptor(
|
||||
m_render_pass_descriptor.get() );
|
||||
if ( !m_render_target->create() )
|
||||
throw std::runtime_error( "failed to create render target" );
|
||||
|
||||
auto qqrt
|
||||
= QQuickRenderTarget::fromRhiRenderTarget( m_render_target.get() );
|
||||
|
||||
m_window.setRenderTarget( qqrt );
|
||||
quickItem->setParentItem( m_window.contentItem() );
|
||||
m_window.setGeometry( 0,
|
||||
0,
|
||||
static_cast<int>( quickItem->width() ),
|
||||
static_cast<int>( quickItem->height() ) );
|
||||
m_renderControl.initialize( &m_openGLContext );
|
||||
|
||||
vr::HmdVector2_t vecWindowSize
|
||||
= { static_cast<float>( quickItem->width() ),
|
||||
@@ -510,7 +485,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
||||
m_steamVRTabController.initStage2( this );
|
||||
m_chaperoneTabController.initStage2( this );
|
||||
m_fixFloorTabController.initStage2( this );
|
||||
m_audioTabController.initStage2();
|
||||
m_audioTabController.initStage2( this );
|
||||
m_statisticsTabController.initStage2( this );
|
||||
m_settingsTabController.initStage2( this );
|
||||
m_utilitiesTabController.initStage2( this );
|
||||
@@ -526,7 +501,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
||||
autoApplyChaperoneName() );
|
||||
if ( chapindex.first )
|
||||
{
|
||||
LOG( INFO ) << "Auto Applying Chaperone";
|
||||
qInfo() << "Auto Applying Chaperone";
|
||||
m_chaperoneTabController.applyChaperoneProfile( chapindex.second );
|
||||
// This should be the way to stop room-setup from starting... as it
|
||||
// sends steamvr a signal that it is completed
|
||||
@@ -534,7 +509,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
||||
vr::EChaperoneConfigFile_Live );
|
||||
return;
|
||||
}
|
||||
LOG( WARNING ) << "Profile Not Found for Auto Apply Chaperone!";
|
||||
qWarning() << "Profile Not Found for Auto Apply Chaperone!";
|
||||
}
|
||||
auto indexList = ovr_system_wrapper::getAllConnectedDevices();
|
||||
|
||||
@@ -571,6 +546,59 @@ void OverlayController::OnRenderRequest()
|
||||
}
|
||||
}
|
||||
|
||||
void OverlayController::SetOverlayFromQRhiTexture( QRhiTexture& tex )
|
||||
{
|
||||
vr::Texture_t vrTex = {};
|
||||
QRhi* rhi = this->rhi();
|
||||
|
||||
switch ( rhi->backend() )
|
||||
{
|
||||
case QRhi::OpenGLES2:
|
||||
{
|
||||
vrTex.handle = reinterpret_cast<void*>( tex.nativeTexture().object );
|
||||
vrTex.eType = vr::TextureType_OpenGL;
|
||||
vrTex.eColorSpace = vr::ColorSpace_Auto;
|
||||
}
|
||||
break;
|
||||
case QRhi::D3D11:
|
||||
{
|
||||
vrTex.handle = reinterpret_cast<ID3D11Texture2D *>( tex.nativeTexture().object );
|
||||
vrTex.eType = vr::TextureType_DirectX;
|
||||
vrTex.eColorSpace = vr::ColorSpace_Auto;
|
||||
|
||||
}
|
||||
break;
|
||||
#if QT_CONFIG( vulkan )
|
||||
case QRhi::Vulkan:
|
||||
{
|
||||
const QRhiVulkanNativeHandles* vulkan_handles
|
||||
= reinterpret_cast<const QRhiVulkanNativeHandles*>(
|
||||
rhi->nativeHandles() );
|
||||
vr::VRVulkanTextureData_t vulkan = {
|
||||
.m_nImage = tex.nativeTexture().object,
|
||||
.m_pDevice = vulkan_handles->dev,
|
||||
.m_pPhysicalDevice = vulkan_handles->physDev,
|
||||
.m_pInstance = vulkan_handles->inst->vkInstance(),
|
||||
.m_pQueue = vulkan_handles->gfxQueue,
|
||||
.m_nQueueFamilyIndex = vulkan_handles->gfxQueueIdx,
|
||||
.m_nWidth = static_cast<uint32_t>( tex.pixelSize().width() ),
|
||||
.m_nHeight = static_cast<uint32_t>( tex.pixelSize().height() ),
|
||||
.m_nFormat = static_cast<uint32_t>(tex.format()),
|
||||
.m_nSampleCount = static_cast<uint32_t>( tex.sampleCount() ),
|
||||
};
|
||||
vrTex.handle = &vulkan;
|
||||
vrTex.eType = vr::TextureType_Vulkan;
|
||||
vrTex.eColorSpace = vr::ColorSpace_Auto;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
qFatal() << "unimplemented backend:" << rhi->backend();
|
||||
throw std::runtime_error( "unimplemented backend" );
|
||||
}
|
||||
vr::VROverlay()->SetOverlayTexture( m_ulOverlayHandle, &vrTex );
|
||||
}
|
||||
|
||||
void OverlayController::renderOverlay()
|
||||
{
|
||||
if ( !m_desktopMode )
|
||||
@@ -582,28 +610,12 @@ void OverlayController::renderOverlay()
|
||||
m_ulOverlayThumbnailHandle ) ) )
|
||||
return;
|
||||
m_renderControl.polishItems();
|
||||
m_renderControl.beginFrame();
|
||||
m_renderControl.sync();
|
||||
m_renderControl.render();
|
||||
m_renderControl.endFrame();
|
||||
|
||||
GLuint unTexture = m_pFbo->texture();
|
||||
if ( unTexture != 0 )
|
||||
{
|
||||
#if defined _WIN64 || defined _LP64
|
||||
// To avoid any compiler warning because of cast to a larger
|
||||
// pointer type (warning C4312 on VC)
|
||||
vr::Texture_t texture = { reinterpret_cast<void*>(
|
||||
static_cast<uint64_t>( unTexture ) ),
|
||||
vr::TextureType_OpenGL,
|
||||
vr::ColorSpace_Auto };
|
||||
#else
|
||||
vr::Texture_t texture = { reinterpret_cast<void*>( unTexture ),
|
||||
vr::TextureType_OpenGL,
|
||||
vr::ColorSpace_Auto };
|
||||
#endif
|
||||
vr::VROverlay()->SetOverlayTexture( m_ulOverlayHandle, &texture );
|
||||
}
|
||||
m_openGLContext.functions()->glFlush(); // We need to flush otherwise
|
||||
// the texture may be empty.*/
|
||||
SetOverlayFromQRhiTexture( *m_pFBTexture );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -621,14 +633,15 @@ bool OverlayController::pollNextEvent( vr::VROverlayHandle_t ulOverlayHandle,
|
||||
}
|
||||
}
|
||||
|
||||
QPoint OverlayController::getMousePositionForEvent( vr::VREvent_Mouse_t mouse )
|
||||
QPointF OverlayController::getMousePositionForEvent( vr::VREvent_Mouse_t mouse )
|
||||
{
|
||||
float y = mouse.y;
|
||||
//TODO temp mouse is negative??
|
||||
float y = m_window.height() - mouse.y;
|
||||
#ifdef __linux__
|
||||
float h = static_cast<float>( m_window.height() );
|
||||
y = h - y;
|
||||
#endif
|
||||
return QPoint( static_cast<int>( mouse.x ), static_cast<int>( y ) );
|
||||
return { mouse.x, y };
|
||||
}
|
||||
|
||||
void OverlayController::processMediaKeyBindings()
|
||||
@@ -1013,7 +1026,7 @@ QString OverlayController::versionCheckText() const
|
||||
void OverlayController::setVersionCheckText( QString value, bool notify )
|
||||
{
|
||||
m_versionCheckText = value;
|
||||
LOG( INFO ) << "m_versionCheckText = " << m_versionCheckText;
|
||||
qInfo() << "m_versionCheckText = " << m_versionCheckText;
|
||||
if ( notify )
|
||||
{
|
||||
emit versionCheckTextChanged( m_versionCheckText );
|
||||
@@ -1134,7 +1147,7 @@ void OverlayController::mainEventLoop()
|
||||
{
|
||||
case vr::VREvent_MouseMove:
|
||||
{
|
||||
QPoint ptNewMouse = getMousePositionForEvent( vrEvent.data.mouse );
|
||||
QPointF ptNewMouse = getMousePositionForEvent( vrEvent.data.mouse );
|
||||
if ( ptNewMouse != m_ptLastMouse )
|
||||
{
|
||||
QMouseEvent mouseEvent( QEvent::MouseMove,
|
||||
@@ -1142,7 +1155,7 @@ void OverlayController::mainEventLoop()
|
||||
m_window.mapToGlobal( ptNewMouse ),
|
||||
Qt::NoButton,
|
||||
m_lastMouseButtons,
|
||||
nullptr );
|
||||
Qt::NoModifier );
|
||||
m_ptLastMouse = ptNewMouse;
|
||||
QCoreApplication::sendEvent( &m_window, &mouseEvent );
|
||||
OnRenderRequest();
|
||||
@@ -1152,7 +1165,7 @@ void OverlayController::mainEventLoop()
|
||||
|
||||
case vr::VREvent_MouseButtonDown:
|
||||
{
|
||||
QPoint ptNewMouse = getMousePositionForEvent( vrEvent.data.mouse );
|
||||
QPointF ptNewMouse = getMousePositionForEvent( vrEvent.data.mouse );
|
||||
Qt::MouseButton button
|
||||
= vrEvent.data.mouse.button == vr::VRMouseButton_Right
|
||||
? Qt::RightButton
|
||||
@@ -1163,14 +1176,14 @@ void OverlayController::mainEventLoop()
|
||||
m_window.mapToGlobal( ptNewMouse ),
|
||||
button,
|
||||
m_lastMouseButtons,
|
||||
nullptr );
|
||||
Qt::NoModifier );
|
||||
QCoreApplication::sendEvent( &m_window, &mouseEvent );
|
||||
}
|
||||
break;
|
||||
|
||||
case vr::VREvent_MouseButtonUp:
|
||||
{
|
||||
QPoint ptNewMouse = getMousePositionForEvent( vrEvent.data.mouse );
|
||||
QPointF ptNewMouse = getMousePositionForEvent( vrEvent.data.mouse );
|
||||
Qt::MouseButton button
|
||||
= vrEvent.data.mouse.button == vr::VRMouseButton_Right
|
||||
? Qt::RightButton
|
||||
@@ -1181,7 +1194,7 @@ void OverlayController::mainEventLoop()
|
||||
m_window.mapToGlobal( ptNewMouse ),
|
||||
button,
|
||||
m_lastMouseButtons,
|
||||
nullptr );
|
||||
Qt::NoModifier );
|
||||
QCoreApplication::sendEvent( &m_window, &mouseEvent );
|
||||
}
|
||||
break;
|
||||
@@ -1197,10 +1210,10 @@ void OverlayController::mainEventLoop()
|
||||
* ( 360.0f * 8.0f ) ),
|
||||
static_cast<int>( vrEvent.data.scroll.ydelta
|
||||
* ( 360.0f * 8.0f ) ) ),
|
||||
0,
|
||||
Qt::Vertical,
|
||||
m_lastMouseButtons,
|
||||
nullptr );
|
||||
Qt::KeyboardModifiers::fromInt( 0 ),
|
||||
Qt::ScrollPhase::NoScrollPhase,
|
||||
false );
|
||||
QCoreApplication::sendEvent( &m_window, &wheelEvent );
|
||||
}
|
||||
break;
|
||||
@@ -1213,7 +1226,7 @@ void OverlayController::mainEventLoop()
|
||||
|
||||
case vr::VREvent_Quit:
|
||||
{
|
||||
LOG( INFO ) << "Received quit request.";
|
||||
qInfo() << "Received quit request.";
|
||||
vr::VRSystem()->AcknowledgeQuit_Exiting(); // Let us buy some
|
||||
// time just in case
|
||||
|
||||
@@ -1225,14 +1238,14 @@ void OverlayController::mainEventLoop()
|
||||
|
||||
case vr::VREvent_DashboardActivated:
|
||||
{
|
||||
LOG( DEBUG ) << "Dashboard activated";
|
||||
qDebug() << "Dashboard activated";
|
||||
m_dashboardVisible = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case vr::VREvent_DashboardDeactivated:
|
||||
{
|
||||
LOG( DEBUG ) << "Dashboard deactivated";
|
||||
qDebug() << "Dashboard deactivated";
|
||||
m_dashboardVisible = false;
|
||||
settings::saveChangedSettings();
|
||||
if(0UL != m_lastTextUID){
|
||||
@@ -1709,7 +1722,7 @@ void OverlayController::OnNetworkReply( QNetworkReply* reply )
|
||||
if ( reply->error() == QNetworkReply::NoError )
|
||||
{
|
||||
QByteArray replyByteData = reply->readAll();
|
||||
LOG( INFO ) << "Version Check: Recieved Data: " << replyByteData;
|
||||
qInfo() << "Version Check: Recieved Data: " << replyByteData;
|
||||
QJsonParseError parseError;
|
||||
m_remoteVersionJsonDocument
|
||||
= QJsonDocument::fromJson( replyByteData, &parseError );
|
||||
@@ -1752,10 +1765,9 @@ void OverlayController::OnNetworkReply( QNetworkReply* reply )
|
||||
+ QString::number( m_remoteVersionPatch )
|
||||
+ ") available." );
|
||||
}
|
||||
LOG( INFO )
|
||||
<< "Version Check: Newer version (" << m_remoteVersionMajor
|
||||
<< "." << m_remoteVersionMinor << "."
|
||||
<< m_remoteVersionPatch << ") available.";
|
||||
qInfo() << "Version Check: Newer version ("
|
||||
<< m_remoteVersionMajor << "." << m_remoteVersionMinor
|
||||
<< "." << m_remoteVersionPatch << ") available.";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1764,22 +1776,22 @@ void OverlayController::OnNetworkReply( QNetworkReply* reply )
|
||||
setVersionCheckText( m_optionalMessage );
|
||||
}
|
||||
setNewVersionDetected( false );
|
||||
LOG( INFO ) << "Version Check: Installed version is latest "
|
||||
"release.";
|
||||
qInfo() << "Version Check: Installed version is latest "
|
||||
"release.";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( ERROR )
|
||||
qCritical()
|
||||
<< "Version Check: Error parsing json. QJsonParseError = "
|
||||
<< parseError.error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG( ERROR ) << "Version Check: Error connecting to network. "
|
||||
"QNetworkReply::NetworkError = "
|
||||
<< reply->error();
|
||||
qCritical() << "Version Check: Error connecting to network. "
|
||||
"QNetworkReply::NetworkError = "
|
||||
<< reply->error();
|
||||
}
|
||||
reply->deleteLater();
|
||||
}
|
||||
|
||||
+29
-7
@@ -1,9 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <openvr.h>
|
||||
#include <QtCore/QtCore>
|
||||
// because of incompatibilities with QtOpenGL and GLEW we need to cherry pick
|
||||
// includes
|
||||
#include <QVector2D>
|
||||
#include <QMatrix4x4>
|
||||
#include <QVector>
|
||||
#include <QVector2D>
|
||||
@@ -21,8 +22,10 @@
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QQuickRenderTarget>
|
||||
#include <memory>
|
||||
#include <easylogging++.h>
|
||||
#include <optional>
|
||||
#include <rhi/qrhi.h>
|
||||
|
||||
#include "openvr/openvr_init.h"
|
||||
|
||||
@@ -105,18 +108,30 @@ private:
|
||||
vr::VROverlayHandle_t m_ulOverlayThumbnailHandle
|
||||
= vr::k_ulOverlayHandleInvalid;
|
||||
|
||||
#if QT_CONFIG( vulkan )
|
||||
std::unique_ptr<QVulkanInstance> m_vulkanInstance = nullptr;
|
||||
#endif
|
||||
QQuickRenderControl m_renderControl;
|
||||
QQuickWindow m_window{ &m_renderControl };
|
||||
|
||||
std::optional<vr::ETextureType> m_cached_vr_texture_type;
|
||||
std::unique_ptr<QRhiTexture> m_pFBTexture;
|
||||
std::unique_ptr<QRhiTextureRenderTarget> m_render_target;
|
||||
std::unique_ptr<QRhiRenderPassDescriptor> m_render_pass_descriptor;
|
||||
|
||||
/*
|
||||
std::unique_ptr<QOpenGLFramebufferObject> m_pFbo;
|
||||
QQuickRenderTarget m_pRenderTarget;
|
||||
QOpenGLContext m_openGLContext;
|
||||
QOffscreenSurface m_offscreenSurface;
|
||||
*/
|
||||
|
||||
QTimer m_pumpEventsTimer;
|
||||
std::unique_ptr<QTimer> m_pRenderTimer;
|
||||
bool m_dashboardVisible = false;
|
||||
|
||||
QPoint m_ptLastMouse;
|
||||
Qt::MouseButtons m_lastMouseButtons = nullptr;
|
||||
QPointF m_ptLastMouse;
|
||||
Qt::MouseButtons m_lastMouseButtons;
|
||||
|
||||
bool m_desktopMode;
|
||||
bool m_noSound;
|
||||
@@ -154,8 +169,9 @@ private:
|
||||
QJsonDocument m_remoteVersionJsonDocument = QJsonDocument();
|
||||
QJsonObject m_remoteVersionJsonObject;
|
||||
|
||||
public: // I know it's an ugly hack to make them public to enable external
|
||||
// access, but I am too lazy to implement getters.
|
||||
public:
|
||||
// I know it's an ugly hack to make them public to enable external
|
||||
// access, but I am too lazy to implement getters.
|
||||
SteamVRTabController m_steamVRTabController;
|
||||
ChaperoneTabController m_chaperoneTabController;
|
||||
MoveCenterTabController m_moveCenterTabController;
|
||||
@@ -169,7 +185,7 @@ public: // I know it's an ugly hack to make them public to enable external
|
||||
bool m_incomingReset = false;
|
||||
|
||||
private:
|
||||
QPoint getMousePositionForEvent( vr::VREvent_Mouse_t mouse );
|
||||
QPointF getMousePositionForEvent( vr::VREvent_Mouse_t mouse );
|
||||
void processInputBindings();
|
||||
void processMediaKeyBindings();
|
||||
void processMotionBindings();
|
||||
@@ -179,11 +195,17 @@ private:
|
||||
void processRotationBindings();
|
||||
void processExclusiveInputBinding();
|
||||
|
||||
inline QRhi* rhi()
|
||||
{
|
||||
return m_renderControl.rhi();
|
||||
}
|
||||
|
||||
bool m_exclusiveState = false;
|
||||
bool m_keyPressOneState = false;
|
||||
bool m_keyPressTwoState = false;
|
||||
|
||||
public:
|
||||
void SetOverlayFromQRhiTexture( QRhiTexture& tex );
|
||||
OverlayController( bool desktopMode, bool noSound, QQmlEngine& qmlEngine );
|
||||
virtual ~OverlayController();
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Dialogs
|
||||
import ovras.advsettings 1.0
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
import "common"
|
||||
@@ -415,43 +415,43 @@ MyStackViewPage {
|
||||
|
||||
Connections {
|
||||
target: ChaperoneTabController
|
||||
onChaperoneSwitchToBeginnerEnabledChanged: {
|
||||
function onChaperoneSwitchToBeginnerEnabledChanged() {
|
||||
switchBeginnerToggle.checked = ChaperoneTabController.chaperoneSwitchToBeginnerEnabled
|
||||
}
|
||||
onChaperoneSwitchToBeginnerDistanceChanged: {
|
||||
function onChaperoneSwitchToBeginnerDistanceChanged() {
|
||||
var d = ChaperoneTabController.chaperoneSwitchToBeginnerDistance.toFixed(2)
|
||||
if (d <= switchBeginnerDistanceSlider.to && Math.abs(switchBeginnerDistanceSlider.value - d) > 0.0008) {
|
||||
switchBeginnerDistanceSlider.value = d
|
||||
}
|
||||
switchBeginnerDistanceText.text = d
|
||||
}
|
||||
onChaperoneHapticFeedbackEnabledChanged: {
|
||||
function onChaperoneHapticFeedbackEnabledChanged() {
|
||||
hapticFeedbackToggle.checked = ChaperoneTabController.chaperoneHapticFeedbackEnabled
|
||||
}
|
||||
onChaperoneHapticFeedbackDistanceChanged: {
|
||||
function onChaperoneHapticFeedbackDistanceChanged() {
|
||||
var d = ChaperoneTabController.chaperoneHapticFeedbackDistance.toFixed(2)
|
||||
if (d <= hapticFeedbackDistanceSlider.to && Math.abs(hapticFeedbackDistanceSlider.value - d) > 0.0008) {
|
||||
hapticFeedbackDistanceSlider.value = d
|
||||
}
|
||||
hapticFeedbackDistanceText.text = d
|
||||
}
|
||||
onChaperoneAlarmSoundEnabledChanged: {
|
||||
function onChaperoneAlarmSoundEnabledChanged() {
|
||||
audioWarningToggle.checked = ChaperoneTabController.chaperoneAlarmSoundEnabled
|
||||
}
|
||||
onChaperoneAlarmSoundLoopingChanged: {
|
||||
function onChaperoneAlarmSoundLoopingChanged() {
|
||||
audioWarningLoopingToggle.checked = ChaperoneTabController.chaperoneAlarmSoundLooping
|
||||
}
|
||||
onChaperoneAlarmSoundDistanceChanged: {
|
||||
function onChaperoneAlarmSoundDistanceChanged() {
|
||||
var d = ChaperoneTabController.chaperoneAlarmSoundDistance.toFixed(2)
|
||||
if (d <= audioWarningDistanceSlider.to && Math.abs(audioWarningDistanceSlider.value - d) > 0.0008) {
|
||||
audioWarningDistanceSlider.value = d
|
||||
}
|
||||
audioWarningDistanceText.text = d
|
||||
}
|
||||
onChaperoneShowDashboardEnabledChanged: {
|
||||
function onChaperoneShowDashboardEnabledChanged() {
|
||||
openDashboardToggle.checked = ChaperoneTabController.chaperoneShowDashboardEnabled
|
||||
}
|
||||
onChaperoneShowDashboardDistanceChanged: {
|
||||
function onChaperoneShowDashboardDistanceChanged() {
|
||||
var d = ChaperoneTabController.chaperoneShowDashboardDistance.toFixed(2)
|
||||
if (d <= openDashboardDistanceSlider.to && Math.abs(openDashboardDistanceSlider.value - d) > 0.0008) {
|
||||
openDashboardDistanceSlider.value = d
|
||||
|
||||
@@ -140,7 +140,7 @@ MyStackViewPage {
|
||||
|
||||
Connections {
|
||||
target: FixFloorTabController
|
||||
onStatusMessageSignal: {
|
||||
function onStatusMessageSignal() {
|
||||
if (statusMessageTimer.running) {
|
||||
statusMessageTimer.stop()
|
||||
}
|
||||
@@ -148,15 +148,15 @@ MyStackViewPage {
|
||||
statusMessageTimer.interval = FixFloorTabController.currentStatusMessageTimeout() * 1000
|
||||
statusMessageTimer.start()
|
||||
}
|
||||
onMeasureStartSignal: {
|
||||
function onMeasureStartSignal() {
|
||||
fixButton.enabled = false
|
||||
undoFixButton.enabled = false
|
||||
}
|
||||
onMeasureEndSignal: {
|
||||
function onMeasureEndSignal() {
|
||||
fixButton.enabled = true
|
||||
// undoFixButton.enabled = FixFloorTabController.canUndo
|
||||
}
|
||||
onCanUndoChanged: {
|
||||
function onCanUndoChanged() {
|
||||
//undoFixButton.enabled = FixFloorTabController.canUndo
|
||||
// revert below to this -^
|
||||
undoFixButton.enabled = false
|
||||
|
||||
@@ -524,33 +524,33 @@ MyStackViewPage {
|
||||
|
||||
Connections {
|
||||
target: MoveCenterTabController
|
||||
onOffsetXChanged: {
|
||||
function onOffsetXChanged() {
|
||||
spaceMoveXText.text = MoveCenterTabController.offsetX.toFixed(2)
|
||||
}
|
||||
onOffsetYChanged: {
|
||||
function onOffsetYChanged() {
|
||||
spaceMoveYText.text = MoveCenterTabController.offsetY.toFixed(2)
|
||||
}
|
||||
onOffsetZChanged: {
|
||||
function onOffsetZChanged() {
|
||||
spaceMoveZText.text = MoveCenterTabController.offsetZ.toFixed(2)
|
||||
}
|
||||
onRotationChanged: {
|
||||
function onRotationChanged() {
|
||||
spaceRotationSlider.value = ( MoveCenterTabController.rotation / 100 )
|
||||
}
|
||||
onTempRotationChanged: {
|
||||
function onTempRotationChanged() {
|
||||
var intTempRotation = MoveCenterTabController.tempRotation
|
||||
spaceRotationSlider.value = ( intTempRotation / 100 )
|
||||
spaceRotationText.text = ( intTempRotation / 100 ) + "°"
|
||||
}
|
||||
onLockXToggleChanged: {
|
||||
function onLockXToggleChanged() {
|
||||
lockXToggle.checked = MoveCenterTabController.lockXToggle
|
||||
}
|
||||
onLockYToggleChanged: {
|
||||
function onLockYToggleChanged() {
|
||||
lockYToggle.checked = MoveCenterTabController.lockYToggle
|
||||
}
|
||||
onLockZToggleChanged: {
|
||||
function onLockZToggleChanged() {
|
||||
lockZToggle.checked = MoveCenterTabController.lockZToggle
|
||||
}
|
||||
onTrackingUniverseChanged: {
|
||||
function onTrackingUniverseChanged() {
|
||||
if (MoveCenterTabController.trackingUniverse === 0) {
|
||||
spaceModeText.text = "Sitting"
|
||||
spaceSeatedRecenter.visible = true
|
||||
@@ -560,7 +560,7 @@ MyStackViewPage {
|
||||
spaceModeText.text = "Unknown(" + MoveCenterTabController.trackingUniverse + ")"
|
||||
}
|
||||
}
|
||||
onOffsetProfilesUpdated: {
|
||||
function onOffsetProfilesUpdated() {
|
||||
reloadOffsetProfiles()
|
||||
}
|
||||
}
|
||||
|
||||
+37
-38
@@ -1,7 +1,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
import "common"
|
||||
import "utilities_page"
|
||||
@@ -28,107 +28,107 @@ MyStackViewPage {
|
||||
spacing: 10
|
||||
MyPushButton {
|
||||
id: steamVRButton
|
||||
iconPath: "qrc:/main_menu_icons/steamvr_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/steamvr_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " SteamVR"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(steamVRPage)
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: chaperoneButton
|
||||
iconPath: "qrc:/main_menu_icons/chaperone_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/chaperone_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Chaperone"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(chaperonePage)
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: playSpaceButton
|
||||
iconPath: "qrc:/main_menu_icons/offsets_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/offsets_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Offsets"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(playspacePage)
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: motionButton
|
||||
iconPath: "qrc:/main_menu_icons/motion_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/motion_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Motion"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(motionPage)
|
||||
}
|
||||
}
|
||||
MyPushButton {
|
||||
id: rotationButton
|
||||
iconPath: "qrc:/main_menu_icons/rotation_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/rotation_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Rotation"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(rotationPage)
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: fixFloorButton
|
||||
iconPath: "qrc:/main_menu_icons/space_fix_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/space_fix_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Space Fix"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(fixFloorPage)
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: audioButton
|
||||
iconPath: "qrc:/main_menu_icons/audio_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/audio_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Audio"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(audioPage)
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: videoButton
|
||||
iconPath: "qrc:/main_menu_icons/video_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/video_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Video"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(videoPage)
|
||||
}
|
||||
}
|
||||
|
||||
MyPushButton {
|
||||
id: utilitiesButton
|
||||
iconPath: "qrc:/main_menu_icons/utilities_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/utilities_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Utilities"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(utilitiesPage)
|
||||
}
|
||||
}
|
||||
@@ -136,12 +136,12 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: statisticsButton
|
||||
iconPath: "qrc:/main_menu_icons/statistics_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/statistics_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Statistics"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(statisticsPage)
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: bindingsButton
|
||||
iconPath: "qrc:/main_menu_icons/bindings_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/bindings_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Bindings"
|
||||
Layout.fillWidth: true
|
||||
@@ -164,12 +164,12 @@ MyStackViewPage {
|
||||
|
||||
MyPushButton {
|
||||
id: settingsButton
|
||||
iconPath: "qrc:/main_menu_icons/settings_tab_icon"
|
||||
iconPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/main_menu_icons/settings_tab_icon.svg"
|
||||
activationSoundEnabled: false
|
||||
text: " Settings"
|
||||
Layout.fillWidth: true
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(settingsPage)
|
||||
}
|
||||
}
|
||||
@@ -379,7 +379,7 @@ MyStackViewPage {
|
||||
Layout.leftMargin: 12
|
||||
checkable: true
|
||||
contentItem: Image {
|
||||
source: parent.checked ? "qrc:/microphone/off" : "qrc:/microphone/on"
|
||||
source: parent.checked ? "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/microphone/mic_off.svg" : "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/microphone/mic_on.svg"
|
||||
sourceSize.width: 32
|
||||
sourceSize.height: 32
|
||||
anchors.fill: parent
|
||||
@@ -470,10 +470,9 @@ MyStackViewPage {
|
||||
summaryMicMuteToggle.checked = AudioTabController.micMuted
|
||||
summaryPttToggle.checked = AudioTabController.pttEnabled
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: OverlayController
|
||||
onNewVersionDetectedChanged: {
|
||||
function onNewVersionDetectedChanged() {
|
||||
if (OverlayController.newVersionDetected)
|
||||
{
|
||||
summaryVersionCheckTextRect.color = "#ff0000"
|
||||
@@ -481,10 +480,10 @@ MyStackViewPage {
|
||||
summaryVersionCheckTextRect.color = "#2a2e35"
|
||||
}
|
||||
}
|
||||
onVersionCheckTextChanged: {
|
||||
function onVersionCheckTextChanged() {
|
||||
summaryVersionCheckText.text = OverlayController.versionCheckText
|
||||
}
|
||||
onDisableVersionCheckChanged: {
|
||||
function onDisableVersionCheckChanged() {
|
||||
if (OverlayController.disableVersionCheck)
|
||||
{
|
||||
summaryVersionCheckText.visible = false
|
||||
@@ -503,34 +502,34 @@ MyStackViewPage {
|
||||
|
||||
Connections {
|
||||
target: ChaperoneTabController
|
||||
onChaperoneProfilesUpdated: {
|
||||
function onChaperoneProfilesUpdated() {
|
||||
reloadChaperoneProfiles()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
onVideoProfilesUpdated: {
|
||||
function onVideoProfilesUpdated() {
|
||||
reloadVideoProfiles()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onMicVolumeChanged: {
|
||||
function onMicVolumeChanged() {
|
||||
summaryMicVolumeSlider.value = AudioTabController.micVolume
|
||||
}
|
||||
onMicMutedChanged: {
|
||||
function onMicMutedChanged() {
|
||||
summaryMicMuteToggle.checked = AudioTabController.micMuted
|
||||
}
|
||||
onPttEnabledChanged: {
|
||||
function onPttEnabledChanged() {
|
||||
summaryPttToggle.checked = AudioTabController.pttEnabled
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: MoveCenterTabController
|
||||
onTrackingUniverseChanged: {
|
||||
function onTrackingUniverseChanged() {
|
||||
if (MoveCenterTabController.trackingUniverse === 0) {
|
||||
summaryPlaySpaceModeText.text = "Sitting"
|
||||
} else if (MoveCenterTabController.trackingUniverse === 1) {
|
||||
|
||||
@@ -338,66 +338,66 @@ MyStackViewPage {
|
||||
|
||||
Connections {
|
||||
target: SettingsTabController
|
||||
onAutoStartEnabledChanged: {
|
||||
function onAutoStartEnabledChanged() {
|
||||
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
|
||||
}
|
||||
onNativeChaperoneToggleChanged:{
|
||||
function onNativeChaperoneToggleChanged(){
|
||||
nativeChaperoneToggleButton.checked = SettingsTabController.nativeChaperoneToggle
|
||||
}
|
||||
onOculusSdkToggleChanged:{
|
||||
function onOculusSdkToggleChanged(){
|
||||
oculusSdkToggleButton.checked = SettingsTabController.oculusSdkToggle
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: MoveCenterTabController
|
||||
onUniverseCenteredRotationChanged: {
|
||||
function onUniverseCenteredRotationChanged() {
|
||||
universeCenteredRotationToggle.checked = MoveCenterTabController.universeCenteredRotation
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: OverlayController
|
||||
onVsyncDisabledChanged: {
|
||||
function onVsyncDisabledChanged() {
|
||||
vsyncDisabledToggle.checked = OverlayController.vsyncDisabled
|
||||
customTickRateText.visible = vsyncDisabledToggle.checked
|
||||
customTickRateLabel.visible = vsyncDisabledToggle.checked
|
||||
customTickRateMsLabel.visible = vsyncDisabledToggle.checked
|
||||
}
|
||||
onCrashRecoveryDisabledChanged: {
|
||||
function onCrashRecoveryDisabledChanged() {
|
||||
disableCrashRecoveryToggle.checked = !OverlayController.crashRecoveryDisabled
|
||||
}
|
||||
|
||||
onCustomTickRateMsChanged: {
|
||||
function onCustomTickRateMsChanged() {
|
||||
customTickRateText.text = OverlayController.customTickRateMs
|
||||
}
|
||||
|
||||
onEnableDebugChanged: {
|
||||
function onEnableDebugChanged() {
|
||||
debugStateRow.visible = OverlayController.enableDebug
|
||||
}
|
||||
|
||||
onDebugStateChanged: {
|
||||
function onDebugStateChanged() {
|
||||
debugStateText.text = OverlayController.debugState
|
||||
}
|
||||
onDisableVersionCheckChanged: {
|
||||
function onDisableVersionCheckChanged() {
|
||||
disableVersionCheckToggle.checked = OverlayController.disableVersionCheck
|
||||
}
|
||||
onExclusiveInputEnabledChanged:{
|
||||
function onExclusiveInputEnabledChanged(){
|
||||
exclusiveInputToggleButton.checked = OverlayController.exclusiveInputEnabled
|
||||
}
|
||||
onAutoApplyChaperoneEnabledChanged: {
|
||||
function onAutoApplyChaperoneEnabledChanged() {
|
||||
autoApplyChaperoneToggleButton.checked = OverlayController.autoApplyChaperoneEnabled
|
||||
}
|
||||
onSoundVolumeChanged:{
|
||||
function onSoundVolumeChanged(){
|
||||
volumeSlider.value = OverlayController.soundVolume
|
||||
}
|
||||
onDesktopModeToggleChanged:{
|
||||
function onDesktopModeToggleChanged(){
|
||||
desktopModeToggleButton.checked = OverlayController.desktopModeToggle
|
||||
}
|
||||
}
|
||||
Connections{
|
||||
target: ChaperoneTabController
|
||||
onChaperoneProfilesUpdated: {
|
||||
function onChaperoneProfilesUpdated() {
|
||||
reloadChaperoneProfiles()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,14 +44,14 @@ RowLayout {
|
||||
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onPlaybackDeviceIndexChanged: {
|
||||
function onPlaybackDeviceIndexChanged() {
|
||||
setShownAudioDevice(index)
|
||||
}
|
||||
onPlaybackDeviceListChanged: {
|
||||
function onPlaybackDeviceListChanged() {
|
||||
audioPlaybackNameCombo.devices = getAudioDeviceList()
|
||||
setShownAudioDevice(AudioTabController.playbackDeviceIndex)
|
||||
}
|
||||
onPlaybackOverrideChanged: {
|
||||
function onPlaybackOverrideChanged() {
|
||||
playbackOverrideToggle.value = AudioTabController.playbackOverride
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,14 +63,14 @@ RowLayout {
|
||||
}
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onMicDeviceIndexChanged: {
|
||||
function onMicDeviceIndexChanged() {
|
||||
setShownAudioDevice(index)
|
||||
}
|
||||
onRecordingDeviceListChanged: {
|
||||
function onRecordingDeviceListChanged() {
|
||||
devices = getAudioDeviceList()
|
||||
setShownAudioDevice(AudioTabController.micDeviceIndex)
|
||||
}
|
||||
onRecordingOverrideChanged: {
|
||||
function onRecordingOverrideChanged() {
|
||||
recordingOverrideToggle.value = AudioTabController.recordingOverride
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ ColumnLayout {
|
||||
Layout.leftMargin: 12
|
||||
checkable: true
|
||||
contentItem: Image {
|
||||
source: parent.checked ? "qrc:/microphone/off" : "qrc:/microphone/on"
|
||||
source: parent.checked ? "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/microphone/mic_on.svg" : "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/microphone/mic_off.svg"
|
||||
sourceSize.width: 32
|
||||
sourceSize.height: 32
|
||||
anchors.fill: parent
|
||||
@@ -89,7 +89,7 @@ ColumnLayout {
|
||||
}
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onMicDeviceIndexChanged: {
|
||||
function onMicDeviceIndexChanged() {
|
||||
if (index < 0) {
|
||||
audioMicVolumeMinusButton.enabled = false
|
||||
audioMicVolumeSlider.enabled = false
|
||||
@@ -102,16 +102,16 @@ ColumnLayout {
|
||||
audioMicMuteToggle.enabled = true
|
||||
}
|
||||
}
|
||||
onMicVolumeChanged: {
|
||||
function onMicVolumeChanged() {
|
||||
audioMicVolumeSlider.value = AudioTabController.micVolume
|
||||
}
|
||||
onMicMutedChanged: {
|
||||
function onMicMutedChanged() {
|
||||
audioMicMuteToggle.checked = AudioTabController.micMuted
|
||||
}
|
||||
onPlaybackDeviceListChanged: {
|
||||
function onPlaybackDeviceListChanged() {
|
||||
|
||||
}
|
||||
onRecordingDeviceListChanged: {
|
||||
function onRecordingDeviceListChanged() {
|
||||
if (AudioTabController.micDeviceIndex < 0) {
|
||||
audioMicVolumeMinusButton.enabled = false
|
||||
audioMicVolumeSlider.enabled = false
|
||||
|
||||
@@ -41,10 +41,10 @@ RowLayout {
|
||||
}
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onMirrorDeviceIndexChanged: {
|
||||
function onMirrorDeviceIndexChanged() {
|
||||
setShownAudioDevice(index)
|
||||
}
|
||||
onPlaybackDeviceListChanged: {
|
||||
function onPlaybackDeviceListChanged() {
|
||||
audioMirrorNameCombo.devices = getAudioDeviceList()
|
||||
setShownAudioDevice(AudioTabController.mirrorDeviceIndex)
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ ColumnLayout {
|
||||
Layout.leftMargin: 12
|
||||
checkable: true
|
||||
contentItem: Image {
|
||||
source: parent.checked ? "qrc:/speaker/off" : "qrc:/speaker/on"
|
||||
source: parent.checked ? "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/speaker/speaker_off.svg" : "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/speaker/speaker_on.svg"
|
||||
sourceSize.width: 32
|
||||
sourceSize.height: 32
|
||||
anchors.fill: parent
|
||||
@@ -89,7 +89,7 @@ ColumnLayout {
|
||||
}
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onMirrorDeviceIndexChanged: {
|
||||
function onMirrorDeviceIndexChanged() {
|
||||
if (index < 0) {
|
||||
audioMirrorNameCombo.deviceIndex = 0
|
||||
audioMirrorVolumeMinusButton.enabled = false
|
||||
@@ -104,13 +104,13 @@ ColumnLayout {
|
||||
audioMirrorNameCombo.deviceIndex = index + 1
|
||||
}
|
||||
}
|
||||
onMirrorVolumeChanged: {
|
||||
function onMirrorVolumeChanged() {
|
||||
audioMirrorVolumeSlider.value = AudioTabController.mirrorVolume
|
||||
}
|
||||
onMirrorMutedChanged: {
|
||||
function onMirrorMutedChanged() {
|
||||
audioMirrorMuteToggle.checked = AudioTabController.mirrorMuted
|
||||
}
|
||||
onPlaybackDeviceListChanged: {
|
||||
function onPlaybackDeviceListChanged() {
|
||||
if (AudioTabController.mirrorDeviceIndex < 0) {
|
||||
audioMirrorVolumeMinusButton.enabled = false
|
||||
audioMirrorVolumeSlider.enabled = false
|
||||
|
||||
@@ -98,13 +98,13 @@ ColumnLayout {
|
||||
}
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onAudioProfilesUpdated: {
|
||||
function onAudioProfilesUpdated() {
|
||||
reloadAudioProfiles()
|
||||
}
|
||||
onAudioProfileAdded: {
|
||||
function onAudioProfileAdded() {
|
||||
audioProfileComboBox.currentIndex = AudioTabController.getAudioProfileCount()
|
||||
}
|
||||
onDefaultProfileDisplay: {
|
||||
function onDefaultProfileDisplay() {
|
||||
audioProfileComboBox.currentIndex = AudioTabController.getDefaultAudioProfileIndex(
|
||||
) + 1
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ MyToggleButton {
|
||||
}
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onMicProximitySensorCanMuteChanged: {
|
||||
function onMicProximitySensorCanMuteChanged() {
|
||||
audioMuteProximitySensorToggle.checked = AudioTabController.micProximitySensorCanMute
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,13 +39,13 @@ ColumnLayout {
|
||||
}
|
||||
Connections {
|
||||
target: AudioTabController
|
||||
onPttEnabledChanged: {
|
||||
function onPttEnabledChanged() {
|
||||
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
||||
}
|
||||
onMicReversePttChanged: {
|
||||
function onMicReversePttChanged() {
|
||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||
}
|
||||
onPttShowNotificationChanged: {
|
||||
function onPttShowNotificationChanged() {
|
||||
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Dialogs
|
||||
import ovras.advsettings 1.0
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
import "../common"
|
||||
@@ -494,7 +494,7 @@ MyStackViewPage {
|
||||
text: "Proximity Warning Settings"
|
||||
Layout.preferredWidth: 350
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(chaperoneWarningsPage)
|
||||
}
|
||||
}
|
||||
@@ -506,7 +506,7 @@ MyStackViewPage {
|
||||
Layout.preferredWidth: 400
|
||||
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(chaperoneAdditionalPage)
|
||||
}
|
||||
}
|
||||
@@ -586,26 +586,26 @@ MyStackViewPage {
|
||||
|
||||
Connections {
|
||||
target: ChaperoneTabController
|
||||
onBoundsVisibilityChanged: {
|
||||
function onBoundsVisibilityChanged() {
|
||||
if (Math.abs(chaperoneVisibilitySlider.value - ChaperoneTabController.boundsVisibility) > 0.008) {
|
||||
chaperoneVisibilitySlider.value = ChaperoneTabController.boundsVisibility
|
||||
}
|
||||
}
|
||||
onFadeDistanceChanged: {
|
||||
function onFadeDistanceChanged() {
|
||||
var d = ChaperoneTabController.fadeDistance.toFixed(1)
|
||||
if (d <= chaperoneFadeDistanceSlider.to && Math.abs(chaperoneFadeDistanceSlider.value - d) > 0.008) {
|
||||
chaperoneFadeDistanceSlider.value = d
|
||||
}
|
||||
chaperoneFadeDistanceText.text = d
|
||||
}
|
||||
onHeightChanged: {
|
||||
function onHeightChanged() {
|
||||
var h = ChaperoneTabController.height.toFixed(2)
|
||||
if (h <= chaperoneHeightSlider.to && Math.abs(chaperoneHeightSlider.value - h) > 0.008) {
|
||||
chaperoneHeightSlider.value = h
|
||||
}
|
||||
chaperoneHeightText.text = h
|
||||
}
|
||||
onChaperoneDimHeightChanged: {
|
||||
function onChaperoneDimHeightChanged() {
|
||||
var dim = ChaperoneTabController.chaperoneDimHeight
|
||||
if(dim > 0.0){
|
||||
chaperoneDisableChaperone.enabled = false;
|
||||
@@ -625,16 +625,16 @@ MyStackViewPage {
|
||||
chaperoneFadeDistanceText.enabled = true;
|
||||
}
|
||||
}
|
||||
onCenterMarkerNewChanged: {
|
||||
function onCenterMarkerNewChanged() {
|
||||
chaperoneCenterMarkerToggle.checked = ChaperoneTabController.centerMarkerNew
|
||||
}
|
||||
onPlaySpaceMarkerChanged: {
|
||||
function onPlaySpaceMarkerChanged() {
|
||||
chaperonePlaySpaceToggle.checked = ChaperoneTabController.playSpaceMarker
|
||||
}
|
||||
onForceBoundsChanged: {
|
||||
function onForceBoundsChanged() {
|
||||
chaperoneForceBoundsToggle.checked = ChaperoneTabController.forceBounds
|
||||
}
|
||||
onChaperoneProfilesUpdated: {
|
||||
function onChaperoneProfilesUpdated() {
|
||||
reloadChaperoneProfiles()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Dialogs
|
||||
import ovras.advsettings 1.0
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
import "../../common"
|
||||
@@ -113,7 +113,7 @@ MyStackViewPage {
|
||||
|
||||
Connections {
|
||||
target: ChaperoneTabController
|
||||
onChaperoneDimHeightChanged: {
|
||||
function onChaperoneDimHeightChanged() {
|
||||
var d = ChaperoneTabController.chaperoneDimHeight.toFixed(2)
|
||||
if (d <= dimHeightSlider.to && Math.abs(dimHeightSlider.value - d) > 0.0008) {
|
||||
dimHeightSlider.value = d
|
||||
|
||||
+3
-3
@@ -180,17 +180,17 @@ GroupBox {
|
||||
|
||||
Connections {
|
||||
target: ChaperoneTabController
|
||||
onChaperoneColorRChanged:{
|
||||
function onChaperoneColorRChanged(){
|
||||
var redValue = ChaperoneTabController.chaperoneColorR
|
||||
colorRedText.text = redValue
|
||||
chaperoneColorRedSlider.value = redValue
|
||||
}
|
||||
onChaperoneColorGChanged:{
|
||||
function onChaperoneColorGChanged(){
|
||||
var greenValue = ChaperoneTabController.chaperoneColorG
|
||||
colorGreenText.text = greenValue
|
||||
chaperoneColorGreenSlider.value = greenValue
|
||||
}
|
||||
onChaperoneColorBChanged:{
|
||||
function onChaperoneColorBChanged(){
|
||||
var blueValue = ChaperoneTabController.chaperoneColorB
|
||||
colorBlueText.text = blueValue
|
||||
chaperoneColorBlueSlider.value = blueValue
|
||||
|
||||
+2
-2
@@ -70,10 +70,10 @@ GroupBox {
|
||||
|
||||
Connections {
|
||||
target: ChaperoneTabController
|
||||
onChaperoneFloorToggleChanged:{
|
||||
function onChaperoneFloorToggleChanged(){
|
||||
chaperoneFloorToggleBtn.checked = ChaperoneTabController.chaperoneFloorToggle
|
||||
}
|
||||
onCenterMarkerChanged:{
|
||||
function onCenterMarkerChanged(){
|
||||
legacyCenterMarkerbtn.checked = ChaperoneTabController.centerMarker
|
||||
}
|
||||
}
|
||||
|
||||
+9
-6
@@ -40,7 +40,7 @@ GroupBox {
|
||||
Layout.preferredWidth: 200
|
||||
onCheckedChanged: {
|
||||
if(checked){
|
||||
MyResources.playActivationSound()
|
||||
OverlayController.playActivationSound()
|
||||
ChaperoneTabController.setCollisionBoundStyle(0)
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ GroupBox {
|
||||
Layout.preferredWidth: 200
|
||||
onCheckedChanged: {
|
||||
if(checked){
|
||||
MyResources.playActivationSound()
|
||||
OverlayController.playActivationSound()
|
||||
ChaperoneTabController.setCollisionBoundStyle(1)
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ GroupBox {
|
||||
Layout.preferredWidth: 200
|
||||
onCheckedChanged: {
|
||||
if(checked){
|
||||
MyResources.playActivationSound()
|
||||
OverlayController.playActivationSound()
|
||||
ChaperoneTabController.setCollisionBoundStyle(2)
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,7 @@ GroupBox {
|
||||
Layout.preferredWidth: 200
|
||||
onCheckedChanged: {
|
||||
if(checked){
|
||||
MyResources.playActivationSound()
|
||||
OverlayController.playActivationSound()
|
||||
ChaperoneTabController.setCollisionBoundStyle(3)
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ GroupBox {
|
||||
Layout.preferredWidth: 200
|
||||
onCheckedChanged: {
|
||||
if(checked){
|
||||
MyResources.playActivationSound()
|
||||
OverlayController.playActivationSound()
|
||||
ChaperoneTabController.setCollisionBoundStyle(4)
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ GroupBox {
|
||||
|
||||
Connections {
|
||||
target: ChaperoneTabController
|
||||
onCollisionBoundStyleChanged:{
|
||||
function onCollisionBoundStyleChanged(){
|
||||
var collisiontype = ChaperoneTabController.collisionBoundStyle
|
||||
switch(collisiontype){
|
||||
case 0: denseRadio.checked = true; break;
|
||||
@@ -124,4 +124,7 @@ GroupBox {
|
||||
}
|
||||
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
|
||||
@@ -63,11 +64,14 @@ ComboBox {
|
||||
|
||||
onActivated: {
|
||||
if (activeFocus) {
|
||||
MyResources.playActivationSound()
|
||||
OverlayController.playActivationSound()
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
popup.background.color = "#2a2e35"
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings
|
||||
|
||||
Popup {
|
||||
id: myDialogPopup
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import ovras.advsettings
|
||||
|
||||
Popup {
|
||||
id: myDialogPopup
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
Button {
|
||||
@@ -35,7 +36,10 @@ Button {
|
||||
|
||||
onClicked: {
|
||||
if (activationSoundEnabled) {
|
||||
MyResources.playActivationSound()
|
||||
OverlayController.playActivationSound()
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
Button {
|
||||
@@ -24,6 +25,9 @@ Button {
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
MyResources.playActivationSound()
|
||||
OverlayController.playActivationSound()
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
RadioButton {
|
||||
@@ -19,6 +20,9 @@ RadioButton {
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
MyResources.playActivationSound()
|
||||
OverlayController.playActivationSound()
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,7 @@ QtObject {
|
||||
function playFocusChangedSound() {
|
||||
OverlayController.playFocusChangedSound()
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
|
||||
|
||||
@@ -48,7 +49,7 @@ Slider {
|
||||
|
||||
onValueChanged: {
|
||||
if (activeFocus) {
|
||||
//MyResources.playActivationSound()
|
||||
//OverlayController.playActivationSound()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.2
|
||||
import ovras.advsettings
|
||||
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 ".."
|
||||
|
||||
Rectangle {
|
||||
@@ -26,7 +27,7 @@ Rectangle {
|
||||
enabled: headerShowBackButton
|
||||
opacity: headerShowBackButton ? 1.0 : 0.0
|
||||
contentItem: Image {
|
||||
source: "qrc:/common/backarrow"
|
||||
source: "qrc:/qt/qml/AdvancedSettings/src/res/img/common/backarrow.svg"
|
||||
sourceSize.width: 50
|
||||
sourceSize.height: 50
|
||||
anchors.fill: parent
|
||||
@@ -45,7 +46,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
stackView.pop()
|
||||
}
|
||||
}
|
||||
@@ -90,4 +91,7 @@ Rectangle {
|
||||
content.Layout.rightMargin = 40
|
||||
content.Layout.bottomMargin = 40
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
|
||||
import ovras.advsettings
|
||||
|
||||
Text {
|
||||
color: "#d9dbe0"
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import ovras.advsettings
|
||||
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 ".."
|
||||
|
||||
CheckBox {
|
||||
@@ -31,7 +32,7 @@ CheckBox {
|
||||
height: 28
|
||||
x: (parent.width - width) / 2
|
||||
y: (parent.height - height) / 2
|
||||
source: "qrc:/common/box_checkmark"
|
||||
source: "qrc:/qt/qml/AdvancedSettings/src/res/img/common/check.svg"
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
visible: parent.parent.checked
|
||||
@@ -60,6 +61,9 @@ CheckBox {
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
MyResources.playActivationSound()
|
||||
OverlayController.playActivationSound()
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls.Material
|
||||
import QtQuick.Layouts
|
||||
import ".."
|
||||
import "../utilities_page"
|
||||
import "../audio_page"
|
||||
@@ -11,6 +11,7 @@ import "../steamvr_page"
|
||||
import "../rotation_page"
|
||||
import "../chaperone_page/chaperone_additional"
|
||||
import "../steamvr_page/steamvr_additional"
|
||||
import ovras.advsettings
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
@@ -218,19 +218,19 @@ GroupBox {
|
||||
Connections {
|
||||
target: MoveCenterTabController
|
||||
|
||||
onGravityActiveChanged: {
|
||||
function onGravityActiveChanged() {
|
||||
gravityToggleButton.checked = MoveCenterTabController.gravityActive
|
||||
}
|
||||
onGravityStrengthChanged: {
|
||||
function onGravityStrengthChanged() {
|
||||
gravityStrengthText.text = MoveCenterTabController.gravityStrength.toFixed(2)
|
||||
}
|
||||
onMomentumSaveChanged: {
|
||||
function onMomentumSaveChanged() {
|
||||
momentumToggleButton.checked = MoveCenterTabController.momentumSave
|
||||
}
|
||||
onFlingStrengthChanged: {
|
||||
function onFlingStrengthChanged() {
|
||||
flingStrengthText.text = MoveCenterTabController.flingStrength.toFixed(2)
|
||||
}
|
||||
onFrictionPercentChanged: {
|
||||
function onFrictionPercentChanged() {
|
||||
frictionPercentText.text = MoveCenterTabController.frictionPercent + "%"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,10 +88,10 @@ GroupBox {
|
||||
Connections {
|
||||
target: MoveCenterTabController
|
||||
|
||||
onHeightToggleChanged: {
|
||||
function onHeightToggleChanged() {
|
||||
heightToggleButton.checked = MoveCenterTabController.heightToggle
|
||||
}
|
||||
onHeightToggleOffsetChanged: {
|
||||
function onHeightToggleOffsetChanged() {
|
||||
heightToggleOffsetText.text = MoveCenterTabController.heightToggleOffset.toFixed(2)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,19 +156,19 @@ GroupBox {
|
||||
Connections {
|
||||
target: MoveCenterTabController
|
||||
|
||||
onMoveShortcutLeftChanged: {
|
||||
function onMoveShortcutLeftChanged() {
|
||||
moveShortcutLeft.checked = MoveCenterTabController.moveShortcutLeft
|
||||
}
|
||||
onMoveShortcutRightChanged: {
|
||||
function onMoveShortcutRightChanged() {
|
||||
moveShortcutRight.checked = MoveCenterTabController.moveShortcutRight
|
||||
}
|
||||
onDragComfortFactorChanged: {
|
||||
function onDragComfortFactorChanged() {
|
||||
dragComfortSlider.value = MoveCenterTabController.dragComfortFactor
|
||||
}
|
||||
onDragBoundsChanged: {
|
||||
function onDragBoundsChanged() {
|
||||
dragBounds.checked = MoveCenterTabController.dragBounds
|
||||
}
|
||||
onDragMultChanged: {
|
||||
function onDragMultChanged() {
|
||||
dragMultText.text = MoveCenterTabController.dragMult.toFixed(2)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,23 +312,23 @@ GroupBox {
|
||||
Connections {
|
||||
target: RotationTabController
|
||||
|
||||
onAutoTurnEnabledChanged: {
|
||||
function onAutoTurnEnabledChanged() {
|
||||
autoTurn.checked = RotationTabController.autoTurnEnabled
|
||||
}
|
||||
onAutoTurnActivationDistanceChanged: {
|
||||
function onAutoTurnActivationDistanceChanged() {
|
||||
activationSlider.value = RotationTabController.autoTurnActivationDistance.toFixed(2)
|
||||
}
|
||||
onAutoTurnDeactivationDistanceChanged:{
|
||||
function onAutoTurnDeactivationDistanceChanged(){
|
||||
deactivationSlider.value = RotationTabController.autoTurnDeactivationDistance.toFixed(2)
|
||||
}
|
||||
onAutoTurnUseCornerAngleChanged:{
|
||||
function onAutoTurnUseCornerAngleChanged(){
|
||||
cornerAngle.checked = RotationTabController.autoTurnUseCornerAngle
|
||||
}
|
||||
onAutoTurnSpeedChanged:{
|
||||
function onAutoTurnSpeedChanged(){
|
||||
var val = RotationTabController.autoTurnSpeed
|
||||
speedSlider.value = ((val/100).toFixed())
|
||||
}
|
||||
onAutoTurnModeChanged:{
|
||||
function onAutoTurnModeChanged(){
|
||||
if(RotationTabController.autoTurnMode === 1){
|
||||
|
||||
autoTurnModeToggle.checked = true;
|
||||
@@ -338,13 +338,13 @@ GroupBox {
|
||||
autoTurnModeToggle.checked = false;
|
||||
}
|
||||
}
|
||||
onMinCordTangleChanged:{
|
||||
function onMinCordTangleChanged(){
|
||||
detangleAngleStartText.text = parseInt(RotationTabController.minCordTangle*(180/Math.PI))+ "°"
|
||||
}
|
||||
onCordDetangleAngleChanged:{
|
||||
function onCordDetangleAngleChanged(){
|
||||
detangleAngleAssistText.text = parseInt(RotationTabController.cordDetangleAngle*(180/Math.PI))+ "°"
|
||||
}
|
||||
onAutoTurnShowNotificationChanged:{
|
||||
function onAutoTurnShowNotificationChanged(){
|
||||
autoTurnNotificationToggle.checked = RotationTabController.autoTurnShowNotification
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,10 +115,10 @@ GroupBox {
|
||||
Connections {
|
||||
target: RotationTabController
|
||||
|
||||
onVestibularMotionEnabledChanged:{
|
||||
function onVestibularMotionEnabledChanged(){
|
||||
redirectedModeToggle.checked = RotationTabController.vestibularMotionEnabled
|
||||
}
|
||||
onVestibularMotionRadiusChanged:{
|
||||
function onVestibularMotionRadiusChanged(){
|
||||
redirectedWalkingRadiusText.text = ((RotationTabController.vestibularMotionRadius).toFixed(2))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,10 +103,10 @@ GroupBox {
|
||||
Connections {
|
||||
target: MoveCenterTabController
|
||||
|
||||
onSnapTurnAngleChanged: {
|
||||
function onSnapTurnAngleChanged() {
|
||||
snapTurnAngleText.text = ( Math.round( MoveCenterTabController.snapTurnAngle / 100 ) ) + "°"
|
||||
}
|
||||
onSmoothTurnRateChanged: {
|
||||
function onSmoothTurnRateChanged() {
|
||||
smoothTurnRateText.text = MoveCenterTabController.smoothTurnRate + "%"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,16 +100,16 @@ GroupBox {
|
||||
Connections {
|
||||
target: MoveCenterTabController
|
||||
|
||||
onTurnBindLeftChanged: {
|
||||
function onTurnBindLeftChanged() {
|
||||
turnBindLeft.checked = MoveCenterTabController.turnBindLeft
|
||||
}
|
||||
onTurnBindRightChanged: {
|
||||
function onTurnBindRightChanged() {
|
||||
turnBindRight.checked = MoveCenterTabController.turnBindRight
|
||||
}
|
||||
onTurnComfortFactorChanged: {
|
||||
function onTurnComfortFactorChanged() {
|
||||
turnComfortSlider.value = MoveCenterTabController.turnComfortFactor
|
||||
}
|
||||
onTurnBoundsChanged: {
|
||||
function onTurnBoundsChanged() {
|
||||
turnBounds.checked = MoveCenterTabController.turnBounds
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,10 +76,10 @@ GroupBox {
|
||||
Connections {
|
||||
target: RotationTabController
|
||||
|
||||
onViewRatchettingEnabledChanged:{
|
||||
function onViewRatchettingEnabledChanged(){
|
||||
viewRatchetToggleBtn.checked = RotationTabController.viewRatchettingEnabled
|
||||
}
|
||||
onViewRatchettingPercentChanged:{
|
||||
function onViewRatchettingPercentChanged(){
|
||||
var ratchetPercVal = RotationTabController.viewRatchettingPercent
|
||||
viewRatchetSlider.value = ratchetPercVal
|
||||
viewRatchetText.text = ratchetPercVal.toFixed(2)
|
||||
|
||||
@@ -32,7 +32,7 @@ MyStackViewPage {
|
||||
Layout.preferredWidth: 350
|
||||
|
||||
onClicked: {
|
||||
MyResources.playFocusChangedSound()
|
||||
OverlayController.playFocusChangedSound()
|
||||
mainView.push(steamVRTXRXPage)
|
||||
SteamVRTabController.updateRXTXList()
|
||||
}
|
||||
@@ -50,4 +50,7 @@ MyStackViewPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,13 +92,13 @@ GroupBox {
|
||||
|
||||
Connections {
|
||||
target: SteamVRTabController
|
||||
onCameraActiveChanged: {
|
||||
function onCameraActiveChanged() {
|
||||
steamvrCameraActiveToggle.checked = SteamVRTabController.cameraActive
|
||||
}
|
||||
onCameraContChanged: {
|
||||
function onCameraContChanged() {
|
||||
steamvrCameraContToggle.checked = SteamVRTabController.cameraCont
|
||||
}
|
||||
onCameraBoundsChanged: {
|
||||
function onCameraBoundsChanged() {
|
||||
steamvrCameraBoundsToggle.checked = SteamVRTabController.cameraBounds
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Controls 2.5
|
||||
import QtQuick.Layouts 1.3
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Dialogs
|
||||
import ovras.advsettings 1.0
|
||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||
import "../../common"
|
||||
@@ -185,11 +185,11 @@ MyStackViewPage {
|
||||
}
|
||||
Connections{
|
||||
target: SteamVRTabController
|
||||
onPairStatusChanged: {
|
||||
function onPairStatusChanged() {
|
||||
statusText.text = value;
|
||||
getRXTX()
|
||||
}
|
||||
onUpdateRXTX:{
|
||||
function onUpdateRXTX(){
|
||||
getRXTX()
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ GroupBox {
|
||||
|
||||
Connections {
|
||||
target: SteamVRTabController
|
||||
onPerformanceGraphChanged:{
|
||||
function onPerformanceGraphChanged() {
|
||||
steamvrBindingToggle.checked = SteamVRTabController.perAppBindEnabled
|
||||
}
|
||||
|
||||
|
||||
@@ -131,25 +131,25 @@ GroupBox {
|
||||
|
||||
Connections {
|
||||
target: SteamVRTabController
|
||||
onPerformanceGraphChanged:{
|
||||
function onPerformanceGraphChanged(){
|
||||
steamvrPerformanceGraphToggle.checked = SteamVRTabController.performanceGraph
|
||||
}
|
||||
onSystemButtonChanged:{
|
||||
function onSystemButtonChanged(){
|
||||
steamvrSystemButtonToggle.checked = SteamVRTabController.systemButton
|
||||
}
|
||||
onMultipleDriverChanged:{
|
||||
function onMultipleDriverChanged(){
|
||||
steamvrMultipleDriverToggle.checked = SteamVRTabController.multipleDriver
|
||||
}
|
||||
onNoFadeToGridChanged:{
|
||||
function onNoFadeToGridChanged(){
|
||||
steamvrNoFadeToGridToggle.checked = SteamVRTabController.noFadeToGrid
|
||||
}
|
||||
onDNDChanged:{
|
||||
function onDNDChanged(){
|
||||
steamvrNotificationToggle.checked = SteamVRTabController.dnd
|
||||
}
|
||||
onNoHMDChanged:{
|
||||
function onNoHMDChanged(){
|
||||
steamvrNoHMDToggle.checked = SteamVRTabController.noHMD
|
||||
}
|
||||
onControllerPowerChanged:{
|
||||
function onControllerPowerChanged(){
|
||||
steamvrControllerPowerToggle.checked = SteamVRTabController.controllerPower
|
||||
}
|
||||
|
||||
|
||||
@@ -103,10 +103,10 @@ GroupBox {
|
||||
}
|
||||
Connections {
|
||||
target: VrAlarm
|
||||
onAlarmEnabledChanged: {
|
||||
function onAlarmEnabledChanged() {
|
||||
alarmClockToggle.checked = VrAlarm.alarmEnabled
|
||||
}
|
||||
onAlarmTimeChanged: {
|
||||
function onAlarmTimeChanged() {
|
||||
alarmClockTimeAssembly.changeTimer(VrAlarm.getAlarmHour(),
|
||||
VrAlarm.getAlarmMinute(),
|
||||
VrAlarm.getAlarmSecond())
|
||||
|
||||
@@ -45,7 +45,7 @@ GroupBox {
|
||||
}
|
||||
Connections {
|
||||
target: OverlayController
|
||||
onKeyBoardInputSignal: {
|
||||
function onKeyBoardInputSignal() {
|
||||
if (userValue == 601) {
|
||||
UtilitiesTabController.sendKeyboardInput(input)
|
||||
}
|
||||
@@ -581,7 +581,7 @@ GroupBox {
|
||||
}
|
||||
Connections {
|
||||
target: UtilitiesTabController
|
||||
onVrcDebugChanged: {
|
||||
function onVrcDebugChanged() {
|
||||
vrcDebugRow.visible = UtilitiesTabController.vrcDebug
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ GroupBox {
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
property string playPauseButtonPath: "qrc:/media_keys/play_pause"
|
||||
property string stopButtonPath: "qrc:/media_keys/stop"
|
||||
property string previousButtonPath: "qrc:/media_keys/previous"
|
||||
property string nextButtonPath: "qrc:/media_keys/next"
|
||||
property string playPauseButtonPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/media_keys/outline_play_pause_white_24dp.svg"
|
||||
property string stopButtonPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/media_keys/outline_stop_white_24dp.svg"
|
||||
property string previousButtonPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/media_keys/outline_skip_previous_white_24dp.svg"
|
||||
property string nextButtonPath: "qrc:/qt/qml/AdvancedSettings/src/res/img/audio/media_keys/outline_skip_next_white_24dp.svg"
|
||||
|
||||
MediaButton {
|
||||
id: previousSongButton
|
||||
|
||||
@@ -53,7 +53,7 @@ GroupBox {
|
||||
|
||||
Connections {
|
||||
target: UtilitiesTabController
|
||||
onTrackerOvlEnabledChanged:{
|
||||
function onTrackerOvlEnabledChanged(){
|
||||
trackerOvlToggle.checked = UtilitiesTabController.trackerOvlEnabled
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ MyStackViewPage {
|
||||
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
onIsOverlayMethodActiveChanged:{
|
||||
function onIsOverlayMethodActiveChanged(){
|
||||
overlayMethodGroupBox.visible = VideoTabController.isOverlayMethodActive
|
||||
brightnessGroupBox.visible = !(VideoTabController.isOverlayMethodActive);
|
||||
colorGroupBox.visible = !(VideoTabController.isOverlayMethodActive);
|
||||
|
||||
@@ -95,12 +95,12 @@ GroupBox {
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
|
||||
onBrightnessOpacityValueChanged: {
|
||||
function onBrightnessOpacityValueChanged() {
|
||||
var brightvalue = VideoTabController.brightnessOpacityValue
|
||||
brightnessSlider.value = brightvalue
|
||||
brightnessValueText.text = Math.round(brightvalue*100)+ "%"
|
||||
}
|
||||
onBrightnessEnabledChanged: {
|
||||
function onBrightnessEnabledChanged() {
|
||||
brightnessToggle.checked = VideoTabController.brightnessEnabled
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,17 +197,17 @@ GroupBox {
|
||||
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
onColorRedChanged:{
|
||||
function onColorRedChanged(){
|
||||
var redValue = VideoTabController.colorRed
|
||||
colorRedText.text = Math.round(redValue * 100) + "%"
|
||||
colorRedSlider.value = redValue
|
||||
}
|
||||
onColorGreenChanged:{
|
||||
function onColorGreenChanged(){
|
||||
var greenValue = VideoTabController.colorGreen
|
||||
colorGreenText.text = Math.round(greenValue * 100) + "%"
|
||||
colorGreenSlider.value = greenValue
|
||||
}
|
||||
onColorBlueChanged:{
|
||||
function onColorBlueChanged(){
|
||||
var blueValue = VideoTabController.colorBlue
|
||||
colorBlueText.text = Math.round(blueValue * 100) + "%"
|
||||
colorBlueSlider.value = blueValue
|
||||
|
||||
@@ -73,14 +73,14 @@ GroupBox {
|
||||
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
onAllowSupersampleFilteringChanged: {
|
||||
function onAllowSupersampleFilteringChanged() {
|
||||
videoAllowSupersampleFilteringToggle.checked = VideoTabController.allowSupersampleFiltering
|
||||
}
|
||||
|
||||
onMotionSmoothingChanged: {
|
||||
function onMotionSmoothingChanged() {
|
||||
videoMotionSmoothingToggle.checked = VideoTabController.motionSmoothing
|
||||
}
|
||||
onIsOverlayMethodActiveChanged:{
|
||||
function onIsOverlayMethodActiveChanged(){
|
||||
videoUseOverlayToggle.checked = VideoTabController.isOverlayMethodActive
|
||||
}
|
||||
|
||||
|
||||
@@ -298,32 +298,33 @@ GroupBox {
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
|
||||
onBrightnessOpacityValueChanged: {
|
||||
function onBrightnessOpacityValueChanged() {
|
||||
var brightvalue = VideoTabController.brightnessOpacityValue
|
||||
brightnessSlider.value = brightvalue
|
||||
brightnessValueText.text = Math.round(brightvalue*100)+ "%"
|
||||
brightnessSlider.value = VideoTabController.brightnessOpacityValue
|
||||
}
|
||||
onBrightnessEnabledChanged: {
|
||||
function onBrightnessEnabledChanged() {
|
||||
brightnessToggle.checked = VideoTabController.brightnessEnabled
|
||||
}
|
||||
onColorOverlayOpacityChanged:{
|
||||
function onColorOverlayOpacityChanged(){
|
||||
opacitySlider.value = VideoTabController.colorOverlayOpacity
|
||||
}
|
||||
onColorOverlayEnabledChanged:{
|
||||
function onColorOverlayEnabledChanged(){
|
||||
colorToggle.checked = VideoTabController.colorOverlayEnabled
|
||||
}
|
||||
|
||||
onColorRedChanged:{
|
||||
function onColorRedChanged(){
|
||||
var redValue = VideoTabController.colorRed
|
||||
colorRedText.text = Math.round(redValue * 100) + "%"
|
||||
colorRedSlider.value = redValue
|
||||
}
|
||||
onColorGreenChanged:{
|
||||
function onColorGreenChanged(){
|
||||
var greenValue = VideoTabController.colorGreen
|
||||
colorGreenText.text = Math.round(greenValue * 100) + "%"
|
||||
colorGreenSlider.value = greenValue
|
||||
}
|
||||
onColorBlueChanged:{
|
||||
function onColorBlueChanged(){
|
||||
var blueValue = VideoTabController.colorBlue
|
||||
colorBlueText.text = Math.round(blueValue * 100) + "%"
|
||||
colorBlueSlider.value = blueValue
|
||||
|
||||
@@ -108,10 +108,10 @@ GroupBox {
|
||||
}
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
onVideoProfilesUpdated: {
|
||||
function onVideoProfilesUpdated() {
|
||||
reloadVideoProfiles()
|
||||
}
|
||||
onVideoProfileAdded: {
|
||||
function onVideoProfileAdded() {
|
||||
videoProfileComboBox.currentIndex = VideoTabController.getVideoProfileCount()
|
||||
}
|
||||
|
||||
|
||||
@@ -133,12 +133,12 @@ GroupBox {
|
||||
Connections {
|
||||
target: VideoTabController
|
||||
|
||||
onSuperSamplingChanged: {
|
||||
function onSuperSamplingChanged() {
|
||||
var s1 = VideoTabController.superSampling
|
||||
videoSupersamplingSlider.value = s1
|
||||
videoSupersamplingText.text = s1.toFixed(2)
|
||||
}
|
||||
onAllowSupersampleOverrideChanged: {
|
||||
function onAllowSupersampleOverrideChanged() {
|
||||
videoAllowSupersampleOverrideToggle.checked = VideoTabController.allowSupersampleOverride
|
||||
var s1 = VideoTabController.superSampling
|
||||
videoSupersamplingSlider.value = s1
|
||||
|
||||
+148
-33
@@ -1,34 +1,149 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/common">
|
||||
<file alias="backarrow">img/common/backarrow.svg</file>
|
||||
<file alias="box_checkmark">img/common/check.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/microphone">
|
||||
<file alias="on">img/audio/microphone/mic_on.svg</file>
|
||||
<file alias="off">img/audio/microphone/mic_off.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/speaker">
|
||||
<file alias="on">img/audio/speaker/speaker_on.svg</file>
|
||||
<file alias="off">img/audio/speaker/speaker_off.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/media_keys">
|
||||
<file alias="play_pause">img/audio/media_keys/outline_play_pause_white_24dp.svg</file>
|
||||
<file alias="next">img/audio/media_keys/outline_skip_next_white_24dp.svg</file>
|
||||
<file alias="previous">img/audio/media_keys/outline_skip_previous_white_24dp.svg</file>
|
||||
<file alias="stop">img/audio/media_keys/outline_stop_white_24dp.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/main_menu_icons">
|
||||
<file alias="audio_tab_icon">img/main_menu_icons/audio_tab_icon.svg</file>
|
||||
<file alias="bindings_tab_icon">img/main_menu_icons/bindings_tab_icon.svg</file>
|
||||
<file alias="chaperone_tab_icon">img/main_menu_icons/chaperone_tab_icon.svg</file>
|
||||
<file alias="motion_tab_icon">img/main_menu_icons/motion_tab_icon.svg</file>
|
||||
<file alias="offsets_tab_icon">img/main_menu_icons/offsets_tab_icon.svg</file>
|
||||
<file alias="settings_tab_icon">img/main_menu_icons/settings_tab_icon.svg</file>
|
||||
<file alias="space_fix_tab_icon">img/main_menu_icons/space_fix_tab_icon.svg</file>
|
||||
<file alias="statistics_tab_icon">img/main_menu_icons/statistics_tab_icon.svg</file>
|
||||
<file alias="steamvr_tab_icon">img/main_menu_icons/steamvr_tab_icon.svg</file>
|
||||
<file alias="utilities_tab_icon">img/main_menu_icons/utilities_tab_icon.svg</file>
|
||||
<file alias="video_tab_icon">img/main_menu_icons/video_tab_icon.svg</file>
|
||||
<file alias="rotation_tab_icon">img/main_menu_icons/rotation_tab_icon.svg</file>
|
||||
</qresource>
|
||||
<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">
|
||||
<file alias="backarrow">img/common/backarrow.svg</file>
|
||||
<file alias="box_checkmark">img/common/check.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/icons">
|
||||
<file alias="thumbicon.png">img/icons/thumbicon.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/microphone">
|
||||
<file alias="on">img/audio/microphone/mic_on.svg</file>
|
||||
<file alias="off">img/audio/microphone/mic_off.svg</file>
|
||||
<file alias="ptt_notification.png">img/audio/microphone/ptt_notification.png</file>
|
||||
<file alias="ptm_notification.png">img/audio/microphone/ptm_notification.png</file>
|
||||
<file alias="ptt_notification.svg">img/audio/microphone/ptt_notification.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/speaker">
|
||||
<file alias="on">img/audio/speaker/speaker_on.svg</file>
|
||||
<file alias="off">img/audio/speaker/speaker_off.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/media_keys">
|
||||
<file alias="play_pause">img/audio/media_keys/outline_play_pause_white_24dp.svg</file>
|
||||
<file alias="next">img/audio/media_keys/outline_skip_next_white_24dp.svg</file>
|
||||
<file alias="previous">img/audio/media_keys/outline_skip_previous_white_24dp.svg</file>
|
||||
<file alias="stop">img/audio/media_keys/outline_stop_white_24dp.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/main_menu_icons">
|
||||
<file alias="audio_tab_icon">img/main_menu_icons/audio_tab_icon.svg</file>
|
||||
<file alias="bindings_tab_icon">img/main_menu_icons/bindings_tab_icon.svg</file>
|
||||
<file alias="chaperone_tab_icon">img/main_menu_icons/chaperone_tab_icon.svg</file>
|
||||
<file alias="motion_tab_icon">img/main_menu_icons/motion_tab_icon.svg</file>
|
||||
<file alias="offsets_tab_icon">img/main_menu_icons/offsets_tab_icon.svg</file>
|
||||
<file alias="settings_tab_icon">img/main_menu_icons/settings_tab_icon.svg</file>
|
||||
<file alias="space_fix_tab_icon">img/main_menu_icons/space_fix_tab_icon.svg</file>
|
||||
<file alias="statistics_tab_icon">img/main_menu_icons/statistics_tab_icon.svg</file>
|
||||
<file alias="steamvr_tab_icon">img/main_menu_icons/steamvr_tab_icon.svg</file>
|
||||
<file alias="utilities_tab_icon">img/main_menu_icons/utilities_tab_icon.svg</file>
|
||||
<file alias="video_tab_icon">img/main_menu_icons/video_tab_icon.svg</file>
|
||||
<file alias="rotation_tab_icon">img/main_menu_icons/rotation_tab_icon.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/sounds">
|
||||
<file alias="alarm01.wav">sounds/alarm01.wav</file>
|
||||
<file alias="click.wav">sounds/click.wav</file>
|
||||
<file alias="focus.wav">sounds/focus.wav</file>
|
||||
</qresource>
|
||||
<qresource prefix="/battery">
|
||||
<file alias="battery_0.png">img/battery/battery_0.png</file>
|
||||
<file alias="battery_1.png">img/battery/battery_1.png</file>
|
||||
<file alias="battery_2.png">img/battery/battery_2.png</file>
|
||||
<file alias="battery_3.png">img/battery/battery_3.png</file>
|
||||
<file alias="battery_4.png">img/battery/battery_4.png</file>
|
||||
<file alias="battery_5.png">img/battery/battery_5.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/chaperone">
|
||||
<file alias="centermark.png">img/chaperone/centermark.png</file>
|
||||
<file alias="centermarkl1.png">img/chaperone/centermarkl1.png</file>
|
||||
<file alias="centermarkl2.png">img/chaperone/centermarkl2.png</file>
|
||||
<file alias="centermarkl3.png">img/chaperone/centermarkl3.png</file>
|
||||
<file alias="centermarkr1.png">img/chaperone/centermarkr1.png</file>
|
||||
<file alias="centermarkr2.png">img/chaperone/centermarkr2.png</file>
|
||||
<file alias="centermarkr3.png">img/chaperone/centermarkr3.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/video">
|
||||
<file alias="color.png">img/video/color.png</file>
|
||||
<file alias="dimmer.png">img/video/dimmer.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/rotation">
|
||||
<file alias="autoturn.png">img/rotation/autoturn.png</file>
|
||||
<file alias="noautoturn.png">img/rotation/noautoturn.png</file>
|
||||
<file alias="noautoturn.svg">img/rotation/noautoturn.svg</file>
|
||||
</qresource>
|
||||
<qresource prefix="/alarm">
|
||||
<file alias="alarm_activated.png">img/alarm/alarm_activated.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -2,7 +2,8 @@
|
||||
#include <assert.h>
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <easylogging++.h>
|
||||
#include <QtLogging>
|
||||
#include <QtDebug>
|
||||
#include "../settings.h"
|
||||
#include "setting_value.h"
|
||||
#include "../../utils/setup.h"
|
||||
@@ -64,12 +65,12 @@ void verifySettings( std::array<Value, ArraySize> v ) noexcept
|
||||
|
||||
const auto enumSettingNumber = static_cast<int>( currentSetting );
|
||||
|
||||
LOG( ERROR ) << enumName << ": at index '" << settingIndex
|
||||
<< "' is incorrect. Current value: '"
|
||||
<< enumSettingNumber
|
||||
<< "'. Exiting "
|
||||
"with error code "
|
||||
<< ReturnErrorCode::SETTING_INCORRECT_INDEX << ".";
|
||||
qCritical() << enumName << ": at index '" << settingIndex
|
||||
<< "' is incorrect. Current value: '"
|
||||
<< enumSettingNumber
|
||||
<< "'. Exiting "
|
||||
"with error code "
|
||||
<< ReturnErrorCode::SETTING_INCORRECT_INDEX << ".";
|
||||
exit( ReturnErrorCode::SETTING_INCORRECT_INDEX );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ void saveQtSetting( const SettingCategory category,
|
||||
getQSettings().endGroup();
|
||||
}
|
||||
|
||||
template <typename Value>[[nodiscard]] bool isValidQVariant( const QVariant v )
|
||||
template <typename Value> [[nodiscard]] bool isValidQVariant( const QVariant v )
|
||||
{
|
||||
auto savedSettingIsValid = v.isValid() && !v.isNull();
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user