compiling and various updates

This commit is contained in:
ykeara
2025-10-09 18:45:53 -05:00
parent 44a05dfd57
commit 1152cfee1f
25 changed files with 542 additions and 297 deletions
+1
View File
@@ -16,3 +16,4 @@ build_scripts/win/__pycache__
build_scripts/win/current_build.bat
AdvancedSettings_resource.rc
.qtc_clangd/
out/
+324 -229
View File
@@ -4,20 +4,35 @@ 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_CXX_STANDARD_REQUIRED ON)
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Gui Multimedia Qml Quick WebSockets Widgets QuickControls2 QuickDialogs2 Svg)
find_package(Qt${QT_VERSION_MAJOR} OPTIONAL_COMPONENTS DBus)
qt_standard_project_setup()
if(QT_KNOWN_POLICY_QTP0001)
qt_policy(SET QTP0001 NEW)
endif()
#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(CMAKE_AUTORCC ON)
set(SRCS
src/alarm_clock/vr_alarm.cpp
@@ -95,7 +110,7 @@ set(HEADERS
src/quaternion/quaternion.h
)
set(QML_FILES
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
@@ -171,22 +186,80 @@ set(QML_FILES
src/res/qml/StatisticsPage.qml
)
set(RESOURCES src/res/resources.qrc)
set(ResourcesRC
src/res/img/alarm/alarm_activated.png
src/res/img/audio/media_keys/outline_play_pause_white_24dp.svg
src/res/img/audio/media_keys/outline_skip_next_white_24dp.svg
src/res/img/audio/media_keys/outline_skip_previous_white_24dp.svg
src/res/img/audio/media_keys/outline_stop_white_24dp.svg
src/res/img/audio/microphone/mic_off.svg
src/res/img/audio/microphone/mic_on.svg
src/res/img/audio/microphone/ptm_notification.png
src/res/img/audio/microphone/ptt_notification.png
src/res/img/audio/microphone/ptt_notification.svg
src/res/img/audio/speaker/speaker_off.svg
src/res/img/audio/speaker/speaker_on.svg
src/res/img/battery/battery_0.png
src/res/img/battery/battery_1.png
src/res/img/battery/battery_2.png
src/res/img/battery/battery_3.png
src/res/img/battery/battery_4.png
src/res/img/battery/battery_5.png
src/res/img/chaperone/centermark.png
src/res/img/chaperone/centermarkl1.png
src/res/img/chaperone/centermarkl2.png
src/res/img/chaperone/centermarkl3.png
src/res/img/chaperone/centermarkr1.png
src/res/img/chaperone/centermarkr2.png
src/res/img/chaperone/centermarkr3.png
src/res/img/common/backarrow.svg
src/res/img/common/check.svg
src/res/img/icons/advicon256px.ico
src/res/img/icons/thumbicon.png
src/res/img/main_menu_icons/audio_tab_icon.svg
src/res/img/main_menu_icons/bindings_tab_icon.svg
src/res/img/main_menu_icons/chaperone_tab_icon.svg
src/res/img/main_menu_icons/motion_tab_icon.svg
src/res/img/main_menu_icons/offsets_tab_icon.svg
src/res/img/main_menu_icons/rotation_tab_icon.svg
src/res/img/main_menu_icons/settings_tab_icon.svg
src/res/img/main_menu_icons/space_fix_tab_icon.svg
src/res/img/main_menu_icons/statistics_tab_icon.svg
src/res/img/main_menu_icons/steamvr_tab_icon.svg
src/res/img/main_menu_icons/utilities_tab_icon.svg
src/res/img/main_menu_icons/video_tab_icon.svg
src/res/img/rotation/autoturn.png
src/res/img/rotation/noautoturn.png
src/res/img/rotation/noautoturn.svg
src/res/img/video/color.png
src/res/img/video/dimmer.png
src/res/sounds/alarm01.wav
src/res/sounds/click.wav
src/res/sounds/focus.wav
)
# make alias path relative to src/res/qml
foreach(qml_file ${QML_FILES})
cmake_path(RELATIVE_PATH qml_file BASE_DIRECTORY src/res/qml OUTPUT_VARIABLE qml_alias)
set_source_files_properties(${qml_file} PROPERTIES QT_RESOURCE_ALIAS ${qml_alias})
endforeach()
#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
set_source_files_properties(src/res/qml/common/MyResources.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE)
qt_add_executable(AdvancedSettings WIN32 MACOSX_BUNDLE ${SRCS} ${RESOURCES} ${HEADERS})
qt_add_qml_module(AdvancedSettings
URI AdvancedSettings
QML_FILES
${QML_FILERC}
RESOURCES
${ResourcesRC}
VERSION ${PROJECT_VERSION}
)
target_include_directories(AdvancedSettings PUBLIC
src
third-party/nlohmann
third-party/openvr/headers)
third-party/openvr/headers
${Vulkan_INCLUDE_DIR}
)
# Avoid collision between executable name and QML module directory (QTBUG-98568).
if(NOT WIN32 AND NOT APPLE)
@@ -197,21 +270,27 @@ 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)
#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::Core
Qt::Gui
Qt6::Core5Compat
# For QRhi
Qt::GuiPrivate
Qt::Multimedia
@@ -222,18 +301,179 @@ target_link_libraries(AdvancedSettings PRIVATE
Qt::QuickControls2
Qt::QuickDialogs2
Qt::Svg
${OPENVR_LIBRARIES}
Qt::Qml
openvr_api
)
#${OPENVR_LIBRARIES}
#qt6_add_resources(RESOURCES src/res/resources.qrc)
#target_sources(AdvancedSettings PRIVATE ${RESOURCES})
#qt_add_qml_module(AdvancedSettings
# URI AdvancedSettings
# VERSION ${PROJECT_VERSION}
# QML_FILES ${QML_FILES}
#)
set(COPY_DEST_DIR "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>")
set_target_properties(AdvancedSettings PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${COPY_DEST_DIR}"
)
qt_add_qml_module(AdvancedSettings
URI AdvancedSettings
VERSION ${PROJECT_VERSION}
QML_FILES ${QML_FILES}
# 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"
)
if(GCC)
target_compile_options(AdvancedSettings
# 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
@@ -252,197 +492,52 @@ if(GCC)
-Wshadow
-Wunused
-Wzero-as-null-pointer-constant
-flto
#-flto
)
if (warnings_as_errors)
target_compile_options(AdvancedSettings PRIVATE -Werror)
endif ()
endif ()
endif ()
if(warnings_as_errors)
target_compile_options(AdvancedSettings
-Werror
)
endif()
endif()
if (debugSymbolsAndLogs)
target_compile_definitions(AdvancedSettings PRIVATE ENABLE_DEBUG_LOGGING)
endif ()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options(AdvancedSettings
--system-header-prefix=qt
--system-header-prefix=third-party
-Wcast-align
-Wconversion
-Wdouble-promotion
-Wextra
-Wextra-semi
-Wformat=2
-Wmissing-variable-declarations
-Wmost
-Wno-sign-conversion
-Wnon-virtual-dtor
-Wold-style-cast
-Woverloaded-virtual
-Wpedantic
-Wshadow
-Wunused
-Wzero-as-null-pointer-constant
-flto
)
if(warnings_as_errors)
target_compile_options(AdvancedSettings
-Werror
)
endif()
endif()
install(TARGETS AdvancedSettings
BUNDLE DESTINATION .
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
if(debugSymbolsAndLogs)
target_compile_definitions(AdvancedSettings PRIVATE
ENABLE_DEBUG_LOGGING
)
endif()
#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})
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
cmake_path(GET QT_DIR PARENT_PATH QT_ROOT)
cmake_path(GET QT_ROOT PARENT_PATH QT_ROOT)
cmake_path(GET QT_ROOT PARENT_PATH QT_ROOT)
cmake_path(NATIVE_PATH QT_ROOT NORMALIZE NATIVE_QT_ROOT)
cmake_path(NATIVE_PATH QT_DIR NORMALIZE NATIVE_QT_DIR)
cmake_path(NATIVE_PATH PROJECT_SOURCE_DIR NORMALIZE NATIVE_PROJECT_SOURCE_DIR)
# Needs to be executed: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
configure_file(build_scripts/win/env.ps1.in env.ps1)
configure_file(build_scripts/win/env.sh.in env.sh @ONLY)
# Adds default qt plugins path
configure_file(build_scripts/win/qt.conf.in qt.conf ESCAPE_QUOTES)
target_sources(AdvancedSettings PUBLIC
src/keyboard_input/input_sender_win.cpp
src/media_keys/media_keys_win.cpp
src/tabcontrollers/audiomanager/AudioManagerWindows.cpp
)
target_link_libraries(AdvancedSettings PRIVATE
ole32
user32
)
target_include_directories(AdvancedSettings PUBLIC third-party/policyconfig)
target_compile_definitions(AdvancedSettings PRIVATE
_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
)
if(MSVC)
target_compile_options(AdvancedSettings PUBLIC
/Gw
/W4
/permissive-
/w14254
/w14263
/w14265
/w14287
/w14296
/w14311
/w14545
/w14546
/w14547
/w14549
/w14555
/w14640
/w14826
/w14905
/w14906
/w14928
/wd4127
/we4289
)
if(warnings_as_errors)
target_compile_options(AdvancedSettings
/WX
)
endif()
elseif(win32-clang-msvc)
target_compile_options(AdvancedSettings
-Wcast-align
-Wdouble-promotion
-Wextra
-Wformat=2
-Wmissing-variable-declarations
-Wmost
-Wnon-virtual-dtor
-Wold-style-cast
-Woverloaded-virtual
-Wshadow
-Wunused
-flto
/Gw
/W4
/imsvc /imsvc /imsvc
/w14254
/w14263
/w14265
/w14287
/w14296
/w14311
/w14545
/w14546
/w14547
/w14549
/w14555
/w14640
/w14826
/w14905
/w14906
/w14928
/wd4127
/we4289
)
endif()
elseif(UNIX AND NOT MACOS)
if(noX11)
target_sources(AdvancedSettings PUBLIC
src/keyboard_input/input_sender_dummy.cpp
)
else()
target_sources(AdvancedSettings PUBLIC
src/keyboard_input/input_sender_X11.cpp
)
target_link_libraries(AdvancedSettings PRIVATE
Xtst
X11
)
endif()
if(noDBUS)
target_sources(AdvancedSettings PUBLIC
src/media_keys/media_keys_dummy.cpp
)
else()
target_sources(AdvancedSettings PUBLIC
src/media_keys/media_keys_dbus.cpp
)
target_link_libraries(AdvancedSettings PRIVATE
Qt::DBus
)
endif()
if(noPulse)
target_sources(AdvancedSettings PUBLIC
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
)
else()
target_sources(AdvancedSettings PUBLIC
src/tabcontrollers/audiomanager/AudioManagerPulse.cpp
)
target_link_libraries(AdvancedSettings PRIVATE
pulse
)
endif()
elseif(MACOS)
target_sources(AdvancedSettings PUBLIC
src/keyboard_input/input_sender_dummy.cpp
src/media_keys/media_keys_dummy.cpp
src/tabcontrollers/audiomanager/AudioManagerDummy.cpp
)
endif()
# 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 ()
+33
View File
@@ -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 -1
View File
@@ -25,7 +25,7 @@ VrAlarm::VrAlarm()
ovr_overlay_wrapper::hideOverlay( m_alarmOverlayHandle );
// Only need to set it once, no need to keep it in memory
QImage alarmIcon( QString( ":/alarm/alarm_activated.png" ) );
QImage alarmIcon( ":qt/qml/AdvancedSettings/src/res/img/alarm/alarm_activated.png" );
ovr_overlay_wrapper::setOverlayFromQImage( m_alarmOverlayHandle,
alarmIcon );
+12 -6
View File
@@ -46,20 +46,25 @@ int main( int argc, char* argv[] )
openvr_init::initializeOpenVR(
openvr_init::OpenVrInitializationType::Overlay );
try
{
QQmlEngine qmlEngine;
// Just error checking to ensure QRC works properly
//qDebug() << "list of qmldirs";
//QDirIterator it( ":", QDirIterator::Subdirectories );
//while ( it.hasNext() )
//{
// qDebug() << it.next();
//}
std::unique_ptr<advsettings::OverlayController> controller(
new advsettings::OverlayController( commandLineArgs.desktopMode,
commandLineArgs.forceNoSound,
qmlEngine ) );
const auto url
= QUrl( "qrc:/qt/qml/AdvancedSettings/common/mainwidget.qml" );
QQmlComponent component( &qmlEngine, url );
//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 )
{
@@ -98,6 +103,7 @@ int main( int argc, char* argv[] )
|| settings::getSetting(
settings::BoolSetting::APPLICATION_desktopModeToggle ) )
{
qDebug() << "Desktop MODE!";
auto m_pWindow = new QQuickWindow();
qobject_cast<QQuickItem*>( quickObj )
->setParentItem( m_pWindow->contentItem() );
+14 -5
View File
@@ -77,13 +77,13 @@ OverlayController::OverlayController( bool desktopMode,
qInfo() << "VR Runtime Path: " << m_runtimePathUrl.toLocalFile();
const double initVol = soundVolume();
m_activationSoundEffect.setSource( QUrl( "qrc:/sounds/click.wav" ) );
m_activationSoundEffect.setSource( QUrl( ":/qt/qml/AdvancedSettings/src/res/sounds/click.wav" ) );
m_activationSoundEffect.setVolume( initVol );
m_focusChangedSoundEffect.setSource( QUrl( "qrc:/sounds/focus.wav" ) );
m_focusChangedSoundEffect.setSource( QUrl( ":/qt/qml/AdvancedSettings/src/res/sounds/focus.wav" ) );
m_focusChangedSoundEffect.setVolume( initVol );
m_alarm01SoundEffect.setSource( QUrl( "qrc:/sounds/alarm01.wav" ) );
m_alarm01SoundEffect.setSource( QUrl( ":/qt/qml/AdvancedSettings/src/res/sounds/alarm01.wav" ) );
m_alarm01SoundEffect.setVolume( 1.0 );
// If we have desktop mode flag ignore waht toggle says otherwise we use
@@ -362,6 +362,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
{
if ( !m_desktopMode )
{
qDebug() << "not desktop mode";
vr::VROverlayError overlayError
= vr::VROverlay()->CreateDashboardOverlay(
key.c_str(),
@@ -390,7 +391,7 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
true );
{
QImage thumbiconImg( QString( ":/icons/thumbicon.png" ) );
QImage thumbiconImg( ":qt/qml/AdvancedSettings/src/res/img/icons/thumbicon.png");
ovr_overlay_wrapper::setOverlayFromQImage(
m_ulOverlayThumbnailHandle, thumbiconImg );
}
@@ -422,7 +423,6 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
if ( !m_renderControl.initialize() )
throw std::runtime_error( "could not initialize m_renderControl" );
QRhi* rhi = this->rhi();
qInfo() << "Started with" << rhi->backendName();
@@ -533,6 +533,15 @@ void OverlayController::SetOverlayFromQRhiTexture( QRhiTexture& tex )
vrTex.eColorSpace = vr::ColorSpace_Auto;
}
break;
case QRhi::D3D11:
{
qInfo() << "YEPPPERS HERE WE GO!";
vrTex.handle = reinterpret_cast<void*>( tex.nativeTexture().object );
vrTex.eType = vr::TextureType_DirectX;
vrTex.eColorSpace = vr::ColorSpace_Auto;
}
break;
#if QT_CONFIG( vulkan )
case QRhi::Vulkan:
{
+15 -16
View File
@@ -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"
@@ -33,7 +33,7 @@ MyStackViewPage {
text: " SteamVR"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(steamVRPage)
}
}
@@ -45,7 +45,7 @@ MyStackViewPage {
text: " Chaperone"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(chaperonePage)
}
}
@@ -57,7 +57,7 @@ MyStackViewPage {
text: " Offsets"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(playspacePage)
}
}
@@ -69,7 +69,7 @@ MyStackViewPage {
text: " Motion"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(motionPage)
}
}
@@ -80,7 +80,7 @@ MyStackViewPage {
text: " Rotation"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(rotationPage)
}
}
@@ -92,7 +92,7 @@ MyStackViewPage {
text: " Space Fix"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(fixFloorPage)
}
}
@@ -104,7 +104,7 @@ MyStackViewPage {
text: " Audio"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(audioPage)
}
}
@@ -116,7 +116,7 @@ MyStackViewPage {
text: " Video"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(videoPage)
}
}
@@ -128,7 +128,7 @@ MyStackViewPage {
text: " Utilities"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(utilitiesPage)
}
}
@@ -141,7 +141,7 @@ MyStackViewPage {
text: " Statistics"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(statisticsPage)
}
}
@@ -169,7 +169,7 @@ MyStackViewPage {
text: " Settings"
Layout.fillWidth: true
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
mainView.push(settingsPage)
}
}
@@ -470,7 +470,6 @@ MyStackViewPage {
summaryMicMuteToggle.checked = AudioTabController.micMuted
summaryPttToggle.checked = AudioTabController.pttEnabled
}
Connections {
target: OverlayController
function onNewVersionDetectedChanged() {
+2 -2
View File
@@ -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)
}
}
@@ -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)
}
}
@@ -124,4 +124,7 @@ GroupBox {
}
}
Connections {
target: OverlayController
}
}
+4 -1
View File
@@ -63,11 +63,14 @@ ComboBox {
onActivated: {
if (activeFocus) {
MyResources.playActivationSound()
OverlayController.playActivationSound()
}
}
Component.onCompleted: {
popup.background.color = "#2a2e35"
}
Connections {
target: OverlayController
}
}
+4 -1
View File
@@ -35,7 +35,10 @@ Button {
onClicked: {
if (activationSoundEnabled) {
MyResources.playActivationSound()
OverlayController.playActivationSound()
}
}
Connections {
target: OverlayController
}
}
+4 -1
View File
@@ -24,6 +24,9 @@ Button {
}
onClicked: {
MyResources.playActivationSound()
OverlayController.playActivationSound()
}
Connections {
target: OverlayController
}
}
+4 -1
View File
@@ -19,6 +19,9 @@ RadioButton {
}
onClicked: {
MyResources.playActivationSound()
OverlayController.playActivationSound()
}
Connections {
target: OverlayController
}
}
+3
View File
@@ -10,4 +10,7 @@ QtObject {
function playFocusChangedSound() {
OverlayController.playFocusChangedSound()
}
Connections {
target: OverlayController
}
}
+1 -1
View File
@@ -48,7 +48,7 @@ Slider {
onValueChanged: {
if (activeFocus) {
//MyResources.playActivationSound()
//OverlayController.playActivationSound()
}
}
}
+5 -2
View File
@@ -2,7 +2,7 @@ import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.2
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 {
@@ -45,7 +45,7 @@ Rectangle {
}
}
onClicked: {
MyResources.playFocusChangedSound()
OverlayController.playFocusChangedSound()
stackView.pop()
}
}
@@ -90,4 +90,7 @@ Rectangle {
content.Layout.rightMargin = 40
content.Layout.bottomMargin = 40
}
Connections {
target: OverlayController
}
}
+5 -2
View File
@@ -1,7 +1,7 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
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 {
@@ -60,6 +60,9 @@ CheckBox {
}
onClicked: {
MyResources.playActivationSound()
OverlayController.playActivationSound()
}
Connections {
target: OverlayController
}
}
+3 -3
View File
@@ -1,6 +1,6 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import ".."
import "../utilities_page"
import "../audio_page"
+4 -1
View File
@@ -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
}
}
+75
View File
@@ -1,4 +1,79 @@
<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>
+3 -3
View File
@@ -7,7 +7,7 @@
#include "../settings/settings.h"
#include "../settings/settings_object.h"
#include "../utils/update_rate.h"
#include "openvr/ovr_overlay_wrapper.h"
#include "../openvr/ovr_overlay_wrapper.h"
#ifdef _WIN32
# include "audiomanager/AudioManagerWindows.h"
#elif __linux__
@@ -89,9 +89,9 @@ void AudioTabController::initStage2( OverlayController* var_parent )
}
m_pushToTalkValues.pushToTalkImg.reset(
new QImage( QString( ":/microphone/ptt_notification.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/microphone/ptt_notification.png" ) );
m_pushToTalkValues.pushToMuteImg.reset(
new QImage( QString( ":/microphone/ptm_notification.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/microphone/ptm_notification.png" ) );
auto* pushToImg = m_pushToTalkValues.pushToTalkImg.get();
if ( settings::getSetting( settings::BoolSetting::AUDIO_micReversePtt ) )
@@ -1620,19 +1620,19 @@ void ChaperoneTabController::initCenterMarkerOverlay()
if ( overlayError == ovr_overlay_wrapper::OverlayError::NoError )
{
m_floorMarkers[-3] = std::unique_ptr<QImage>(
new QImage( QString( ":/chaperone/centermarkl3.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkl3.png" ) );
m_floorMarkers[-2] = std::unique_ptr<QImage>(
new QImage( QString( ":/chaperone/centermarkl2.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkl2.png" ) );
m_floorMarkers[-1] = std::unique_ptr<QImage>(
new QImage( QString( ":/chaperone/centermarkl1.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkl1.png" ) );
m_floorMarkers[0] = std::unique_ptr<QImage>(
new QImage( QString( ":/chaperone/centermark.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermark.png" ) );
m_floorMarkers[1] = std::unique_ptr<QImage>(
new QImage( QString( ":/chaperone/centermarkr1.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkr1.png" ) );
m_floorMarkers[2] = std::unique_ptr<QImage>(
new QImage( QString( ":/chaperone/centermarkr2.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkr2.png" ) );
m_floorMarkers[3] = std::unique_ptr<QImage>(
new QImage( QString( ":/chaperone/centermarkr3.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/chaperone/centermarkr3.png" ) );
ovr_overlay_wrapper::setOverlayFromQImage(
m_chaperoneFloorOverlayHandle, *m_floorMarkers[0], "" );
ovr_overlay_wrapper::setOverlayWidthInMeters(
+2 -2
View File
@@ -40,9 +40,9 @@ void RotationTabController::initStage2( OverlayController* var_parent )
return;
}
m_autoturnValues.autoturnImg.reset(
new QImage( QString( ":/rotation/autoturn.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/rotation/autoturn.png" ) );
m_autoturnValues.noautoturnImg.reset(
new QImage( QString( ":/rotation/noautoturn.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/rotation/noautoturn.png" ) );
ovr_overlay_wrapper::setOverlayFromQImage( m_autoturnValues.overlayHandle,
*m_autoturnValues.autoturnImg );
@@ -7,7 +7,7 @@
#include "../keyboard_input/input_sender.h"
#include "../settings/settings.h"
#include "../utils/update_rate.h"
#include "openvr/ovr_overlay_wrapper.h"
#include "../openvr/ovr_overlay_wrapper.h"
#include <chrono>
#include <qimage.h>
#include <thread>
@@ -260,17 +260,17 @@ vr::VROverlayHandle_t UtilitiesTabController::createBatteryOverlay(
if ( overlayError == vr::VROverlayError_None )
{
m_batteryImgs[0] = std::unique_ptr<QImage>(
new QImage( QString( ":/battery/battery_0.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_0.png" ) );
m_batteryImgs[1] = std::unique_ptr<QImage>(
new QImage( QString( ":/battery/battery_1.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_1.png" ) );
m_batteryImgs[2] = std::unique_ptr<QImage>(
new QImage( QString( ":/battery/battery_2.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_2.png" ) );
m_batteryImgs[3] = std::unique_ptr<QImage>(
new QImage( QString( ":/battery/battery_3.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_3.png" ) );
m_batteryImgs[4] = std::unique_ptr<QImage>(
new QImage( QString( ":/battery/battery_4.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_4.png" ) );
m_batteryImgs[5] = std::unique_ptr<QImage>(
new QImage( QString( ":/battery/battery_5.png" ) ) );
new QImage( ":qt/qml/AdvancedSettings/src/res/img/battery/battery_5.png" ) );
ovr_overlay_wrapper::setOverlayFromQImage( handle, *m_batteryImgs[0] );
vr::VROverlay()->SetOverlayWidthInMeters( handle, 0.045f );
vr::HmdMatrix34_t notificationTransform;
+2 -2
View File
@@ -52,7 +52,7 @@ void VideoTabController::initBrightnessOverlay()
notifKey.c_str(), notifKey.c_str(), &m_brightnessOverlayHandle );
if ( overlayError == vr::VROverlayError_None )
{
QImage notifIcon( QString( ":/video/dimmer.png" ) );
QImage notifIcon( ":qt/qml/AdvancedSettings/src/res/img/video/dimmer.png" );
ovr_overlay_wrapper::setOverlayFromQImage( m_brightnessOverlayHandle,
notifIcon );
vr::VROverlay()->SetOverlayWidthInMeters( m_brightnessOverlayHandle,
@@ -86,7 +86,7 @@ void VideoTabController::initColorOverlay()
notifKey.c_str(), notifKey.c_str(), &m_colorOverlayHandle );
if ( overlayError == vr::VROverlayError_None )
{
QImage notifIcon( QString( ":/video/color.png" ) );
QImage notifIcon(":qt/qml/AdvancedSettings/src/res/img/video/color.png");
ovr_overlay_wrapper::setOverlayFromQImage( m_colorOverlayHandle,
notifIcon );
vr::VROverlay()->SetOverlayWidthInMeters( m_colorOverlayHandle,