mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-07 09:05:57 -05:00
Compare commits
179 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf7fe71ae3 | ||
|
|
12a6b26d9a | ||
|
|
373e74c080 | ||
|
|
f3e7eaf212 | ||
|
|
b036736547 | ||
|
|
817de13e9d | ||
|
|
0b774c171d | ||
|
|
be8f7bd70f | ||
|
|
5f963b5b7d | ||
|
|
c6155c9fea | ||
|
|
be809dbfab | ||
|
|
7478c149b3 | ||
|
|
f4eaa9785d | ||
|
|
49c0de3f1b | ||
|
|
101ef4e973 | ||
|
|
82568b23e8 | ||
|
|
0cd7004f6a | ||
|
|
40c62ba700 | ||
|
|
f2c7b532d9 | ||
|
|
456a9c04c7 | ||
|
|
3e1fdbde45 | ||
|
|
874b9b86e2 | ||
|
|
98d1f83acc | ||
|
|
7e91f81957 | ||
|
|
20488afdd1 | ||
|
|
d9d387ad47 | ||
|
|
0736d673e1 | ||
|
|
34151e4bc6 | ||
|
|
1346c19bec | ||
|
|
be6bc48231 | ||
|
|
79a8ad57af | ||
|
|
daeb9275a3 | ||
|
|
73b542a4db | ||
|
|
e3471066e9 | ||
|
|
ec41c06b4d | ||
|
|
201e45d058 | ||
|
|
b17aa30432 | ||
|
|
93703c80bc | ||
|
|
d7951a7179 | ||
|
|
d42a3b584a | ||
|
|
becd1bd02a | ||
|
|
30422aecf3 | ||
|
|
c567e6ef7f | ||
|
|
1ca61f3ed4 | ||
|
|
1affe9dce3 | ||
|
|
406e3c1855 | ||
|
|
c05dd40c4c | ||
|
|
9a86ecac42 | ||
|
|
721a786e79 | ||
|
|
32d29875ed | ||
|
|
0e5f56b562 | ||
|
|
5490fabf92 | ||
|
|
5e3ab19940 | ||
|
|
1c94a1ab44 | ||
|
|
34baa56134 | ||
|
|
5ce4171773 | ||
|
|
c281c6db83 | ||
|
|
c43439ee64 | ||
|
|
a84731b8fe | ||
|
|
61fbff5821 | ||
|
|
1381654fed | ||
|
|
9805601c07 | ||
|
|
fcf57ee031 | ||
|
|
ba3e87a761 | ||
|
|
3dd3f576c3 | ||
|
|
7403a18e96 | ||
|
|
56494480ba | ||
|
|
cdc5d16e95 | ||
|
|
27aed79305 | ||
|
|
7ec95e33eb | ||
|
|
98260b25a1 | ||
|
|
45b37de9f7 | ||
|
|
027a3e9074 | ||
|
|
cab50e0922 | ||
|
|
88514e209d | ||
|
|
4ed7f13b72 | ||
|
|
0fb11ac274 | ||
|
|
942933290a | ||
|
|
f13beaead2 | ||
|
|
13dba6527d | ||
|
|
b78a6510a9 | ||
|
|
6c22f438b6 | ||
|
|
347abe6c84 | ||
|
|
230863adda | ||
|
|
f59478fac7 | ||
|
|
8adac79cd8 | ||
|
|
ea93c44db7 | ||
|
|
9e20b341d8 | ||
|
|
232cbb06f6 | ||
|
|
e9d57a0f4a | ||
|
|
9633a61a65 | ||
|
|
0643b250e1 | ||
|
|
b52738881f | ||
|
|
470d5ba3d7 | ||
|
|
8326e72047 | ||
|
|
12ab4d8cf9 | ||
|
|
295ec9eb81 | ||
|
|
4c5dbd4b7c | ||
|
|
5568f92ad0 | ||
|
|
7c4c0056ce | ||
|
|
d2b4b1cc07 | ||
|
|
a3ca22d238 | ||
|
|
c73542a3cc | ||
|
|
70bbc7cdac | ||
|
|
d892298995 | ||
|
|
0fe31432be | ||
|
|
aaa0113ccb | ||
|
|
b908954b46 | ||
|
|
b0eede8a85 | ||
|
|
aa87911b71 | ||
|
|
1b05019acc | ||
|
|
78a5a2629d | ||
|
|
634270a978 | ||
|
|
78ba22e1e4 | ||
|
|
aba5737a60 | ||
|
|
4315f7f621 | ||
|
|
53c535962f | ||
|
|
1e718b78c7 | ||
|
|
b1d2156228 | ||
|
|
9c3c953c6b | ||
|
|
ae74f68db7 | ||
|
|
213f1bba36 | ||
|
|
5a2cb0bd68 | ||
|
|
23b461828b | ||
|
|
9944a1b03b | ||
|
|
eaad4d1bbd | ||
|
|
17d9b73b9a | ||
|
|
d6185a6099 | ||
|
|
41c06b9edb | ||
|
|
d8807077da | ||
|
|
34e125f82d | ||
|
|
d670b6d07e | ||
|
|
7b0f985f18 | ||
|
|
212be923f6 | ||
|
|
88fcb57e9f | ||
|
|
9b609c118f | ||
|
|
37c398d37a | ||
|
|
a51b7f6b13 | ||
|
|
808fd84b83 | ||
|
|
57bcea15f5 | ||
|
|
4e51b56b9b | ||
|
|
ef5cf41d34 | ||
|
|
911e79ea6a | ||
|
|
d586177de0 | ||
|
|
202c36646c | ||
|
|
ab5102f5ca | ||
|
|
e612fb99f6 | ||
|
|
691e77a69a | ||
|
|
930118c61f | ||
|
|
1e05f2f2ce | ||
|
|
ae25b4d023 | ||
|
|
af055a12a1 | ||
|
|
7de28eedd3 | ||
|
|
8dfe81f522 | ||
|
|
a1d8ae291d | ||
|
|
eb6989527d | ||
|
|
2986a5dd96 | ||
|
|
816ee9b244 | ||
|
|
51b53bf948 | ||
|
|
2c5121ee94 | ||
|
|
6a58684854 | ||
|
|
0b622fdbed | ||
|
|
3bce8e075f | ||
|
|
f598d84ea1 | ||
|
|
d7a244e80e | ||
|
|
408002e96a | ||
|
|
50da3d3210 | ||
|
|
9e13067769 | ||
|
|
821e768e76 | ||
|
|
4d2179448b | ||
|
|
40d9002470 | ||
|
|
7f1e310ca6 | ||
|
|
66d02f4683 | ||
|
|
0aae1b9978 | ||
|
|
db50822b05 | ||
|
|
63a545b293 | ||
|
|
bc0497d2c9 | ||
|
|
37226a3a4c | ||
|
|
9f15fbe47c |
@@ -6,15 +6,6 @@
|
|||||||
"autosort": true
|
"autosort": true
|
||||||
},
|
},
|
||||||
"additional_commands": {
|
"additional_commands": {
|
||||||
"find_qt": {
|
|
||||||
"flags": [],
|
|
||||||
"kwargs": {
|
|
||||||
"COMPONENTS": "+",
|
|
||||||
"COMPONENTS_WIN": "+",
|
|
||||||
"COMPONENTS_MACOS": "+",
|
|
||||||
"COMPONENTS_LINUX": "+"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"set_target_properties_obs": {
|
"set_target_properties_obs": {
|
||||||
"pargs": 1,
|
"pargs": 1,
|
||||||
"flags": [],
|
"flags": [],
|
||||||
|
|||||||
1
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
1
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -20,6 +20,7 @@ body:
|
|||||||
- macOS 13
|
- macOS 13
|
||||||
- macOS 12
|
- macOS 12
|
||||||
- macOS 11
|
- macOS 11
|
||||||
|
- Ubuntu 24.04
|
||||||
- Ubuntu 23.10
|
- Ubuntu 23.10
|
||||||
- Ubuntu 22.04
|
- Ubuntu 22.04
|
||||||
- Other
|
- Other
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yaml
vendored
@@ -2,7 +2,7 @@
|
|||||||
# https://github.com/obsproject/.github/tree/master/.github/ISSUE_TEMPLATE
|
# https://github.com/obsproject/.github/tree/master/.github/ISSUE_TEMPLATE
|
||||||
|
|
||||||
name: Feature request
|
name: Feature request
|
||||||
description: Suggest an idea for this projectReport a bug or crash
|
description: Suggest an idea for this project
|
||||||
body:
|
body:
|
||||||
- type: markdown
|
- type: markdown
|
||||||
id: md_welcome
|
id: md_welcome
|
||||||
|
|||||||
9
.github/scripts/.Aptfile
vendored
9
.github/scripts/.Aptfile
vendored
@@ -9,5 +9,10 @@ package 'libxtst-dev'
|
|||||||
package 'libxss-dev'
|
package 'libxss-dev'
|
||||||
package 'libopencv-dev'
|
package 'libopencv-dev'
|
||||||
package 'libtesseract-dev'
|
package 'libtesseract-dev'
|
||||||
package 'libprocps-dev'
|
package 'libproc2-dev'
|
||||||
package 'libusb-1.0-0-dev'
|
package 'libusb-1.0-0-dev'
|
||||||
|
package 'libpaho-mqttpp-dev'
|
||||||
|
package 'libpaho-mqtt-dev'
|
||||||
|
package 'libpaho-mqtt-dev'
|
||||||
|
package 'libasound2-dev'
|
||||||
|
package 'libpipewire-0.3-dev'
|
||||||
|
|||||||
34
.github/scripts/.build-deps.zsh
vendored
34
.github/scripts/.build-deps.zsh
vendored
@@ -478,14 +478,36 @@ Usage: %B${functrace[1]%:*}%b <option> [<options>]
|
|||||||
unset MACOSX_DEPLOYMENT_TARGET
|
unset MACOSX_DEPLOYMENT_TARGET
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
local mqtt_dir="${project_root}/deps/paho.mqtt.cpp"
|
||||||
|
local mqtt_build_dir="${mqtt_dir}/build_${target##*-}"
|
||||||
|
|
||||||
|
local -a mqtt_cmake_args=(
|
||||||
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
|
-DCMAKE_OSX_ARCHITECTURES=${${target##*-}//universal/x86_64;arm64}
|
||||||
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET:-10.15}
|
||||||
|
-DCMAKE_PREFIX_PATH="${advss_dep_path};${_plugin_deps}"
|
||||||
|
-DCMAKE_INSTALL_PREFIX="${advss_dep_path}"
|
||||||
|
-DPAHO_BUILD_SHARED=OFF
|
||||||
|
-DPAHO_BUILD_STATIC=ON
|
||||||
|
-DPAHO_WITH_MQTT_C=ON
|
||||||
|
-DOPENSSL_ROOT_DIR="${advss_dep_path}"
|
||||||
|
-DPAHO_WITH_SSL=OFF # TODO: figure out linking issues with openssl
|
||||||
|
)
|
||||||
|
|
||||||
|
pushd ${mqtt_dir}
|
||||||
|
log_info "Configure paho.mqtt.cpp ..."
|
||||||
|
cmake -S . -B ${mqtt_build_dir} ${mqtt_cmake_args}
|
||||||
|
|
||||||
|
log_info "Building paho.mqtt.cpp ..."
|
||||||
|
cmake --build ${mqtt_build_dir} --config Release
|
||||||
|
|
||||||
|
log_info "Installing paho.mqtt.cpp ..."
|
||||||
|
cmake --install ${mqtt_build_dir} --prefix "${advss_dep_path}" --config Release
|
||||||
|
popd
|
||||||
;;
|
;;
|
||||||
linux)
|
linux)
|
||||||
# Hacky workaround to support libproc2 with Ubuntu 22 build environment
|
# Nothing to do for now
|
||||||
local lsb_version=$(lsb_release -r | cut -f 2 || true)
|
|
||||||
if [[ "${lsb_version}" == '22.04' ]] {
|
|
||||||
sudo apt install ${project_root}/build-aux/CI/linux/ubuntu22/libproc2-0_4.0.2-3_amd64.deb
|
|
||||||
sudo apt install ${project_root}/build-aux/CI/linux/ubuntu22/libproc2-dev_4.0.2-3_amd64.deb
|
|
||||||
}
|
|
||||||
;;
|
;;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
31
.github/scripts/Build-Deps-Windows.ps1
vendored
31
.github/scripts/Build-Deps-Windows.ps1
vendored
@@ -219,6 +219,37 @@ function Build {
|
|||||||
} else {
|
} else {
|
||||||
Log-Information "Failed to locate msbuild.exe - skipping libusb build"
|
Log-Information "Failed to locate msbuild.exe - skipping libusb build"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Push-Location -Stack BuildMqttTemp
|
||||||
|
Ensure-Location $ProjectRoot
|
||||||
|
|
||||||
|
$MqttPath = "${ProjectRoot}/deps/paho.mqtt.cpp"
|
||||||
|
$MqttBuildPath = "${MqttPath}/build"
|
||||||
|
|
||||||
|
# Explicitly disable PkgConfig and tiff as it will lead build errors
|
||||||
|
$MqttCmakeArgs = @(
|
||||||
|
"-DCMAKE_BUILD_TYPE=${Configuration}"
|
||||||
|
"-DCMAKE_PREFIX_PATH:PATH=${OBSDepPath}"
|
||||||
|
"-DCMAKE_INSTALL_PREFIX:PATH=${ADVSSDepPath}"
|
||||||
|
"-DPAHO_WITH_MQTT_C=ON"
|
||||||
|
)
|
||||||
|
|
||||||
|
Log-Information "Configuring paho.mqtt.cpp..."
|
||||||
|
Invoke-External cmake -S ${MqttPath} -B ${MqttBuildPath} @MqttCmakeArgs
|
||||||
|
|
||||||
|
$MqttCmakeArgs = @(
|
||||||
|
'--config', "${Configuration}"
|
||||||
|
)
|
||||||
|
|
||||||
|
if ( $VerbosePreference -eq 'Continue' ) {
|
||||||
|
$MqttCmakeArgs += ('--verbose')
|
||||||
|
}
|
||||||
|
|
||||||
|
Log-Information "Building paho.mqtt.cpp..."
|
||||||
|
Invoke-External cmake --build "${MqttBuildPath}" @MqttCmakeArgs
|
||||||
|
|
||||||
|
Log-Information "Install paho.mqtt.cpp..."
|
||||||
|
Invoke-External cmake --install "${MqttBuildPath}" --prefix "${ADVSSDepPath}" @MqttCmakeArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
Build
|
Build
|
||||||
|
|||||||
0
.github/test
vendored
0
.github/test
vendored
2
.github/workflows/build-debian.yml
vendored
2
.github/workflows/build-debian.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
|||||||
# devscripts and libobs-dev are needed but they were already installed
|
# devscripts and libobs-dev are needed but they were already installed
|
||||||
# from check_libobs_revision and install_frontend_header sections.
|
# from check_libobs_revision and install_frontend_header sections.
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install cmake debhelper libcurl4-openssl-dev libxss-dev libxtst-dev qtbase5-dev libopencv-dev libprocps-dev
|
sudo apt install build-essential cmake debhelper libcurl4-openssl-dev libxss-dev libxtst-dev qt6-base-dev libopencv-dev libproc2-dev
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
debuild --no-lintian --no-sign
|
debuild --no-lintian --no-sign
|
||||||
|
|||||||
13
.github/workflows/build-project.yaml
vendored
13
.github/workflows/build-project.yaml
vendored
@@ -10,7 +10,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
check-event:
|
check-event:
|
||||||
name: Check GitHub Event Data 🔎
|
name: Check GitHub Event Data 🔎
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -177,7 +177,7 @@ jobs:
|
|||||||
|
|
||||||
ubuntu-build:
|
ubuntu-build:
|
||||||
name: Build for Ubuntu 🐧
|
name: Build for Ubuntu 🐧
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
needs: check-event
|
needs: check-event
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -210,6 +210,11 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-ccache-x86_64-
|
${{ runner.os }}-ccache-x86_64-
|
||||||
|
|
||||||
|
- name: Set up CMake 🏗️
|
||||||
|
uses: jwlawson/actions-setup-cmake@v1.13
|
||||||
|
with:
|
||||||
|
cmake-version: '3.24.x'
|
||||||
|
|
||||||
- name: Set up Homebrew 🍺
|
- name: Set up Homebrew 🍺
|
||||||
uses: Homebrew/actions/setup-homebrew@master
|
uses: Homebrew/actions/setup-homebrew@master
|
||||||
|
|
||||||
@@ -241,14 +246,14 @@ jobs:
|
|||||||
- name: Upload Artifacts 📡
|
- name: Upload Artifacts 📡
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-22.04-x86_64-${{ needs.check-event.outputs.commitHash }}
|
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-24.04-x86_64-${{ needs.check-event.outputs.commitHash }}
|
||||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*.*
|
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*.*
|
||||||
|
|
||||||
- name: Upload debug symbol artifacts 🪲
|
- name: Upload debug symbol artifacts 🪲
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
if: ${{ fromJSON(needs.check-event.outputs.package) }}
|
if: ${{ fromJSON(needs.check-event.outputs.package) }}
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-22.04-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym
|
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-24.04-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym
|
||||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*-dbgsym.ddeb
|
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*-dbgsym.ddeb
|
||||||
|
|
||||||
windows-build:
|
windows-build:
|
||||||
|
|||||||
4
.github/workflows/check-format.yaml
vendored
4
.github/workflows/check-format.yaml
vendored
@@ -3,7 +3,7 @@ on:
|
|||||||
workflow_call:
|
workflow_call:
|
||||||
jobs:
|
jobs:
|
||||||
clang-format:
|
clang-format:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
failCondition: error
|
failCondition: error
|
||||||
|
|
||||||
cmake-format:
|
cmake-format:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|||||||
4
.github/workflows/push.yaml
vendored
4
.github/workflows/push.yaml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
create-release:
|
create-release:
|
||||||
name: Create Release 🛫
|
name: Create Release 🛫
|
||||||
if: github.ref_type == 'tag'
|
if: github.ref_type == 'tag'
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
needs: build-project
|
needs: build-project
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -77,7 +77,7 @@ jobs:
|
|||||||
variants=(
|
variants=(
|
||||||
'windows-x64;zip|exe'
|
'windows-x64;zip|exe'
|
||||||
'macos-universal;tar.xz|pkg'
|
'macos-universal;tar.xz|pkg'
|
||||||
'ubuntu-22.04-x86_64;tar.xz|deb|ddeb'
|
'ubuntu-24.04-x86_64;tar.xz|deb|ddeb'
|
||||||
'sources;tar.xz'
|
'sources;tar.xz'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
9
.gitmodules
vendored
9
.gitmodules
vendored
@@ -28,3 +28,12 @@
|
|||||||
[submodule "deps/libusb"]
|
[submodule "deps/libusb"]
|
||||||
path = deps/libusb
|
path = deps/libusb
|
||||||
url = https://github.com/libusb/libusb.git
|
url = https://github.com/libusb/libusb.git
|
||||||
|
[submodule "deps/date"]
|
||||||
|
path = deps/date
|
||||||
|
url = https://github.com/HowardHinnant/date.git
|
||||||
|
[submodule "deps/jsoncons"]
|
||||||
|
path = deps/jsoncons
|
||||||
|
url = https://github.com/danielaparker/jsoncons.git
|
||||||
|
[submodule "deps/paho.mqtt.cpp"]
|
||||||
|
path = deps/paho.mqtt.cpp
|
||||||
|
url = https://github.com/eclipse-paho/paho.mqtt.cpp.git
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.16...3.26)
|
cmake_minimum_required(VERSION 3.21...3.26)
|
||||||
|
|
||||||
project(advanced-scene-switcher VERSION 1.0.0)
|
project(advanced-scene-switcher VERSION 1.0.0)
|
||||||
|
|
||||||
@@ -20,6 +20,12 @@ if(BUILD_OUT_OF_TREE)
|
|||||||
include(helpers)
|
include(helpers)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# OBS 31 no longer defines find_qt so check if we need to include it for in-tree
|
||||||
|
# builds
|
||||||
|
if(NOT COMMAND find_qt)
|
||||||
|
include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/common/helpers_common.cmake")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(LIB_NAME "${PROJECT_NAME}-lib")
|
set(LIB_NAME "${PROJECT_NAME}-lib")
|
||||||
add_library(${PROJECT_NAME} MODULE)
|
add_library(${PROJECT_NAME} MODULE)
|
||||||
add_library(${LIB_NAME} SHARED)
|
add_library(${LIB_NAME} SHARED)
|
||||||
@@ -27,6 +33,11 @@ add_library(${LIB_NAME} SHARED)
|
|||||||
include(cmake/common/get_git_revision_description.cmake)
|
include(cmake/common/get_git_revision_description.cmake)
|
||||||
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
git_describe(GIT_TAG)
|
git_describe(GIT_TAG)
|
||||||
|
|
||||||
|
if(${GIT_TAG} STREQUAL "GIT-NOTFOUND")
|
||||||
|
set(GIT_TAG ${PROJECT_VERSION})
|
||||||
|
endif()
|
||||||
|
message(STATUS "${PROJECT_NAME} version: ${GIT_TAG}")
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/common/version.cpp.in"
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/common/version.cpp.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/lib/version.cpp" @ONLY)
|
"${CMAKE_CURRENT_BINARY_DIR}/lib/version.cpp" @ONLY)
|
||||||
|
|
||||||
@@ -92,8 +103,6 @@ target_sources(
|
|||||||
lib/macro/macro-action-macro.hpp
|
lib/macro/macro-action-macro.hpp
|
||||||
lib/macro/macro-action-queue.cpp
|
lib/macro/macro-action-queue.cpp
|
||||||
lib/macro/macro-action-queue.hpp
|
lib/macro/macro-action-queue.hpp
|
||||||
lib/macro/macro-action-script.cpp
|
|
||||||
lib/macro/macro-action-script.hpp
|
|
||||||
lib/macro/macro-action-variable.cpp
|
lib/macro/macro-action-variable.cpp
|
||||||
lib/macro/macro-action-variable.hpp
|
lib/macro/macro-action-variable.hpp
|
||||||
lib/macro/macro-action.cpp
|
lib/macro/macro-action.cpp
|
||||||
@@ -106,8 +115,6 @@ target_sources(
|
|||||||
lib/macro/macro-condition-macro.hpp
|
lib/macro/macro-condition-macro.hpp
|
||||||
lib/macro/macro-condition-queue.cpp
|
lib/macro/macro-condition-queue.cpp
|
||||||
lib/macro/macro-condition-queue.hpp
|
lib/macro/macro-condition-queue.hpp
|
||||||
lib/macro/macro-condition-script.cpp
|
|
||||||
lib/macro/macro-condition-script.hpp
|
|
||||||
lib/macro/macro-condition-tempvar.cpp
|
lib/macro/macro-condition-tempvar.cpp
|
||||||
lib/macro/macro-condition-tempvar.hpp
|
lib/macro/macro-condition-tempvar.hpp
|
||||||
lib/macro/macro-condition-variable.cpp
|
lib/macro/macro-condition-variable.cpp
|
||||||
@@ -116,6 +123,8 @@ target_sources(
|
|||||||
lib/macro/macro-condition.hpp
|
lib/macro/macro-condition.hpp
|
||||||
lib/macro/macro-dock.cpp
|
lib/macro/macro-dock.cpp
|
||||||
lib/macro/macro-dock.hpp
|
lib/macro/macro-dock.hpp
|
||||||
|
lib/macro/macro-edit.cpp
|
||||||
|
lib/macro/macro-edit.hpp
|
||||||
lib/macro/macro-export-import-dialog.cpp
|
lib/macro/macro-export-import-dialog.cpp
|
||||||
lib/macro/macro-export-import-dialog.hpp
|
lib/macro/macro-export-import-dialog.hpp
|
||||||
lib/macro/macro-helpers.cpp
|
lib/macro/macro-helpers.cpp
|
||||||
@@ -128,14 +137,10 @@ target_sources(
|
|||||||
lib/macro/macro-ref.hpp
|
lib/macro/macro-ref.hpp
|
||||||
lib/macro/macro-run-button.cpp
|
lib/macro/macro-run-button.cpp
|
||||||
lib/macro/macro-run-button.hpp
|
lib/macro/macro-run-button.hpp
|
||||||
lib/macro/macro-script-handler.cpp
|
|
||||||
lib/macro/macro-script-handler.hpp
|
|
||||||
lib/macro/macro-segment-copy-paste.cpp
|
lib/macro/macro-segment-copy-paste.cpp
|
||||||
lib/macro/macro-segment-copy-paste.hpp
|
lib/macro/macro-segment-copy-paste.hpp
|
||||||
lib/macro/macro-segment-list.cpp
|
lib/macro/macro-segment-list.cpp
|
||||||
lib/macro/macro-segment-list.hpp
|
lib/macro/macro-segment-list.hpp
|
||||||
lib/macro/macro-segment-script.cpp
|
|
||||||
lib/macro/macro-segment-script.hpp
|
|
||||||
lib/macro/macro-segment-selection.cpp
|
lib/macro/macro-segment-selection.cpp
|
||||||
lib/macro/macro-segment-selection.hpp
|
lib/macro/macro-segment-selection.hpp
|
||||||
lib/macro/macro-segment.cpp
|
lib/macro/macro-segment.cpp
|
||||||
@@ -184,6 +189,8 @@ target_sources(
|
|||||||
lib/utils/help-icon.cpp
|
lib/utils/help-icon.cpp
|
||||||
lib/utils/item-selection-helpers.cpp
|
lib/utils/item-selection-helpers.cpp
|
||||||
lib/utils/item-selection-helpers.hpp
|
lib/utils/item-selection-helpers.hpp
|
||||||
|
lib/utils/json-helpers.cpp
|
||||||
|
lib/utils/json-helpers.hpp
|
||||||
lib/utils/layout-helpers.cpp
|
lib/utils/layout-helpers.cpp
|
||||||
lib/utils/layout-helpers.hpp
|
lib/utils/layout-helpers.hpp
|
||||||
lib/utils/list-controls.cpp
|
lib/utils/list-controls.cpp
|
||||||
@@ -210,17 +217,14 @@ target_sources(
|
|||||||
lib/utils/plugin-state-helpers.hpp
|
lib/utils/plugin-state-helpers.hpp
|
||||||
lib/utils/priority-helper.cpp
|
lib/utils/priority-helper.cpp
|
||||||
lib/utils/priority-helper.hpp
|
lib/utils/priority-helper.hpp
|
||||||
lib/utils/properties-view.cpp
|
|
||||||
lib/utils/properties-view.hpp
|
|
||||||
lib/utils/properties-view.moc.hpp
|
|
||||||
lib/utils/regex-config.cpp
|
lib/utils/regex-config.cpp
|
||||||
lib/utils/regex-config.hpp
|
lib/utils/regex-config.hpp
|
||||||
|
lib/utils/resizable-widget.cpp
|
||||||
|
lib/utils/resizable-widget.hpp
|
||||||
lib/utils/resizing-text-edit.cpp
|
lib/utils/resizing-text-edit.cpp
|
||||||
lib/utils/resizing-text-edit.hpp
|
lib/utils/resizing-text-edit.hpp
|
||||||
lib/utils/resource-table.cpp
|
lib/utils/resource-table.cpp
|
||||||
lib/utils/resource-table.hpp
|
lib/utils/resource-table.hpp
|
||||||
lib/utils/resource-table-hotkey-handler.cpp
|
|
||||||
lib/utils/resource-table-hotkey-handler.hpp
|
|
||||||
lib/utils/scene-selection.cpp
|
lib/utils/scene-selection.cpp
|
||||||
lib/utils/scene-selection.hpp
|
lib/utils/scene-selection.hpp
|
||||||
lib/utils/scene-switch-helpers.cpp
|
lib/utils/scene-switch-helpers.cpp
|
||||||
@@ -289,9 +293,16 @@ include(cmake/common/advss_helpers.cmake)
|
|||||||
setup_obs_lib_dependency(${LIB_NAME})
|
setup_obs_lib_dependency(${LIB_NAME})
|
||||||
setup_obs_lib_dependency(${PROJECT_NAME})
|
setup_obs_lib_dependency(${PROJECT_NAME})
|
||||||
|
|
||||||
find_qt(COMPONENTS Widgets Core)
|
find_package(Qt6 REQUIRED COMPONENTS Widgets Core)
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE Qt::Core Qt::Widgets)
|
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Widgets)
|
||||||
target_link_libraries(${LIB_NAME} PRIVATE Qt::Core Qt::Widgets)
|
target_link_libraries(${LIB_NAME} PRIVATE Qt6::Core Qt6::Widgets)
|
||||||
|
|
||||||
|
# Ignore QCheckBox::stateChanged deprecation warning until minimum supported Qt
|
||||||
|
# version is at least Qt 6.7, which introduces QCheckBox::checkStateChanged
|
||||||
|
if(Qt6_VERSION VERSION_GREATER "6.0.0")
|
||||||
|
target_compile_definitions(${LIB_NAME} PRIVATE QT_NO_DEPRECATED_WARNINGS)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_compile_options(
|
target_compile_options(
|
||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@@ -340,6 +351,21 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
target_link_libraries(${LIB_NAME} PUBLIC nlohmann_json::nlohmann_json)
|
target_link_libraries(${LIB_NAME} PUBLIC nlohmann_json::nlohmann_json)
|
||||||
|
|
||||||
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/deps/jsoncons/CMakeLists.txt")
|
||||||
|
# Don't build jsoncons unit tests as they are causing compilation issues and
|
||||||
|
# won't be executed either way
|
||||||
|
if(OS_MACOS)
|
||||||
|
cmake_policy(SET CMP0077 NEW)
|
||||||
|
endif()
|
||||||
|
set(JSONCONS_BUILD_TESTS
|
||||||
|
OFF
|
||||||
|
CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
add_subdirectory(deps/jsoncons EXCLUDE_FROM_ALL)
|
||||||
|
target_link_libraries(${LIB_NAME} PRIVATE jsoncons)
|
||||||
|
target_compile_definitions(${LIB_NAME} PRIVATE JSONPATH_SUPPORT=1)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(CURL QUIET)
|
find_package(CURL QUIET)
|
||||||
find_package(Libcurl QUIET)
|
find_package(Libcurl QUIET)
|
||||||
if(CURL_FOUND)
|
if(CURL_FOUND)
|
||||||
@@ -393,6 +419,7 @@ else()
|
|||||||
set_target_properties(${LIB_NAME} PROPERTIES PREFIX "")
|
set_target_properties(${LIB_NAME} PROPERTIES PREFIX "")
|
||||||
set_target_properties(${LIB_NAME} PROPERTIES SOVERSION 1)
|
set_target_properties(${LIB_NAME} PROPERTIES SOVERSION 1)
|
||||||
|
|
||||||
|
find_package(Qt6 REQUIRED COMPONENTS DBus)
|
||||||
find_package(X11 REQUIRED COMPONENTS Xss)
|
find_package(X11 REQUIRED COMPONENTS Xss)
|
||||||
target_include_directories(${LIB_NAME} PRIVATE "${X11_INCLUDE_DIR}"
|
target_include_directories(${LIB_NAME} PRIVATE "${X11_INCLUDE_DIR}"
|
||||||
"${X11_Xss_INCLUDE_PATH}")
|
"${X11_Xss_INCLUDE_PATH}")
|
||||||
@@ -407,7 +434,12 @@ else()
|
|||||||
set(PROCESS_CONDITION_SUPPORTED 1)
|
set(PROCESS_CONDITION_SUPPORTED 1)
|
||||||
endif()
|
endif()
|
||||||
if(PROCPS2_INCLUDE_DIR)
|
if(PROCPS2_INCLUDE_DIR)
|
||||||
message(STATUS "${PROJECT_NAME} using libproc2")
|
find_package(PkgConfig REQUIRED)
|
||||||
|
pkg_check_modules(libproc2 IMPORTED_TARGET libproc2<4.0.5 QUIET)
|
||||||
|
if(libproc2_FOUND)
|
||||||
|
target_compile_definitions(${LIB_NAME} PRIVATE PROCPS2_USE_INFO)
|
||||||
|
endif()
|
||||||
|
pkg_check_modules(libproc2 REQUIRED IMPORTED_TARGET libproc2)
|
||||||
set(PROC_INCLUDE_DIR "${PROCPS2_INCLUDE_DIR}")
|
set(PROC_INCLUDE_DIR "${PROCPS2_INCLUDE_DIR}")
|
||||||
target_compile_definitions(${LIB_NAME} PRIVATE PROCPS2_AVAILABLE)
|
target_compile_definitions(${LIB_NAME} PRIVATE PROCPS2_AVAILABLE)
|
||||||
set(PROCESS_CONDITION_SUPPORTED 1)
|
set(PROCESS_CONDITION_SUPPORTED 1)
|
||||||
@@ -419,7 +451,11 @@ else()
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
target_include_directories(${LIB_NAME} PRIVATE "${PROC_INCLUDE_DIR}")
|
target_include_directories(${LIB_NAME} PRIVATE "${PROC_INCLUDE_DIR}")
|
||||||
target_sources(${LIB_NAME} PRIVATE lib/linux/advanced-scene-switcher-nix.cpp)
|
target_sources(${LIB_NAME} PRIVATE lib/linux/advanced-scene-switcher-nix.cpp
|
||||||
|
lib/linux/kwin-helpers.cpp)
|
||||||
|
|
||||||
|
# Don't include irrelevant folders into sources archive
|
||||||
|
list(APPEND CPACK_SOURCE_IGNORE_FILES "\\.deps/.*")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT OS_WINDOWS)
|
if(NOT OS_WINDOWS)
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ The **Snap** package manager offers an OBS Studio installation which is bundled
|
|||||||
sudo snap install obs-studio
|
sudo snap install obs-studio
|
||||||
```
|
```
|
||||||
|
|
||||||
|
More information can be found [here](https://github.com/WarmUpTill/SceneSwitcher/wiki/Installation).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
- If you wish to contribute code to the project, have a look at this [section](BUILDING.md) describing how to compile the plugin.
|
- If you wish to contribute code to the project, have a look at this [section](BUILDING.md) describing how to compile the plugin.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Build-Depends: cmake,
|
|||||||
libcurl4-openssl-dev,
|
libcurl4-openssl-dev,
|
||||||
libobs-dev,
|
libobs-dev,
|
||||||
libxtst-dev,
|
libxtst-dev,
|
||||||
qtbase5-dev,
|
qt6-base-dev,
|
||||||
libxss-dev,
|
libxss-dev,
|
||||||
libopencv-dev
|
libopencv-dev
|
||||||
Standards-Version: 4.6.0
|
Standards-Version: 4.6.0
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
|
|
||||||
export QT_SELECT = qt5
|
export QT_SELECT = qt6
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -283,8 +283,14 @@ endfunction()
|
|||||||
|
|
||||||
function(setup_advss_plugin target)
|
function(setup_advss_plugin target)
|
||||||
setup_obs_lib_dependency(${target})
|
setup_obs_lib_dependency(${target})
|
||||||
find_qt(COMPONENTS Widgets Core)
|
find_package(Qt6 REQUIRED COMPONENTS Widgets Core)
|
||||||
target_link_libraries(${target} PRIVATE Qt::Core Qt::Widgets)
|
target_link_libraries(${target} PRIVATE Qt6::Core Qt6::Widgets)
|
||||||
|
|
||||||
|
# Ignore QCheckBox::stateChanged deprecation warning until minimum supported
|
||||||
|
# Qt version is at least Qt 6.7, which introduces QCheckBox::checkStateChanged
|
||||||
|
if(Qt6_VERSION VERSION_GREATER "6.7.0")
|
||||||
|
target_compile_definitions(${target} PRIVATE QT_NO_DEPRECATED_WARNINGS)
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
${target}
|
${target}
|
||||||
|
|||||||
@@ -17,85 +17,6 @@ if(NOT QT_VERSION)
|
|||||||
set_property(CACHE QT_VERSION PROPERTY STRINGS AUTO 5 6)
|
set_property(CACHE QT_VERSION PROPERTY STRINGS AUTO 5 6)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# find_qt: Macro to find best possible Qt version for use with the project:
|
|
||||||
macro(find_qt)
|
|
||||||
set(multiValueArgs COMPONENTS COMPONENTS_WIN COMPONENTS_MAC COMPONENTS_LINUX)
|
|
||||||
cmake_parse_arguments(find_qt "" "${oneValueArgs}" "${multiValueArgs}"
|
|
||||||
${ARGN})
|
|
||||||
|
|
||||||
# Do not use versionless targets in the first step to avoid Qt::Core being
|
|
||||||
# clobbered by later opportunistic find_package runs
|
|
||||||
set(QT_NO_CREATE_VERSIONLESS_TARGETS TRUE)
|
|
||||||
|
|
||||||
message(DEBUG "Start Qt version discovery...")
|
|
||||||
# Loop until _QT_VERSION is set or FATAL_ERROR aborts script execution early
|
|
||||||
while(NOT _QT_VERSION)
|
|
||||||
message(DEBUG "QT_VERSION set to ${QT_VERSION}")
|
|
||||||
if(QT_VERSION STREQUAL AUTO AND NOT qt_test_version)
|
|
||||||
set(qt_test_version 6)
|
|
||||||
elseif(NOT QT_VERSION STREQUAL AUTO)
|
|
||||||
set(qt_test_version ${QT_VERSION})
|
|
||||||
endif()
|
|
||||||
message(DEBUG "Attempting to find Qt${qt_test_version}")
|
|
||||||
|
|
||||||
find_package(
|
|
||||||
Qt${qt_test_version}
|
|
||||||
COMPONENTS Core
|
|
||||||
QUIET)
|
|
||||||
|
|
||||||
if(TARGET Qt${qt_test_version}::Core)
|
|
||||||
set(_QT_VERSION
|
|
||||||
${qt_test_version}
|
|
||||||
CACHE INTERNAL "")
|
|
||||||
message(STATUS "Qt version found: ${_QT_VERSION}")
|
|
||||||
unset(qt_test_version)
|
|
||||||
break()
|
|
||||||
elseif(QT_VERSION STREQUAL AUTO)
|
|
||||||
if(qt_test_version EQUAL 6)
|
|
||||||
message(WARNING "Qt6 was not found, falling back to Qt5")
|
|
||||||
set(qt_test_version 5)
|
|
||||||
continue()
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
message(FATAL_ERROR "Neither Qt6 nor Qt5 found.")
|
|
||||||
endwhile()
|
|
||||||
|
|
||||||
# Enable versionless targets for the remaining Qt components
|
|
||||||
set(QT_NO_CREATE_VERSIONLESS_TARGETS FALSE)
|
|
||||||
|
|
||||||
set(qt_components ${find_qt_COMPONENTS})
|
|
||||||
if(OS_WINDOWS)
|
|
||||||
list(APPEND qt_components ${find_qt_COMPONENTS_WIN})
|
|
||||||
elseif(OS_MACOS)
|
|
||||||
list(APPEND qt_components ${find_qt_COMPONENTS_MAC})
|
|
||||||
else()
|
|
||||||
list(APPEND qt_components ${find_qt_COMPONENTS_LINUX})
|
|
||||||
endif()
|
|
||||||
message(DEBUG "Trying to find Qt components ${qt_components}...")
|
|
||||||
|
|
||||||
find_package(Qt${_QT_VERSION} REQUIRED ${qt_components})
|
|
||||||
|
|
||||||
list(APPEND qt_components Core)
|
|
||||||
|
|
||||||
if("Gui" IN_LIST find_qt_COMPONENTS_LINUX)
|
|
||||||
list(APPEND qt_components "GuiPrivate")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Check for versionless targets of each requested component and create if
|
|
||||||
# necessary
|
|
||||||
foreach(component IN LISTS qt_components)
|
|
||||||
message(DEBUG "Checking for target Qt::${component}")
|
|
||||||
if(NOT TARGET Qt::${component} AND TARGET Qt${_QT_VERSION}::${component})
|
|
||||||
add_library(Qt::${component} INTERFACE IMPORTED)
|
|
||||||
set_target_properties(
|
|
||||||
Qt::${component} PROPERTIES INTERFACE_LINK_LIBRARIES
|
|
||||||
Qt${_QT_VERSION}::${component})
|
|
||||||
endif()
|
|
||||||
set_property(TARGET Qt::${component} PROPERTY INTERFACE_COMPILE_FEATURES "")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
endmacro()
|
|
||||||
|
|
||||||
# check_uuid: Helper function to check for valid UUID
|
# check_uuid: Helper function to check for valid UUID
|
||||||
function(check_uuid uuid_string return_value)
|
function(check_uuid uuid_string return_value)
|
||||||
set(valid_uuid TRUE)
|
set(valid_uuid TRUE)
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ function(set_target_properties_plugin target)
|
|||||||
|
|
||||||
configure_file(cmake/windows/resources/installer-Windows.iss.in
|
configure_file(cmake/windows/resources/installer-Windows.iss.in
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/installer-Windows.generated.iss")
|
"${CMAKE_CURRENT_BINARY_DIR}/installer-Windows.generated.iss")
|
||||||
|
configure_file(data/res/images/logo.ico
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/installer.ico" COPYONLY)
|
||||||
|
|
||||||
configure_file(cmake/windows/resources/resource.rc.in
|
configure_file(cmake/windows/resources/resource.rc.in
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.rc")
|
"${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.rc")
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ OutputBaseFilename={#MyAppName}-{#MyAppVersion}-Windows-Installer
|
|||||||
Compression=lzma
|
Compression=lzma
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
DirExistsWarning=no
|
DirExistsWarning=no
|
||||||
|
SetupIconFile=installer.ico
|
||||||
|
UninstallDisplayIcon={app}\data\obs-plugins\advanced-scene-switcher\res\images\logo.ico
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchToRandom="Wechsle zu
|
|||||||
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Wechsle zu:"
|
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Wechsle zu:"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.cooldown="Nach Ausführen von Aktionen überspringe das Ausführen von Aktionen für"
|
AdvSceneSwitcher.generalTab.generalBehavior.cooldown="Nach Ausführen von Aktionen überspringe das Ausführen von Aktionen für"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="In diesem Zeitraum werden potentielle erfüllte Bedingungen ignoriert!"
|
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="In diesem Zeitraum werden potentielle erfüllte Bedingungen ignoriert!"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.verboseLogging="Ausführliches Logging"
|
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Fensterposition und -größe speichern"
|
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Fensterposition und -größe speichern"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Benachrichtigungen im System-Tray anzeigen"
|
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Benachrichtigungen im System-Tray anzeigen"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Deaktiviere UI Tipps"
|
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Deaktiviere UI Tipps"
|
||||||
@@ -41,7 +40,7 @@ AdvSceneSwitcher.generalTab.saveOrLoadsettings.export="Exportieren"
|
|||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Importieren"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Importieren"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Exportiere Erweiterter Automatischer Szenenwechsler Einstellungen zu Datei ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Exportiere Erweiterter Automatischer Szenenwechsler Einstellungen zu Datei ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Exportiere Erweiterter Automatischer Szenenwechsler Einstellungen von Datei ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Exportiere Erweiterter Automatischer Szenenwechsler Einstellungen von Datei ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Text Dateien (*.txt)"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Text Dateien (*.txt *.json)"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="Importieren der Einstellungen ist fehlgeschlagen"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="Importieren der Einstellungen ist fehlgeschlagen"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Einstellungen wurden erfolgreich importiert"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Einstellungen wurden erfolgreich importiert"
|
||||||
AdvSceneSwitcher.generalTab.priority.fileContent="Datei Inhalt"
|
AdvSceneSwitcher.generalTab.priority.fileContent="Datei Inhalt"
|
||||||
@@ -195,12 +194,12 @@ AdvSceneSwitcher.condition.video.modelLoadFail="Modelldaten konnten nicht gelade
|
|||||||
AdvSceneSwitcher.condition.video.type.main="OBS's Haupt-Ausgabe"
|
AdvSceneSwitcher.condition.video.type.main="OBS's Haupt-Ausgabe"
|
||||||
AdvSceneSwitcher.condition.video.type.source="Quelle"
|
AdvSceneSwitcher.condition.video.type.source="Quelle"
|
||||||
AdvSceneSwitcher.condition.video.type.scene="Szene"
|
AdvSceneSwitcher.condition.video.type.scene="Szene"
|
||||||
AdvSceneSwitcher.condition.video.entry="{{videoInputTypes}}{{sources}}{{scenes}}{{condition}}{{imagePath}}"
|
AdvSceneSwitcher.condition.video.layout="{{videoInputTypes}}{{sources}}{{scenes}}{{condition}}{{imagePath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.modelPath="Modelldaten (Haar-Kaskaden-Klassifikator): {{modelDataPath}}"
|
AdvSceneSwitcher.condition.video.layout.modelPath="Modelldaten (Haar-Kaskaden-Klassifikator): {{modelDataPath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.minNeighbor="Minimale Anzahl von Nachbarn: {{minNeighbors}}"
|
AdvSceneSwitcher.condition.video.layout.minNeighbor="Minimale Anzahl von Nachbarn: {{minNeighbors}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.throttle="{{throttleEnable}}Reduzieren Sie die CPU-Belastung, indem Sie die Prüfung nur alle {{throttleCount}} Millisekunden"
|
AdvSceneSwitcher.condition.video.layout.throttle="{{throttleEnable}}Reduzieren Sie die CPU-Belastung, indem Sie die Prüfung nur alle {{throttleCount}} Millisekunden"
|
||||||
AdvSceneSwitcher.condition.video.entry.checkAreaEnable="Kontrolle nur im Bereich durchführen"
|
AdvSceneSwitcher.condition.video.layout.checkAreaEnable="Kontrolle nur im Bereich durchführen"
|
||||||
AdvSceneSwitcher.condition.video.entry.checkArea="{{checkAreaEnable}}{{checkArea}}{{selectArea}}"
|
AdvSceneSwitcher.condition.video.layout.checkArea="{{checkAreaEnable}}{{checkArea}}{{selectArea}}"
|
||||||
AdvSceneSwitcher.condition.video.minSize="Minimale Größe:"
|
AdvSceneSwitcher.condition.video.minSize="Minimale Größe:"
|
||||||
AdvSceneSwitcher.condition.video.maxSize="Maximale Größe:"
|
AdvSceneSwitcher.condition.video.maxSize="Maximale Größe:"
|
||||||
AdvSceneSwitcher.condition.video.selectArea="Bereich auswählen"
|
AdvSceneSwitcher.condition.video.selectArea="Bereich auswählen"
|
||||||
@@ -526,7 +525,6 @@ AdvSceneSwitcher.action.screenshot.save.default="Standard"
|
|||||||
AdvSceneSwitcher.action.screenshot.save.custom="Benutzerdefiniert"
|
AdvSceneSwitcher.action.screenshot.save.custom="Benutzerdefiniert"
|
||||||
AdvSceneSwitcher.action.screenshot.type.source="Quelle"
|
AdvSceneSwitcher.action.screenshot.type.source="Quelle"
|
||||||
AdvSceneSwitcher.action.screenshot.type.scene="Szene"
|
AdvSceneSwitcher.action.screenshot.type.scene="Szene"
|
||||||
AdvSceneSwitcher.action.screenshot.mainOutput="OBS's Haupt-Ausgabe"
|
|
||||||
AdvSceneSwitcher.action.screenshot.blackscreenNote="Quellen oder Szenen, die nicht immer gerendert werden, können dazu führen, dass einige Teile der Screenshots leer bleiben."
|
AdvSceneSwitcher.action.screenshot.blackscreenNote="Quellen oder Szenen, die nicht immer gerendert werden, können dazu führen, dass einige Teile der Screenshots leer bleiben."
|
||||||
AdvSceneSwitcher.action.screenshot.entry="Screenshot{{targetType}}{{sources}}{{scenes}}und speichere in{{saveType}}{{variables}}Pfad"
|
AdvSceneSwitcher.action.screenshot.entry="Screenshot{{targetType}}{{sources}}{{scenes}}und speichere in{{saveType}}{{variables}}Pfad"
|
||||||
AdvSceneSwitcher.action.profile="Profil"
|
AdvSceneSwitcher.action.profile="Profil"
|
||||||
@@ -754,9 +752,9 @@ AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey="Starte/Stoppe den Erweite
|
|||||||
AdvSceneSwitcher.hotkey.macro.pause="Pausiere Makro %1"
|
AdvSceneSwitcher.hotkey.macro.pause="Pausiere Makro %1"
|
||||||
AdvSceneSwitcher.hotkey.macro.unpause="Makro %1 nicht mehr pausieren"
|
AdvSceneSwitcher.hotkey.macro.unpause="Makro %1 nicht mehr pausieren"
|
||||||
AdvSceneSwitcher.hotkey.macro.togglePause="Pause von Makro %1 togglen"
|
AdvSceneSwitcher.hotkey.macro.togglePause="Pause von Makro %1 togglen"
|
||||||
AdvSceneSwitcher.hotkey.upMacroSegmentHotkey="Makro-Segmentauswahl nach oben verschieben"
|
AdvSceneSwitcher.hotkey.macro.segment.up="Makro-Segmentauswahl nach oben verschieben"
|
||||||
AdvSceneSwitcher.hotkey.downMacroSegmentHotkey="Makro-Segmentauswahl nach unten verschieben"
|
AdvSceneSwitcher.hotkey.macro.segment.down="Makro-Segmentauswahl nach unten verschieben"
|
||||||
AdvSceneSwitcher.hotkey.removeMacroSegmentHotkey="Ausgewähltes Makro-Segment entfernen"
|
AdvSceneSwitcher.hotkey.macro.segment.remove="Ausgewähltes Makro-Segment entfernen"
|
||||||
|
|
||||||
AdvSceneSwitcher.askBackup="Neue Version des Erweiterten Automatischen Szenenwechslers wurde erkannt.\nSoll ein Backup der alten Einstellungen angelegt werden?"
|
AdvSceneSwitcher.askBackup="Neue Version des Erweiterten Automatischen Szenenwechslers wurde erkannt.\nSoll ein Backup der alten Einstellungen angelegt werden?"
|
||||||
AdvSceneSwitcher.askForMacro="Makro auswählen {{macroSelection}}"
|
AdvSceneSwitcher.askForMacro="Makro auswählen {{macroSelection}}"
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Switch to:"
|
|||||||
AdvSceneSwitcher.generalTab.generalBehavior.cooldown="After performing actions skip performing actions for"
|
AdvSceneSwitcher.generalTab.generalBehavior.cooldown="After performing actions skip performing actions for"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="During this time potential matches will be ignored!"
|
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="During this time potential matches will be ignored!"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.logLevel="Log level:"
|
AdvSceneSwitcher.generalTab.generalBehavior.logLevel="Log level:"
|
||||||
|
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.disable="Disable logging"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.default="Default"
|
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.default="Default"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.logMacro="Log executed macros"
|
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.logMacro="Log executed macros"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.logAction="Log performed actions"
|
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.logAction="Log performed actions"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.verbose="Verbose logging"
|
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.verbose="Verbose logging"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.verboseLogging="Enable verbose logging"
|
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Save window position and size"
|
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Save window position and size"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Show system tray notifications"
|
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Show system tray notifications"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Disable UI hints"
|
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Disable UI hints"
|
||||||
@@ -42,6 +42,7 @@ AdvSceneSwitcher.generalTab.generalBehavior.warnPluginLoadFailure="Display warni
|
|||||||
AdvSceneSwitcher.generalTab.generalBehavior.warnPluginLoadFailureMessage="<html><body>Loading of the following plugin libraries was unsuccessful, which could result in some Advanced Scene Switcher functions not being available:%1Check the OBS logs for details.<br>This message can be disabled on the General tab.</body></html>"
|
AdvSceneSwitcher.generalTab.generalBehavior.warnPluginLoadFailureMessage="<html><body>Loading of the following plugin libraries was unsuccessful, which could result in some Advanced Scene Switcher functions not being available:%1Check the OBS logs for details.<br>This message can be disabled on the General tab.</body></html>"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.warnCorruptedInstallMessage="The plugin installation seems to be corrupted and might crash!\nPlease make sure the plugin was installed correctly!"
|
AdvSceneSwitcher.generalTab.generalBehavior.warnCorruptedInstallMessage="The plugin installation seems to be corrupted and might crash!\nPlease make sure the plugin was installed correctly!"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.hideLegacyTabs="Hide tabs which can be represented via macros"
|
AdvSceneSwitcher.generalTab.generalBehavior.hideLegacyTabs="Hide tabs which can be represented via macros"
|
||||||
|
AdvSceneSwitcher.generalTab.generalBehavior.disableMacroWidgetCache="Disable macro widget caching"
|
||||||
AdvSceneSwitcher.generalTab.matchBehavior="Match behavior"
|
AdvSceneSwitcher.generalTab.matchBehavior="Match behavior"
|
||||||
AdvSceneSwitcher.generalTab.priority="Priority"
|
AdvSceneSwitcher.generalTab.priority="Priority"
|
||||||
AdvSceneSwitcher.generalTab.priority.description="Switching methods priority (Highest priority is at the top)"
|
AdvSceneSwitcher.generalTab.priority.description="Switching methods priority (Highest priority is at the top)"
|
||||||
@@ -52,7 +53,7 @@ AdvSceneSwitcher.generalTab.saveOrLoadsettings.export="Export"
|
|||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Import"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Import"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Export Advanced Scene Switcher settings to file ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Export Advanced Scene Switcher settings to file ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Import Advanced Scene Switcher settings from file ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Import Advanced Scene Switcher settings from file ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Text files (*.txt)"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Text files (*.txt);;JSON files (*.json)"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="Advanced Scene Switcher failed to import settings"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="Advanced Scene Switcher failed to import settings"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Advanced Scene Switcher settings imported successfully"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Advanced Scene Switcher settings imported successfully"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportSensitiveDataWarning="Warning:\nThe exported data might contain sensitive information!"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportSensitiveDataWarning="Warning:\nThe exported data might contain sensitive information!"
|
||||||
@@ -132,14 +133,26 @@ AdvSceneSwitcher.twitchConnectionTab.no="No"
|
|||||||
AdvSceneSwitcher.twitchConnectionTab.removeSingleConnectionPopup.text="Are you sure you want to remove \"%1\"?"
|
AdvSceneSwitcher.twitchConnectionTab.removeSingleConnectionPopup.text="Are you sure you want to remove \"%1\"?"
|
||||||
AdvSceneSwitcher.twitchConnectionTab.removeMultipleConnectionsPopup.text="Are you sure you want to remove %1 Twitch connections?"
|
AdvSceneSwitcher.twitchConnectionTab.removeMultipleConnectionsPopup.text="Are you sure you want to remove %1 Twitch connections?"
|
||||||
|
|
||||||
|
# MQTT Connections Tab
|
||||||
|
AdvSceneSwitcher.mqttConnectionTab.title="MQTT Connections"
|
||||||
|
AdvSceneSwitcher.mqttConnectionTab.help="MQTT connections can be used to communicate with other devices.\n\nClick on the highlighted plus symbol to add a new connection."
|
||||||
|
AdvSceneSwitcher.mqttConnectionTab.mqttonnectionAddButton.tooltip="Add new MQTT connection"
|
||||||
|
AdvSceneSwitcher.mqttConnectionTab.mqttConnectionRemoveButton.tooltip="Remove selected MQTT connections"
|
||||||
|
AdvSceneSwitcher.mqttConnectionTab.name.header="Name"
|
||||||
|
AdvSceneSwitcher.mqttConnectionTab.address.header="Address"
|
||||||
|
AdvSceneSwitcher.mqttConnectionTab.topics.header="Topic subscription count"
|
||||||
|
AdvSceneSwitcher.mqttConnectionTab.status.header="Status"
|
||||||
|
AdvSceneSwitcher.mqttConnectionTab.removeSingleConnectionPopup.text="Are you sure you want to remove \"%1\"?"
|
||||||
|
AdvSceneSwitcher.mqttConnectionTab.removeMultipleConnectionsPopup.text="Are you sure you want to remove %1 connections?"
|
||||||
|
|
||||||
# Macro Tab
|
# Macro Tab
|
||||||
AdvSceneSwitcher.macroTab.title="Macro"
|
AdvSceneSwitcher.macroTab.title="Macro"
|
||||||
AdvSceneSwitcher.macroTab.macros="Macros"
|
AdvSceneSwitcher.macroTab.macros="Macros"
|
||||||
AdvSceneSwitcher.macroTab.priorityWarning="Note: It is recommended to configure macros to be the highest priority functionality.\nThis setting can be changed on the General tab."
|
AdvSceneSwitcher.macroTab.priorityWarning="Note: It is recommended to configure macros to be the highest priority functionality.\nThis setting can be changed on the General tab."
|
||||||
AdvSceneSwitcher.macroTab.help="Macros allow you to execute a string of actions depending on multiple conditions.\n\nClick on the highlighted plus symbol to add a new Macro."
|
AdvSceneSwitcher.macroTab.help="Macros allow you to execute a string of actions depending on multiple conditions.\n\nClick on the highlighted plus symbol to add a new Macro."
|
||||||
AdvSceneSwitcher.macroTab.editConditionHelp="This section allows you to define Macro conditions.\n\nSelect an existing or add a new Macro on the left.\nThen click the plus button below to add a new condition."
|
AdvSceneSwitcher.macroTab.editConditionHelp="This section allows you to define macro conditions.\n\nSelect an existing or add a new macro on the left.\nThen click the plus button below to add a new condition."
|
||||||
AdvSceneSwitcher.macroTab.editActionHelp="This section allows you to define Macro actions.\n\nSelect an existing or add a new Macro on the left.\nThen click the plus button below to add a new action."
|
AdvSceneSwitcher.macroTab.editActionHelp="This section allows you to define macro actions.\nThe actions in this section will be performed when the conditions are met.\n\nSelect an existing or add a new macro on the left.\nThen click the plus button below to add a new action."
|
||||||
AdvSceneSwitcher.macroTab.editElseActionHelp="This section allows you to define Macro actions, which are executed if the conditions are *not* met.\n\nSelect an existing or add a new Macro on the left.\nThen click the plus button below to add a new action."
|
AdvSceneSwitcher.macroTab.editElseActionHelp="This section allows you to define macro actions.\nThe actions in this section will be performed when the conditions are *not* met.\n\nSelect an existing or add a new macro on the left.\nThen click the plus button below to add a new action."
|
||||||
AdvSceneSwitcher.macroTab.edit="Edit macro"
|
AdvSceneSwitcher.macroTab.edit="Edit macro"
|
||||||
AdvSceneSwitcher.macroTab.edit.logic="Logic type:"
|
AdvSceneSwitcher.macroTab.edit.logic="Logic type:"
|
||||||
AdvSceneSwitcher.macroTab.edit.condition="Condition type:"
|
AdvSceneSwitcher.macroTab.edit.condition="Condition type:"
|
||||||
@@ -164,6 +177,8 @@ AdvSceneSwitcher.macroTab.contextMenuAdd="Add"
|
|||||||
AdvSceneSwitcher.macroTab.copy="Duplicate Macro"
|
AdvSceneSwitcher.macroTab.copy="Duplicate Macro"
|
||||||
AdvSceneSwitcher.macroTab.group="Group Selected Macros"
|
AdvSceneSwitcher.macroTab.group="Group Selected Macros"
|
||||||
AdvSceneSwitcher.macroTab.ungroup="Ungroup Selected Groups"
|
AdvSceneSwitcher.macroTab.ungroup="Ungroup Selected Groups"
|
||||||
|
AdvSceneSwitcher.macroTab.expandAllGroups="Expand all Groups"
|
||||||
|
AdvSceneSwitcher.macroTab.collapseAllGroups="Collapse all Groups"
|
||||||
AdvSceneSwitcher.macroTab.rename="Rename"
|
AdvSceneSwitcher.macroTab.rename="Rename"
|
||||||
AdvSceneSwitcher.macroTab.remove="Remove"
|
AdvSceneSwitcher.macroTab.remove="Remove"
|
||||||
AdvSceneSwitcher.macroTab.export="Export"
|
AdvSceneSwitcher.macroTab.export="Export"
|
||||||
@@ -199,8 +214,11 @@ AdvSceneSwitcher.macroTab.highlightTrueConditions="Highlight conditions of curre
|
|||||||
AdvSceneSwitcher.macroTab.highlightPerformedActions="Highlight recently performed actions of currently selected macro"
|
AdvSceneSwitcher.macroTab.highlightPerformedActions="Highlight recently performed actions of currently selected macro"
|
||||||
AdvSceneSwitcher.macroTab.newMacroRegisterHotkey="Register hotkeys to control the pause state of new macros"
|
AdvSceneSwitcher.macroTab.newMacroRegisterHotkey="Register hotkeys to control the pause state of new macros"
|
||||||
AdvSceneSwitcher.macroTab.newMacroUseShortCircuitEvaluation="Enable short circuit evaluation of macro conditions for new macros"
|
AdvSceneSwitcher.macroTab.newMacroUseShortCircuitEvaluation="Enable short circuit evaluation of macro conditions for new macros"
|
||||||
AdvSceneSwitcher.macroTab.saveSettingsOnMacroChange="Save settings when selecting a new macro"
|
AdvSceneSwitcher.macroTab.newMacroCheckInParallel="Evaluate conditions of new macros in parallel to other macros"
|
||||||
|
AdvSceneSwitcher.macroTab.checkInParallel.tooltip="If this option is not enabled, this macro's conditions will be evaluated after the preceeding macro's condition check has completed.\nSo, if there are three macros - Macro A, Macro B, and Macro C - in the macro list the order the conditions in are evaluated is:\n • Macro A's conditions\n • Macro B's conditions\n • Macro C's conditions\nIf this option is enabled, the order might differ.\nEnabling this option can be useful for scenarios in which you have multiple long running condition checks, which you don't want to result in \"blocking\" other macros."
|
||||||
|
AdvSceneSwitcher.macroTab.saveSettingsOnMacroChange="Save settings when switching between macros"
|
||||||
AdvSceneSwitcher.macroTab.saveSettingsOnMacroChange.tooltip="Saving the settings can be an expensive operation if you are working with a very large scene collection.\nIn this case, it might make sense to disable this option."
|
AdvSceneSwitcher.macroTab.saveSettingsOnMacroChange.tooltip="Saving the settings can be an expensive operation if you are working with a very large scene collection.\nIn this case, it might make sense to disable this option."
|
||||||
|
AdvSceneSwitcher.macroTab.currentCheckInParallel="Evaluate conditions of selected macro in parallel to other macros (Experimental)"
|
||||||
AdvSceneSwitcher.macroTab.currentRegisterHotkeys="Register hotkeys to control the pause state of selected macro"
|
AdvSceneSwitcher.macroTab.currentRegisterHotkeys="Register hotkeys to control the pause state of selected macro"
|
||||||
AdvSceneSwitcher.macroTab.currentUseShortCircuitEvaluation="Enable short circuit evaluation of macro conditions for currently selected macro"
|
AdvSceneSwitcher.macroTab.currentUseShortCircuitEvaluation="Enable short circuit evaluation of macro conditions for currently selected macro"
|
||||||
AdvSceneSwitcher.macroTab.shortCircuit.tooltip="Enabling short circuit evaluation might improve the performance, as some condition checks are skipped, if the overall macro cannot be evaluated to \"true\" anymore.\nHowever, please note that condition checks, which are skipped over, will also not update their duration modifier checks."
|
AdvSceneSwitcher.macroTab.shortCircuit.tooltip="Enabling short circuit evaluation might improve the performance, as some condition checks are skipped, if the overall macro cannot be evaluated to \"true\" anymore.\nHowever, please note that condition checks, which are skipped over, will also not update their duration modifier checks."
|
||||||
@@ -308,7 +326,7 @@ AdvSceneSwitcher.condition.scene.previousSceneTransitionBehaviour="During transi
|
|||||||
AdvSceneSwitcher.condition.scene.entry.line1="{{sceneType}}{{scenes}}{{pattern}}{{regex}}"
|
AdvSceneSwitcher.condition.scene.entry.line1="{{sceneType}}{{scenes}}{{pattern}}{{regex}}"
|
||||||
AdvSceneSwitcher.condition.scene.entry.line2="{{useTransitionTargetScene}}"
|
AdvSceneSwitcher.condition.scene.entry.line2="{{useTransitionTargetScene}}"
|
||||||
AdvSceneSwitcher.condition.window="Window"
|
AdvSceneSwitcher.condition.window="Window"
|
||||||
AdvSceneSwitcher.condition.window.entry.window="{{checkTitle}}Window title matches{{windowRegex}}{{windows}}"
|
AdvSceneSwitcher.condition.window.entry.window="{{checkTitle}}Window title matches{{windows}}{{windowRegex}}"
|
||||||
AdvSceneSwitcher.condition.window.entry.fullscreen="{{fullscreen}}Window is fullscreen"
|
AdvSceneSwitcher.condition.window.entry.fullscreen="{{fullscreen}}Window is fullscreen"
|
||||||
AdvSceneSwitcher.condition.window.entry.maximized="{{maximized}}Window is maximized"
|
AdvSceneSwitcher.condition.window.entry.maximized="{{maximized}}Window is maximized"
|
||||||
AdvSceneSwitcher.condition.window.entry.focused="{{focused}}Window is focused"
|
AdvSceneSwitcher.condition.window.entry.focused="{{focused}}Window is focused"
|
||||||
@@ -377,6 +395,13 @@ AdvSceneSwitcher.condition.video.patternMatchSuccessFullImage="Full image matche
|
|||||||
AdvSceneSwitcher.condition.video.objectMatchFail="Object was not found!"
|
AdvSceneSwitcher.condition.video.objectMatchFail="Object was not found!"
|
||||||
AdvSceneSwitcher.condition.video.objectMatchSuccess="Object is highlighted in red"
|
AdvSceneSwitcher.condition.video.objectMatchSuccess="Object is highlighted in red"
|
||||||
AdvSceneSwitcher.condition.video.ocrMatchSuccess="Detected text:\n\n%1"
|
AdvSceneSwitcher.condition.video.ocrMatchSuccess="Detected text:\n\n%1"
|
||||||
|
AdvSceneSwitcher.condition.video.ocrMatchFail="Could not detect any text!"
|
||||||
|
AdvSceneSwitcher.condition.video.ocrUseConfigFile="Use custom tesseract config file"
|
||||||
|
AdvSceneSwitcher.condition.video.ocrOpenConfigFile="Open"
|
||||||
|
AdvSceneSwitcher.condition.video.ocrOpenConfig.createFailed="Could not create the config file!"
|
||||||
|
AdvSceneSwitcher.condition.video.ocrOpenConfig.openFailed="Could not open the config file!"
|
||||||
|
AdvSceneSwitcher.condition.video.ocrConfigReload="Reload configuration file"
|
||||||
|
AdvSceneSwitcher.condition.video.ocrConfigHint="Tesseract config files consist of lines with parameter-value pairs (space separated).\nFor example:\n\ntessedit_char_blacklist\t\t\t\t\"abc\"\nlanguage_model_penalty_non_dict_word\t0"
|
||||||
AdvSceneSwitcher.condition.video.modelLoadFail="Model data could not be loaded!"
|
AdvSceneSwitcher.condition.video.modelLoadFail="Model data could not be loaded!"
|
||||||
AdvSceneSwitcher.condition.video.selectColor="Select Color"
|
AdvSceneSwitcher.condition.video.selectColor="Select Color"
|
||||||
AdvSceneSwitcher.condition.video.ocrMode.singleColumn="Single column of text of variable sizes"
|
AdvSceneSwitcher.condition.video.ocrMode.singleColumn="Single column of text of variable sizes"
|
||||||
@@ -396,16 +421,18 @@ AdvSceneSwitcher.condition.video.colorDeviationThresholdDescription="How similar
|
|||||||
AdvSceneSwitcher.condition.video.type.main="OBS's main output"
|
AdvSceneSwitcher.condition.video.type.main="OBS's main output"
|
||||||
AdvSceneSwitcher.condition.video.type.source="Source"
|
AdvSceneSwitcher.condition.video.type.source="Source"
|
||||||
AdvSceneSwitcher.condition.video.type.scene="Scene"
|
AdvSceneSwitcher.condition.video.type.scene="Scene"
|
||||||
AdvSceneSwitcher.condition.video.entry="{{videoInputTypes}}{{sources}}{{scenes}}{{condition}}{{imagePath}}"
|
AdvSceneSwitcher.condition.video.layout="{{videoInputTypes}}{{sources}}{{scenes}}{{condition}}{{imagePath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.modelPath="Model data (haar cascade classifier):{{modelDataPath}}"
|
AdvSceneSwitcher.condition.video.layout.modelPath="Model data (haar cascade classifier):{{modelDataPath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.minNeighbor="Minimum neighbors:{{minNeighbors}}"
|
AdvSceneSwitcher.condition.video.layout.minNeighbor="Minimum neighbors:{{minNeighbors}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.throttle="{{throttleEnable}}Reduce CPU load by performing check only every{{throttleCount}}milliseconds"
|
AdvSceneSwitcher.condition.video.layout.throttle="{{throttleEnable}}Reduce CPU load by performing check only every{{throttleCount}}milliseconds"
|
||||||
AdvSceneSwitcher.condition.video.entry.checkAreaEnable="Perform check only in area"
|
AdvSceneSwitcher.condition.video.layout.checkAreaEnable="Perform check only in area"
|
||||||
AdvSceneSwitcher.condition.video.entry.checkArea="{{checkAreaEnable}}{{checkArea}}{{selectArea}}"
|
AdvSceneSwitcher.condition.video.layout.checkArea="{{checkAreaEnable}}{{checkArea}}{{selectArea}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.orcColorPick="Check for text color:{{textColor}}{{selectColor}}"
|
AdvSceneSwitcher.condition.video.layout.ocrColorPick="Check for text color:{{textColor}}{{selectColor}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.orcTextType="Check for text type:{{textType}}"
|
AdvSceneSwitcher.condition.video.layout.ocrTextType="Check for text type:{{textType}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.orcLanguage="Check for language:{{languageCode}}"
|
AdvSceneSwitcher.condition.video.layout.ocrBaseDir="Tesseract base directory:{{tesseractBaseDir}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.color="Check for color:{{color}}{{selectColor}}"
|
AdvSceneSwitcher.condition.video.layout.ocrLanguage="Check for language:{{languageCode}}"
|
||||||
|
AdvSceneSwitcher.condition.video.layout.ocrConfig="Config file:{{configFile}}{{openConfigFile}}{{reloadConfig}}{{configFileHint}}"
|
||||||
|
AdvSceneSwitcher.condition.video.layout.color="Check for color:{{color}}{{selectColor}}"
|
||||||
AdvSceneSwitcher.condition.video.minSize="Minimum size:"
|
AdvSceneSwitcher.condition.video.minSize="Minimum size:"
|
||||||
AdvSceneSwitcher.condition.video.maxSize="Maximum size:"
|
AdvSceneSwitcher.condition.video.maxSize="Maximum size:"
|
||||||
AdvSceneSwitcher.condition.video.selectArea="Select area"
|
AdvSceneSwitcher.condition.video.selectArea="Select area"
|
||||||
@@ -482,6 +509,7 @@ AdvSceneSwitcher.condition.source.type.showing="Is showing"
|
|||||||
AdvSceneSwitcher.condition.source.type.settingsMatch="Settings match"
|
AdvSceneSwitcher.condition.source.type.settingsMatch="Settings match"
|
||||||
AdvSceneSwitcher.condition.source.type.settingsChanged="Settings changed"
|
AdvSceneSwitcher.condition.source.type.settingsChanged="Settings changed"
|
||||||
AdvSceneSwitcher.condition.source.type.individualSettingMatches="Setting value matches"
|
AdvSceneSwitcher.condition.source.type.individualSettingMatches="Setting value matches"
|
||||||
|
AdvSceneSwitcher.condition.source.type.individualSettingListSelectionMatches="Settings value list selection matches"
|
||||||
AdvSceneSwitcher.condition.source.type.individualSettingChanged="Setting value changed"
|
AdvSceneSwitcher.condition.source.type.individualSettingChanged="Setting value changed"
|
||||||
AdvSceneSwitcher.condition.source.type.width="Width"
|
AdvSceneSwitcher.condition.source.type.width="Width"
|
||||||
AdvSceneSwitcher.condition.source.type.height="Height"
|
AdvSceneSwitcher.condition.source.type.height="Height"
|
||||||
@@ -490,6 +518,7 @@ AdvSceneSwitcher.condition.source.sizeCompare.equal="Equals"
|
|||||||
AdvSceneSwitcher.condition.source.sizeCompare.more="Bigger than"
|
AdvSceneSwitcher.condition.source.sizeCompare.more="Bigger than"
|
||||||
AdvSceneSwitcher.condition.source.refresh="Refresh"
|
AdvSceneSwitcher.condition.source.refresh="Refresh"
|
||||||
AdvSceneSwitcher.condition.source.refresh.tooltip="Repopulate the source settings selection with the settings of the source which's name matches the variable value."
|
AdvSceneSwitcher.condition.source.refresh.tooltip="Repopulate the source settings selection with the settings of the source which's name matches the variable value."
|
||||||
|
AdvSceneSwitcher.condition.source.includeDefaults="Include default settings values"
|
||||||
AdvSceneSwitcher.condition.source.sceneVisibilityHint="Scene specific visibility can be checked using the \"Scene item visibility\" condition"
|
AdvSceneSwitcher.condition.source.sceneVisibilityHint="Scene specific visibility can be checked using the \"Scene item visibility\" condition"
|
||||||
AdvSceneSwitcher.condition.source.getSettings="Get current settings"
|
AdvSceneSwitcher.condition.source.getSettings="Get current settings"
|
||||||
AdvSceneSwitcher.condition.source.entry.line1="{{sources}}{{conditions}}{{settingSelection}}{{refresh}}{{sizeCompareMethods}}{{size}}"
|
AdvSceneSwitcher.condition.source.entry.line1="{{sources}}{{conditions}}{{settingSelection}}{{refresh}}{{sizeCompareMethods}}{{size}}"
|
||||||
@@ -505,9 +534,11 @@ AdvSceneSwitcher.condition.filter.type.showing="Is disabled"
|
|||||||
AdvSceneSwitcher.condition.filter.type.settingsMatch="Settings match"
|
AdvSceneSwitcher.condition.filter.type.settingsMatch="Settings match"
|
||||||
AdvSceneSwitcher.condition.filter.type.settingsChanged="Settings changed"
|
AdvSceneSwitcher.condition.filter.type.settingsChanged="Settings changed"
|
||||||
AdvSceneSwitcher.condition.filter.type.individualSettingMatches="Settings value matches"
|
AdvSceneSwitcher.condition.filter.type.individualSettingMatches="Settings value matches"
|
||||||
|
AdvSceneSwitcher.condition.filter.type.individualSettingListSelectionMatches="Settings value list selection matches"
|
||||||
AdvSceneSwitcher.condition.filter.type.individualSettingChanged="Settings value changed"
|
AdvSceneSwitcher.condition.filter.type.individualSettingChanged="Settings value changed"
|
||||||
AdvSceneSwitcher.condition.filter.refresh="Refresh"
|
AdvSceneSwitcher.condition.filter.refresh="Refresh"
|
||||||
AdvSceneSwitcher.condition.filter.refresh.tooltip="Repopulate the filter settings selection with the settings of the filter which's name matches the variable value."
|
AdvSceneSwitcher.condition.filter.refresh.tooltip="Repopulate the filter settings selection with the settings of the filter which's name matches the variable value."
|
||||||
|
AdvSceneSwitcher.condition.filter.includeDefaults="Include default settings values"
|
||||||
AdvSceneSwitcher.condition.filter.getSettings="Get current settings"
|
AdvSceneSwitcher.condition.filter.getSettings="Get current settings"
|
||||||
AdvSceneSwitcher.condition.filter.entry.line1="On{{sources}}{{filters}}{{conditions}}{{settingSelection}}{{refresh}}"
|
AdvSceneSwitcher.condition.filter.entry.line1="On{{sources}}{{filters}}{{conditions}}{{settingSelection}}{{refresh}}"
|
||||||
AdvSceneSwitcher.condition.filter.entry.line2="{{settings}}"
|
AdvSceneSwitcher.condition.filter.entry.line2="{{settings}}"
|
||||||
@@ -705,6 +736,8 @@ AdvSceneSwitcher.condition.twitch.type.polling.channel.live="Stream is currently
|
|||||||
AdvSceneSwitcher.condition.twitch.type.polling.channel.title="Current title matches"
|
AdvSceneSwitcher.condition.twitch.type.polling.channel.title="Current title matches"
|
||||||
AdvSceneSwitcher.condition.twitch.type.polling.channel.category="Current category is"
|
AdvSceneSwitcher.condition.twitch.type.polling.channel.category="Current category is"
|
||||||
AdvSceneSwitcher.condition.twitch.type.chat.message="Chat message received"
|
AdvSceneSwitcher.condition.twitch.type.chat.message="Chat message received"
|
||||||
|
AdvSceneSwitcher.condition.twitch.type.chat.messageRemoved="Single chat message removed"
|
||||||
|
AdvSceneSwitcher.condition.twitch.type.chat.cleared="All messages of user or channel cleared"
|
||||||
AdvSceneSwitcher.condition.twitch.type.chat.properties="Chat message properties:"
|
AdvSceneSwitcher.condition.twitch.type.chat.properties="Chat message properties:"
|
||||||
AdvSceneSwitcher.condition.twitch.type.chat.properties.select="Select chat message property:"
|
AdvSceneSwitcher.condition.twitch.type.chat.properties.select="Select chat message property:"
|
||||||
AdvSceneSwitcher.condition.twitch.type.chat.properties.firstMessage="Is first message"
|
AdvSceneSwitcher.condition.twitch.type.chat.properties.firstMessage="Is first message"
|
||||||
@@ -769,6 +802,14 @@ AdvSceneSwitcher.condition.streamDeck.checkData="Check data field"
|
|||||||
AdvSceneSwitcher.condition.streamDeck.startListen="Start listening"
|
AdvSceneSwitcher.condition.streamDeck.startListen="Start listening"
|
||||||
AdvSceneSwitcher.condition.streamDeck.stopListen="Stop listening"
|
AdvSceneSwitcher.condition.streamDeck.stopListen="Stop listening"
|
||||||
AdvSceneSwitcher.condition.streamDeck.pluginDownload="<html><head/><body><p>The Stream Deck plugin can be found <a href=\"https://github.com/WarmUpTill/advanced-scene-switcher-streamdeck-plugin/releases\"><span style=\" text-decoration: underline; color:#268bd2;\">here on GitHub</span></a>.</p></body></html>"
|
AdvSceneSwitcher.condition.streamDeck.pluginDownload="<html><head/><body><p>The Stream Deck plugin can be found <a href=\"https://github.com/WarmUpTill/advanced-scene-switcher-streamdeck-plugin/releases\"><span style=\" text-decoration: underline; color:#268bd2;\">here on GitHub</span></a>.</p></body></html>"
|
||||||
|
AdvSceneSwitcher.condition.gameCapture="Game capture"
|
||||||
|
AdvSceneSwitcher.condition.gameCapture.entry="{{sources}}hooked a game."
|
||||||
|
AdvSceneSwitcher.condition.screenshot="Screenshot"
|
||||||
|
AdvSceneSwitcher.condition.screenshot.entry="A screenshot was taken"
|
||||||
|
AdvSceneSwitcher.condition.mqtt="MQTT"
|
||||||
|
AdvSceneSwitcher.condition.mqtt.layout.match="Message was received from{{connection}} which matches{{regex}}:"
|
||||||
|
AdvSceneSwitcher.condition.mqtt.layout.listen="Set message selection to incoming message:{{listenButton}}"
|
||||||
|
AdvSceneSwitcher.condition.script="Script"
|
||||||
|
|
||||||
# Macro Actions
|
# Macro Actions
|
||||||
AdvSceneSwitcher.action.unknown="Unknown action"
|
AdvSceneSwitcher.action.unknown="Unknown action"
|
||||||
@@ -787,6 +828,7 @@ AdvSceneSwitcher.action.wait.entry.random="Wait for{{waitType}}duration from{{du
|
|||||||
AdvSceneSwitcher.action.audio="Audio"
|
AdvSceneSwitcher.action.audio="Audio"
|
||||||
AdvSceneSwitcher.action.audio.type.mute="Mute"
|
AdvSceneSwitcher.action.audio.type.mute="Mute"
|
||||||
AdvSceneSwitcher.action.audio.type.unmute="Unmute"
|
AdvSceneSwitcher.action.audio.type.unmute="Unmute"
|
||||||
|
AdvSceneSwitcher.action.audio.type.toggleMute="Toggle mute"
|
||||||
AdvSceneSwitcher.action.audio.type.sourceVolume="Set source volume"
|
AdvSceneSwitcher.action.audio.type.sourceVolume="Set source volume"
|
||||||
AdvSceneSwitcher.action.audio.type.masterVolume="Set master volume"
|
AdvSceneSwitcher.action.audio.type.masterVolume="Set master volume"
|
||||||
AdvSceneSwitcher.action.audio.type.syncOffset="Set sync offset"
|
AdvSceneSwitcher.action.audio.type.syncOffset="Set sync offset"
|
||||||
@@ -852,6 +894,7 @@ AdvSceneSwitcher.action.filter.entry="On{{sources}}{{actions}}{{filters}}{{refre
|
|||||||
AdvSceneSwitcher.action.filter.entry.settings="{{settings}}{{settingsInputMethod}}{{settingValue}}{{tempVar}}"
|
AdvSceneSwitcher.action.filter.entry.settings="{{settings}}{{settingsInputMethod}}{{settingValue}}{{tempVar}}"
|
||||||
AdvSceneSwitcher.action.filter.getSettings="Get current settings"
|
AdvSceneSwitcher.action.filter.getSettings="Get current settings"
|
||||||
AdvSceneSwitcher.action.filter.inputMethod.individualManual="Set to fixed value"
|
AdvSceneSwitcher.action.filter.inputMethod.individualManual="Set to fixed value"
|
||||||
|
AdvSceneSwitcher.action.filter.inputMethod.individualListEntryManual="Set to list entry"
|
||||||
AdvSceneSwitcher.action.filter.inputMethod.individualTempvar="Set to macro property"
|
AdvSceneSwitcher.action.filter.inputMethod.individualTempvar="Set to macro property"
|
||||||
AdvSceneSwitcher.action.filter.inputMethod.json="Set setting JSON string"
|
AdvSceneSwitcher.action.filter.inputMethod.json="Set setting JSON string"
|
||||||
AdvSceneSwitcher.action.source="Source"
|
AdvSceneSwitcher.action.source="Source"
|
||||||
@@ -882,6 +925,7 @@ AdvSceneSwitcher.action.source.deinterlaceMode.yadif2x="Yadif 2x"
|
|||||||
AdvSceneSwitcher.action.source.deinterlaceOrder.topFieldFirst="Top Field First"
|
AdvSceneSwitcher.action.source.deinterlaceOrder.topFieldFirst="Top Field First"
|
||||||
AdvSceneSwitcher.action.source.deinterlaceOrder.bottomFieldFirst="Bottom Field First"
|
AdvSceneSwitcher.action.source.deinterlaceOrder.bottomFieldFirst="Bottom Field First"
|
||||||
AdvSceneSwitcher.action.source.inputMethod.individualManual="Set to fixed value"
|
AdvSceneSwitcher.action.source.inputMethod.individualManual="Set to fixed value"
|
||||||
|
AdvSceneSwitcher.action.source.inputMethod.individualListEntryManual="Set to list entry"
|
||||||
AdvSceneSwitcher.action.source.inputMethod.individualTempvar="Set to macro property"
|
AdvSceneSwitcher.action.source.inputMethod.individualTempvar="Set to macro property"
|
||||||
AdvSceneSwitcher.action.source.inputMethod.json="Set setting JSON string"
|
AdvSceneSwitcher.action.source.inputMethod.json="Set setting JSON string"
|
||||||
AdvSceneSwitcher.action.source.refresh="Refresh"
|
AdvSceneSwitcher.action.source.refresh="Refresh"
|
||||||
@@ -903,6 +947,7 @@ AdvSceneSwitcher.action.media.seek.percentage.label="Percentage of total duratio
|
|||||||
AdvSceneSwitcher.action.macro="Macro"
|
AdvSceneSwitcher.action.macro="Macro"
|
||||||
AdvSceneSwitcher.action.macro.type.pause="Pause"
|
AdvSceneSwitcher.action.macro.type.pause="Pause"
|
||||||
AdvSceneSwitcher.action.macro.type.unpause="Unpause"
|
AdvSceneSwitcher.action.macro.type.unpause="Unpause"
|
||||||
|
AdvSceneSwitcher.action.macro.type.togglePause="Toggle pause"
|
||||||
AdvSceneSwitcher.action.macro.type.resetCounter="Reset counter"
|
AdvSceneSwitcher.action.macro.type.resetCounter="Reset counter"
|
||||||
AdvSceneSwitcher.action.macro.type.run="Run macro"
|
AdvSceneSwitcher.action.macro.type.run="Run macro"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.ignore="Do not consider condition state"
|
AdvSceneSwitcher.action.macro.type.run.conditions.ignore="Do not consider condition state"
|
||||||
@@ -919,6 +964,10 @@ AdvSceneSwitcher.action.macro.type.stop="Stop actions"
|
|||||||
AdvSceneSwitcher.action.macro.type.disableAction="Disable action"
|
AdvSceneSwitcher.action.macro.type.disableAction="Disable action"
|
||||||
AdvSceneSwitcher.action.macro.type.enableAction="Enable action"
|
AdvSceneSwitcher.action.macro.type.enableAction="Enable action"
|
||||||
AdvSceneSwitcher.action.macro.type.toggleAction="Toggle action"
|
AdvSceneSwitcher.action.macro.type.toggleAction="Toggle action"
|
||||||
|
AdvSceneSwitcher.action.macro.type.nestedMacro="Nested macro"
|
||||||
|
AdvSceneSwitcher.action.macro.type.nestedMacro.conditionHelp="This section allows you to define macro conditions.\n\nClick the plus button below to add a new condition."
|
||||||
|
AdvSceneSwitcher.action.macro.type.nestedMacro.actionHelp="This section allows you to define macro actions.\nThe actions in this section will be performed when the conditions are met.\n\nClick the plus button below to add a new action."
|
||||||
|
AdvSceneSwitcher.action.macro.type.nestedMacro.elseActionHelp="This section allows you to define macro actions.\nThe actions in this section will be performed when the conditions are *not* met.\n\nClick the plus button below to add a new action."
|
||||||
AdvSceneSwitcher.action.macro.entry.run="{{actions}}{{actionTypes}}of{{macros}}"
|
AdvSceneSwitcher.action.macro.entry.run="{{actions}}{{actionTypes}}of{{macros}}"
|
||||||
AdvSceneSwitcher.action.macro.entry.run.condition="{{conditionBehaviors}}of{{conditionMacros}}"
|
AdvSceneSwitcher.action.macro.entry.run.condition="{{conditionBehaviors}}of{{conditionMacros}}"
|
||||||
AdvSceneSwitcher.action.macro.entry.other="{{actions}}{{actionIndex}}{{macros}}"
|
AdvSceneSwitcher.action.macro.entry.other="{{actions}}{{actionIndex}}{{macros}}"
|
||||||
@@ -1017,7 +1066,6 @@ AdvSceneSwitcher.action.screenshot.save.custom="Custom file path"
|
|||||||
AdvSceneSwitcher.action.screenshot.save.variable="Variable (base64 encoded PNG)"
|
AdvSceneSwitcher.action.screenshot.save.variable="Variable (base64 encoded PNG)"
|
||||||
AdvSceneSwitcher.action.screenshot.type.source="Source"
|
AdvSceneSwitcher.action.screenshot.type.source="Source"
|
||||||
AdvSceneSwitcher.action.screenshot.type.scene="Scene"
|
AdvSceneSwitcher.action.screenshot.type.scene="Scene"
|
||||||
AdvSceneSwitcher.action.screenshot.mainOutput="OBS's main output"
|
|
||||||
AdvSceneSwitcher.action.screenshot.blackscreenNote="Sources or scenes, which are not always rendered, may result in some parts of screenshots to remain blank."
|
AdvSceneSwitcher.action.screenshot.blackscreenNote="Sources or scenes, which are not always rendered, may result in some parts of screenshots to remain blank."
|
||||||
AdvSceneSwitcher.action.screenshot.entry="Screenshot{{targetType}}{{sources}}{{scenes}}and save to{{saveType}}{{variables}}"
|
AdvSceneSwitcher.action.screenshot.entry="Screenshot{{targetType}}{{sources}}{{scenes}}and save to{{saveType}}{{variables}}"
|
||||||
AdvSceneSwitcher.action.profile="Profile"
|
AdvSceneSwitcher.action.profile="Profile"
|
||||||
@@ -1046,21 +1094,35 @@ AdvSceneSwitcher.action.websocket.entry.sceneSwitcher.request="Send{{api}}of typ
|
|||||||
AdvSceneSwitcher.action.websocket.entry.sceneSwitcher.event="Send{{api}}of type{{type}}to connected clients"
|
AdvSceneSwitcher.action.websocket.entry.sceneSwitcher.event="Send{{api}}of type{{type}}to connected clients"
|
||||||
AdvSceneSwitcher.action.websocket.entry.generic="Send{{api}}via{{connection}}"
|
AdvSceneSwitcher.action.websocket.entry.generic="Send{{api}}via{{connection}}"
|
||||||
AdvSceneSwitcher.action.http="HTTP"
|
AdvSceneSwitcher.action.http="HTTP"
|
||||||
|
AdvSceneSwitcher.action.http.legacy="HTTP (legacy)"
|
||||||
AdvSceneSwitcher.action.http.setHeaders="Set headers"
|
AdvSceneSwitcher.action.http.setHeaders="Set headers"
|
||||||
AdvSceneSwitcher.action.http.headers="Headers:"
|
AdvSceneSwitcher.action.http.headers="Headers:"
|
||||||
AdvSceneSwitcher.action.http.addHeader="Add header"
|
AdvSceneSwitcher.action.http.addHeader="Add header"
|
||||||
|
AdvSceneSwitcher.action.http.addHeader.name="Header name"
|
||||||
|
AdvSceneSwitcher.action.http.addHeader.value="Header value"
|
||||||
|
AdvSceneSwitcher.action.http.setParams="Set parameters"
|
||||||
|
AdvSceneSwitcher.action.http.params="Parameters:"
|
||||||
|
AdvSceneSwitcher.action.http.addParam.name="Parameter name"
|
||||||
|
AdvSceneSwitcher.action.http.addParam.value="Parameter value"
|
||||||
|
AdvSceneSwitcher.action.http.body="Message body:"
|
||||||
AdvSceneSwitcher.action.http.type.get="GET"
|
AdvSceneSwitcher.action.http.type.get="GET"
|
||||||
AdvSceneSwitcher.action.http.type.post="POST"
|
AdvSceneSwitcher.action.http.type.post="POST"
|
||||||
|
AdvSceneSwitcher.action.http.type.put="PUT"
|
||||||
|
AdvSceneSwitcher.action.http.type.patch="PATCH"
|
||||||
|
AdvSceneSwitcher.action.http.type.delete="DELETE"
|
||||||
|
AdvSceneSwitcher.action.http.layout.method="Send{{method}}to URL{{url}}"
|
||||||
|
AdvSceneSwitcher.action.http.layout.contentType="Content type:{{contentType}}"
|
||||||
|
AdvSceneSwitcher.action.http.layout.timeout="Timeout:{{timeout}}seconds"
|
||||||
AdvSceneSwitcher.action.http.entry.line1="Send{{method}}to{{url}}"
|
AdvSceneSwitcher.action.http.entry.line1="Send{{method}}to{{url}}"
|
||||||
AdvSceneSwitcher.action.http.entry.line2="Timeout:{{timeout}}seconds"
|
AdvSceneSwitcher.action.http.entry.line2="Timeout:{{timeout}}seconds"
|
||||||
AdvSceneSwitcher.action.variable="Variable"
|
AdvSceneSwitcher.action.variable="Variable"
|
||||||
AdvSceneSwitcher.action.variable.type.set="Set to fixed value"
|
AdvSceneSwitcher.action.variable.type.set="Set to value"
|
||||||
AdvSceneSwitcher.action.variable.type.append="Append"
|
AdvSceneSwitcher.action.variable.type.append="Append"
|
||||||
AdvSceneSwitcher.action.variable.type.appendVar="Append variable"
|
AdvSceneSwitcher.action.variable.type.appendVar="Append variable"
|
||||||
AdvSceneSwitcher.action.variable.type.increment="Increment"
|
AdvSceneSwitcher.action.variable.type.increment="Increment"
|
||||||
AdvSceneSwitcher.action.variable.type.decrement="Decrement"
|
AdvSceneSwitcher.action.variable.type.decrement="Decrement"
|
||||||
AdvSceneSwitcher.action.variable.type.setActionValue="Set to action value"
|
AdvSceneSwitcher.action.variable.type.setActionValue="Set to action value (legacy)"
|
||||||
AdvSceneSwitcher.action.variable.type.setConditionValue="Set to condition value"
|
AdvSceneSwitcher.action.variable.type.setConditionValue="Set to condition value (legacy)"
|
||||||
AdvSceneSwitcher.action.variable.type.roundToInt="Round to nearest integer"
|
AdvSceneSwitcher.action.variable.type.roundToInt="Round to nearest integer"
|
||||||
AdvSceneSwitcher.action.variable.type.subString="Set to substring of current value"
|
AdvSceneSwitcher.action.variable.type.subString="Set to substring of current value"
|
||||||
AdvSceneSwitcher.action.variable.type.findAndReplace="Find and replace in current value"
|
AdvSceneSwitcher.action.variable.type.findAndReplace="Find and replace in current value"
|
||||||
@@ -1069,7 +1131,10 @@ AdvSceneSwitcher.action.variable.type.askForValue="Get user input"
|
|||||||
AdvSceneSwitcher.action.variable.type.environmentVariable="Set to environment variable value"
|
AdvSceneSwitcher.action.variable.type.environmentVariable="Set to environment variable value"
|
||||||
AdvSceneSwitcher.action.variable.type.sceneItemCount="Set to scene item count of scene"
|
AdvSceneSwitcher.action.variable.type.sceneItemCount="Set to scene item count of scene"
|
||||||
AdvSceneSwitcher.action.variable.type.stringLength="Set to length of string"
|
AdvSceneSwitcher.action.variable.type.stringLength="Set to length of string"
|
||||||
AdvSceneSwitcher.action.variable.type.extractJson="Extract json field with name"
|
AdvSceneSwitcher.action.variable.type.extractJsonField="Extract JSON field with name"
|
||||||
|
AdvSceneSwitcher.action.variable.type.queryJson="Query JSON"
|
||||||
|
AdvSceneSwitcher.action.variable.type.queryJson.info="You can use \"JSONPath\" (RFC 9535) syntax here.\nSo, for example:\n\n • $['books'][0]['category']\n • $.books[0].category\n\nIf the query or the JSON should be invalid, the variable value will not be changed.\nIf the input is valid, the result of the query will always be a JSON array."
|
||||||
|
AdvSceneSwitcher.action.variable.type.accessJsonArray="Access JSON array at index"
|
||||||
AdvSceneSwitcher.action.variable.type.setToTempvar="Set to macro property"
|
AdvSceneSwitcher.action.variable.type.setToTempvar="Set to macro property"
|
||||||
AdvSceneSwitcher.action.variable.type.setToTempvar.help="This action type will allow you to extract values out of segments of the current macro and assign those values to the selected variable.\nFor example, you can get the current scene name from a scene condition and assign this name to a variable."
|
AdvSceneSwitcher.action.variable.type.setToTempvar.help="This action type will allow you to extract values out of segments of the current macro and assign those values to the selected variable.\nFor example, you can get the current scene name from a scene condition and assign this name to a variable."
|
||||||
AdvSceneSwitcher.action.variable.type.sceneItemName="Set to scene item name at index"
|
AdvSceneSwitcher.action.variable.type.sceneItemName="Set to scene item name at index"
|
||||||
@@ -1078,6 +1143,7 @@ AdvSceneSwitcher.action.variable.type.truncateValue="Truncate current value"
|
|||||||
AdvSceneSwitcher.action.variable.type.swapValues="Swap variable values"
|
AdvSceneSwitcher.action.variable.type.swapValues="Swap variable values"
|
||||||
AdvSceneSwitcher.action.variable.type.trim="Trim whitespace"
|
AdvSceneSwitcher.action.variable.type.trim="Trim whitespace"
|
||||||
AdvSceneSwitcher.action.variable.type.changeCase="Change case"
|
AdvSceneSwitcher.action.variable.type.changeCase="Change case"
|
||||||
|
AdvSceneSwitcher.action.variable.type.randomNumber="Generate random number"
|
||||||
AdvSceneSwitcher.action.variable.case.type.lowerCase="lowercase"
|
AdvSceneSwitcher.action.variable.case.type.lowerCase="lowercase"
|
||||||
AdvSceneSwitcher.action.variable.case.type.upperCase="UPPERCASE"
|
AdvSceneSwitcher.action.variable.case.type.upperCase="UPPERCASE"
|
||||||
AdvSceneSwitcher.action.variable.case.type.capitalized="Capitalized"
|
AdvSceneSwitcher.action.variable.case.type.capitalized="Capitalized"
|
||||||
@@ -1092,19 +1158,23 @@ AdvSceneSwitcher.action.variable.findAndReplace.replace="Text to replace with"
|
|||||||
AdvSceneSwitcher.action.variable.findAndReplace.replace.tooltip="Using \1, \2, etc. to represent first, second, etc. capture groups is supported."
|
AdvSceneSwitcher.action.variable.findAndReplace.replace.tooltip="Using \1, \2, etc. to represent first, second, etc. capture groups is supported."
|
||||||
AdvSceneSwitcher.action.variable.subString.begin="Beginning"
|
AdvSceneSwitcher.action.variable.subString.begin="Beginning"
|
||||||
AdvSceneSwitcher.action.variable.subString.all="All"
|
AdvSceneSwitcher.action.variable.subString.all="All"
|
||||||
|
AdvSceneSwitcher.action.variable.generateInteger="Only generate integers"
|
||||||
AdvSceneSwitcher.action.variable.invalidSelection="Invalid selection!"
|
AdvSceneSwitcher.action.variable.invalidSelection="Invalid selection!"
|
||||||
AdvSceneSwitcher.action.variable.actionNoVariableSupport="Getting variable values from %1 actions is not supported!"
|
AdvSceneSwitcher.action.variable.actionNoVariableSupport="Getting variable values from %1 actions is not supported!"
|
||||||
AdvSceneSwitcher.action.variable.conditionNoVariableSupport="Getting variable values from %1 conditions is not supported!"
|
AdvSceneSwitcher.action.variable.conditionNoVariableSupport="Getting variable values from %1 conditions is not supported!"
|
||||||
AdvSceneSwitcher.action.variable.currentSegmentValue="Current value:"
|
AdvSceneSwitcher.action.variable.currentSegmentValue="Current value:"
|
||||||
AdvSceneSwitcher.action.variable.entry.other="{{actions}}{{variables}}{{variables2}}{{strValue}}{{numValue}}{{segmentIndex}}{{mathExpression}}{{envVariableName}}{{scenes}}{{tempVars}}{{tempVarsHelp}}{{sceneItemIndex}}{{direction}}{{stringLength}}{{paddingCharSelection}}{{caseType}}"
|
AdvSceneSwitcher.action.variable.layout.other="{{actions}}{{variables}}{{variables2}}{{strValue}}{{numValue}}{{segmentIndex}}{{mathExpression}}{{envVariableName}}{{scenes}}{{tempVars}}{{tempVarsHelp}}{{sceneItemIndex}}{{direction}}{{stringLength}}{{paddingCharSelection}}{{caseType}}{{jsonQuery}}{{jsonQueryHelp}}{{jsonIndex}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.pad="{{actions}}of{{variables}}to length{{stringLength}}by adding{{paddingCharSelection}}to the{{direction}}"
|
AdvSceneSwitcher.action.variable.layout.pad="{{actions}}of{{variables}}to length{{stringLength}}by adding{{paddingCharSelection}}to the{{direction}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.truncate="{{actions}}of{{variables}}to length{{stringLength}}by removing characters from the{{direction}}"
|
AdvSceneSwitcher.action.variable.layout.truncate="{{actions}}of{{variables}}to length{{stringLength}}by removing characters from the{{direction}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.substringIndex="Substring start:{{subStringStart}}Substring size:{{subStringSize}}"
|
AdvSceneSwitcher.action.variable.layout.substringIndex="Substring start:{{subStringStart}}Substring size:{{subStringSize}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.substringRegex="Assign value of{{regexMatchIdx}}match using regular expression:"
|
AdvSceneSwitcher.action.variable.layout.substringRegex="Assign value of{{regexMatchIdx}}match using regular expression:"
|
||||||
AdvSceneSwitcher.action.variable.entry.findAndReplace="{{findStr}}{{findRegex}}{{replaceStr}}"
|
AdvSceneSwitcher.action.variable.layout.findAndReplace="{{findStr}}{{findRegex}}{{replaceStr}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.userInput.customPrompt="{{useCustomPrompt}}Use custom prompt{{inputPrompt}}"
|
AdvSceneSwitcher.action.variable.layout.userInput.customPrompt="{{useCustomPrompt}}Use custom prompt{{inputPrompt}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.userInput.placeholder="{{useInputPlaceholder}}Fill with placeholder{{inputPlaceholder}}"
|
AdvSceneSwitcher.action.variable.layout.userInput.placeholder="{{useInputPlaceholder}}Fill with placeholder{{inputPlaceholder}}"
|
||||||
|
AdvSceneSwitcher.action.variable.layout.randomNumber="Generate random number in range from{{randomNumberStart}}to{{randomNumberEnd}}"
|
||||||
AdvSceneSwitcher.action.projector="Projector"
|
AdvSceneSwitcher.action.projector="Projector"
|
||||||
|
AdvSceneSwitcher.action.projector.action.open="Open"
|
||||||
|
AdvSceneSwitcher.action.projector.action.close="Close"
|
||||||
AdvSceneSwitcher.action.projector.type.source="Source"
|
AdvSceneSwitcher.action.projector.type.source="Source"
|
||||||
AdvSceneSwitcher.action.projector.type.scene="Scene"
|
AdvSceneSwitcher.action.projector.type.scene="Scene"
|
||||||
AdvSceneSwitcher.action.projector.type.preview="Preview"
|
AdvSceneSwitcher.action.projector.type.preview="Preview"
|
||||||
@@ -1113,8 +1183,9 @@ AdvSceneSwitcher.action.projector.type.multiview="Multiview"
|
|||||||
AdvSceneSwitcher.action.projector.display="Display"
|
AdvSceneSwitcher.action.projector.display="Display"
|
||||||
AdvSceneSwitcher.action.projector.windowed="Windowed"
|
AdvSceneSwitcher.action.projector.windowed="Windowed"
|
||||||
AdvSceneSwitcher.action.projector.fullscreen="Fullscreen"
|
AdvSceneSwitcher.action.projector.fullscreen="Fullscreen"
|
||||||
AdvSceneSwitcher.action.projector.entry="Open{{windowTypes}}projector of{{types}}{{scenes}}{{sources}}"
|
AdvSceneSwitcher.action.projector.entry.close="{{actions}}projector with name{{projectorWindowName}}{{regex}}"
|
||||||
AdvSceneSwitcher.action.projector.entry.monitor="on{{monitors}}"
|
AdvSceneSwitcher.action.projector.entry.open.windowed="{{actions}}{{windowTypes}}projector of{{types}}{{scenes}}{{sources}}"
|
||||||
|
AdvSceneSwitcher.action.projector.entry.open.fullscreen="{{actions}}{{windowTypes}}projector of{{types}}{{scenes}}{{sources}}on{{monitors}}"
|
||||||
AdvSceneSwitcher.action.midi="MIDI"
|
AdvSceneSwitcher.action.midi="MIDI"
|
||||||
AdvSceneSwitcher.action.midi.entry="Send message to{{device}}:"
|
AdvSceneSwitcher.action.midi.entry="Send message to{{device}}:"
|
||||||
AdvSceneSwitcher.action.midi.entry.listen="Set MIDI message selection to messages incoming on{{listenDevices}}:{{listenButton}}"
|
AdvSceneSwitcher.action.midi.entry.listen="Set MIDI message selection to messages incoming on{{listenDevices}}:{{listenButton}}"
|
||||||
@@ -1134,10 +1205,15 @@ AdvSceneSwitcher.action.twitch.type.clip.create="Create stream clip"
|
|||||||
AdvSceneSwitcher.action.twitch.type.chat.announcement.send="Send chat announcement"
|
AdvSceneSwitcher.action.twitch.type.chat.announcement.send="Send chat announcement"
|
||||||
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.enable="Enable chat's emote-only mode"
|
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.enable="Enable chat's emote-only mode"
|
||||||
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.disable="Disable chat's emote-only mode"
|
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.disable="Disable chat's emote-only mode"
|
||||||
AdvSceneSwitcher.action.twitch.type.sendChatMessage="Send chat message"
|
AdvSceneSwitcher.action.twitch.type.chat.sendMessage="Send chat message"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.user.getInfo="Get user information"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.reward.getInfo="Get channel points reward information"
|
||||||
|
AdvSceneSwitcher.action.twitch.reward.toggleControl="Toggle reward name / variable selection control"
|
||||||
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="Cannot select category without selecting a Twitch account first!"
|
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="Cannot select category without selecting a Twitch account first!"
|
||||||
AdvSceneSwitcher.action.twitch.entry.default="On{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}"
|
AdvSceneSwitcher.action.twitch.entry.default="On{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}{{pointsReward}}"
|
||||||
AdvSceneSwitcher.action.twitch.entry.chat="Using account{{account}}{{actions}}on{{channel}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}"
|
AdvSceneSwitcher.action.twitch.entry.chat="Using account{{account}}{{actions}}on{{channel}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.entry.user.getInfo="Using account{{account}}{{actions}}for{{userInfoQueryType}}{{userLogin}}{{userId}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.entry.reward.getInfo="Using account{{account}}{{actions}}for channel{{channel}}{{pointsReward}}{{rewardVariable}}{{toggleRewardSelection}}"
|
||||||
AdvSceneSwitcher.action.twitch.title.title="Enter title"
|
AdvSceneSwitcher.action.twitch.title.title="Enter title"
|
||||||
AdvSceneSwitcher.action.twitch.marker.description="Describe marker"
|
AdvSceneSwitcher.action.twitch.marker.description="Describe marker"
|
||||||
AdvSceneSwitcher.action.twitch.clip.hasDelay="Add a slight delay before capturing the clip"
|
AdvSceneSwitcher.action.twitch.clip.hasDelay="Add a slight delay before capturing the clip"
|
||||||
@@ -1147,6 +1223,8 @@ AdvSceneSwitcher.action.twitch.announcement.blue="Blue"
|
|||||||
AdvSceneSwitcher.action.twitch.announcement.green="Green"
|
AdvSceneSwitcher.action.twitch.announcement.green="Green"
|
||||||
AdvSceneSwitcher.action.twitch.announcement.orange="Orange"
|
AdvSceneSwitcher.action.twitch.announcement.orange="Orange"
|
||||||
AdvSceneSwitcher.action.twitch.announcement.purple="Purple"
|
AdvSceneSwitcher.action.twitch.announcement.purple="Purple"
|
||||||
|
AdvSceneSwitcher.action.twitch.user.getInfo.queryType.id="User Id"
|
||||||
|
AdvSceneSwitcher.action.twitch.user.getInfo.queryType.login="User login"
|
||||||
AdvSceneSwitcher.action.clipboard="Clipboard"
|
AdvSceneSwitcher.action.clipboard="Clipboard"
|
||||||
AdvSceneSwitcher.action.clipboard.type.copy.text="Copy text"
|
AdvSceneSwitcher.action.clipboard.type.copy.text="Copy text"
|
||||||
AdvSceneSwitcher.action.clipboard.type.copy.image="Copy image"
|
AdvSceneSwitcher.action.clipboard.type.copy.image="Copy image"
|
||||||
@@ -1171,6 +1249,24 @@ AdvSceneSwitcher.action.window.entry="{{actions}}{{windows}}{{regex}}"
|
|||||||
AdvSceneSwitcher.action.log="Log"
|
AdvSceneSwitcher.action.log="Log"
|
||||||
AdvSceneSwitcher.action.log.placeholder="My log message!"
|
AdvSceneSwitcher.action.log.placeholder="My log message!"
|
||||||
AdvSceneSwitcher.action.log.entry="Write to OBS log:{{logMessage}}"
|
AdvSceneSwitcher.action.log.entry="Write to OBS log:{{logMessage}}"
|
||||||
|
AdvSceneSwitcher.action.mqtt="MQTT"
|
||||||
|
AdvSceneSwitcher.action.mqtt.topic="Topic:"
|
||||||
|
AdvSceneSwitcher.action.mqtt.qos="QoS:"
|
||||||
|
AdvSceneSwitcher.action.mqtt.retain="Retained message:"
|
||||||
|
AdvSceneSwitcher.action.mqtt.layout="Send message to{{connection}}"
|
||||||
|
AdvSceneSwitcher.action.obsSetting="OBS setting"
|
||||||
|
AdvSceneSwitcher.action.obsSetting.action.setFPSType="Set FPS selection type to"
|
||||||
|
AdvSceneSwitcher.action.obsSetting.action.setFPSCommonValue="Set FPS common selection to"
|
||||||
|
AdvSceneSwitcher.action.obsSetting.action.setFPSIntegerValue="Set FPS integer selection to"
|
||||||
|
AdvSceneSwitcher.action.obsSetting.action.setFPSFractionNumeratorValue="Set fractional FPS numerator selection to"
|
||||||
|
AdvSceneSwitcher.action.obsSetting.action.setFPSFractionDenominatorValue="Set fractional FPS denominator selection to"
|
||||||
|
AdvSceneSwitcher.action.obsSetting.action.setBaseCanvasX="Set base resolution X value"
|
||||||
|
AdvSceneSwitcher.action.obsSetting.action.setBaseCanvasY="Set base resolution Y value"
|
||||||
|
AdvSceneSwitcher.action.obsSetting.action.setOutputCanvasX="Set output resolution X value"
|
||||||
|
AdvSceneSwitcher.action.obsSetting.action.setOutputCanvasY="Set output resolution Y value"
|
||||||
|
AdvSceneSwitcher.action.obsSetting.getCurrentValue="Get current value"
|
||||||
|
AdvSceneSwitcher.action.obsSettings.layout="{{actions}}{{fpsType}}{{fpsIntValue}}{{fpsStringValue}}{{canvasSizeValue}}{{getCurrentValue}}"
|
||||||
|
AdvSceneSwitcher.action.script="Script"
|
||||||
|
|
||||||
# Hotkey
|
# Hotkey
|
||||||
AdvSceneSwitcher.hotkey.startSwitcherHotkey="Start the Advanced Scene Switcher"
|
AdvSceneSwitcher.hotkey.startSwitcherHotkey="Start the Advanced Scene Switcher"
|
||||||
@@ -1179,9 +1275,10 @@ AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey="Toggle Start/Stop for the
|
|||||||
AdvSceneSwitcher.hotkey.macro.pause="Pause macro %1"
|
AdvSceneSwitcher.hotkey.macro.pause="Pause macro %1"
|
||||||
AdvSceneSwitcher.hotkey.macro.unpause="Unpause macro %1"
|
AdvSceneSwitcher.hotkey.macro.unpause="Unpause macro %1"
|
||||||
AdvSceneSwitcher.hotkey.macro.togglePause="Toggle pause of macro %1"
|
AdvSceneSwitcher.hotkey.macro.togglePause="Toggle pause of macro %1"
|
||||||
AdvSceneSwitcher.hotkey.upMacroSegmentHotkey="Move macro segment selection up"
|
AdvSceneSwitcher.hotkey.macro.new="Add new macro"
|
||||||
AdvSceneSwitcher.hotkey.downMacroSegmentHotkey="Move macro segment selection down"
|
AdvSceneSwitcher.hotkey.macro.segment.up="Move macro segment selection up"
|
||||||
AdvSceneSwitcher.hotkey.removeMacroSegmentHotkey="Remove selected macro segment"
|
AdvSceneSwitcher.hotkey.macro.segment.down="Move macro segment selection down"
|
||||||
|
AdvSceneSwitcher.hotkey.macro.segment.remove="Remove selected macro segment"
|
||||||
|
|
||||||
AdvSceneSwitcher.askBackup="Detected a new version of the Advanced Scene Switcher.\nShould a backup of the old settings be created?"
|
AdvSceneSwitcher.askBackup="Detected a new version of the Advanced Scene Switcher.\nShould a backup of the old settings be created?"
|
||||||
AdvSceneSwitcher.askForMacro="Select macro{{macroSelection}}"
|
AdvSceneSwitcher.askForMacro="Select macro{{macroSelection}}"
|
||||||
@@ -1211,7 +1308,7 @@ AdvSceneSwitcher.validation.text.maxLength="Only %1 characters are allowed in th
|
|||||||
AdvSceneSwitcher.variable.select="--select variable--"
|
AdvSceneSwitcher.variable.select="--select variable--"
|
||||||
AdvSceneSwitcher.variable.add="Add new variable"
|
AdvSceneSwitcher.variable.add="Add new variable"
|
||||||
AdvSceneSwitcher.variable.configure="Configure variable settings"
|
AdvSceneSwitcher.variable.configure="Configure variable settings"
|
||||||
AdvSceneSwitcher.variable.invalid="Invalid varialbe selection"
|
AdvSceneSwitcher.variable.invalid="Invalid variable selection"
|
||||||
AdvSceneSwitcher.variable.name="Name:"
|
AdvSceneSwitcher.variable.name="Name:"
|
||||||
AdvSceneSwitcher.variable.value="Current value:"
|
AdvSceneSwitcher.variable.value="Current value:"
|
||||||
AdvSceneSwitcher.variable.save="Save / load behavior"
|
AdvSceneSwitcher.variable.save="Save / load behavior"
|
||||||
@@ -1327,6 +1424,35 @@ AdvSceneSwitcher.osc.message.type.false="False"
|
|||||||
AdvSceneSwitcher.osc.message.type.infinity="Infinitum"
|
AdvSceneSwitcher.osc.message.type.infinity="Infinitum"
|
||||||
AdvSceneSwitcher.osc.message.type.null="Nil"
|
AdvSceneSwitcher.osc.message.type.null="Nil"
|
||||||
|
|
||||||
|
AdvSceneSwitcher.mqttConnection.startListen="Start listening"
|
||||||
|
AdvSceneSwitcher.mqttConnection.stopListen="Stop listening"
|
||||||
|
AdvSceneSwitcher.mqttConnection.select="--select connection--"
|
||||||
|
AdvSceneSwitcher.mqttConnection.add="Add new connection"
|
||||||
|
AdvSceneSwitcher.mqttConnection.configure="Configure connection settings"
|
||||||
|
AdvSceneSwitcher.mqttConnection.invalid="Invalid connection selection"
|
||||||
|
AdvSceneSwitcher.mqttConnection.name="Name:"
|
||||||
|
AdvSceneSwitcher.mqttConnection.address="Address:"
|
||||||
|
AdvSceneSwitcher.mqttConnection.username="Username:"
|
||||||
|
AdvSceneSwitcher.mqttConnection.password="Password:"
|
||||||
|
AdvSceneSwitcher.mqttConnection.reconnect="Reconnect automatically:"
|
||||||
|
AdvSceneSwitcher.mqttConnection.reconnectDelay="Automatically reconnect after:"
|
||||||
|
AdvSceneSwitcher.mqttConnection.connectOnStart="Connect on startup:"
|
||||||
|
AdvSceneSwitcher.mqttConnection.test="Test connection"
|
||||||
|
AdvSceneSwitcher.mqttConnection.status.connected="Connected!"
|
||||||
|
AdvSceneSwitcher.mqttConnection.status.connecting="Connecting ..."
|
||||||
|
AdvSceneSwitcher.mqttConnection.status.disconnected="Could not connect!"
|
||||||
|
AdvSceneSwitcher.mqttConnection.topic="Topic"
|
||||||
|
AdvSceneSwitcher.mqttConnection.qos="QoS"
|
||||||
|
AdvSceneSwitcher.mqttConnection.topics="Topic subscriptions:"
|
||||||
|
AdvSceneSwitcher.mqttConnection.inputWarning.emptyTopic="Topic cannot be empty."
|
||||||
|
AdvSceneSwitcher.mqttConnection.inputWarning.emptyTopic.title="Input Error"
|
||||||
|
AdvSceneSwitcher.mqttConnection.inputWarning.duplicateTopic="This topic already exists."
|
||||||
|
AdvSceneSwitcher.mqttConnection.inputWarning.duplicateTopic.title="Duplicate Topic"
|
||||||
|
AdvSceneSwitcher.mqttConnection.inputWarning.qosRange="QoS must be 0, 1, or 2."
|
||||||
|
AdvSceneSwitcher.mqttConnection.inputWarning.qosRange.title="Invalid QoS"
|
||||||
|
AdvSceneSwitcher.mqttConnection.add.layout="Add topic subscription{{topic}}with QoS{{QoS}}"
|
||||||
|
AdvSceneSwitcher.mqttConnection.add.title="Add MQTT Topic Subscription"
|
||||||
|
|
||||||
AdvSceneSwitcher.twitchToken.name="Account name:"
|
AdvSceneSwitcher.twitchToken.name="Account name:"
|
||||||
AdvSceneSwitcher.twitchToken.nameNotAvailable="Account already in use"
|
AdvSceneSwitcher.twitchToken.nameNotAvailable="Account already in use"
|
||||||
AdvSceneSwitcher.twitchToken.select="--select Twitch connection--"
|
AdvSceneSwitcher.twitchToken.select="--select Twitch connection--"
|
||||||
@@ -1378,6 +1504,7 @@ AdvSceneSwitcher.twitchToken.moderator.chat.settings.manage="Manage channel's ch
|
|||||||
AdvSceneSwitcher.twitchToken.user.whispers.manage="Manage user's whispers."
|
AdvSceneSwitcher.twitchToken.user.whispers.manage="Manage user's whispers."
|
||||||
AdvSceneSwitcher.twitchToken.chat.read="View live stream chat messages."
|
AdvSceneSwitcher.twitchToken.chat.read="View live stream chat messages."
|
||||||
AdvSceneSwitcher.twitchToken.chat.edit="Send live stream chat messages."
|
AdvSceneSwitcher.twitchToken.chat.edit="Send live stream chat messages."
|
||||||
|
AdvSceneSwitcher.twitchToken.validateTimestamps="Validate timestamps of received Twitch event messages. (Recommended)"
|
||||||
|
|
||||||
AdvSceneSwitcher.twitch.selection.channel.open="Open channel"
|
AdvSceneSwitcher.twitch.selection.channel.open="Open channel"
|
||||||
AdvSceneSwitcher.twitch.selection.channel.open.tooltip.details="Open channel in external application handling the HTTPS protocol."
|
AdvSceneSwitcher.twitch.selection.channel.open.tooltip.details="Open channel in external application handling the HTTPS protocol."
|
||||||
@@ -1404,6 +1531,17 @@ AdvSceneSwitcher.twitch.selection.points.reward.tooltip.noPermission="Can't sele
|
|||||||
AdvSceneSwitcher.twitch.selection.points.reward.tooltip.noChannel="Can't select points reward without entering a channel first!"
|
AdvSceneSwitcher.twitch.selection.points.reward.tooltip.noChannel="Can't select points reward without entering a channel first!"
|
||||||
AdvSceneSwitcher.twitch.selection.points.reward.tooltip.error="Can't select points reward because Twitch responded with an error! Check OBS logs for more details."
|
AdvSceneSwitcher.twitch.selection.points.reward.tooltip.error="Can't select points reward because Twitch responded with an error! Check OBS logs for more details."
|
||||||
|
|
||||||
|
AdvSceneSwitcher.script.type.inline="Inline"
|
||||||
|
AdvSceneSwitcher.script.type.file="File"
|
||||||
|
AdvSceneSwitcher.script.type.layout="Script type:{{scriptType}}"
|
||||||
|
AdvSceneSwitcher.script.language.python="Python"
|
||||||
|
AdvSceneSwitcher.script.language.lua="LUA"
|
||||||
|
AdvSceneSwitcher.script.language.select="--select language--"
|
||||||
|
AdvSceneSwitcher.script.language.layout="Script language:{{language}}"
|
||||||
|
AdvSceneSwitcher.script.file.open="Open"
|
||||||
|
AdvSceneSwitcher.script.file.open.failed="Could not open script file!"
|
||||||
|
AdvSceneSwitcher.script.file.layout="Script file:{{path}}{{open}}"
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.select="--select value--"
|
AdvSceneSwitcher.tempVar.select="--select value--"
|
||||||
AdvSceneSwitcher.tempVar.selectionInfo.lastValues="Last values:"
|
AdvSceneSwitcher.tempVar.selectionInfo.lastValues="Last values:"
|
||||||
|
|
||||||
@@ -1590,12 +1728,21 @@ AdvSceneSwitcher.tempVar.twitch.started_at.shoutoutReceived="Shoutout time"
|
|||||||
AdvSceneSwitcher.tempVar.twitch.started_at.shoutoutReceived.description="The UTC timestamp (in RFC3339 format) of when the moderator sent the Shoutout."
|
AdvSceneSwitcher.tempVar.twitch.started_at.shoutoutReceived.description="The UTC timestamp (in RFC3339 format) of when the moderator sent the Shoutout."
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.twitch.id.reward="Reward ID"
|
AdvSceneSwitcher.tempVar.twitch.id.reward="Reward ID"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.id.redemption="Redemption ID"
|
||||||
AdvSceneSwitcher.tempVar.twitch.user_id.reward="User ID redeeming the reward"
|
AdvSceneSwitcher.tempVar.twitch.user_id.reward="User ID redeeming the reward"
|
||||||
AdvSceneSwitcher.tempVar.twitch.user_login.reward="User login redeeming the reward"
|
AdvSceneSwitcher.tempVar.twitch.user_login.reward="User login redeeming the reward"
|
||||||
AdvSceneSwitcher.tempVar.twitch.user_name.reward="User name redeeming the reward"
|
AdvSceneSwitcher.tempVar.twitch.user_name.reward="User name redeeming the reward"
|
||||||
AdvSceneSwitcher.tempVar.twitch.user_input.reward="User input for reward"
|
AdvSceneSwitcher.tempVar.twitch.user_input.reward="User input for reward"
|
||||||
AdvSceneSwitcher.tempVar.twitch.reward.reward="Reward Information"
|
AdvSceneSwitcher.tempVar.twitch.reward.reward="Reward Information (JSON)"
|
||||||
AdvSceneSwitcher.tempVar.twitch.reward.reward.description="Basic information about the reward that was redeemed, at the time it was redeemed."
|
AdvSceneSwitcher.tempVar.twitch.reward.reward.description="Basic information about the reward that was redeemed in JSON form, at the time it was redeemed."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.reward.id.reward="Reward ID"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.reward.id.reward.description="The ID that uniquely identifies the reward."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.reward.title.reward="Reward title"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.reward.title.reward.description="The reward’s title."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.reward.prompt.reward="Reward prompt"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.reward.prompt.reward.description="The prompt displayed to the viewer if user input is required."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.reward.cost.reward="Reward cost"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.reward.cost.reward.description="The reward’s cost, in Channel Points."
|
||||||
AdvSceneSwitcher.tempVar.twitch.status.reward="Reward status"
|
AdvSceneSwitcher.tempVar.twitch.status.reward="Reward status"
|
||||||
AdvSceneSwitcher.tempVar.twitch.status.reward.description="Defaults to unfulfilled. Possible values are unknown, unfulfilled, fulfilled, and canceled."
|
AdvSceneSwitcher.tempVar.twitch.status.reward.description="Defaults to unfulfilled. Possible values are unknown, unfulfilled, fulfilled, and canceled."
|
||||||
AdvSceneSwitcher.tempVar.twitch.redeemed_at.reward="Redemption time"
|
AdvSceneSwitcher.tempVar.twitch.redeemed_at.reward="Redemption time"
|
||||||
@@ -1610,22 +1757,37 @@ AdvSceneSwitcher.tempVar.twitch.title.reward="Reward title"
|
|||||||
AdvSceneSwitcher.tempVar.twitch.cost.reward="Reward cost"
|
AdvSceneSwitcher.tempVar.twitch.cost.reward="Reward cost"
|
||||||
AdvSceneSwitcher.tempVar.twitch.prompt.reward="Reward description"
|
AdvSceneSwitcher.tempVar.twitch.prompt.reward="Reward description"
|
||||||
AdvSceneSwitcher.tempVar.twitch.is_user_input_required.reward="Reward requires user input"
|
AdvSceneSwitcher.tempVar.twitch.is_user_input_required.reward="Reward requires user input"
|
||||||
AdvSceneSwitcher.tempVar.twitch.should_redemptions_skip_request_queue.reward="Redemptions skip request queue"
|
|
||||||
AdvSceneSwitcher.tempVar.twitch.should_redemptions_skip_request_queue.reward.description="Should redemptions be set to fulfilled status immediately when redeemed and skip the request queue instead of the normal unfulfilled status."
|
|
||||||
AdvSceneSwitcher.tempVar.twitch.max_per_stream.reward="Reward maximum per stream"
|
|
||||||
AdvSceneSwitcher.tempVar.twitch.max_per_user_per_stream.reward="Reward maximum per user per stream"
|
|
||||||
AdvSceneSwitcher.tempVar.twitch.background_color.reward="Reward background color"
|
AdvSceneSwitcher.tempVar.twitch.background_color.reward="Reward background color"
|
||||||
AdvSceneSwitcher.tempVar.twitch.image.reward="Reward image"
|
AdvSceneSwitcher.tempVar.twitch.image.reward="Reward image (JSON)"
|
||||||
AdvSceneSwitcher.tempVar.twitch.image.reward.description="Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded."
|
AdvSceneSwitcher.tempVar.twitch.image.reward.description="Set of custom images of 1x, 2x and 4x sizes for the reward. Can be null if no images have been uploaded."
|
||||||
AdvSceneSwitcher.tempVar.twitch.default_image.reward="Reward default image"
|
AdvSceneSwitcher.tempVar.twitch.image.url_4x.reward="Reward image URL"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.image.url_4x.reward.description="The URL to the custom image for the reward. This field is null if the broadcaster didn’t upload images."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.default_image.reward="Reward default image (JSON)"
|
||||||
AdvSceneSwitcher.tempVar.twitch.default_image.reward.description="Set of default images of 1x, 2x and 4x sizes for the reward."
|
AdvSceneSwitcher.tempVar.twitch.default_image.reward.description="Set of default images of 1x, 2x and 4x sizes for the reward."
|
||||||
AdvSceneSwitcher.tempVar.twitch.global_cooldown.reward="Reward cooldown"
|
AdvSceneSwitcher.tempVar.twitch.default_image.url_4x.reward="Reward default image URL"
|
||||||
AdvSceneSwitcher.tempVar.twitch.global_cooldown.reward.description="Whether a cooldown is enabled and what the cooldown is in seconds."
|
AdvSceneSwitcher.tempVar.twitch.default_image.url_4x.reward.description="The URL to the default image for the reward."
|
||||||
AdvSceneSwitcher.tempVar.twitch.cooldown_expires_at.reward="Reward cooldown expiration"
|
|
||||||
AdvSceneSwitcher.tempVar.twitch.cooldown_expires_at.reward.description="Timestamp of the cooldown expiration. null if the reward isn’t on cooldown."
|
|
||||||
AdvSceneSwitcher.tempVar.twitch.redemptions_redeemed_current_stream.reward="Redemption count"
|
AdvSceneSwitcher.tempVar.twitch.redemptions_redeemed_current_stream.reward="Redemption count"
|
||||||
AdvSceneSwitcher.tempVar.twitch.redemptions_redeemed_current_stream.reward.description="The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. null if the broadcasters stream isn’t live or max_per_stream isn’t enabled."
|
AdvSceneSwitcher.tempVar.twitch.redemptions_redeemed_current_stream.reward.description="The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. null if the broadcasters stream isn’t live or max_per_stream isn’t enabled."
|
||||||
AdvSceneSwitcher.tempVar.twitch.redemptions_redeemed_current_stream.reward.description="The number of redemptions redeemed during the current live stream. Counts against the max_per_stream limit. null if the broadcasters stream isn’t live or max_per_stream isn’t enabled."
|
AdvSceneSwitcher.tempVar.twitch.should_redemptions_skip_request_queue.reward="Redemptions skip request queue"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.should_redemptions_skip_request_queue.reward.description="Should redemptions be set to fulfilled status immediately when redeemed and skip the request queue instead of the normal unfulfilled status."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.max_per_stream.reward="Maximum redemptions per stream (JSON)"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.max_per_stream.is_enabled.reward="Maximum redemptions per stream enabled"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.max_per_stream.is_enabled.reward.description="A Boolean value that determines whether the reward applies a limit on the number of redemptions allowed per live stream. Is true if the reward applies a limit."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.max_per_stream.max_per_stream.reward="Maximum redemptions per stream"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.max_per_stream.max_per_stream.reward.description="The maximum number of redemptions allowed per live stream."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.max_per_user_per_stream.reward="Reward maximum per user per stream (JSON)"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.max_per_user_per_stream.is_enabled.reward="Maximum redemptions per user per stream enabled"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.max_per_user_per_stream.is_enabled.reward.description="A Boolean value that determines whether the reward applies a limit on the number of redemptions allowed per user per live stream. Is true if the reward applies a limit."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.max_per_user_per_stream.max_per_user_per_stream.reward="Maximum redemptions per user per stream"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.max_per_user_per_stream.max_per_user_per_stream.reward.description="The settings used to determine whether to apply a maximum to the number of redemptions allowed per user per live stream."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.global_cooldown.reward="Global cooldown (JSON)"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.global_cooldown.reward.description="Whether a cooldown is enabled and what the cooldown is in seconds."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.global_cooldown.is_enabled.reward="Global cooldown enabled"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.global_cooldown.is_enabled.reward.description="A Boolean value that determines whether to apply a cooldown period. Is true if a cooldown period is enabled."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.global_cooldown.global_cooldown_seconds.reward="Global cooldown"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.global_cooldown.global_cooldown_seconds.reward.description="The cooldown period, in seconds."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.cooldown_expires_at.reward="Reward cooldown expiration"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.cooldown_expires_at.reward.description="Timestamp of the cooldown expiration. null if the reward isn’t on cooldown."
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.twitch.charity_name="Charity name"
|
AdvSceneSwitcher.tempVar.twitch.charity_name="Charity name"
|
||||||
AdvSceneSwitcher.tempVar.twitch.charity_description="Charity description"
|
AdvSceneSwitcher.tempVar.twitch.charity_description="Charity description"
|
||||||
@@ -1773,6 +1935,24 @@ AdvSceneSwitcher.tempVar.twitch.is_turbo.chatReceive.description="'true' if the
|
|||||||
AdvSceneSwitcher.tempVar.twitch.is_vip.chatReceive="Is chatter a VIP"
|
AdvSceneSwitcher.tempVar.twitch.is_vip.chatReceive="Is chatter a VIP"
|
||||||
AdvSceneSwitcher.tempVar.twitch.is_vip.chatReceive.description="'true' if the chatter is a VIP in the channel, 'false' otherwise."
|
AdvSceneSwitcher.tempVar.twitch.is_vip.chatReceive.description="'true' if the chatter is a VIP in the channel, 'false' otherwise."
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.login.chatRemove="User login"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.login.chatRemove.description="The name of the user who sent the message."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.message.chatRemove="Chat message"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.message_id.chatRemove.description="The chat message that was removed."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.message_id.chatRemove="Chat message ID"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.message_id.chatRemove.description="The ID of the message in UUID format."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.timestamp.chatRemove="Chat message timestamp"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.timestamp.chatRemove.description="The UNIX timestamp."
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.login.chatClear="User login"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.login.chatClear.description="The login name of the user whose messages were removed from the chat room because they were banned or put in a timeout."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.user_id.chatClear="User ID"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.user_id.chatClear.description="Optional.\nThe User ID of the user that was banned or put in a timeout.\nEmpty in case the complete chat was cleared."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.ban_duration.chatClear="Ban duration"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.ban_duration.chatClear.description="Set to zero if the complete chat was cleared or a user was banned indefinitely.\nIs set to non-zero value, if a user was put in a timeout.\nWill contain the duration of the timeout in seconds."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.timestamp.chatClear="Timestamp"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.timestamp.chatClear.description="The UNIX timestamp."
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.twitch.user_login.chatJoin="User login"
|
AdvSceneSwitcher.tempVar.twitch.user_login.chatJoin="User login"
|
||||||
AdvSceneSwitcher.tempVar.twitch.user_login.chatJoin.description="The user login of the person who joined the chat room."
|
AdvSceneSwitcher.tempVar.twitch.user_login.chatJoin.description="The user login of the person who joined the chat room."
|
||||||
|
|
||||||
@@ -1794,6 +1974,24 @@ AdvSceneSwitcher.tempVar.twitch.to_broadcaster_user_name.raid.description="The b
|
|||||||
AdvSceneSwitcher.tempVar.twitch.viewers.raid="Raid participants"
|
AdvSceneSwitcher.tempVar.twitch.viewers.raid="Raid participants"
|
||||||
AdvSceneSwitcher.tempVar.twitch.viewers.raid.description="The number of viewers in the raid."
|
AdvSceneSwitcher.tempVar.twitch.viewers.raid.description="The number of viewers in the raid."
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.id.user.getInfo="User ID"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.id.user.getInfo.description="The user ID of the queried account."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.login.user.getInfo="User login"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.login.user.getInfo.description="The user login of the queried account."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.display_name.user.getInfo="User name"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.display_name.user.getInfo.description="The display name of the queried account."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.type.user.getInfo="User type"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.type.user.getInfo.description="The type of user. Possible values are:\n admin — Twitch administrator\n global_mod\n staff — Twitch staff\n \"\" — Normal user"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.broadcaster_type.user.getInfo="Broadcaster type"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.broadcaster_type.user.getInfo.description="The type of broadcaster. Possible values are:\n affiliate — An affiliate broadcaster\n partner — A partner broadcaster\n \"\" — A normal broadcaster"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.description.user.getInfo="Description"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.description.user.getInfo.description="The user's description of their channel."
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.profile_image_url.user.getInfo="Profile image URL"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.offline_image_url.user.getInfo="Offline image URL"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.created_at.user.getInfo="Account creation date"
|
||||||
|
AdvSceneSwitcher.tempVar.twitch.created_at.user.getInfo.description="The UTC date and time that the user's account was created. The timestamp is in RFC3339 format."
|
||||||
|
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.audio.output_volume="Output volume"
|
AdvSceneSwitcher.tempVar.audio.output_volume="Output volume"
|
||||||
AdvSceneSwitcher.tempVar.audio.output_volume.description="The volume the audio source is outputting."
|
AdvSceneSwitcher.tempVar.audio.output_volume.description="The volume the audio source is outputting."
|
||||||
AdvSceneSwitcher.tempVar.audio.configured_volume="Configured volume"
|
AdvSceneSwitcher.tempVar.audio.configured_volume="Configured volume"
|
||||||
@@ -1971,6 +2169,26 @@ AdvSceneSwitcher.tempVar.queue.size="Size"
|
|||||||
AdvSceneSwitcher.tempVar.queue.running="Is running"
|
AdvSceneSwitcher.tempVar.queue.running="Is running"
|
||||||
AdvSceneSwitcher.tempVar.queue.running.description="Returns \"true\" if the queue is started and \"false\" if it is stopped."
|
AdvSceneSwitcher.tempVar.queue.running.description="Returns \"true\" if the queue is started and \"false\" if it is stopped."
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.screenshot.lastScreenshotPath="Last screenshot path"
|
||||||
|
AdvSceneSwitcher.tempVar.screenshot.lastScreenshotPath.description="The filesystem path to the last screenshot taken."
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.gameCapture.title="Title"
|
||||||
|
AdvSceneSwitcher.tempVar.gameCapture.title.description="Window title of the application captured by the source."
|
||||||
|
AdvSceneSwitcher.tempVar.gameCapture.class="Class"
|
||||||
|
AdvSceneSwitcher.tempVar.gameCapture.class.description="Window class of the application captured by the source."
|
||||||
|
AdvSceneSwitcher.tempVar.gameCapture.executable="Executable"
|
||||||
|
AdvSceneSwitcher.tempVar.gameCapture.executable.description="Executable name of the application captured by the source."
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.http.status="Status code"
|
||||||
|
AdvSceneSwitcher.tempVar.http.body="Message body"
|
||||||
|
AdvSceneSwitcher.tempVar.http.error="Error"
|
||||||
|
AdvSceneSwitcher.tempVar.http.error.description="Empty when no error occurred.\nOther possible values:\n\n * Could not establish connection\n * Failed to bind IP address\n * Failed to read connection\n * Failed to write connection\n * Maximum redirect count exceeded\n * Connection handling canceled\n * SSL connection failed\n * SSL certificate loading failed\n * SSL server verification failed\n * Unsupported HTTP multipart boundary characters\n * Compression failed\n * Connection timed out\n * Proxy connection failed\n * Unknown"
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.mqtt.message="Message"
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.cursor.x="Cursor position (X)"
|
||||||
|
AdvSceneSwitcher.tempVar.cursor.y="Cursor position (Y)"
|
||||||
|
|
||||||
AdvSceneSwitcher.selectScene="--select scene--"
|
AdvSceneSwitcher.selectScene="--select scene--"
|
||||||
AdvSceneSwitcher.selectPreviousScene="Previous Scene"
|
AdvSceneSwitcher.selectPreviousScene="Previous Scene"
|
||||||
AdvSceneSwitcher.selectCurrentScene="Current Scene"
|
AdvSceneSwitcher.selectCurrentScene="Current Scene"
|
||||||
@@ -2009,7 +2227,6 @@ AdvSceneSwitcher.settings.suffix.type.list=" (List)"
|
|||||||
AdvSceneSwitcher.settings.suffix.type.color=" (Color)"
|
AdvSceneSwitcher.settings.suffix.type.color=" (Color)"
|
||||||
AdvSceneSwitcher.settings.suffix.type.button=" (Button)"
|
AdvSceneSwitcher.settings.suffix.type.button=" (Button)"
|
||||||
AdvSceneSwitcher.settings.suffix.type.font=" (Font)"
|
AdvSceneSwitcher.settings.suffix.type.font=" (Font)"
|
||||||
AdvSceneSwitcher.settings.suffix.type.font=" (Font)"
|
|
||||||
AdvSceneSwitcher.settings.suffix.type.editableList=" (Editable list)"
|
AdvSceneSwitcher.settings.suffix.type.editableList=" (Editable list)"
|
||||||
AdvSceneSwitcher.settings.suffix.type.frameRate=" (Frame rate)"
|
AdvSceneSwitcher.settings.suffix.type.frameRate=" (Frame rate)"
|
||||||
AdvSceneSwitcher.settings.suffix.type.group=" (Group)"
|
AdvSceneSwitcher.settings.suffix.type.group=" (Group)"
|
||||||
@@ -2091,13 +2308,12 @@ AdvSceneSwitcher.script.timeout="Script timeout:{{timeout}}"
|
|||||||
|
|
||||||
# This secion is copied from the OBS locale files
|
# This secion is copied from the OBS locale files
|
||||||
|
|
||||||
# commonly shared locale
|
# OBS commonly shared locale
|
||||||
Browse="Browse"
|
Browse="Browse"
|
||||||
Show="Show"
|
Show="Show"
|
||||||
Hide="Hide"
|
Hide="Hide"
|
||||||
|
|
||||||
|
# OBS properties window
|
||||||
# properties window
|
|
||||||
Basic.PropertiesWindow="Properties for '%1'"
|
Basic.PropertiesWindow="Properties for '%1'"
|
||||||
Basic.PropertiesWindow.AutoSelectFormat="%1 (autoselect: %2)"
|
Basic.PropertiesWindow.AutoSelectFormat="%1 (autoselect: %2)"
|
||||||
Basic.PropertiesWindow.SelectColor="Select color"
|
Basic.PropertiesWindow.SelectColor="Select color"
|
||||||
@@ -2114,7 +2330,7 @@ Basic.PropertiesWindow.AddEditableListFiles="Add files to '%1'"
|
|||||||
Basic.PropertiesWindow.AddEditableListEntry="Add entry to '%1'"
|
Basic.PropertiesWindow.AddEditableListEntry="Add entry to '%1'"
|
||||||
Basic.PropertiesWindow.EditEditableListEntry="Edit entry from '%1'"
|
Basic.PropertiesWindow.EditEditableListEntry="Edit entry from '%1'"
|
||||||
|
|
||||||
# properties view
|
# OBS properties view
|
||||||
Basic.PropertiesView.FPS.Simple="Simple FPS Values"
|
Basic.PropertiesView.FPS.Simple="Simple FPS Values"
|
||||||
Basic.PropertiesView.FPS.Rational="Rational FPS Values"
|
Basic.PropertiesView.FPS.Rational="Rational FPS Values"
|
||||||
Basic.PropertiesView.FPS.ValidFPSRanges="Valid FPS Ranges:"
|
Basic.PropertiesView.FPS.ValidFPSRanges="Valid FPS Ranges:"
|
||||||
@@ -2122,6 +2338,11 @@ Basic.PropertiesView.UrlButton.Text="Open this link in your default web browser?
|
|||||||
Basic.PropertiesView.UrlButton.Text.Url="URL: %1"
|
Basic.PropertiesView.UrlButton.Text.Url="URL: %1"
|
||||||
Basic.PropertiesView.UrlButton.OpenUrl="Open URL"
|
Basic.PropertiesView.UrlButton.OpenUrl="Open URL"
|
||||||
|
|
||||||
|
# OBS settings
|
||||||
|
Basic.Settings.Video.FPSCommon="Common FPS Values"
|
||||||
|
Basic.Settings.Video.FPSInteger="Integer FPS Value"
|
||||||
|
Basic.Settings.Video.FPSFraction="Fractional FPS Value"
|
||||||
|
|
||||||
# Legacy tabs below - please don't waste your time adding translations for these :)
|
# Legacy tabs below - please don't waste your time adding translations for these :)
|
||||||
# Transition Tab
|
# Transition Tab
|
||||||
AdvSceneSwitcher.transitionTab.title="Transition"
|
AdvSceneSwitcher.transitionTab.title="Transition"
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.dontSwitch="No cambiar"
|
|||||||
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchToRandom="Cambiar a una escena aleatoria"
|
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchToRandom="Cambiar a una escena aleatoria"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Cambiar a:"
|
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Cambiar a:"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="¡Durante este tiempo, se ignorarán las posibles coincidencias!"
|
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="¡Durante este tiempo, se ignorarán las posibles coincidencias!"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.verboseLogging="Habilitar el registro detallado"
|
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Guardar la posición y el tamaño de la ventana"
|
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Guardar la posición y el tamaño de la ventana"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Mostrar notificaciones del sistema"
|
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Mostrar notificaciones del sistema"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Deshabilitar sugerencias de interfaz de usuario"
|
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Deshabilitar sugerencias de interfaz de usuario"
|
||||||
@@ -39,7 +38,7 @@ AdvSceneSwitcher.generalTab.saveOrLoadsettings.export="Exportar"
|
|||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Importar"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Importar"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Exportar los ajustes para Advanced Scene Switcher ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Exportar los ajustes para Advanced Scene Switcher ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Importar los ajustes para Advanced Scene Switcher ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Importar los ajustes para Advanced Scene Switcher ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Archivos de texto (*.txt)"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Archivos de texto (*.txt *.json)"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="La importacion la configuracion de escenas fallo"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="La importacion la configuracion de escenas fallo"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Configuración de escenas importada correctamente"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Configuración de escenas importada correctamente"
|
||||||
AdvSceneSwitcher.generalTab.priority.fileContent="Contenido del archivo"
|
AdvSceneSwitcher.generalTab.priority.fileContent="Contenido del archivo"
|
||||||
@@ -155,12 +154,12 @@ AdvSceneSwitcher.condition.video.patternMatchSuccess="El patrón está resaltado
|
|||||||
AdvSceneSwitcher.condition.video.objectMatchFail="¡No se encontró el objeto!"
|
AdvSceneSwitcher.condition.video.objectMatchFail="¡No se encontró el objeto!"
|
||||||
AdvSceneSwitcher.condition.video.objectMatchSuccess="El objeto está resaltado en rojo"
|
AdvSceneSwitcher.condition.video.objectMatchSuccess="El objeto está resaltado en rojo"
|
||||||
AdvSceneSwitcher.condition.video.modelLoadFail="¡No se pudieron cargar los datos del modelo!"
|
AdvSceneSwitcher.condition.video.modelLoadFail="¡No se pudieron cargar los datos del modelo!"
|
||||||
AdvSceneSwitcher.condition.video.entry="{{videoInputTypes}}{{sources}}{{scenes}}{{condition}}{{imagePath}}"
|
AdvSceneSwitcher.condition.video.layout="{{videoInputTypes}}{{sources}}{{scenes}}{{condition}}{{imagePath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.modelPath="Datos del modelo (haar cascade classifier): {{modelDataPath}}"
|
AdvSceneSwitcher.condition.video.layout.modelPath="Datos del modelo (haar cascade classifier): {{modelDataPath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.minNeighbor="Mínimo de vecinos: {{minNeighbors}}"
|
AdvSceneSwitcher.condition.video.layout.minNeighbor="Mínimo de vecinos: {{minNeighbors}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.throttle="{{throttleEnable}}Reduzca la carga de la CPU realizando una comprobación solo cada {{throttleCount}} milisegundos"
|
AdvSceneSwitcher.condition.video.layout.throttle="{{throttleEnable}}Reduzca la carga de la CPU realizando una comprobación solo cada {{throttleCount}} milisegundos"
|
||||||
AdvSceneSwitcher.condition.video.entry.checkAreaEnable="Realizar comprobación solo en el área"
|
AdvSceneSwitcher.condition.video.layout.checkAreaEnable="Realizar comprobación solo en el área"
|
||||||
AdvSceneSwitcher.condition.video.entry.checkArea="{{checkAreaEnable}}Realizar comprobación solo en el área {{checkArea}} {{selectArea}}"
|
AdvSceneSwitcher.condition.video.layout.checkArea="{{checkAreaEnable}}Realizar comprobación solo en el área {{checkArea}} {{selectArea}}"
|
||||||
AdvSceneSwitcher.condition.video.minSize="Tamaño mínimo:"
|
AdvSceneSwitcher.condition.video.minSize="Tamaño mínimo:"
|
||||||
AdvSceneSwitcher.condition.video.maxSize="Tamaño máximo:"
|
AdvSceneSwitcher.condition.video.maxSize="Tamaño máximo:"
|
||||||
AdvSceneSwitcher.condition.video.selectArea="Seleccionar área"
|
AdvSceneSwitcher.condition.video.selectArea="Seleccionar área"
|
||||||
@@ -438,7 +437,6 @@ AdvSceneSwitcher.action.random="Aleatorio"
|
|||||||
AdvSceneSwitcher.action.random.entry="Ejecute aleatoriamente cualquiera de las siguientes macros (las macros en pausa se ignoran)"
|
AdvSceneSwitcher.action.random.entry="Ejecute aleatoriamente cualquiera de las siguientes macros (las macros en pausa se ignoran)"
|
||||||
AdvSceneSwitcher.action.systray="Notificación de la bandeja del sistema"
|
AdvSceneSwitcher.action.systray="Notificación de la bandeja del sistema"
|
||||||
AdvSceneSwitcher.action.screenshot="Captura de pantalla"
|
AdvSceneSwitcher.action.screenshot="Captura de pantalla"
|
||||||
AdvSceneSwitcher.action.screenshot.mainOutput="Salida principal de OBS"
|
|
||||||
AdvSceneSwitcher.action.profile="Perfil"
|
AdvSceneSwitcher.action.profile="Perfil"
|
||||||
AdvSceneSwitcher.action.profile.entry="Cambiar perfil activo a {{profiles}}"
|
AdvSceneSwitcher.action.profile.entry="Cambiar perfil activo a {{profiles}}"
|
||||||
AdvSceneSwitcher.action.sceneCollection="Colección de escenas"
|
AdvSceneSwitcher.action.sceneCollection="Colección de escenas"
|
||||||
@@ -642,9 +640,9 @@ AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey="Alternar inicio / detenci
|
|||||||
AdvSceneSwitcher.hotkey.macro.pause="Pausar macro %1"
|
AdvSceneSwitcher.hotkey.macro.pause="Pausar macro %1"
|
||||||
AdvSceneSwitcher.hotkey.macro.unpause="Despausar macro %1"
|
AdvSceneSwitcher.hotkey.macro.unpause="Despausar macro %1"
|
||||||
AdvSceneSwitcher.hotkey.macro.togglePause="Alternar pausa de macro %1"
|
AdvSceneSwitcher.hotkey.macro.togglePause="Alternar pausa de macro %1"
|
||||||
AdvSceneSwitcher.hotkey.upMacroSegmentHotkey="Mover selección de segmento de macro hacia arriba"
|
AdvSceneSwitcher.hotkey.macro.segment.up="Mover selección de segmento de macro hacia arriba"
|
||||||
AdvSceneSwitcher.hotkey.downMacroSegmentHotkey="Mover selección de segmento de macro hacia abajo"
|
AdvSceneSwitcher.hotkey.macro.segment.down="Mover selección de segmento de macro hacia abajo"
|
||||||
AdvSceneSwitcher.hotkey.removeMacroSegmentHotkey="Eliminar segmento de macro seleccionado"
|
AdvSceneSwitcher.hotkey.macro.segment.remove="Eliminar segmento de macro seleccionado"
|
||||||
|
|
||||||
AdvSceneSwitcher.askBackup="Se detectó una nueva versión de Advanced Scene Switcher.\n¿Crear una copia de seguridad de la configuración anterior?"
|
AdvSceneSwitcher.askBackup="Se detectó una nueva versión de Advanced Scene Switcher.\n¿Crear una copia de seguridad de la configuración anterior?"
|
||||||
AdvSceneSwitcher.askForMacro="Select macro {{macroSelection}}"
|
AdvSceneSwitcher.askForMacro="Select macro {{macroSelection}}"
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchToRandom="Basculer v
|
|||||||
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Basculer vers :"
|
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Basculer vers :"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.cooldown="Après avoir effectué des actions, sauter l'exécution d'actions pendant"
|
AdvSceneSwitcher.generalTab.generalBehavior.cooldown="Après avoir effectué des actions, sauter l'exécution d'actions pendant"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="Pendant cette période, les correspondances potentielles seront ignorées !"
|
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="Pendant cette période, les correspondances potentielles seront ignorées !"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.verboseLogging="Activer les journaux détaillés"
|
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Enregistrer la position et la taille de la fenêtre"
|
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Enregistrer la position et la taille de la fenêtre"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Afficher les notifications dans la zone de notification système"
|
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Afficher les notifications dans la zone de notification système"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Désactiver les indications de l'interface utilisateur"
|
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Désactiver les indications de l'interface utilisateur"
|
||||||
@@ -44,7 +43,7 @@ AdvSceneSwitcher.generalTab.saveOrLoadsettings.export="Exporter"
|
|||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Importer"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Importer"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Exporter les paramètres d'Advanced Scene Switcher vers un fichier ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Exporter les paramètres d'Advanced Scene Switcher vers un fichier ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Importer les paramètres d'Advanced Scene Switcher depuis un fichier ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Importer les paramètres d'Advanced Scene Switcher depuis un fichier ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Fichiers texte (*.txt)"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Fichiers texte (*.txt *.json)"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="L'importation des paramètres d'Advanced Scene Switcher a échoué"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="L'importation des paramètres d'Advanced Scene Switcher a échoué"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Les paramètres d'Advanced Scene Switcher ont été importés avec succès"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Les paramètres d'Advanced Scene Switcher ont été importés avec succès"
|
||||||
AdvSceneSwitcher.generalTab.priority.fileContent="Contenu du fichier"
|
AdvSceneSwitcher.generalTab.priority.fileContent="Contenu du fichier"
|
||||||
@@ -258,14 +257,14 @@ AdvSceneSwitcher.condition.video.colorDeviationThresholdDescription="À quel poi
|
|||||||
AdvSceneSwitcher.condition.video.type.main="Sortie principale d'OBS"
|
AdvSceneSwitcher.condition.video.type.main="Sortie principale d'OBS"
|
||||||
AdvSceneSwitcher.condition.video.type.source="Source"
|
AdvSceneSwitcher.condition.video.type.source="Source"
|
||||||
AdvSceneSwitcher.condition.video.type.scene="Scène"
|
AdvSceneSwitcher.condition.video.type.scene="Scène"
|
||||||
AdvSceneSwitcher.condition.video.entry.modelPath="Données du modèle (classificateur de cascade de Haar) :{{modelDataPath}}"
|
AdvSceneSwitcher.condition.video.layout.modelPath="Données du modèle (classificateur de cascade de Haar) :{{modelDataPath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.minNeighbor="Nombre minimum de voisins :{{minNeighbors}}"
|
AdvSceneSwitcher.condition.video.layout.minNeighbor="Nombre minimum de voisins :{{minNeighbors}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.throttle="{{throttleEnable}}Réduire la charge CPU en effectuant la vérification uniquement toutes les{{throttleCount}}millisecondes"
|
AdvSceneSwitcher.condition.video.layout.throttle="{{throttleEnable}}Réduire la charge CPU en effectuant la vérification uniquement toutes les{{throttleCount}}millisecondes"
|
||||||
AdvSceneSwitcher.condition.video.entry.checkAreaEnable="Effectuer la vérification uniquement dans la zone"
|
AdvSceneSwitcher.condition.video.layout.checkAreaEnable="Effectuer la vérification uniquement dans la zone"
|
||||||
AdvSceneSwitcher.condition.video.entry.orcColorPick="Vérifier la couleur du texte :{{textColor}}{{selectColor}}"
|
AdvSceneSwitcher.condition.video.layout.ocrColorPick="Vérifier la couleur du texte :{{textColor}}{{selectColor}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.orcTextType="Vérifier le type de texte :{{textType}}"
|
AdvSceneSwitcher.condition.video.layout.ocrTextType="Vérifier le type de texte :{{textType}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.orcLanguage="Vérifier la langue :{{languageCode}}"
|
AdvSceneSwitcher.condition.video.layout.ocrLanguage="Vérifier la langue :{{languageCode}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.color="Vérifier la couleur :{{color}}{{selectColor}}"
|
AdvSceneSwitcher.condition.video.layout.color="Vérifier la couleur :{{color}}{{selectColor}}"
|
||||||
AdvSceneSwitcher.condition.video.minSize="Taille minimale :"
|
AdvSceneSwitcher.condition.video.minSize="Taille minimale :"
|
||||||
AdvSceneSwitcher.condition.video.maxSize="Taille maximale :"
|
AdvSceneSwitcher.condition.video.maxSize="Taille maximale :"
|
||||||
AdvSceneSwitcher.condition.video.selectArea="Sélectionner la zone"
|
AdvSceneSwitcher.condition.video.selectArea="Sélectionner la zone"
|
||||||
@@ -647,7 +646,6 @@ AdvSceneSwitcher.action.screenshot.save.default="Par défaut"
|
|||||||
AdvSceneSwitcher.action.screenshot.save.custom="Personnalisé"
|
AdvSceneSwitcher.action.screenshot.save.custom="Personnalisé"
|
||||||
AdvSceneSwitcher.action.screenshot.type.source="Source"
|
AdvSceneSwitcher.action.screenshot.type.source="Source"
|
||||||
AdvSceneSwitcher.action.screenshot.type.scene="Scène"
|
AdvSceneSwitcher.action.screenshot.type.scene="Scène"
|
||||||
AdvSceneSwitcher.action.screenshot.mainOutput="Sortie principale d'OBS"
|
|
||||||
AdvSceneSwitcher.action.screenshot.blackscreenNote="Les sources ou les scènes qui ne sont pas toujours rendues peuvent entraîner des parties de captures d'écran vides."
|
AdvSceneSwitcher.action.screenshot.blackscreenNote="Les sources ou les scènes qui ne sont pas toujours rendues peuvent entraîner des parties de captures d'écran vides."
|
||||||
AdvSceneSwitcher.action.screenshot.entry="Capturer{{targetType}}{{sources}}{{scenes}}et enregistrer à l'emplacement{{saveType}}{{variables}}"
|
AdvSceneSwitcher.action.screenshot.entry="Capturer{{targetType}}{{sources}}{{scenes}}et enregistrer à l'emplacement{{saveType}}{{variables}}"
|
||||||
AdvSceneSwitcher.action.profile="Profil"
|
AdvSceneSwitcher.action.profile="Profil"
|
||||||
@@ -705,10 +703,10 @@ AdvSceneSwitcher.action.variable.invalidSelection="Sélection invalide !"
|
|||||||
AdvSceneSwitcher.action.variable.actionNoVariableSupport="La récupération de valeurs de variables à partir d'actions %1 n'est pas prise en charge !"
|
AdvSceneSwitcher.action.variable.actionNoVariableSupport="La récupération de valeurs de variables à partir d'actions %1 n'est pas prise en charge !"
|
||||||
AdvSceneSwitcher.action.variable.conditionNoVariableSupport="La récupération de valeurs de variables à partir de conditions %1 n'est pas prise en charge !"
|
AdvSceneSwitcher.action.variable.conditionNoVariableSupport="La récupération de valeurs de variables à partir de conditions %1 n'est pas prise en charge !"
|
||||||
AdvSceneSwitcher.action.variable.currentSegmentValue="Valeur actuelle :"
|
AdvSceneSwitcher.action.variable.currentSegmentValue="Valeur actuelle :"
|
||||||
AdvSceneSwitcher.action.variable.entry.substringIndex="Début de la sous-chaîne :{{subStringStart}}Taille de la sous-chaîne :{{subStringSize}}"
|
AdvSceneSwitcher.action.variable.layout.substringIndex="Début de la sous-chaîne :{{subStringStart}}Taille de la sous-chaîne :{{subStringSize}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.substringRegex="Attribuer la valeur du match{{regexMatchIdx}}en utilisant une expression régulière :"
|
AdvSceneSwitcher.action.variable.layout.substringRegex="Attribuer la valeur du match{{regexMatchIdx}}en utilisant une expression régulière :"
|
||||||
AdvSceneSwitcher.action.variable.entry.userInput.customPrompt="{{useCustomPrompt}}Utiliser un message personnalisé{{inputPrompt}}"
|
AdvSceneSwitcher.action.variable.layout.userInput.customPrompt="{{useCustomPrompt}}Utiliser un message personnalisé{{inputPrompt}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.userInput.placeholder="{{useInputPlaceholder}}Remplir avec un indicateur de position{{inputPlaceholder}}"
|
AdvSceneSwitcher.action.variable.layout.userInput.placeholder="{{useInputPlaceholder}}Remplir avec un indicateur de position{{inputPlaceholder}}"
|
||||||
AdvSceneSwitcher.action.projector="Projecteur"
|
AdvSceneSwitcher.action.projector="Projecteur"
|
||||||
AdvSceneSwitcher.action.projector.type.source="Source"
|
AdvSceneSwitcher.action.projector.type.source="Source"
|
||||||
AdvSceneSwitcher.action.projector.type.scene="Scène"
|
AdvSceneSwitcher.action.projector.type.scene="Scène"
|
||||||
@@ -718,8 +716,6 @@ AdvSceneSwitcher.action.projector.type.multiview="Multivue"
|
|||||||
AdvSceneSwitcher.action.projector.display="Affichage"
|
AdvSceneSwitcher.action.projector.display="Affichage"
|
||||||
AdvSceneSwitcher.action.projector.windowed="Fenêtré"
|
AdvSceneSwitcher.action.projector.windowed="Fenêtré"
|
||||||
AdvSceneSwitcher.action.projector.fullscreen="Plein écran"
|
AdvSceneSwitcher.action.projector.fullscreen="Plein écran"
|
||||||
AdvSceneSwitcher.action.projector.entry="Ouvrir le projecteur{{windowTypes}}de{{types}}{{scenes}}{{sources}}"
|
|
||||||
AdvSceneSwitcher.action.projector.entry.monitor="sur{{monitors}}"
|
|
||||||
AdvSceneSwitcher.action.midi="MIDI"
|
AdvSceneSwitcher.action.midi="MIDI"
|
||||||
AdvSceneSwitcher.action.midi.entry="Envoyer un message à{{device}}:"
|
AdvSceneSwitcher.action.midi.entry="Envoyer un message à{{device}}:"
|
||||||
AdvSceneSwitcher.action.midi.entry.listen="Définir la sélection de messages MIDI sur les messages entrants de{{listenDevices}}:{{listenButton}}"
|
AdvSceneSwitcher.action.midi.entry.listen="Définir la sélection de messages MIDI sur les messages entrants de{{listenDevices}}:{{listenButton}}"
|
||||||
@@ -924,9 +920,9 @@ AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey="Basculer le démarrage/ar
|
|||||||
AdvSceneSwitcher.hotkey.macro.pause="Mettre en pause la macro %1"
|
AdvSceneSwitcher.hotkey.macro.pause="Mettre en pause la macro %1"
|
||||||
AdvSceneSwitcher.hotkey.macro.unpause="Reprendre la macro %1"
|
AdvSceneSwitcher.hotkey.macro.unpause="Reprendre la macro %1"
|
||||||
AdvSceneSwitcher.hotkey.macro.togglePause="Basculer la pause de la macro %1"
|
AdvSceneSwitcher.hotkey.macro.togglePause="Basculer la pause de la macro %1"
|
||||||
AdvSceneSwitcher.hotkey.upMacroSegmentHotkey="Déplacer la sélection du segment de macro vers le haut"
|
AdvSceneSwitcher.hotkey.macro.segment.up="Déplacer la sélection du segment de macro vers le haut"
|
||||||
AdvSceneSwitcher.hotkey.downMacroSegmentHotkey="Déplacer la sélection du segment de macro vers le bas"
|
AdvSceneSwitcher.hotkey.macro.segment.down="Déplacer la sélection du segment de macro vers le bas"
|
||||||
AdvSceneSwitcher.hotkey.removeMacroSegmentHotkey="Supprimer le segment de macro sélectionné"
|
AdvSceneSwitcher.hotkey.macro.segment.remove="Supprimer le segment de macro sélectionné"
|
||||||
|
|
||||||
AdvSceneSwitcher.askBackup="Une nouvelle version du commutateur de scènes avancé a été détectée.\nSouhaitez-vous créer une sauvegarde des anciens paramètres ?"
|
AdvSceneSwitcher.askBackup="Une nouvelle version du commutateur de scènes avancé a été détectée.\nSouhaitez-vous créer une sauvegarde des anciens paramètres ?"
|
||||||
AdvSceneSwitcher.askForMacro="Sélectionnez la macro{{macroSelection}}"
|
AdvSceneSwitcher.askForMacro="Sélectionnez la macro{{macroSelection}}"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,6 @@ AdvSceneSwitcher.generalTab.generalBehavior.logLevel="Nível de log:"
|
|||||||
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.default="Padrão"
|
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.default="Padrão"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.logAction="Registrar ações executadas"
|
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.logAction="Registrar ações executadas"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.verbose="Registro detalhado"
|
AdvSceneSwitcher.generalTab.generalBehavior.logLevel.verbose="Registro detalhado"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.verboseLogging="Ativar registro detalhado"
|
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Salvar posição e tamanho da janela"
|
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Salvar posição e tamanho da janela"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Mostrar notificações na área de notificação"
|
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Mostrar notificações na área de notificação"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Desativar dicas de interface"
|
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Desativar dicas de interface"
|
||||||
@@ -49,7 +48,7 @@ AdvSceneSwitcher.generalTab.saveOrLoadsettings.export="Exportar"
|
|||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Importar"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Importar"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Exportar configurações do Advanced Scene Switcher para arquivo ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Exportar configurações do Advanced Scene Switcher para arquivo ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Importar configurações do Advanced Scene Switcher de arquivo ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Importar configurações do Advanced Scene Switcher de arquivo ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Arquivos de texto (*.txt)"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Arquivos de texto (*.txt *.json)"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="O Advanced Scene Switcher falhou ao importar configurações"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="O Advanced Scene Switcher falhou ao importar configurações"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Configurações do Advanced Scene Switcher importadas com sucesso"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Configurações do Advanced Scene Switcher importadas com sucesso"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportSensitiveDataWarning="Aviso:\nOs dados exportados podem conter informações sensíveis!"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportSensitiveDataWarning="Aviso:\nOs dados exportados podem conter informações sensíveis!"
|
||||||
@@ -373,16 +372,16 @@ AdvSceneSwitcher.condition.video.colorDeviationThresholdDescription="Quão semel
|
|||||||
AdvSceneSwitcher.condition.video.type.main="Saída principal do OBS"
|
AdvSceneSwitcher.condition.video.type.main="Saída principal do OBS"
|
||||||
AdvSceneSwitcher.condition.video.type.source="Fonte"
|
AdvSceneSwitcher.condition.video.type.source="Fonte"
|
||||||
AdvSceneSwitcher.condition.video.type.scene="Cena"
|
AdvSceneSwitcher.condition.video.type.scene="Cena"
|
||||||
AdvSceneSwitcher.condition.video.entry="{{videoInputTypes}}{{sources}}{{scenes}}{{condition}}{{imagePath}}"
|
AdvSceneSwitcher.condition.video.layout="{{videoInputTypes}}{{sources}}{{scenes}}{{condition}}{{imagePath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.modelPath="Dados do modelo (classificador em cascata haar):{{modelDataPath}}"
|
AdvSceneSwitcher.condition.video.layout.modelPath="Dados do modelo (classificador em cascata haar):{{modelDataPath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.minNeighbor="Vizinhos mínimos:{{minNeighbors}}"
|
AdvSceneSwitcher.condition.video.layout.minNeighbor="Vizinhos mínimos:{{minNeighbors}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.throttle="{{throttleEnable}}Reduzir carga de CPU realizando a verificação apenas a cada {{throttleCount}} milissegundos"
|
AdvSceneSwitcher.condition.video.layout.throttle="{{throttleEnable}}Reduzir carga de CPU realizando a verificação apenas a cada {{throttleCount}} milissegundos"
|
||||||
AdvSceneSwitcher.condition.video.entry.checkAreaEnable="Realizar verificação apenas na área"
|
AdvSceneSwitcher.condition.video.layout.checkAreaEnable="Realizar verificação apenas na área"
|
||||||
AdvSceneSwitcher.condition.video.entry.checkArea="{{checkAreaEnable}}{{checkArea}}{{selectArea}}"
|
AdvSceneSwitcher.condition.video.layout.checkArea="{{checkAreaEnable}}{{checkArea}}{{selectArea}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.orcColorPick="Verificar cor do texto:{{textColor}}{{selectColor}}"
|
AdvSceneSwitcher.condition.video.layout.ocrColorPick="Verificar cor do texto:{{textColor}}{{selectColor}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.orcTextType="Verificar tipo de texto:{{textType}}"
|
AdvSceneSwitcher.condition.video.layout.ocrTextType="Verificar tipo de texto:{{textType}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.orcLanguage="Verificar idioma:{{languageCode}}"
|
AdvSceneSwitcher.condition.video.layout.ocrLanguage="Verificar idioma:{{languageCode}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.color="Verificar cor:{{color}}{{selectColor}}"
|
AdvSceneSwitcher.condition.video.layout.color="Verificar cor:{{color}}{{selectColor}}"
|
||||||
AdvSceneSwitcher.condition.video.minSize="Tamanho mínimo:"
|
AdvSceneSwitcher.condition.video.minSize="Tamanho mínimo:"
|
||||||
AdvSceneSwitcher.condition.video.maxSize="Tamanho máximo:"
|
AdvSceneSwitcher.condition.video.maxSize="Tamanho máximo:"
|
||||||
AdvSceneSwitcher.condition.video.selectArea="Selecionar área"
|
AdvSceneSwitcher.condition.video.selectArea="Selecionar área"
|
||||||
@@ -960,7 +959,6 @@ AdvSceneSwitcher.action.screenshot.save.default="Padrão"
|
|||||||
AdvSceneSwitcher.action.screenshot.save.custom="Personalizado"
|
AdvSceneSwitcher.action.screenshot.save.custom="Personalizado"
|
||||||
AdvSceneSwitcher.action.screenshot.type.source="Fonte"
|
AdvSceneSwitcher.action.screenshot.type.source="Fonte"
|
||||||
AdvSceneSwitcher.action.screenshot.type.scene="Cena"
|
AdvSceneSwitcher.action.screenshot.type.scene="Cena"
|
||||||
AdvSceneSwitcher.action.screenshot.mainOutput="Saída principal do OBS"
|
|
||||||
AdvSceneSwitcher.action.screenshot.blackscreenNote="Fontes ou cenas, que nem sempre são renderizadas, podem resultar em algumas partes das capturas de tela permanecendo em branco."
|
AdvSceneSwitcher.action.screenshot.blackscreenNote="Fontes ou cenas, que nem sempre são renderizadas, podem resultar em algumas partes das capturas de tela permanecendo em branco."
|
||||||
AdvSceneSwitcher.action.screenshot.entry="Captura de tela{{targetType}}{{sources}}{{scenes}}e salvar em{{saveType}}{{variables}}localização"
|
AdvSceneSwitcher.action.screenshot.entry="Captura de tela{{targetType}}{{sources}}{{scenes}}e salvar em{{saveType}}{{variables}}localização"
|
||||||
AdvSceneSwitcher.action.profile="Perfil"
|
AdvSceneSwitcher.action.profile="Perfil"
|
||||||
@@ -1013,7 +1011,7 @@ AdvSceneSwitcher.action.variable.type.askForValue="Obter entrada do usuário"
|
|||||||
AdvSceneSwitcher.action.variable.type.environmentVariable="Definir valor da variável de ambiente"
|
AdvSceneSwitcher.action.variable.type.environmentVariable="Definir valor da variável de ambiente"
|
||||||
AdvSceneSwitcher.action.variable.type.sceneItemCount="Definir para contagem de itens de cena"
|
AdvSceneSwitcher.action.variable.type.sceneItemCount="Definir para contagem de itens de cena"
|
||||||
AdvSceneSwitcher.action.variable.type.stringLength="Definir comprimento da string"
|
AdvSceneSwitcher.action.variable.type.stringLength="Definir comprimento da string"
|
||||||
AdvSceneSwitcher.action.variable.type.extractJson="Extrair campo json com nome"
|
AdvSceneSwitcher.action.variable.type.extractJsonField="Extrair campo json com nome"
|
||||||
AdvSceneSwitcher.action.variable.type.setToTempvar="Definir para propriedade da macro"
|
AdvSceneSwitcher.action.variable.type.setToTempvar="Definir para propriedade da macro"
|
||||||
AdvSceneSwitcher.action.variable.type.setToTempvar.help="Este tipo de ação permite extrair valores de segmentos da macro atual e atribuir esses valores à variável selecionada.\nPor exemplo, você pode obter o nome da cena atual de uma condição de cena e atribuir esse nome a uma variável."
|
AdvSceneSwitcher.action.variable.type.setToTempvar.help="Este tipo de ação permite extrair valores de segmentos da macro atual e atribuir esses valores à variável selecionada.\nPor exemplo, você pode obter o nome da cena atual de uma condição de cena e atribuir esse nome a uma variável."
|
||||||
AdvSceneSwitcher.action.variable.type.sceneItemName="Definir para nome do item de cena no índice"
|
AdvSceneSwitcher.action.variable.type.sceneItemName="Definir para nome do item de cena no índice"
|
||||||
@@ -1033,13 +1031,13 @@ AdvSceneSwitcher.action.variable.invalidSelection="Seleção inválida!"
|
|||||||
AdvSceneSwitcher.action.variable.actionNoVariableSupport="Obter valores de variáveis das ações %1 não é suportado!"
|
AdvSceneSwitcher.action.variable.actionNoVariableSupport="Obter valores de variáveis das ações %1 não é suportado!"
|
||||||
AdvSceneSwitcher.action.variable.conditionNoVariableSupport="Obter valores de variáveis das condições %1 não é suportado!"
|
AdvSceneSwitcher.action.variable.conditionNoVariableSupport="Obter valores de variáveis das condições %1 não é suportado!"
|
||||||
AdvSceneSwitcher.action.variable.currentSegmentValue="Valor atual:"
|
AdvSceneSwitcher.action.variable.currentSegmentValue="Valor atual:"
|
||||||
AdvSceneSwitcher.action.variable.entry.pad="{{actions}}de{{variables}}para comprimento{{stringLength}}adicionando{{paddingCharSelection}}ao{{direction}}"
|
AdvSceneSwitcher.action.variable.layout.pad="{{actions}}de{{variables}}para comprimento{{stringLength}}adicionando{{paddingCharSelection}}ao{{direction}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.truncate="{{actions}}de{{variables}}para comprimento{{stringLength}}removendo caracteres da{{direction}}"
|
AdvSceneSwitcher.action.variable.layout.truncate="{{actions}}de{{variables}}para comprimento{{stringLength}}removendo caracteres da{{direction}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.substringIndex="Início da substring:{{subStringStart}}Tamanho da substring:{{subStringSize}}"
|
AdvSceneSwitcher.action.variable.layout.substringIndex="Início da substring:{{subStringStart}}Tamanho da substring:{{subStringSize}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.substringRegex="Atribuir valor do{{regexMatchIdx}}correspondência usando expressão regular:"
|
AdvSceneSwitcher.action.variable.layout.substringRegex="Atribuir valor do{{regexMatchIdx}}correspondência usando expressão regular:"
|
||||||
AdvSceneSwitcher.action.variable.entry.findAndReplace="{{findStr}}{{findRegex}}{{replaceStr}}"
|
AdvSceneSwitcher.action.variable.layout.findAndReplace="{{findStr}}{{findRegex}}{{replaceStr}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.userInput.customPrompt="{{useCustomPrompt}}Usar prompt personalizado{{inputPrompt}}"
|
AdvSceneSwitcher.action.variable.layout.userInput.customPrompt="{{useCustomPrompt}}Usar prompt personalizado{{inputPrompt}}"
|
||||||
AdvSceneSwitcher.action.variable.entry.userInput.placeholder="{{useInputPlaceholder}}Preencher com placeholder{{inputPlaceholder}}"
|
AdvSceneSwitcher.action.variable.layout.userInput.placeholder="{{useInputPlaceholder}}Preencher com placeholder{{inputPlaceholder}}"
|
||||||
AdvSceneSwitcher.action.projector="Projetor"
|
AdvSceneSwitcher.action.projector="Projetor"
|
||||||
AdvSceneSwitcher.action.projector.type.source="Fonte"
|
AdvSceneSwitcher.action.projector.type.source="Fonte"
|
||||||
AdvSceneSwitcher.action.projector.type.scene="Cena"
|
AdvSceneSwitcher.action.projector.type.scene="Cena"
|
||||||
@@ -1049,8 +1047,6 @@ AdvSceneSwitcher.action.projector.type.multiview="Multivisão"
|
|||||||
AdvSceneSwitcher.action.projector.display="Exibição"
|
AdvSceneSwitcher.action.projector.display="Exibição"
|
||||||
AdvSceneSwitcher.action.projector.windowed="Janela"
|
AdvSceneSwitcher.action.projector.windowed="Janela"
|
||||||
AdvSceneSwitcher.action.projector.fullscreen="Tela cheia"
|
AdvSceneSwitcher.action.projector.fullscreen="Tela cheia"
|
||||||
AdvSceneSwitcher.action.projector.entry="Abrir{{windowTypes}}projetor de{{types}}{{scenes}}{{sources}}"
|
|
||||||
AdvSceneSwitcher.action.projector.entry.monitor="em{{monitors}}"
|
|
||||||
AdvSceneSwitcher.action.midi="MIDI"
|
AdvSceneSwitcher.action.midi="MIDI"
|
||||||
AdvSceneSwitcher.action.midi.entry="Enviar mensagem para{{device}}:"
|
AdvSceneSwitcher.action.midi.entry="Enviar mensagem para{{device}}:"
|
||||||
AdvSceneSwitcher.action.midi.entry.listen="Definir seleção de mensagem MIDI para mensagens recebidas em{{listenDevices}}:{{listenButton}}"
|
AdvSceneSwitcher.action.midi.entry.listen="Definir seleção de mensagem MIDI para mensagens recebidas em{{listenDevices}}:{{listenButton}}"
|
||||||
@@ -1070,10 +1066,10 @@ AdvSceneSwitcher.action.twitch.type.clip.create="Criar clipe da transmissão"
|
|||||||
AdvSceneSwitcher.action.twitch.type.chat.announcement.send="Enviar anúncio de chat"
|
AdvSceneSwitcher.action.twitch.type.chat.announcement.send="Enviar anúncio de chat"
|
||||||
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.enable="Habilitar modo apenas emotes no chat"
|
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.enable="Habilitar modo apenas emotes no chat"
|
||||||
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.disable="Desabilitar modo apenas emotes no chat"
|
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.disable="Desabilitar modo apenas emotes no chat"
|
||||||
AdvSceneSwitcher.action.twitch.type.sendChatMessage="Enviar mensagem de chat"
|
AdvSceneSwitcher.action.twitch.type.chat.sendMessage="Enviar mensagem de chat"
|
||||||
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="Não é possível selecionar categoria sem selecionar uma conta Twitch primeiro!"
|
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="Não é possível selecionar categoria sem selecionar uma conta Twitch primeiro!"
|
||||||
AdvSceneSwitcher.action.twitch.entry.default="Em{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}"
|
AdvSceneSwitcher.action.twitch.entry.default="Em{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}{{pointsReward}}"
|
||||||
AdvSceneSwitcher.action.twitch.entry.chat="Usando conta{{account}}{{actions}}em{{channel}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}"
|
AdvSceneSwitcher.action.twitch.entry.chat="Usando conta{{account}}{{actions}}em{{channel}}"
|
||||||
AdvSceneSwitcher.action.twitch.title.title="Digite o título"
|
AdvSceneSwitcher.action.twitch.title.title="Digite o título"
|
||||||
AdvSceneSwitcher.action.twitch.marker.description="Descreva o marcador"
|
AdvSceneSwitcher.action.twitch.marker.description="Descreva o marcador"
|
||||||
AdvSceneSwitcher.action.twitch.clip.hasDelay="Adicionar um leve atraso antes de capturar o clipe"
|
AdvSceneSwitcher.action.twitch.clip.hasDelay="Adicionar um leve atraso antes de capturar o clipe"
|
||||||
@@ -1115,9 +1111,9 @@ AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey="Alternar Iniciar/Parar pa
|
|||||||
AdvSceneSwitcher.hotkey.macro.pause="Pausar macro %1"
|
AdvSceneSwitcher.hotkey.macro.pause="Pausar macro %1"
|
||||||
AdvSceneSwitcher.hotkey.macro.unpause="Retomar macro %1"
|
AdvSceneSwitcher.hotkey.macro.unpause="Retomar macro %1"
|
||||||
AdvSceneSwitcher.hotkey.macro.togglePause="Alternar pausa da macro %1"
|
AdvSceneSwitcher.hotkey.macro.togglePause="Alternar pausa da macro %1"
|
||||||
AdvSceneSwitcher.hotkey.upMacroSegmentHotkey="Mover seleção de segmento de macro para cima"
|
AdvSceneSwitcher.hotkey.macro.segment.up="Mover seleção de segmento de macro para cima"
|
||||||
AdvSceneSwitcher.hotkey.downMacroSegmentHotkey="Mover seleção de segmento de macro para baixo"
|
AdvSceneSwitcher.hotkey.macro.segment.down="Mover seleção de segmento de macro para baixo"
|
||||||
AdvSceneSwitcher.hotkey.removeMacroSegmentHotkey="Remover segmento de macro selecionado"
|
AdvSceneSwitcher.hotkey.macro.segment.remove="Remover segmento de macro selecionado"
|
||||||
|
|
||||||
AdvSceneSwitcher.askBackup="Detectada uma nova versão do Advanced Scene Switcher.\nDeve ser criado um backup das configurações antigas?"
|
AdvSceneSwitcher.askBackup="Detectada uma nova versão do Advanced Scene Switcher.\nDeve ser criado um backup das configurações antigas?"
|
||||||
AdvSceneSwitcher.askForMacro="Selecionar macro{{macroSelection}}"
|
AdvSceneSwitcher.askForMacro="Selecionar macro{{macroSelection}}"
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.dontSwitch="Не пере
|
|||||||
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchToRandom="Переключиться на любую сцену на вкладке Random"
|
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchToRandom="Переключиться на любую сцену на вкладке Random"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Переключиться на:"
|
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Переключиться на:"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="В течение этого времени потенциальные совпадения будут игнорироваться!"
|
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="В течение этого времени потенциальные совпадения будут игнорироваться!"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.verboseLogging="Включить ведение подробного журнала"
|
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Сохранять положение и размер окна"
|
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Сохранять положение и размер окна"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Отключить подсказки пользовательского интерфейса"
|
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Отключить подсказки пользовательского интерфейса"
|
||||||
AdvSceneSwitcher.generalTab.priority="Приоритет"
|
AdvSceneSwitcher.generalTab.priority="Приоритет"
|
||||||
@@ -37,7 +36,7 @@ AdvSceneSwitcher.generalTab.saveOrLoadsettings.export="Экспорт"
|
|||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Импорт"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="Импорт"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Экспортировать настройки расширенного переключателя сцен в файл ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Экспортировать настройки расширенного переключателя сцен в файл ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Импортировать настройки Advanced Scene Switcher из файла ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Импортировать настройки Advanced Scene Switcher из файла ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Текстовые файлы (*.txt)"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Текстовые файлы (*.txt *.json)"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="Advanced Scene Switcher не удалось импортировать настройки"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="Advanced Scene Switcher не удалось импортировать настройки"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Настройки Advanced Scene Switcher импортированы успешно"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Настройки Advanced Scene Switcher импортированы успешно"
|
||||||
AdvSceneSwitcher.generalTab.priority.fileContent="Содержание файла"
|
AdvSceneSwitcher.generalTab.priority.fileContent="Содержание файла"
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchToRandom="Rastgele s
|
|||||||
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Değiştirmek:"
|
AdvSceneSwitcher.generalTab.generalBehavior.onNoMatch.switchTo="Değiştirmek:"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.cooldown="Bir eşleşmeden sonra aşağıdakiler için işlem yapmayın:"
|
AdvSceneSwitcher.generalTab.generalBehavior.cooldown="Bir eşleşmeden sonra aşağıdakiler için işlem yapmayın:"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="Bu süre zarfında olası eşleşmeler göz ardı edilecektir!"
|
AdvSceneSwitcher.generalTab.generalBehavior.cooldownHint="Bu süre zarfında olası eşleşmeler göz ardı edilecektir!"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.verboseLogging="Ayrıntılı günlük kaydını etkinleştir"
|
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Pencere konumunu ve boyutunu kaydet"
|
AdvSceneSwitcher.generalTab.generalBehavior.saveWindowGeo="Pencere konumunu ve boyutunu kaydet"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Sistem tepsisi bildirimlerini göster"
|
AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Sistem tepsisi bildirimlerini göster"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="UI ipuçlarını devre dışı bırak"
|
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="UI ipuçlarını devre dışı bırak"
|
||||||
@@ -39,7 +38,7 @@ AdvSceneSwitcher.generalTab.saveOrLoadsettings.export="Dışa Aktar"
|
|||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="İçe Aktar"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.import="İçe Aktar"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Gelişmiş Sahne Değiştirici ayarlarını dosyaya aktar ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.exportWindowTitle="Gelişmiş Sahne Değiştirici ayarlarını dosyaya aktar ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Gelişmiş Sahne Değiştirici ayarlarını dosyadan içe aktar ..."
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.importWindowTitle="Gelişmiş Sahne Değiştirici ayarlarını dosyadan içe aktar ..."
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Text dosyası (*.txt)"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.textType="Text dosyası (*.txt *.json)"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="Gelişmiş Sahne Değiştirici ayarları dosyadan içe aktarmakta başarısız oldu"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadFail="Gelişmiş Sahne Değiştirici ayarları dosyadan içe aktarmakta başarısız oldu"
|
||||||
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Gelişmiş Sahne Değiştirici ayarları başarılı bir şekilde dosyadan içe aktarıldı"
|
AdvSceneSwitcher.generalTab.saveOrLoadsettings.loadSuccess="Gelişmiş Sahne Değiştirici ayarları başarılı bir şekilde dosyadan içe aktarıldı"
|
||||||
AdvSceneSwitcher.generalTab.priority.fileContent="Dosya İçeriği"
|
AdvSceneSwitcher.generalTab.priority.fileContent="Dosya İçeriği"
|
||||||
@@ -140,10 +139,10 @@ AdvSceneSwitcher.condition.video.screenshotFail="Kaynağın ekran görüntüsü
|
|||||||
AdvSceneSwitcher.condition.video.patternMatchFail="Desen bulunamadı!"
|
AdvSceneSwitcher.condition.video.patternMatchFail="Desen bulunamadı!"
|
||||||
AdvSceneSwitcher.condition.video.objectMatchFail="Nesne bulunamadı!"
|
AdvSceneSwitcher.condition.video.objectMatchFail="Nesne bulunamadı!"
|
||||||
AdvSceneSwitcher.condition.video.modelLoadFail="Model verileri yüklenemedi!"
|
AdvSceneSwitcher.condition.video.modelLoadFail="Model verileri yüklenemedi!"
|
||||||
AdvSceneSwitcher.condition.video.entry="{{videoInputTypes}}{{sources}}{{scenes}}{{condition}}{{imagePath}}"
|
AdvSceneSwitcher.condition.video.layout="{{videoInputTypes}}{{sources}}{{scenes}}{{condition}}{{imagePath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.modelPath="Model verileri (haar kademeli sınıflandırıcı):{{modelDataPath}}"
|
AdvSceneSwitcher.condition.video.layout.modelPath="Model verileri (haar kademeli sınıflandırıcı):{{modelDataPath}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.minNeighbor="Minimum komşular: {{minNeighbors}}"
|
AdvSceneSwitcher.condition.video.layout.minNeighbor="Minimum komşular: {{minNeighbors}}"
|
||||||
AdvSceneSwitcher.condition.video.entry.throttle="{{throttleEnable}} Yalnızca her seferinde kontrol gerçekleştirerek CPU yükünü azaltın {{throttleCount}} millisaniyeler"
|
AdvSceneSwitcher.condition.video.layout.throttle="{{throttleEnable}} Yalnızca her seferinde kontrol gerçekleştirerek CPU yükünü azaltın {{throttleCount}} millisaniyeler"
|
||||||
AdvSceneSwitcher.condition.stream="Yayınlama"
|
AdvSceneSwitcher.condition.stream="Yayınlama"
|
||||||
AdvSceneSwitcher.condition.stream.state.start="Yayın çalışıyor"
|
AdvSceneSwitcher.condition.stream.state.start="Yayın çalışıyor"
|
||||||
AdvSceneSwitcher.condition.stream.state.stop="Yayın durdu"
|
AdvSceneSwitcher.condition.stream.state.stop="Yayın durdu"
|
||||||
@@ -356,7 +355,6 @@ AdvSceneSwitcher.action.random="Rastgele"
|
|||||||
AdvSceneSwitcher.action.random.entry="Aşağıdaki makrolardan herhangi birini rastgele çalıştırın (duraklatılmış makrolar yoksayılır)"
|
AdvSceneSwitcher.action.random.entry="Aşağıdaki makrolardan herhangi birini rastgele çalıştırın (duraklatılmış makrolar yoksayılır)"
|
||||||
AdvSceneSwitcher.action.systray="Sistem tepsisi bildirimi"
|
AdvSceneSwitcher.action.systray="Sistem tepsisi bildirimi"
|
||||||
AdvSceneSwitcher.action.screenshot="Ekran görüntüsü"
|
AdvSceneSwitcher.action.screenshot="Ekran görüntüsü"
|
||||||
AdvSceneSwitcher.action.screenshot.mainOutput="OBS'nin ana çıkışı"
|
|
||||||
AdvSceneSwitcher.action.profile="Profil"
|
AdvSceneSwitcher.action.profile="Profil"
|
||||||
AdvSceneSwitcher.action.profile.entry="Aktif profili şununla değiştir: {{profiles}}"
|
AdvSceneSwitcher.action.profile.entry="Aktif profili şununla değiştir: {{profiles}}"
|
||||||
AdvSceneSwitcher.action.sceneCollection="Sahne koleksiyonu"
|
AdvSceneSwitcher.action.sceneCollection="Sahne koleksiyonu"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
BIN
data/res/images/logo.ico
Normal file
BIN
data/res/images/logo.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
1
deps/date
vendored
Submodule
1
deps/date
vendored
Submodule
Submodule deps/date added at 5bdb7e6f31
13156
deps/exprtk/exprtk.hpp
vendored
13156
deps/exprtk/exprtk.hpp
vendored
File diff suppressed because it is too large
Load Diff
1
deps/jsoncons
vendored
Submodule
1
deps/jsoncons
vendored
Submodule
Submodule deps/jsoncons added at 64b9da1e9f
2
deps/libremidi
vendored
2
deps/libremidi
vendored
Submodule deps/libremidi updated: d6d6557b5b...73e6ea40de
1
deps/paho.mqtt.cpp
vendored
Submodule
1
deps/paho.mqtt.cpp
vendored
Submodule
Submodule deps/paho.mqtt.cpp added at 165476b1dc
@@ -181,28 +181,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="logLevel">
|
<widget class="QComboBox" name="logLevel"/>
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>AdvSceneSwitcher.generalTab.generalBehavior.logLevel.default</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>AdvSceneSwitcher.generalTab.generalBehavior.logLevel.logMacro</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>AdvSceneSwitcher.generalTab.generalBehavior.logLevel.logAction</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>AdvSceneSwitcher.generalTab.generalBehavior.logLevel.verbose</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_49">
|
<spacer name="horizontalSpacer_49">
|
||||||
@@ -315,6 +294,17 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="disableMacroWidgetCache">
|
||||||
|
<property name="text">
|
||||||
|
<string>AdvSceneSwitcher.generalTab.generalBehavior.disableMacroWidgetCache</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_26">
|
<layout class="QHBoxLayout" name="horizontalLayout_26">
|
||||||
<item>
|
<item>
|
||||||
@@ -800,7 +790,7 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QGroupBox" name="macroEdit">
|
<widget class="QGroupBox" name="macroEditGroup">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>AdvSceneSwitcher.macroTab.edit</string>
|
<string>AdvSceneSwitcher.macroTab.edit</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -906,339 +896,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSplitter" name="macroActionConditionSplitter">
|
<widget class="advss::MacroEdit" name="macroEdit" native="true"/>
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="macroConditions" native="true">
|
|
||||||
<layout class="QVBoxLayout" name="macroConditionsLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="advss::MacroSegmentList" name="conditionsList">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>1</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="conditionControlsLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="conditionAdd">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.conditionAddButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">addIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-plus</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="conditionRemove">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.conditionRemoveButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">removeIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-trash</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="conditionTop">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.conditionTopButton</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="conditionUp">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.conditionUpButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">upArrowIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-up</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="conditionDown">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.conditionDownButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">downArrowIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-down</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="conditionBottom">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.conditionBottomButton</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QSplitter" name="macroElseActionSplitter">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="macroActions" native="true">
|
|
||||||
<layout class="QVBoxLayout" name="macroActionsLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="advss::MacroSegmentList" name="actionsList">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>1</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="actionControlsLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="actionAdd">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.actionAddButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">addIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-plus</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="actionRemove">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.actionRemoveButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">removeIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-trash</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="actionTop">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.actionTopButton</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="actionUp">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.actionUpButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">upArrowIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-up</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="actionDown">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.actionDownButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">downArrowIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-down</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="actionBottom">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.actionBottomButton</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<spacer name="horizontalSpacer_14">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="toggleElseActions">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.toggleShowElseSection</string>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="macroElseActions" native="true">
|
|
||||||
<layout class="QVBoxLayout" name="macroElseActionsLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="advss::MacroSegmentList" name="elseActionsList">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>1</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="elseActionControlsLayout">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>9</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="elseActionAdd">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionAddButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">addIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-plus</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="elseActionRemove">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionRemoveButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">removeIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-trash</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="elseActionTop">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionTopButton</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="elseActionUp">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionUpButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">upArrowIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-up</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="elseActionDown">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionDownButton</string>
|
|
||||||
</property>
|
|
||||||
<property name="themeID" stdset="0">
|
|
||||||
<string notr="true">downArrowIconSmall</string>
|
|
||||||
</property>
|
|
||||||
<property name="class" stdset="0">
|
|
||||||
<string notr="true">icon-down</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="elseActionBottom">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionBottomButton</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -4450,12 +4108,6 @@
|
|||||||
<extends>QListView</extends>
|
<extends>QListView</extends>
|
||||||
<header>macro-tree.hpp</header>
|
<header>macro-tree.hpp</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>advss::MacroSegmentList</class>
|
|
||||||
<extends>QScrollArea</extends>
|
|
||||||
<header>macro-segment-list.hpp</header>
|
|
||||||
<container>1</container>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>advss::MacroRunButton</class>
|
<class>advss::MacroRunButton</class>
|
||||||
<extends>QPushButton</extends>
|
<extends>QPushButton</extends>
|
||||||
@@ -4466,6 +4118,12 @@
|
|||||||
<extends>QWidget</extends>
|
<extends>QWidget</extends>
|
||||||
<header>duration-control.hpp</header>
|
<header>duration-control.hpp</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>advss::MacroEdit</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>macro-edit.hpp</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>tabWidget</tabstop>
|
<tabstop>tabWidget</tabstop>
|
||||||
@@ -4502,28 +4160,7 @@
|
|||||||
<tabstop>runMacroInParallel</tabstop>
|
<tabstop>runMacroInParallel</tabstop>
|
||||||
<tabstop>runMacroOnChange</tabstop>
|
<tabstop>runMacroOnChange</tabstop>
|
||||||
<tabstop>macroSettings</tabstop>
|
<tabstop>macroSettings</tabstop>
|
||||||
<tabstop>conditionsList</tabstop>
|
<tabstop>macroEdit</tabstop>
|
||||||
<tabstop>conditionAdd</tabstop>
|
|
||||||
<tabstop>conditionRemove</tabstop>
|
|
||||||
<tabstop>conditionTop</tabstop>
|
|
||||||
<tabstop>conditionUp</tabstop>
|
|
||||||
<tabstop>conditionDown</tabstop>
|
|
||||||
<tabstop>conditionBottom</tabstop>
|
|
||||||
<tabstop>actionsList</tabstop>
|
|
||||||
<tabstop>actionAdd</tabstop>
|
|
||||||
<tabstop>actionRemove</tabstop>
|
|
||||||
<tabstop>actionTop</tabstop>
|
|
||||||
<tabstop>actionUp</tabstop>
|
|
||||||
<tabstop>actionDown</tabstop>
|
|
||||||
<tabstop>actionBottom</tabstop>
|
|
||||||
<tabstop>toggleElseActions</tabstop>
|
|
||||||
<tabstop>elseActionsList</tabstop>
|
|
||||||
<tabstop>elseActionAdd</tabstop>
|
|
||||||
<tabstop>elseActionRemove</tabstop>
|
|
||||||
<tabstop>elseActionTop</tabstop>
|
|
||||||
<tabstop>elseActionUp</tabstop>
|
|
||||||
<tabstop>elseActionDown</tabstop>
|
|
||||||
<tabstop>elseActionBottom</tabstop>
|
|
||||||
<tabstop>sceneGroups</tabstop>
|
<tabstop>sceneGroups</tabstop>
|
||||||
<tabstop>sceneGroupAdd</tabstop>
|
<tabstop>sceneGroupAdd</tabstop>
|
||||||
<tabstop>sceneGroupRemove</tabstop>
|
<tabstop>sceneGroupRemove</tabstop>
|
||||||
|
|||||||
388
forms/macro-edit.ui
Normal file
388
forms/macro-edit.ui
Normal file
@@ -0,0 +1,388 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MacroEdit</class>
|
||||||
|
<widget class="QWidget" name="MacroEdit">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QSplitter" name="macroActionConditionSplitter">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="macroConditions" native="true">
|
||||||
|
<layout class="QVBoxLayout" name="macroConditionsLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="advss::MacroSegmentList" name="conditionsList">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>1</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="conditionControlsLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="conditionAdd">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.conditionAddButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">addIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-plus</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="conditionRemove">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.conditionRemoveButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">removeIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-trash</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="conditionTop">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.conditionTopButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="conditionUp">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.conditionUpButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">upArrowIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-up</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="conditionDown">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.conditionDownButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">downArrowIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-down</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="conditionBottom">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.conditionBottomButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QSplitter" name="macroElseActionSplitter">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="macroActions" native="true">
|
||||||
|
<layout class="QVBoxLayout" name="macroActionsLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="advss::MacroSegmentList" name="actionsList">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>1</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="actionControlsLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="actionAdd">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.actionAddButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">addIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-plus</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="actionRemove">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.actionRemoveButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">removeIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-trash</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="actionTop">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.actionTopButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="actionUp">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.actionUpButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">upArrowIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-up</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="actionDown">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.actionDownButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">downArrowIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-down</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="actionBottom">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.actionBottomButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_14">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="toggleElseActions">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.toggleShowElseSection</string>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="macroElseActions" native="true">
|
||||||
|
<layout class="QVBoxLayout" name="macroElseActionsLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="advss::MacroSegmentList" name="elseActionsList">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>1</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="elseActionControlsLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="elseActionAdd">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionAddButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">addIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-plus</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="elseActionRemove">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionRemoveButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">removeIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-trash</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="elseActionTop">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionTopButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="elseActionUp">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionUpButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">upArrowIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-up</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="elseActionDown">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionDownButton</string>
|
||||||
|
</property>
|
||||||
|
<property name="themeID" stdset="0">
|
||||||
|
<string notr="true">downArrowIconSmall</string>
|
||||||
|
</property>
|
||||||
|
<property name="class" stdset="0">
|
||||||
|
<string notr="true">icon-down</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="elseActionBottom">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>AdvSceneSwitcher.macroTab.tooltip.elseActionBottomButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>advss::MacroSegmentList</class>
|
||||||
|
<extends>QScrollArea</extends>
|
||||||
|
<header>macro-segment-list.hpp</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>conditionsList</tabstop>
|
||||||
|
<tabstop>conditionAdd</tabstop>
|
||||||
|
<tabstop>conditionRemove</tabstop>
|
||||||
|
<tabstop>conditionTop</tabstop>
|
||||||
|
<tabstop>conditionUp</tabstop>
|
||||||
|
<tabstop>conditionDown</tabstop>
|
||||||
|
<tabstop>conditionBottom</tabstop>
|
||||||
|
<tabstop>actionsList</tabstop>
|
||||||
|
<tabstop>actionAdd</tabstop>
|
||||||
|
<tabstop>actionRemove</tabstop>
|
||||||
|
<tabstop>actionTop</tabstop>
|
||||||
|
<tabstop>actionUp</tabstop>
|
||||||
|
<tabstop>actionDown</tabstop>
|
||||||
|
<tabstop>actionBottom</tabstop>
|
||||||
|
<tabstop>toggleElseActions</tabstop>
|
||||||
|
<tabstop>elseActionsList</tabstop>
|
||||||
|
<tabstop>elseActionAdd</tabstop>
|
||||||
|
<tabstop>elseActionRemove</tabstop>
|
||||||
|
<tabstop>elseActionTop</tabstop>
|
||||||
|
<tabstop>elseActionUp</tabstop>
|
||||||
|
<tabstop>elseActionDown</tabstop>
|
||||||
|
<tabstop>elseActionBottom</tabstop>
|
||||||
|
</tabstops>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
#include "advanced-scene-switcher.hpp"
|
#include "advanced-scene-switcher.hpp"
|
||||||
#include "backup.hpp"
|
#include "backup.hpp"
|
||||||
#include "curl-helper.hpp"
|
|
||||||
#include "log-helper.hpp"
|
#include "log-helper.hpp"
|
||||||
#include "macro-helpers.hpp"
|
#include "macro-helpers.hpp"
|
||||||
#include "obs-module-helper.hpp"
|
#include "obs-module-helper.hpp"
|
||||||
@@ -19,10 +18,15 @@
|
|||||||
#include <obs-frontend-api.h>
|
#include <obs-frontend-api.h>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QDirIterator>
|
#include <QDirIterator>
|
||||||
|
#include <QLibrary>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <Windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
AdvSceneSwitcher *AdvSceneSwitcher::window = nullptr;
|
AdvSceneSwitcher *AdvSceneSwitcher::window = nullptr;
|
||||||
@@ -142,16 +146,7 @@ void AdvSceneSwitcher::LoadUI()
|
|||||||
bool AdvSceneSwitcher::eventFilter(QObject *obj, QEvent *event)
|
bool AdvSceneSwitcher::eventFilter(QObject *obj, QEvent *event)
|
||||||
{
|
{
|
||||||
auto eventType = event->type();
|
auto eventType = event->type();
|
||||||
if (obj == ui->macroElseActions && eventType == QEvent::Resize) {
|
if (eventType == QEvent::KeyPress) {
|
||||||
QResizeEvent *resizeEvent = static_cast<QResizeEvent *>(event);
|
|
||||||
|
|
||||||
if (resizeEvent->size().height() == 0) {
|
|
||||||
SetElseActionsStateToHidden();
|
|
||||||
return QDialog::eventFilter(obj, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
SetElseActionsStateToVisible();
|
|
||||||
} else if (eventType == QEvent::KeyPress) {
|
|
||||||
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
|
||||||
auto pressedKey = keyEvent->key();
|
auto pressedKey = keyEvent->key();
|
||||||
|
|
||||||
@@ -307,7 +302,7 @@ void SwitcherData::Thread()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ResetForNextInterval();
|
RunIntervalResetSteps();
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
if (macroMatch) {
|
if (macroMatch) {
|
||||||
@@ -357,14 +352,6 @@ void SwitcherData::SetPreconditions()
|
|||||||
InvalidateMacroTempVarValues();
|
InvalidateMacroTempVarValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitcherData::ResetForNextInterval()
|
|
||||||
{
|
|
||||||
// Plugin reset functions
|
|
||||||
for (const auto &func : resetIntervalSteps) {
|
|
||||||
func();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SwitcherData::CheckForMatch(OBSWeakSource &scene,
|
bool SwitcherData::CheckForMatch(OBSWeakSource &scene,
|
||||||
OBSWeakSource &transition, int &linger,
|
OBSWeakSource &transition, int &linger,
|
||||||
bool &setPrevSceneAfterLinger,
|
bool &setPrevSceneAfterLinger,
|
||||||
@@ -445,7 +432,7 @@ void AutoStartActionQueues();
|
|||||||
void SwitcherData::Start()
|
void SwitcherData::Start()
|
||||||
{
|
{
|
||||||
if (!(th && th->isRunning())) {
|
if (!(th && th->isRunning())) {
|
||||||
ResetForNextInterval();
|
RunIntervalResetSteps();
|
||||||
ResetMacros();
|
ResetMacros();
|
||||||
AutoStartActionQueues();
|
AutoStartActionQueues();
|
||||||
|
|
||||||
@@ -453,10 +440,7 @@ void SwitcherData::Start()
|
|||||||
th = new SwitcherThread();
|
th = new SwitcherThread();
|
||||||
th->start((QThread::Priority)threadPriority);
|
th->start((QThread::Priority)threadPriority);
|
||||||
|
|
||||||
// Will be overwritten quickly but might be useful
|
RunStartSteps();
|
||||||
writeToStatusFile("Advanced Scene Switcher running");
|
|
||||||
SendWebsocketVendorEvent("AdvancedSceneSwitcherStarted",
|
|
||||||
nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showSystemTrayNotifications) {
|
if (showSystemTrayNotifications) {
|
||||||
@@ -483,11 +467,7 @@ void SwitcherData::Stop()
|
|||||||
th->wait();
|
th->wait();
|
||||||
delete th;
|
delete th;
|
||||||
th = nullptr;
|
th = nullptr;
|
||||||
writeToStatusFile("Advanced Scene Switcher stopped");
|
RunStopSteps();
|
||||||
if (!obsIsShuttingDown) {
|
|
||||||
SendWebsocketVendorEvent("AdvancedSceneSwitcherStopped",
|
|
||||||
nullptr);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showSystemTrayNotifications) {
|
if (showSystemTrayNotifications) {
|
||||||
@@ -619,7 +599,7 @@ static void handleSceneCollectionChanging()
|
|||||||
AdvSceneSwitcher::window->close();
|
AdvSceneSwitcher::window->close();
|
||||||
}
|
}
|
||||||
if (!switcher->stop) {
|
if (!switcher->stop) {
|
||||||
switcher->sceneColletionStop = true;
|
switcher->sceneCollectionStop = true;
|
||||||
switcher->Stop();
|
switcher->Stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -735,7 +715,7 @@ void OpenSettingsWindow()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::HighligthMacroSettingsButton(bool enable)
|
void AdvSceneSwitcher::HighlightMacroSettingsButton(bool enable)
|
||||||
{
|
{
|
||||||
static QObject *highlight = nullptr;
|
static QObject *highlight = nullptr;
|
||||||
if ((highlight && enable) || (!highlight && !enable)) {
|
if ((highlight && enable) || (!highlight && !enable)) {
|
||||||
@@ -755,13 +735,28 @@ void AdvSceneSwitcher::HighligthMacroSettingsButton(bool enable)
|
|||||||
highlight = HighlightWidget(ui->macroSettings, Qt::green);
|
highlight = HighlightWidget(ui->macroSettings, Qt::green);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HighligthMacroSettingsButton(bool enable)
|
void AdvSceneSwitcher::HighlightAction(int idx, QColor color) const
|
||||||
|
{
|
||||||
|
ui->macroEdit->HighlightAction(idx, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AdvSceneSwitcher::HighlightElseAction(int idx, QColor color) const
|
||||||
|
{
|
||||||
|
ui->macroEdit->HighlightElseAction(idx, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AdvSceneSwitcher::HighlightCondition(int idx, QColor color) const
|
||||||
|
{
|
||||||
|
ui->macroEdit->HighlightCondition(idx, color);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HighlightMacroSettingsButton(bool enable)
|
||||||
{
|
{
|
||||||
auto window = GetSettingsWindow();
|
auto window = GetSettingsWindow();
|
||||||
if (!window) {
|
if (!window) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
static_cast<AdvSceneSwitcher *>(window)->HighligthMacroSettingsButton(
|
static_cast<AdvSceneSwitcher *>(window)->HighlightMacroSettingsButton(
|
||||||
enable);
|
enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace advss {
|
|||||||
|
|
||||||
class MacroActionEdit;
|
class MacroActionEdit;
|
||||||
class MacroConditionEdit;
|
class MacroConditionEdit;
|
||||||
|
class MacroSegment;
|
||||||
class Duration;
|
class Duration;
|
||||||
class SequenceWidget;
|
class SequenceWidget;
|
||||||
struct SceneGroup;
|
struct SceneGroup;
|
||||||
@@ -66,6 +67,7 @@ public slots:
|
|||||||
void on_showTrayNotifications_stateChanged(int state);
|
void on_showTrayNotifications_stateChanged(int state);
|
||||||
void on_uiHintsDisable_stateChanged(int state);
|
void on_uiHintsDisable_stateChanged(int state);
|
||||||
void on_disableComboBoxFilter_stateChanged(int state);
|
void on_disableComboBoxFilter_stateChanged(int state);
|
||||||
|
void on_disableMacroWidgetCache_stateChanged(int state);
|
||||||
void on_warnPluginLoadFailure_stateChanged(int state);
|
void on_warnPluginLoadFailure_stateChanged(int state);
|
||||||
void on_hideLegacyTabs_stateChanged(int state);
|
void on_hideLegacyTabs_stateChanged(int state);
|
||||||
void on_priorityUp_clicked();
|
void on_priorityUp_clicked();
|
||||||
@@ -77,119 +79,53 @@ public slots:
|
|||||||
/* --- Begin of macro tab section --- */
|
/* --- Begin of macro tab section --- */
|
||||||
public:
|
public:
|
||||||
void SetupMacroTab();
|
void SetupMacroTab();
|
||||||
|
bool MacroTabIsInFocus();
|
||||||
bool AddNewMacro(std::shared_ptr<Macro> &res, std::string &name,
|
bool AddNewMacro(std::shared_ptr<Macro> &res, std::string &name,
|
||||||
std::string format = "");
|
std::string format = "");
|
||||||
void RemoveMacro(std::shared_ptr<Macro> &);
|
void RemoveMacro(std::shared_ptr<Macro> &);
|
||||||
void RemoveSelectedMacros();
|
void RemoveSelectedMacros();
|
||||||
void RenameMacro(std::shared_ptr<Macro> &, const QString &name);
|
void RenameMacro(std::shared_ptr<Macro> &, const QString &name);
|
||||||
std::shared_ptr<Macro> GetSelectedMacro();
|
std::shared_ptr<Macro> GetSelectedMacro() const;
|
||||||
std::vector<std::shared_ptr<Macro>> GetSelectedMacros();
|
std::vector<std::shared_ptr<Macro>> GetSelectedMacros() const;
|
||||||
void SetEditMacro(Macro &m);
|
void SetMacroEditAreaDisabled(bool) const;
|
||||||
void SetMacroEditAreaDisabled(bool);
|
void HighlightAction(int idx, QColor color = QColor(Qt::green)) const;
|
||||||
void HighlightAction(int idx, QColor color = QColor(Qt::green));
|
void HighlightElseAction(int idx,
|
||||||
void HighlightElseAction(int idx, QColor color = QColor(Qt::green));
|
QColor color = QColor(Qt::green)) const;
|
||||||
void HighlightCondition(int idx, QColor color = QColor(Qt::green));
|
void HighlightCondition(int idx,
|
||||||
|
QColor color = QColor(Qt::green)) const;
|
||||||
void PopulateMacroActions(Macro &m, uint32_t afterIdx = 0);
|
void PopulateMacroActions(Macro &m, uint32_t afterIdx = 0);
|
||||||
void PopulateMacroElseActions(Macro &m, uint32_t afterIdx = 0);
|
void PopulateMacroElseActions(Macro &m, uint32_t afterIdx = 0);
|
||||||
void PopulateMacroConditions(Macro &m, uint32_t afterIdx = 0);
|
void PopulateMacroConditions(Macro &m, uint32_t afterIdx = 0);
|
||||||
void SetActionData(Macro &m);
|
void SetActionData(Macro &m) const;
|
||||||
void SetElseActionData(Macro &m);
|
void SetElseActionData(Macro &m) const;
|
||||||
void SetConditionData(Macro &m);
|
void SetConditionData(Macro &m) const;
|
||||||
void SwapActions(Macro *m, int pos1, int pos2);
|
void SwapActions(Macro *m, int pos1, int pos2);
|
||||||
void SwapConditions(Macro *m, int pos1, int pos2);
|
void SwapConditions(Macro *m, int pos1, int pos2);
|
||||||
void HighligthMacroSettingsButton(bool enable = true);
|
void HighlightMacroSettingsButton(bool enable = true);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void on_macroAdd_clicked();
|
void on_macroAdd_clicked();
|
||||||
void on_macroRemove_clicked();
|
void on_macroRemove_clicked();
|
||||||
void on_macroUp_clicked();
|
void on_macroUp_clicked() const;
|
||||||
void on_macroDown_clicked();
|
void on_macroDown_clicked() const;
|
||||||
void on_macroName_editingFinished();
|
void on_macroName_editingFinished();
|
||||||
void on_runMacroInParallel_stateChanged(int value);
|
void on_runMacroInParallel_stateChanged(int value) const;
|
||||||
void on_runMacroOnChange_stateChanged(int value);
|
void on_runMacroOnChange_stateChanged(int value) const;
|
||||||
void on_conditionAdd_clicked();
|
|
||||||
void on_conditionRemove_clicked();
|
|
||||||
void on_conditionTop_clicked();
|
|
||||||
void on_conditionUp_clicked();
|
|
||||||
void on_conditionDown_clicked();
|
|
||||||
void on_conditionBottom_clicked();
|
|
||||||
void on_actionAdd_clicked();
|
|
||||||
void on_actionRemove_clicked();
|
|
||||||
void on_actionTop_clicked();
|
|
||||||
void on_actionUp_clicked();
|
|
||||||
void on_actionDown_clicked();
|
|
||||||
void on_actionBottom_clicked();
|
|
||||||
void on_toggleElseActions_clicked();
|
|
||||||
void on_elseActionAdd_clicked();
|
|
||||||
void on_elseActionRemove_clicked();
|
|
||||||
void on_elseActionTop_clicked();
|
|
||||||
void on_elseActionUp_clicked();
|
|
||||||
void on_elseActionDown_clicked();
|
|
||||||
void on_elseActionBottom_clicked();
|
|
||||||
void MacroSelectionAboutToChange();
|
|
||||||
void MacroSelectionChanged();
|
void MacroSelectionChanged();
|
||||||
void UpMacroSegementHotkey();
|
|
||||||
void DownMacroSegementHotkey();
|
|
||||||
void DeleteMacroSegementHotkey();
|
|
||||||
void ShowMacroContextMenu(const QPoint &);
|
void ShowMacroContextMenu(const QPoint &);
|
||||||
void ShowMacroActionsContextMenu(const QPoint &);
|
|
||||||
void ShowMacroElseActionsContextMenu(const QPoint &);
|
|
||||||
void ShowMacroConditionsContextMenu(const QPoint &);
|
|
||||||
void CopyMacro();
|
void CopyMacro();
|
||||||
void RenameSelectedMacro();
|
void RenameSelectedMacro();
|
||||||
void ExportMacros();
|
void ExportMacros() const;
|
||||||
void ImportMacros();
|
void ImportMacros();
|
||||||
void ExpandAllActions();
|
void HighlightOnChange() const;
|
||||||
void ExpandAllElseActions();
|
|
||||||
void ExpandAllConditions();
|
|
||||||
void CollapseAllActions();
|
|
||||||
void CollapseAllElseActions();
|
|
||||||
void CollapseAllConditions();
|
|
||||||
void MinimizeActions();
|
|
||||||
void MaximizeActions();
|
|
||||||
void MinimizeElseActions();
|
|
||||||
void MaximizeElseActions();
|
|
||||||
void MinimizeConditions();
|
|
||||||
void MaximizeConditions();
|
|
||||||
void SetElseActionsStateToHidden();
|
|
||||||
void SetElseActionsStateToVisible();
|
|
||||||
void MacroActionSelectionChanged(int idx);
|
|
||||||
void MacroActionReorder(int to, int target);
|
|
||||||
void AddMacroAction(Macro *macro, int idx, const std::string &id,
|
|
||||||
obs_data_t *data);
|
|
||||||
void AddMacroAction(int idx);
|
|
||||||
void RemoveMacroAction(int idx);
|
|
||||||
void MoveMacroActionUp(int idx);
|
|
||||||
void MoveMacroActionDown(int idx);
|
|
||||||
void MacroElseActionSelectionChanged(int idx);
|
|
||||||
void MacroElseActionReorder(int to, int target);
|
|
||||||
void AddMacroElseAction(Macro *macro, int idx, const std::string &id,
|
|
||||||
obs_data_t *data);
|
|
||||||
void AddMacroElseAction(int idx);
|
|
||||||
void RemoveMacroElseAction(int idx);
|
|
||||||
void SwapElseActions(Macro *m, int pos1, int pos2);
|
|
||||||
void MoveMacroElseActionUp(int idx);
|
|
||||||
void MoveMacroElseActionDown(int idx);
|
|
||||||
void MacroConditionSelectionChanged(int idx);
|
|
||||||
void MacroConditionReorder(int to, int target);
|
|
||||||
void AddMacroCondition(int idx);
|
|
||||||
void AddMacroCondition(Macro *macro, int idx, const std::string &id,
|
|
||||||
obs_data_t *data, Logic::Type logic);
|
|
||||||
void RemoveMacroCondition(int idx);
|
|
||||||
void MoveMacroConditionUp(int idx);
|
|
||||||
void MoveMacroConditionDown(int idx);
|
|
||||||
void HighlightControls();
|
|
||||||
void HighlightOnChange();
|
|
||||||
void on_macroSettings_clicked();
|
void on_macroSettings_clicked();
|
||||||
void CopyMacroSegment();
|
|
||||||
void PasteMacroSegment();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void MacroAdded(const QString &name);
|
void MacroAdded(const QString &name);
|
||||||
void MacroRemoved(const QString &name);
|
void MacroRemoved(const QString &name);
|
||||||
void MacroRenamed(const QString &oldName, const QString &newName);
|
void MacroRenamed(const QString &oldName, const QString &newName);
|
||||||
void MacroSegmentOrderChanged();
|
void MacroSegmentOrderChanged();
|
||||||
void SegmentTempVarsChanged();
|
void SegmentTempVarsChanged(MacroSegment *);
|
||||||
void HighlightMacrosChanged(bool value);
|
void HighlightMacrosChanged(bool value);
|
||||||
|
|
||||||
void ConnectionAdded(const QString &);
|
void ConnectionAdded(const QString &);
|
||||||
@@ -197,16 +133,7 @@ signals:
|
|||||||
void ConnectionRemoved(const QString &);
|
void ConnectionRemoved(const QString &);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class MacroSection { CONDITIONS, ACTIONS, ELSE_ACTIONS };
|
|
||||||
|
|
||||||
void SetupMacroSegmentSelection(MacroSection type, int idx);
|
|
||||||
bool ResolveMacroImportNameConflict(std::shared_ptr<Macro> &);
|
bool ResolveMacroImportNameConflict(std::shared_ptr<Macro> &);
|
||||||
bool MacroTabIsInFocus();
|
|
||||||
|
|
||||||
MacroSection lastInteracted = MacroSection::CONDITIONS;
|
|
||||||
int currentConditionIdx = -1;
|
|
||||||
int currentActionIdx = -1;
|
|
||||||
int currentElseActionIdx = -1;
|
|
||||||
|
|
||||||
/* --- End of macro tab section --- */
|
/* --- End of macro tab section --- */
|
||||||
|
|
||||||
@@ -386,6 +313,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
void OpenSettingsWindow();
|
void OpenSettingsWindow();
|
||||||
void HighligthMacroSettingsButton(bool enable);
|
void HighlightMacroSettingsButton(bool enable);
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -113,12 +113,12 @@ void AdvSceneSwitcher::on_startupBehavior_currentIndexChanged(int index)
|
|||||||
static_cast<SwitcherData::StartupBehavior>(index);
|
static_cast<SwitcherData::StartupBehavior>(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_logLevel_currentIndexChanged(int value)
|
void AdvSceneSwitcher::on_logLevel_currentIndexChanged(int idx)
|
||||||
{
|
{
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switcher->logLevel = static_cast<SwitcherData::LogLevel>(value);
|
SetLogLevel(static_cast<LogLevel>(ui->logLevel->itemData(idx).toInt()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_autoStartEvent_currentIndexChanged(int index)
|
void AdvSceneSwitcher::on_autoStartEvent_currentIndexChanged(int index)
|
||||||
@@ -163,7 +163,7 @@ void AdvSceneSwitcher::closeEvent(QCloseEvent *)
|
|||||||
switcher->windowSize = this->size();
|
switcher->windowSize = this->size();
|
||||||
switcher->macroListMacroEditSplitterPosition =
|
switcher->macroListMacroEditSplitterPosition =
|
||||||
ui->macroListMacroEditSplitter->sizes();
|
ui->macroListMacroEditSplitter->sizes();
|
||||||
MacroSelectionAboutToChange(); // Trigger saving of splitter states
|
ui->macroEdit->SetMacro(nullptr); // Trigger saving of splitter states
|
||||||
|
|
||||||
obs_frontend_save();
|
obs_frontend_save();
|
||||||
}
|
}
|
||||||
@@ -205,6 +205,16 @@ void AdvSceneSwitcher::on_disableComboBoxFilter_stateChanged(int state)
|
|||||||
FilterComboBox::SetFilterBehaviourEnabled(!state);
|
FilterComboBox::SetFilterBehaviourEnabled(!state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AdvSceneSwitcher::on_disableMacroWidgetCache_stateChanged(int state)
|
||||||
|
{
|
||||||
|
if (loading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switcher->disableMacroWidgetCache = state;
|
||||||
|
MacroSegmentList::SetCachingEnabled(!state);
|
||||||
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_warnPluginLoadFailure_stateChanged(int state)
|
void AdvSceneSwitcher::on_warnPluginLoadFailure_stateChanged(int state)
|
||||||
{
|
{
|
||||||
if (loading) {
|
if (loading) {
|
||||||
@@ -275,12 +285,15 @@ static bool containsSensitiveData(obs_data_t *data)
|
|||||||
obs_data_get_array(data, "twitchConnections");
|
obs_data_get_array(data, "twitchConnections");
|
||||||
OBSDataArrayAutoRelease websocketConnections =
|
OBSDataArrayAutoRelease websocketConnections =
|
||||||
obs_data_get_array(data, "websocketConnections");
|
obs_data_get_array(data, "websocketConnections");
|
||||||
|
OBSDataArrayAutoRelease mqttConnections =
|
||||||
|
obs_data_get_array(data, "mqttConnections");
|
||||||
|
|
||||||
auto isNotEmpty = [](obs_data_array *array) {
|
auto isNotEmpty = [](obs_data_array *array) {
|
||||||
return obs_data_array_count(array) > 0;
|
return obs_data_array_count(array) > 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
return isNotEmpty(twitchTokens) || isNotEmpty(websocketConnections);
|
return isNotEmpty(twitchTokens) || isNotEmpty(websocketConnections) ||
|
||||||
|
isNotEmpty(mqttConnections);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_exportSettings_clicked()
|
void AdvSceneSwitcher::on_exportSettings_clicked()
|
||||||
@@ -344,6 +357,10 @@ void AdvSceneSwitcher::on_importSettings_clicked()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We have to make sure to that no macro is currently being edited while
|
||||||
|
// the new settings are loaded
|
||||||
|
ui->macros->clearSelection();
|
||||||
|
|
||||||
std::lock_guard<std::mutex> lock(switcher->m);
|
std::lock_guard<std::mutex> lock(switcher->m);
|
||||||
switcher->LoadSettings(obj);
|
switcher->LoadSettings(obj);
|
||||||
switcher->lastImportPath = path.toStdString();
|
switcher->lastImportPath = path.toStdString();
|
||||||
@@ -379,6 +396,7 @@ void AdvSceneSwitcher::CheckFirstTimeSetup()
|
|||||||
switcher->firstBoot = false;
|
switcher->firstBoot = false;
|
||||||
DisplayMessage(
|
DisplayMessage(
|
||||||
obs_module_text("AdvSceneSwitcher.firstBootMessage"));
|
obs_module_text("AdvSceneSwitcher.firstBootMessage"));
|
||||||
|
switcher->Start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -517,21 +535,23 @@ void SwitcherData::SaveGeneralSettings(obs_data_t *obj)
|
|||||||
cooldown.Save(obj, "cooldown");
|
cooldown.Save(obj, "cooldown");
|
||||||
obs_data_set_bool(obj, "enableCooldown", enableCooldown);
|
obs_data_set_bool(obj, "enableCooldown", enableCooldown);
|
||||||
|
|
||||||
obs_data_set_bool(obj, "active", sceneColletionStop ? true : !stop);
|
obs_data_set_bool(obj, "active", sceneCollectionStop ? true : !stop);
|
||||||
sceneColletionStop = false;
|
sceneCollectionStop = false;
|
||||||
obs_data_set_int(obj, "startup_behavior",
|
obs_data_set_int(obj, "startup_behavior",
|
||||||
static_cast<int>(startupBehavior));
|
static_cast<int>(startupBehavior));
|
||||||
|
|
||||||
obs_data_set_int(obj, "autoStartEvent",
|
obs_data_set_int(obj, "autoStartEvent",
|
||||||
static_cast<int>(autoStartEvent));
|
static_cast<int>(autoStartEvent));
|
||||||
|
|
||||||
obs_data_set_int(obj, "logLevel", static_cast<int>(logLevel));
|
SaveLogLevel(obj);
|
||||||
obs_data_set_int(obj, "logLevelVersion", 1);
|
|
||||||
obs_data_set_bool(obj, "showSystemTrayNotifications",
|
obs_data_set_bool(obj, "showSystemTrayNotifications",
|
||||||
showSystemTrayNotifications);
|
showSystemTrayNotifications);
|
||||||
obs_data_set_bool(obj, "disableHints", disableHints);
|
obs_data_set_bool(obj, "disableHints", disableHints);
|
||||||
obs_data_set_bool(obj, "disableFilterComboboxFilter",
|
obs_data_set_bool(obj, "disableFilterComboboxFilter",
|
||||||
disableFilterComboboxFilter);
|
disableFilterComboboxFilter);
|
||||||
|
obs_data_set_bool(obj, "disableMacroWidgetCache",
|
||||||
|
disableMacroWidgetCache);
|
||||||
obs_data_set_bool(obj, "warnPluginLoadFailure", warnPluginLoadFailure);
|
obs_data_set_bool(obj, "warnPluginLoadFailure", warnPluginLoadFailure);
|
||||||
obs_data_set_bool(obj, "hideLegacyTabs", hideLegacyTabs);
|
obs_data_set_bool(obj, "hideLegacyTabs", hideLegacyTabs);
|
||||||
|
|
||||||
@@ -582,31 +602,15 @@ void SwitcherData::LoadGeneralSettings(obs_data_t *obj)
|
|||||||
autoStartEvent =
|
autoStartEvent =
|
||||||
static_cast<AutoStart>(obs_data_get_int(obj, "autoStartEvent"));
|
static_cast<AutoStart>(obs_data_get_int(obj, "autoStartEvent"));
|
||||||
|
|
||||||
logLevel = static_cast<LogLevel>(obs_data_get_int(obj, "logLevel"));
|
LoadLogLevel(obj);
|
||||||
if (obs_data_get_int(obj, "logLevelVersion") < 1) {
|
|
||||||
enum OldLogLevel { DEFAULT, LOG_ACTION, VERBOSE };
|
|
||||||
OldLogLevel oldLogLevel = static_cast<OldLogLevel>(
|
|
||||||
obs_data_get_int(obj, "logLevel"));
|
|
||||||
switch (oldLogLevel) {
|
|
||||||
case DEFAULT:
|
|
||||||
logLevel = LogLevel::DEFAULT;
|
|
||||||
break;
|
|
||||||
case LOG_ACTION:
|
|
||||||
logLevel = LogLevel::LOG_ACTION;
|
|
||||||
break;
|
|
||||||
case VERBOSE:
|
|
||||||
logLevel = LogLevel::VERBOSE;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
showSystemTrayNotifications =
|
showSystemTrayNotifications =
|
||||||
obs_data_get_bool(obj, "showSystemTrayNotifications");
|
obs_data_get_bool(obj, "showSystemTrayNotifications");
|
||||||
disableHints = obs_data_get_bool(obj, "disableHints");
|
disableHints = obs_data_get_bool(obj, "disableHints");
|
||||||
disableFilterComboboxFilter =
|
disableFilterComboboxFilter =
|
||||||
obs_data_get_bool(obj, "disableFilterComboboxFilter");
|
obs_data_get_bool(obj, "disableFilterComboboxFilter");
|
||||||
|
disableMacroWidgetCache =
|
||||||
|
obs_data_get_bool(obj, "disableMacroWidgetCache");
|
||||||
obs_data_set_default_bool(obj, "warnPluginLoadFailure", true);
|
obs_data_set_default_bool(obj, "warnPluginLoadFailure", true);
|
||||||
warnPluginLoadFailure = obs_data_get_bool(obj, "warnPluginLoadFailure");
|
warnPluginLoadFailure = obs_data_get_bool(obj, "warnPluginLoadFailure");
|
||||||
obs_data_set_default_bool(obj, "hideLegacyTabs", true);
|
obs_data_set_default_bool(obj, "hideLegacyTabs", true);
|
||||||
@@ -890,7 +894,9 @@ void AdvSceneSwitcher::SetupGeneralTab()
|
|||||||
SIGNAL(DurationChanged(const Duration &)), this,
|
SIGNAL(DurationChanged(const Duration &)), this,
|
||||||
SLOT(CooldownDurationChanged(const Duration &)));
|
SLOT(CooldownDurationChanged(const Duration &)));
|
||||||
|
|
||||||
ui->logLevel->setCurrentIndex(static_cast<int>(switcher->logLevel));
|
PopulateLogLevelSelection(ui->logLevel);
|
||||||
|
ui->logLevel->setCurrentIndex(
|
||||||
|
ui->logLevel->findData(static_cast<int>(GetLogLevel())));
|
||||||
|
|
||||||
ui->saveWindowGeo->setChecked(switcher->saveWindowGeo);
|
ui->saveWindowGeo->setChecked(switcher->saveWindowGeo);
|
||||||
ui->showTrayNotifications->setChecked(
|
ui->showTrayNotifications->setChecked(
|
||||||
@@ -900,6 +906,9 @@ void AdvSceneSwitcher::SetupGeneralTab()
|
|||||||
switcher->disableFilterComboboxFilter);
|
switcher->disableFilterComboboxFilter);
|
||||||
FilterComboBox::SetFilterBehaviourEnabled(
|
FilterComboBox::SetFilterBehaviourEnabled(
|
||||||
!switcher->disableFilterComboboxFilter);
|
!switcher->disableFilterComboboxFilter);
|
||||||
|
ui->disableMacroWidgetCache->setChecked(
|
||||||
|
switcher->disableMacroWidgetCache);
|
||||||
|
MacroSegmentList::SetCachingEnabled(!switcher->disableMacroWidgetCache);
|
||||||
ui->warnPluginLoadFailure->setChecked(switcher->warnPluginLoadFailure);
|
ui->warnPluginLoadFailure->setChecked(switcher->warnPluginLoadFailure);
|
||||||
ui->hideLegacyTabs->setChecked(switcher->hideLegacyTabs);
|
ui->hideLegacyTabs->setChecked(switcher->hideLegacyTabs);
|
||||||
|
|
||||||
|
|||||||
@@ -259,7 +259,8 @@ void AudioSwitch::setVolumeLevel(void *data, const float *,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
obs_volmeter_t *AddVolmeterToSource(AudioSwitch *entry, obs_weak_source *source)
|
static obs_volmeter_t *addVolmeterToSource(AudioSwitch *entry,
|
||||||
|
obs_weak_source *source)
|
||||||
{
|
{
|
||||||
obs_volmeter_t *volmeter = obs_volmeter_create(OBS_FADER_LOG);
|
obs_volmeter_t *volmeter = obs_volmeter_create(OBS_FADER_LOG);
|
||||||
obs_volmeter_add_callback(volmeter, AudioSwitch::setVolumeLevel, entry);
|
obs_volmeter_add_callback(volmeter, AudioSwitch::setVolumeLevel, entry);
|
||||||
@@ -279,7 +280,7 @@ void AudioSwitch::resetVolmeter()
|
|||||||
obs_volmeter_remove_callback(volmeter, setVolumeLevel, this);
|
obs_volmeter_remove_callback(volmeter, setVolumeLevel, this);
|
||||||
obs_volmeter_destroy(volmeter);
|
obs_volmeter_destroy(volmeter);
|
||||||
|
|
||||||
volmeter = AddVolmeterToSource(this, audioSource);
|
volmeter = addVolmeterToSource(this, audioSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AudioSwitch::initialized()
|
bool AudioSwitch::initialized()
|
||||||
@@ -318,7 +319,7 @@ void AudioSwitch::load(obs_data_t *obj)
|
|||||||
duration.Load(obj, "duration");
|
duration.Load(obj, "duration");
|
||||||
ignoreInactiveSource = obs_data_get_bool(obj, "ignoreInactiveSource");
|
ignoreInactiveSource = obs_data_get_bool(obj, "ignoreInactiveSource");
|
||||||
|
|
||||||
volmeter = AddVolmeterToSource(this, audioSource);
|
volmeter = addVolmeterToSource(this, audioSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioSwitchFallback::save(obs_data_t *obj)
|
void AudioSwitchFallback::save(obs_data_t *obj)
|
||||||
@@ -349,7 +350,7 @@ AudioSwitch::AudioSwitch(const AudioSwitch &other)
|
|||||||
condition(other.condition),
|
condition(other.condition),
|
||||||
duration(other.duration)
|
duration(other.duration)
|
||||||
{
|
{
|
||||||
volmeter = AddVolmeterToSource(this, other.audioSource);
|
volmeter = addVolmeterToSource(this, other.audioSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioSwitch::AudioSwitch(AudioSwitch &&other) noexcept
|
AudioSwitch::AudioSwitch(AudioSwitch &&other) noexcept
|
||||||
|
|||||||
@@ -21,6 +21,29 @@ bool FileSwitch::pause = false;
|
|||||||
static QObject *addPulse = nullptr;
|
static QObject *addPulse = nullptr;
|
||||||
static std::hash<std::string> strHash;
|
static std::hash<std::string> strHash;
|
||||||
|
|
||||||
|
static void writeToStatusFile(const QString &msg)
|
||||||
|
{
|
||||||
|
if (!GetSwitcher() || !GetSwitcher()->fileIO.writeEnabled ||
|
||||||
|
GetSwitcher()->fileIO.writePath.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QFile file(QString::fromStdString(GetSwitcher()->fileIO.writePath));
|
||||||
|
if (file.open(QIODevice::ReadWrite)) {
|
||||||
|
QTextStream stream(&file);
|
||||||
|
stream << msg << Qt::endl;
|
||||||
|
}
|
||||||
|
file.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool _ = []() {
|
||||||
|
AddStartStep(
|
||||||
|
[]() { writeToStatusFile("Advanced Scene Switcher running"); });
|
||||||
|
AddStopStep(
|
||||||
|
[]() { writeToStatusFile("Advanced Scene Switcher stopped"); });
|
||||||
|
return true;
|
||||||
|
}();
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_browseButton_clicked()
|
void AdvSceneSwitcher::on_browseButton_clicked()
|
||||||
{
|
{
|
||||||
QString path = QFileDialog::getOpenFileName(
|
QString path = QFileDialog::getOpenFileName(
|
||||||
@@ -113,24 +136,6 @@ void SwitcherData::writeSceneInfoToFile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitcherData::writeToStatusFile(const QString &msg)
|
|
||||||
{
|
|
||||||
if (!fileIO.writeEnabled || fileIO.writePath.empty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QFile file(QString::fromStdString(fileIO.writePath));
|
|
||||||
if (file.open(QIODevice::ReadWrite)) {
|
|
||||||
QTextStream stream(&file);
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
stream << msg << "\n";
|
|
||||||
#else
|
|
||||||
stream << msg << Qt::endl;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
file.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SwitcherData::checkSwitchInfoFromFile(OBSWeakSource &scene,
|
bool SwitcherData::checkSwitchInfoFromFile(OBSWeakSource &scene,
|
||||||
OBSWeakSource &transition)
|
OBSWeakSource &transition)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include "kwin-helpers.h"
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
@@ -44,6 +45,10 @@ static XScreenSaverAllocInfoFunc allocSSFunc = nullptr;
|
|||||||
static XScreenSaverQueryInfoFunc querySSFunc = nullptr;
|
static XScreenSaverQueryInfoFunc querySSFunc = nullptr;
|
||||||
bool canGetIdleTime = false;
|
bool canGetIdleTime = false;
|
||||||
|
|
||||||
|
static bool KWin = false;
|
||||||
|
static FocusNotifier notifier;
|
||||||
|
static QString KWinScriptObjectPath;
|
||||||
|
|
||||||
static QLibrary *libprocps = nullptr;
|
static QLibrary *libprocps = nullptr;
|
||||||
#ifdef PROCPS_AVAILABLE
|
#ifdef PROCPS_AVAILABLE
|
||||||
typedef PROCTAB *(*openproc_func)(int flags);
|
typedef PROCTAB *(*openproc_func)(int flags);
|
||||||
@@ -275,6 +280,11 @@ int getActiveWindow(Window *&window)
|
|||||||
|
|
||||||
void GetCurrentWindowTitle(std::string &title)
|
void GetCurrentWindowTitle(std::string &title)
|
||||||
{
|
{
|
||||||
|
if (KWin) {
|
||||||
|
title = FocusNotifier::getActiveWindowTitle();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Window *data = 0;
|
Window *data = 0;
|
||||||
if (getActiveWindow(data) != Success || !data) {
|
if (getActiveWindow(data) != Success || !data) {
|
||||||
return;
|
return;
|
||||||
@@ -286,6 +296,7 @@ void GetCurrentWindowTitle(std::string &title)
|
|||||||
|
|
||||||
auto name = getWindowName(data[0]);
|
auto name = getWindowName(data[0]);
|
||||||
XFree(data);
|
XFree(data);
|
||||||
|
|
||||||
if (name.empty()) {
|
if (name.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -384,7 +395,11 @@ static void getProcessListProcps2(QStringList &processes)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
while ((stack = procps_pids_get_(info, PIDS_FETCH_TASKS_ONLY))) {
|
while ((stack = procps_pids_get_(info, PIDS_FETCH_TASKS_ONLY))) {
|
||||||
|
#ifdef PROCPS2_USE_INFO
|
||||||
auto cmd = PIDS_VAL(0, str, stack, info);
|
auto cmd = PIDS_VAL(0, str, stack, info);
|
||||||
|
#else
|
||||||
|
auto cmd = PIDS_VAL(0, str, stack);
|
||||||
|
#endif
|
||||||
QString procName(cmd);
|
QString procName(cmd);
|
||||||
if (!procName.isEmpty() && !processes.contains(procName)) {
|
if (!procName.isEmpty() && !processes.contains(procName)) {
|
||||||
processes << procName;
|
processes << procName;
|
||||||
@@ -408,6 +423,10 @@ void GetProcessList(QStringList &processes)
|
|||||||
|
|
||||||
long getForegroundProcessPid()
|
long getForegroundProcessPid()
|
||||||
{
|
{
|
||||||
|
if (KWin) {
|
||||||
|
return FocusNotifier::getActiveWindowPID();
|
||||||
|
}
|
||||||
|
|
||||||
Window *window;
|
Window *window;
|
||||||
if (getActiveWindow(window) != Success || !window || !*window) {
|
if (getActiveWindow(window) != Success || !window || !*window) {
|
||||||
return -1;
|
return -1;
|
||||||
@@ -433,6 +452,7 @@ long getForegroundProcessPid()
|
|||||||
|
|
||||||
pid = *((long *)prop);
|
pid = *((long *)prop);
|
||||||
XFree(prop);
|
XFree(prop);
|
||||||
|
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -546,6 +566,11 @@ static void initProc2()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ignoreXerror(Display *d, XErrorEvent *e)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void PlatformInit()
|
void PlatformInit()
|
||||||
{
|
{
|
||||||
auto display = disp();
|
auto display = disp();
|
||||||
@@ -553,9 +578,21 @@ void PlatformInit()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KWin = isKWinAvailable();
|
||||||
|
if (!(KWin && startKWinScript(KWinScriptObjectPath) &&
|
||||||
|
registerKWinDBusListener(¬ifier))) {
|
||||||
|
// something bad happened while trying to initialize
|
||||||
|
// the KWin script/dbus so disable it
|
||||||
|
KWin = false;
|
||||||
|
blog(LOG_INFO, "not using KWin compat");
|
||||||
|
} else {
|
||||||
|
blog(LOG_INFO, "using KWin compat");
|
||||||
|
}
|
||||||
|
|
||||||
initXss();
|
initXss();
|
||||||
initProcps();
|
initProcps();
|
||||||
initProc2();
|
initProc2();
|
||||||
|
XSetErrorHandler(ignoreXerror);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cleanupHelper(QLibrary *lib)
|
static void cleanupHelper(QLibrary *lib)
|
||||||
@@ -572,6 +609,9 @@ void PlatformCleanup()
|
|||||||
cleanupHelper(libprocps);
|
cleanupHelper(libprocps);
|
||||||
cleanupHelper(libproc2);
|
cleanupHelper(libproc2);
|
||||||
cleanupDisplay();
|
cleanupDisplay();
|
||||||
|
XSetErrorHandler(NULL);
|
||||||
|
if (KWin && !KWinScriptObjectPath.isEmpty())
|
||||||
|
stopKWinScript(KWinScriptObjectPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
166
lib/linux/kwin-helpers.cpp
Normal file
166
lib/linux/kwin-helpers.cpp
Normal file
@@ -0,0 +1,166 @@
|
|||||||
|
#include "kwin-helpers.h"
|
||||||
|
|
||||||
|
#include "log-helper.hpp"
|
||||||
|
|
||||||
|
#include <QDir>
|
||||||
|
#include <QFile>
|
||||||
|
#include <QFileDevice>
|
||||||
|
#include <QTextStream>
|
||||||
|
#include <QtDBus/QDBusConnectionInterface>
|
||||||
|
#include <QtDBus/QDBusInterface>
|
||||||
|
#include <QtDBus/QDBusReply>
|
||||||
|
|
||||||
|
namespace advss {
|
||||||
|
|
||||||
|
int FocusNotifier::activePID = -1;
|
||||||
|
std::string FocusNotifier::activeTitle = {};
|
||||||
|
|
||||||
|
int FocusNotifier::getActiveWindowPID()
|
||||||
|
{
|
||||||
|
return activePID;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string FocusNotifier::getActiveWindowTitle()
|
||||||
|
{
|
||||||
|
return activeTitle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FocusNotifier::focusChanged(const int pid)
|
||||||
|
{
|
||||||
|
activePID = pid;
|
||||||
|
}
|
||||||
|
|
||||||
|
void FocusNotifier::focusTitle(const QString &title)
|
||||||
|
{
|
||||||
|
activeTitle = title.toStdString();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isKWinAvailable()
|
||||||
|
{
|
||||||
|
const QDBusConnectionInterface *interface =
|
||||||
|
QDBusConnection::sessionBus().interface();
|
||||||
|
if (!interface)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
const QStringList services =
|
||||||
|
interface->registeredServiceNames().value();
|
||||||
|
return services.contains("org.kde.KWin");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool startKWinScript(QString &scriptObjectPath)
|
||||||
|
{
|
||||||
|
const QString scriptPath =
|
||||||
|
"/tmp/AdvancedSceneSwitcher/KWinFocusNotifier.js";
|
||||||
|
|
||||||
|
const QString script =
|
||||||
|
R"(workspace.windowActivated.connect(function(client) {
|
||||||
|
if (!client) return;
|
||||||
|
if (!client.pid) return;
|
||||||
|
if (!client.caption) return;
|
||||||
|
|
||||||
|
callDBus(
|
||||||
|
"com.github.AdvancedSceneSwitcher",
|
||||||
|
"/com/github/AdvancedSceneSwitcher",
|
||||||
|
"com.github.AdvancedSceneSwitcher",
|
||||||
|
"focusChanged",
|
||||||
|
client.pid
|
||||||
|
);
|
||||||
|
callDBus(
|
||||||
|
"com.github.AdvancedSceneSwitcher",
|
||||||
|
"/com/github/AdvancedSceneSwitcher",
|
||||||
|
"com.github.AdvancedSceneSwitcher",
|
||||||
|
"focusTitle",
|
||||||
|
client.caption
|
||||||
|
);
|
||||||
|
}))";
|
||||||
|
|
||||||
|
if (const QDir dir; !dir.mkpath(QFileInfo(scriptPath).absolutePath())) {
|
||||||
|
blog(LOG_ERROR, "error creating /tmp/AdvancedSceneSwitcher");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QFile scriptFile(scriptPath);
|
||||||
|
if (!scriptFile.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||||
|
blog(LOG_ERROR,
|
||||||
|
"error opening KWinFocusNotifier.js for writing");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
scriptFile.setPermissions(QFileDevice::ReadOwner |
|
||||||
|
QFileDevice::WriteOwner);
|
||||||
|
QTextStream outputStream(&scriptFile);
|
||||||
|
outputStream << script;
|
||||||
|
scriptFile.close();
|
||||||
|
|
||||||
|
const QDBusConnection bus = QDBusConnection::sessionBus();
|
||||||
|
|
||||||
|
QDBusInterface scriptingIface("org.kde.KWin", "/Scripting",
|
||||||
|
"org.kde.kwin.Scripting", bus);
|
||||||
|
if (!scriptingIface.isValid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QDBusReply<bool> scriptRunningReply =
|
||||||
|
scriptingIface.call("isScriptLoaded", scriptPath);
|
||||||
|
if (scriptRunningReply.isValid() && scriptRunningReply.value()) {
|
||||||
|
// script already registered and running, don't do it again
|
||||||
|
// this will leave the script running since we do not have
|
||||||
|
// a valid script id anymore, but at the very least this prevents
|
||||||
|
// it from running multiple times
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QDBusReply<int> scriptIdReply =
|
||||||
|
scriptingIface.call("loadScript", scriptPath);
|
||||||
|
if (!scriptIdReply.isValid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const int scriptId = scriptIdReply.value();
|
||||||
|
scriptObjectPath =
|
||||||
|
QString("/Scripting/Script%1").arg(QString::number(scriptId));
|
||||||
|
|
||||||
|
QDBusInterface scriptRunner("org.kde.KWin", scriptObjectPath,
|
||||||
|
"org.kde.kwin.Script", bus);
|
||||||
|
if (!scriptRunner.isValid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QDBusReply<void> runReply = scriptRunner.call("run");
|
||||||
|
return runReply.isValid();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool stopKWinScript(const QString &scriptObjectPath)
|
||||||
|
{
|
||||||
|
QDBusInterface scriptRunner("org.kde.KWin", scriptObjectPath,
|
||||||
|
"org.kde.kwin.Script",
|
||||||
|
QDBusConnection::sessionBus());
|
||||||
|
if (!scriptRunner.isValid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const QDBusReply<void> stopReply = scriptRunner.call("stop");
|
||||||
|
return stopReply.isValid();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool registerKWinDBusListener(FocusNotifier *notifier)
|
||||||
|
{
|
||||||
|
static const QString serviceName = "com.github.AdvancedSceneSwitcher";
|
||||||
|
static const QString objectPath = "/com/github/AdvancedSceneSwitcher";
|
||||||
|
auto bus = QDBusConnection::sessionBus();
|
||||||
|
|
||||||
|
if (bus.objectRegisteredAt(objectPath)) {
|
||||||
|
// already registered?
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bus.registerService(serviceName)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bus.registerObject(objectPath, notifier,
|
||||||
|
QDBusConnection::ExportAllSlots)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} // namespace advss
|
||||||
33
lib/linux/kwin-helpers.h
Normal file
33
lib/linux/kwin-helpers.h
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace advss {
|
||||||
|
|
||||||
|
class FocusNotifier final : public QObject {
|
||||||
|
Q_OBJECT
|
||||||
|
Q_CLASSINFO("D-Bus Interface", "com.github.AdvancedSceneSwitcher")
|
||||||
|
|
||||||
|
static int activePID;
|
||||||
|
static std::string activeTitle;
|
||||||
|
|
||||||
|
public:
|
||||||
|
using QObject::QObject;
|
||||||
|
|
||||||
|
static int getActiveWindowPID();
|
||||||
|
static std::string getActiveWindowTitle();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void focusChanged(const int pid);
|
||||||
|
void focusTitle(const QString &title);
|
||||||
|
};
|
||||||
|
|
||||||
|
bool isKWinAvailable();
|
||||||
|
bool startKWinScript(QString &scriptObjectPath);
|
||||||
|
bool stopKWinScript(const QString &scriptObjectPath);
|
||||||
|
bool registerKWinDBusListener(FocusNotifier *notifier);
|
||||||
|
void printDBusError();
|
||||||
|
|
||||||
|
} // namespace advss
|
||||||
@@ -7,8 +7,6 @@
|
|||||||
#include "section.hpp"
|
#include "section.hpp"
|
||||||
#include "switch-button.hpp"
|
#include "switch-button.hpp"
|
||||||
|
|
||||||
#include <QGraphicsOpacityEffect>
|
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
static inline void populateActionSelection(QComboBox *list)
|
static inline void populateActionSelection(QComboBox *list)
|
||||||
@@ -17,6 +15,9 @@ static inline void populateActionSelection(QComboBox *list)
|
|||||||
QString entry(obs_module_text(action._name.c_str()));
|
QString entry(obs_module_text(action._name.c_str()));
|
||||||
if (list->findText(entry) == -1) {
|
if (list->findText(entry) == -1) {
|
||||||
list->addItem(entry);
|
list->addItem(entry);
|
||||||
|
qobject_cast<QListView *>(list->view())
|
||||||
|
->setRowHidden(list->count() - 1,
|
||||||
|
action._hidden);
|
||||||
} else {
|
} else {
|
||||||
blog(LOG_WARNING,
|
blog(LOG_WARNING,
|
||||||
"did not insert duplicate action entry with name \"%s\"",
|
"did not insert duplicate action entry with name \"%s\"",
|
||||||
@@ -34,12 +35,14 @@ MacroActionEdit::MacroActionEdit(QWidget *parent,
|
|||||||
_enable(new SwitchButton()),
|
_enable(new SwitchButton()),
|
||||||
_entryData(entryData)
|
_entryData(entryData)
|
||||||
{
|
{
|
||||||
|
auto actionStateTimer = new QTimer(this);
|
||||||
|
|
||||||
QWidget::connect(_actionSelection,
|
QWidget::connect(_actionSelection,
|
||||||
SIGNAL(currentTextChanged(const QString &)), this,
|
SIGNAL(currentTextChanged(const QString &)), this,
|
||||||
SLOT(ActionSelectionChanged(const QString &)));
|
SLOT(ActionSelectionChanged(const QString &)));
|
||||||
QWidget::connect(_enable, SIGNAL(checked(bool)), this,
|
QWidget::connect(_enable, SIGNAL(checked(bool)), this,
|
||||||
SLOT(ActionEnableChanged(bool)));
|
SLOT(ActionEnableChanged(bool)));
|
||||||
QWidget::connect(&_actionStateTimer, SIGNAL(timeout()), this,
|
QWidget::connect(actionStateTimer, SIGNAL(timeout()), this,
|
||||||
SLOT(UpdateActionState()));
|
SLOT(UpdateActionState()));
|
||||||
|
|
||||||
populateActionSelection(_actionSelection);
|
populateActionSelection(_actionSelection);
|
||||||
@@ -60,12 +63,40 @@ MacroActionEdit::MacroActionEdit(QWidget *parent,
|
|||||||
setLayout(mainLayout);
|
setLayout(mainLayout);
|
||||||
|
|
||||||
_entryData = entryData;
|
_entryData = entryData;
|
||||||
UpdateEntryData(id);
|
SetupWidgets(true);
|
||||||
|
|
||||||
_actionStateTimer.start(300);
|
actionStateTimer->start(300);
|
||||||
_loading = false;
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroActionEdit::SetupWidgets(bool basicSetup)
|
||||||
|
{
|
||||||
|
if (_allWidgetsAreSetup) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto id = (*_entryData)->GetId();
|
||||||
|
_actionSelection->setCurrentText(
|
||||||
|
obs_module_text(MacroActionFactory::GetActionName(id).c_str()));
|
||||||
|
const bool enabled = (*_entryData)->Enabled();
|
||||||
|
_enable->setChecked(enabled);
|
||||||
|
SetDisableEffect(!enabled);
|
||||||
|
HeaderInfoChanged(
|
||||||
|
QString::fromStdString((*_entryData)->GetShortDesc()));
|
||||||
|
|
||||||
|
if (basicSetup) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto widget = MacroActionFactory::CreateWidget(id, this, *_entryData);
|
||||||
|
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
||||||
|
this, SLOT(HeaderInfoChanged(const QString &)));
|
||||||
|
_section->SetContent(widget, (*_entryData)->GetCollapsed());
|
||||||
|
SetFocusPolicyOfWidgets();
|
||||||
|
|
||||||
|
_allWidgetsAreSetup = true;
|
||||||
|
}
|
||||||
|
|
||||||
void MacroActionEdit::ActionSelectionChanged(const QString &text)
|
void MacroActionEdit::ActionSelectionChanged(const QString &text)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
if (_loading || !_entryData) {
|
||||||
@@ -95,38 +126,11 @@ void MacroActionEdit::ActionSelectionChanged(const QString &text)
|
|||||||
SetFocusPolicyOfWidgets();
|
SetFocusPolicyOfWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroActionEdit::UpdateEntryData(const std::string &id)
|
|
||||||
{
|
|
||||||
_actionSelection->setCurrentText(
|
|
||||||
obs_module_text(MacroActionFactory::GetActionName(id).c_str()));
|
|
||||||
const bool enabled = (*_entryData)->Enabled();
|
|
||||||
_enable->setChecked(enabled);
|
|
||||||
SetDisableEffect(!enabled);
|
|
||||||
auto widget = MacroActionFactory::CreateWidget(id, this, *_entryData);
|
|
||||||
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
|
||||||
this, SLOT(HeaderInfoChanged(const QString &)));
|
|
||||||
HeaderInfoChanged(
|
|
||||||
QString::fromStdString((*_entryData)->GetShortDesc()));
|
|
||||||
_section->SetContent(widget, (*_entryData)->GetCollapsed());
|
|
||||||
SetFocusPolicyOfWidgets();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MacroActionEdit::SetEntryData(std::shared_ptr<MacroAction> *data)
|
void MacroActionEdit::SetEntryData(std::shared_ptr<MacroAction> *data)
|
||||||
{
|
{
|
||||||
_entryData = data;
|
_entryData = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroActionEdit::SetDisableEffect(bool value)
|
|
||||||
{
|
|
||||||
if (value) {
|
|
||||||
auto effect = new QGraphicsOpacityEffect(this);
|
|
||||||
effect->setOpacity(0.5);
|
|
||||||
_section->setGraphicsEffect(effect);
|
|
||||||
} else {
|
|
||||||
_section->setGraphicsEffect(nullptr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void MacroActionEdit::ActionEnableChanged(bool value)
|
void MacroActionEdit::ActionEnableChanged(bool value)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
if (_loading || !_entryData) {
|
||||||
@@ -144,13 +148,9 @@ void MacroActionEdit::UpdateActionState()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetEnableAppearance((*_entryData)->Enabled());
|
const bool enabled = (*_entryData)->Enabled();
|
||||||
}
|
SetEnableAppearance(enabled);
|
||||||
|
_enable->setChecked(enabled);
|
||||||
void MacroActionEdit::SetEnableAppearance(bool value)
|
|
||||||
{
|
|
||||||
_enable->setChecked(value);
|
|
||||||
SetDisableEffect(!value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<MacroSegment> MacroActionEdit::Data() const
|
std::shared_ptr<MacroSegment> MacroActionEdit::Data() const
|
||||||
@@ -158,473 +158,4 @@ std::shared_ptr<MacroSegment> MacroActionEdit::Data() const
|
|||||||
return *_entryData;
|
return *_entryData;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::AddMacroAction(Macro *macro, int idx,
|
|
||||||
const std::string &id, obs_data_t *data)
|
|
||||||
{
|
|
||||||
if (idx < 0 || idx > (int)macro->Actions().size()) {
|
|
||||||
assert(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto lock = LockContext();
|
|
||||||
macro->Actions().emplace(macro->Actions().begin() + idx,
|
|
||||||
MacroActionFactory::Create(id, macro));
|
|
||||||
if (data) {
|
|
||||||
macro->Actions().at(idx)->Load(data);
|
|
||||||
}
|
|
||||||
macro->Actions().at(idx)->PostLoad();
|
|
||||||
RunPostLoadSteps();
|
|
||||||
macro->UpdateActionIndices();
|
|
||||||
ui->actionsList->Insert(
|
|
||||||
idx,
|
|
||||||
new MacroActionEdit(this, ¯o->Actions()[idx], id));
|
|
||||||
SetActionData(*macro);
|
|
||||||
}
|
|
||||||
HighlightAction(idx);
|
|
||||||
ui->actionsList->SetHelpMsgVisible(false);
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::AddMacroAction(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 0 || idx > (int)macro->Actions().size()) {
|
|
||||||
assert(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string id;
|
|
||||||
if (idx - 1 >= 0) {
|
|
||||||
id = macro->Actions().at(idx - 1)->GetId();
|
|
||||||
} else {
|
|
||||||
id = MacroAction::GetDefaultID();
|
|
||||||
}
|
|
||||||
|
|
||||||
OBSDataAutoRelease data;
|
|
||||||
if (idx - 1 >= 0) {
|
|
||||||
data = obs_data_create();
|
|
||||||
macro->Actions().at(idx - 1)->Save(data);
|
|
||||||
}
|
|
||||||
AddMacroAction(macro.get(), idx, id, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_actionAdd_clicked()
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentActionIdx == -1) {
|
|
||||||
AddMacroAction((int)macro->Actions().size());
|
|
||||||
} else {
|
|
||||||
AddMacroAction(currentActionIdx + 1);
|
|
||||||
}
|
|
||||||
if (currentActionIdx != -1) {
|
|
||||||
MacroActionSelectionChanged(currentActionIdx + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::RemoveMacroAction(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 0 || idx >= (int)macro->Actions().size()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto lock = LockContext();
|
|
||||||
ui->actionsList->Remove(idx);
|
|
||||||
macro->Actions().erase(macro->Actions().begin() + idx);
|
|
||||||
SetMacroAbortWait(true);
|
|
||||||
GetMacroWaitCV().notify_all();
|
|
||||||
macro->UpdateActionIndices();
|
|
||||||
SetActionData(*macro);
|
|
||||||
}
|
|
||||||
MacroActionSelectionChanged(-1);
|
|
||||||
lastInteracted = MacroSection::ACTIONS;
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_actionRemove_clicked()
|
|
||||||
{
|
|
||||||
if (currentActionIdx == -1) {
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
RemoveMacroAction((int)macro->Actions().size() - 1);
|
|
||||||
} else {
|
|
||||||
RemoveMacroAction(currentActionIdx);
|
|
||||||
}
|
|
||||||
MacroActionSelectionChanged(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_actionTop_clicked()
|
|
||||||
{
|
|
||||||
if (currentActionIdx == -1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MacroActionReorder(0, currentActionIdx);
|
|
||||||
MacroActionSelectionChanged(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_actionUp_clicked()
|
|
||||||
{
|
|
||||||
if (currentActionIdx == -1 || currentActionIdx == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MoveMacroActionUp(currentActionIdx);
|
|
||||||
MacroActionSelectionChanged(currentActionIdx - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_actionDown_clicked()
|
|
||||||
{
|
|
||||||
if (currentActionIdx == -1 ||
|
|
||||||
currentActionIdx == ui->actionsList->ContentLayout()->count() - 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MoveMacroActionDown(currentActionIdx);
|
|
||||||
MacroActionSelectionChanged(currentActionIdx + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_actionBottom_clicked()
|
|
||||||
{
|
|
||||||
if (currentActionIdx == -1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const int newIdx = ui->actionsList->ContentLayout()->count() - 1;
|
|
||||||
MacroActionReorder(newIdx, currentActionIdx);
|
|
||||||
MacroActionSelectionChanged(newIdx);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_elseActionAdd_clicked()
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentElseActionIdx == -1) {
|
|
||||||
AddMacroElseAction((int)macro->ElseActions().size());
|
|
||||||
} else {
|
|
||||||
AddMacroElseAction(currentElseActionIdx + 1);
|
|
||||||
}
|
|
||||||
if (currentElseActionIdx != -1) {
|
|
||||||
MacroElseActionSelectionChanged(currentElseActionIdx + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_elseActionRemove_clicked()
|
|
||||||
{
|
|
||||||
if (currentElseActionIdx == -1) {
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
RemoveMacroElseAction((int)macro->ElseActions().size() - 1);
|
|
||||||
} else {
|
|
||||||
RemoveMacroElseAction(currentElseActionIdx);
|
|
||||||
}
|
|
||||||
MacroElseActionSelectionChanged(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_elseActionTop_clicked()
|
|
||||||
{
|
|
||||||
if (currentElseActionIdx == -1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MacroElseActionReorder(0, currentElseActionIdx);
|
|
||||||
MacroElseActionSelectionChanged(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_elseActionUp_clicked()
|
|
||||||
{
|
|
||||||
if (currentElseActionIdx == -1 || currentElseActionIdx == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MoveMacroElseActionUp(currentElseActionIdx);
|
|
||||||
MacroElseActionSelectionChanged(currentElseActionIdx - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_elseActionDown_clicked()
|
|
||||||
{
|
|
||||||
if (currentElseActionIdx == -1 ||
|
|
||||||
currentElseActionIdx ==
|
|
||||||
ui->elseActionsList->ContentLayout()->count() - 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MoveMacroElseActionDown(currentElseActionIdx);
|
|
||||||
MacroElseActionSelectionChanged(currentElseActionIdx + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_elseActionBottom_clicked()
|
|
||||||
{
|
|
||||||
if (currentElseActionIdx == -1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const int newIdx = ui->elseActionsList->ContentLayout()->count() - 1;
|
|
||||||
MacroElseActionReorder(newIdx, currentElseActionIdx);
|
|
||||||
MacroElseActionSelectionChanged(newIdx);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::SwapActions(Macro *m, int pos1, int pos2)
|
|
||||||
{
|
|
||||||
if (pos1 == pos2) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (pos1 > pos2) {
|
|
||||||
std::swap(pos1, pos2);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
iter_swap(m->Actions().begin() + pos1, m->Actions().begin() + pos2);
|
|
||||||
m->UpdateActionIndices();
|
|
||||||
auto widget1 = static_cast<MacroActionEdit *>(
|
|
||||||
ui->actionsList->ContentLayout()->takeAt(pos1)->widget());
|
|
||||||
auto widget2 = static_cast<MacroActionEdit *>(
|
|
||||||
ui->actionsList->ContentLayout()->takeAt(pos2 - 1)->widget());
|
|
||||||
ui->actionsList->Insert(pos1, widget2);
|
|
||||||
ui->actionsList->Insert(pos2, widget1);
|
|
||||||
SetActionData(*m);
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MoveMacroActionUp(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 1 || idx >= (int)macro->Actions().size()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SwapActions(macro.get(), idx, idx - 1);
|
|
||||||
HighlightAction(idx - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MoveMacroActionDown(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 0 || idx >= (int)macro->Actions().size() - 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SwapActions(macro.get(), idx, idx + 1);
|
|
||||||
HighlightAction(idx + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MacroElseActionSelectionChanged(int idx)
|
|
||||||
{
|
|
||||||
SetupMacroSegmentSelection(MacroSection::ELSE_ACTIONS, idx);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MacroElseActionReorder(int to, int from)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (to == from || from < 0 || from > (int)macro->ElseActions().size() ||
|
|
||||||
to < 0 || to > (int)macro->ElseActions().size()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
auto lock = LockContext();
|
|
||||||
auto action = macro->ElseActions().at(from);
|
|
||||||
macro->ElseActions().erase(macro->ElseActions().begin() + from);
|
|
||||||
macro->ElseActions().insert(macro->ElseActions().begin() + to,
|
|
||||||
action);
|
|
||||||
macro->UpdateElseActionIndices();
|
|
||||||
ui->elseActionsList->ContentLayout()->insertItem(
|
|
||||||
to, ui->elseActionsList->ContentLayout()->takeAt(from));
|
|
||||||
SetElseActionData(*macro);
|
|
||||||
}
|
|
||||||
HighlightElseAction(to);
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::AddMacroElseAction(Macro *macro, int idx,
|
|
||||||
const std::string &id,
|
|
||||||
obs_data_t *data)
|
|
||||||
{
|
|
||||||
if (idx < 0 || idx > (int)macro->ElseActions().size()) {
|
|
||||||
assert(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto lock = LockContext();
|
|
||||||
macro->ElseActions().emplace(macro->ElseActions().begin() + idx,
|
|
||||||
MacroActionFactory::Create(id,
|
|
||||||
macro));
|
|
||||||
if (data) {
|
|
||||||
macro->ElseActions().at(idx)->Load(data);
|
|
||||||
}
|
|
||||||
macro->ElseActions().at(idx)->PostLoad();
|
|
||||||
RunPostLoadSteps();
|
|
||||||
macro->UpdateElseActionIndices();
|
|
||||||
ui->elseActionsList->Insert(
|
|
||||||
idx, new MacroActionEdit(
|
|
||||||
this, ¯o->ElseActions()[idx], id));
|
|
||||||
SetElseActionData(*macro);
|
|
||||||
}
|
|
||||||
HighlightElseAction(idx);
|
|
||||||
ui->elseActionsList->SetHelpMsgVisible(false);
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::AddMacroElseAction(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 0 || idx > (int)macro->ElseActions().size()) {
|
|
||||||
assert(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string id;
|
|
||||||
if (idx - 1 >= 0) {
|
|
||||||
id = macro->ElseActions().at(idx - 1)->GetId();
|
|
||||||
} else {
|
|
||||||
id = MacroAction::GetDefaultID();
|
|
||||||
}
|
|
||||||
|
|
||||||
OBSDataAutoRelease data;
|
|
||||||
if (idx - 1 >= 0) {
|
|
||||||
data = obs_data_create();
|
|
||||||
macro->ElseActions().at(idx - 1)->Save(data);
|
|
||||||
}
|
|
||||||
AddMacroElseAction(macro.get(), idx, id, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::RemoveMacroElseAction(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 0 || idx >= (int)macro->ElseActions().size()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto lock = LockContext();
|
|
||||||
ui->elseActionsList->Remove(idx);
|
|
||||||
macro->ElseActions().erase(macro->ElseActions().begin() + idx);
|
|
||||||
SetMacroAbortWait(true);
|
|
||||||
GetMacroWaitCV().notify_all();
|
|
||||||
macro->UpdateElseActionIndices();
|
|
||||||
SetElseActionData(*macro);
|
|
||||||
}
|
|
||||||
MacroElseActionSelectionChanged(-1);
|
|
||||||
lastInteracted = MacroSection::ELSE_ACTIONS;
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::SwapElseActions(Macro *m, int pos1, int pos2)
|
|
||||||
{
|
|
||||||
if (pos1 == pos2) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (pos1 > pos2) {
|
|
||||||
std::swap(pos1, pos2);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
iter_swap(m->ElseActions().begin() + pos1,
|
|
||||||
m->ElseActions().begin() + pos2);
|
|
||||||
m->UpdateElseActionIndices();
|
|
||||||
auto widget1 = static_cast<MacroActionEdit *>(
|
|
||||||
ui->elseActionsList->ContentLayout()->takeAt(pos1)->widget());
|
|
||||||
auto widget2 = static_cast<MacroActionEdit *>(
|
|
||||||
ui->elseActionsList->ContentLayout()
|
|
||||||
->takeAt(pos2 - 1)
|
|
||||||
->widget());
|
|
||||||
ui->elseActionsList->Insert(pos1, widget2);
|
|
||||||
ui->elseActionsList->Insert(pos2, widget1);
|
|
||||||
SetElseActionData(*m);
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MoveMacroElseActionUp(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 1 || idx >= (int)macro->ElseActions().size()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SwapElseActions(macro.get(), idx, idx - 1);
|
|
||||||
HighlightElseAction(idx - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MoveMacroElseActionDown(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 0 || idx >= (int)macro->ElseActions().size() - 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SwapElseActions(macro.get(), idx, idx + 1);
|
|
||||||
HighlightElseAction(idx + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MacroActionSelectionChanged(int idx)
|
|
||||||
{
|
|
||||||
SetupMacroSegmentSelection(MacroSection::ACTIONS, idx);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MacroActionReorder(int to, int from)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (to == from || from < 0 || from > (int)macro->Actions().size() ||
|
|
||||||
to < 0 || to > (int)macro->Actions().size()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
auto lock = LockContext();
|
|
||||||
auto action = macro->Actions().at(from);
|
|
||||||
macro->Actions().erase(macro->Actions().begin() + from);
|
|
||||||
macro->Actions().insert(macro->Actions().begin() + to, action);
|
|
||||||
macro->UpdateActionIndices();
|
|
||||||
ui->actionsList->ContentLayout()->insertItem(
|
|
||||||
to, ui->actionsList->ContentLayout()->takeAt(from));
|
|
||||||
SetActionData(*macro);
|
|
||||||
}
|
|
||||||
HighlightAction(to);
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public:
|
|||||||
QWidget *parent = nullptr,
|
QWidget *parent = nullptr,
|
||||||
std::shared_ptr<MacroAction> * = nullptr,
|
std::shared_ptr<MacroAction> * = nullptr,
|
||||||
const std::string &id = MacroAction::GetDefaultID().data());
|
const std::string &id = MacroAction::GetDefaultID().data());
|
||||||
void UpdateEntryData(const std::string &id);
|
void SetupWidgets(bool basicSetup = false);
|
||||||
void SetEntryData(std::shared_ptr<MacroAction> *);
|
void SetEntryData(std::shared_ptr<MacroAction> *);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@@ -27,14 +27,11 @@ private slots:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<MacroSegment> Data() const;
|
std::shared_ptr<MacroSegment> Data() const;
|
||||||
void SetDisableEffect(bool);
|
|
||||||
void SetEnableAppearance(bool);
|
|
||||||
|
|
||||||
FilterComboBox *_actionSelection;
|
FilterComboBox *_actionSelection;
|
||||||
SwitchButton *_enable;
|
SwitchButton *_enable;
|
||||||
|
|
||||||
std::shared_ptr<MacroAction> *_entryData;
|
std::shared_ptr<MacroAction> *_entryData;
|
||||||
QTimer _actionStateTimer;
|
|
||||||
bool _loading = true;
|
bool _loading = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ struct MacroActionInfo {
|
|||||||
std::function<std::shared_ptr<MacroAction>(Macro *m)> _create = nullptr;
|
std::function<std::shared_ptr<MacroAction>(Macro *m)> _create = nullptr;
|
||||||
CreateActionWidget _createWidget = nullptr;
|
CreateActionWidget _createWidget = nullptr;
|
||||||
std::string _name;
|
std::string _name;
|
||||||
|
bool _hidden = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MacroActionFactory {
|
class MacroActionFactory {
|
||||||
@@ -19,7 +20,7 @@ public:
|
|||||||
MacroActionFactory() = delete;
|
MacroActionFactory() = delete;
|
||||||
|
|
||||||
EXPORT static bool Register(const std::string &id, MacroActionInfo);
|
EXPORT static bool Register(const std::string &id, MacroActionInfo);
|
||||||
static bool Deregister(const std::string &id);
|
EXPORT static bool Deregister(const std::string &id);
|
||||||
static std::shared_ptr<MacroAction> Create(const std::string &id,
|
static std::shared_ptr<MacroAction> Create(const std::string &id,
|
||||||
Macro *m);
|
Macro *m);
|
||||||
static QWidget *CreateWidget(const std::string &id, QWidget *parent,
|
static QWidget *CreateWidget(const std::string &id, QWidget *parent,
|
||||||
|
|||||||
@@ -12,27 +12,13 @@ bool MacroActionMacro::_registered = MacroActionFactory::Register(
|
|||||||
{MacroActionMacro::Create, MacroActionMacroEdit::Create,
|
{MacroActionMacro::Create, MacroActionMacroEdit::Create,
|
||||||
"AdvSceneSwitcher.action.macro"});
|
"AdvSceneSwitcher.action.macro"});
|
||||||
|
|
||||||
const static std::map<MacroActionMacro::Action, std::string> actionTypes = {
|
|
||||||
{MacroActionMacro::Action::PAUSE,
|
|
||||||
"AdvSceneSwitcher.action.macro.type.pause"},
|
|
||||||
{MacroActionMacro::Action::UNPAUSE,
|
|
||||||
"AdvSceneSwitcher.action.macro.type.unpause"},
|
|
||||||
{MacroActionMacro::Action::RESET_COUNTER,
|
|
||||||
"AdvSceneSwitcher.action.macro.type.resetCounter"},
|
|
||||||
{MacroActionMacro::Action::RUN,
|
|
||||||
"AdvSceneSwitcher.action.macro.type.run"},
|
|
||||||
{MacroActionMacro::Action::STOP,
|
|
||||||
"AdvSceneSwitcher.action.macro.type.stop"},
|
|
||||||
{MacroActionMacro::Action::DISABLE_ACTION,
|
|
||||||
"AdvSceneSwitcher.action.macro.type.disableAction"},
|
|
||||||
{MacroActionMacro::Action::ENABLE_ACTION,
|
|
||||||
"AdvSceneSwitcher.action.macro.type.enableAction"},
|
|
||||||
{MacroActionMacro::Action::TOGGLE_ACTION,
|
|
||||||
"AdvSceneSwitcher.action.macro.type.toggleAction"},
|
|
||||||
};
|
|
||||||
|
|
||||||
bool MacroActionMacro::PerformAction()
|
bool MacroActionMacro::PerformAction()
|
||||||
{
|
{
|
||||||
|
if (_action == Action::NESTED_MACRO) {
|
||||||
|
const bool conditionsMatched = _nestedMacro->CheckConditions();
|
||||||
|
return _nestedMacro->PerformActions(conditionsMatched);
|
||||||
|
}
|
||||||
|
|
||||||
auto macro = _macro.GetMacro();
|
auto macro = _macro.GetMacro();
|
||||||
if (!macro) {
|
if (!macro) {
|
||||||
return true;
|
return true;
|
||||||
@@ -45,10 +31,13 @@ bool MacroActionMacro::PerformAction()
|
|||||||
case Action::UNPAUSE:
|
case Action::UNPAUSE:
|
||||||
macro->SetPaused(false);
|
macro->SetPaused(false);
|
||||||
break;
|
break;
|
||||||
|
case Action::TOGGLE_PAUSE:
|
||||||
|
macro->SetPaused(!macro->Paused());
|
||||||
|
break;
|
||||||
case Action::RESET_COUNTER:
|
case Action::RESET_COUNTER:
|
||||||
macro->ResetRunCount();
|
macro->ResetRunCount();
|
||||||
break;
|
break;
|
||||||
case Action::RUN:
|
case Action::RUN_ACTIONS:
|
||||||
RunActions(macro.get());
|
RunActions(macro.get());
|
||||||
break;
|
break;
|
||||||
case Action::STOP:
|
case Action::STOP:
|
||||||
@@ -96,7 +85,7 @@ void MacroActionMacro::LogAction() const
|
|||||||
ablog(LOG_INFO, "reset counter for \"%s\"",
|
ablog(LOG_INFO, "reset counter for \"%s\"",
|
||||||
macro->Name().c_str());
|
macro->Name().c_str());
|
||||||
break;
|
break;
|
||||||
case Action::RUN:
|
case Action::RUN_ACTIONS:
|
||||||
ablog(LOG_INFO, "run nested macro \"%s\"",
|
ablog(LOG_INFO, "run nested macro \"%s\"",
|
||||||
macro->Name().c_str());
|
macro->Name().c_str());
|
||||||
break;
|
break;
|
||||||
@@ -115,6 +104,9 @@ void MacroActionMacro::LogAction() const
|
|||||||
ablog(LOG_INFO, "toggled action %d of macro \"%s\"",
|
ablog(LOG_INFO, "toggled action %d of macro \"%s\"",
|
||||||
_actionIndex.GetValue(), macro->Name().c_str());
|
_actionIndex.GetValue(), macro->Name().c_str());
|
||||||
break;
|
break;
|
||||||
|
case Action::NESTED_MACRO:
|
||||||
|
ablog(LOG_INFO, "run nested macro");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -127,6 +119,10 @@ bool MacroActionMacro::Save(obs_data_t *obj) const
|
|||||||
_actionIndex.Save(obj, "actionIndex");
|
_actionIndex.Save(obj, "actionIndex");
|
||||||
obs_data_set_int(obj, "action", static_cast<int>(_action));
|
obs_data_set_int(obj, "action", static_cast<int>(_action));
|
||||||
_runOptions.Save(obj);
|
_runOptions.Save(obj);
|
||||||
|
OBSDataAutoRelease nestedMacroData = obs_data_create();
|
||||||
|
_nestedMacro->Save(nestedMacroData);
|
||||||
|
obs_data_set_obj(obj, "nestedMacro", nestedMacroData);
|
||||||
|
obs_data_set_int(obj, "customWidgetHeight", _customWidgetHeight);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,6 +134,16 @@ bool MacroActionMacro::Load(obs_data_t *obj)
|
|||||||
_action = static_cast<MacroActionMacro::Action>(
|
_action = static_cast<MacroActionMacro::Action>(
|
||||||
obs_data_get_int(obj, "action"));
|
obs_data_get_int(obj, "action"));
|
||||||
_runOptions.Load(obj);
|
_runOptions.Load(obj);
|
||||||
|
|
||||||
|
if (obs_data_has_user_value(obj, "nestedMacro")) {
|
||||||
|
OBSDataAutoRelease nestedMacroData =
|
||||||
|
obs_data_get_obj(obj, "nestedMacro");
|
||||||
|
_nestedMacro->Load(nestedMacroData);
|
||||||
|
_nestedMacro->PostLoad();
|
||||||
|
}
|
||||||
|
|
||||||
|
_customWidgetHeight = obs_data_get_int(obj, "customWidgetHeight");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,8 +216,33 @@ void MacroActionMacro::RunActions(Macro *actionMacro) const
|
|||||||
|
|
||||||
static void populateActionSelection(QComboBox *list)
|
static void populateActionSelection(QComboBox *list)
|
||||||
{
|
{
|
||||||
for (const auto &[_, name] : actionTypes) {
|
static const std::vector<std::pair<MacroActionMacro::Action, std::string>>
|
||||||
list->addItem(obs_module_text(name.c_str()));
|
actions = {
|
||||||
|
{MacroActionMacro::Action::PAUSE,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.pause"},
|
||||||
|
{MacroActionMacro::Action::UNPAUSE,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.unpause"},
|
||||||
|
{MacroActionMacro::Action::TOGGLE_PAUSE,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.togglePause"},
|
||||||
|
{MacroActionMacro::Action::RESET_COUNTER,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.resetCounter"},
|
||||||
|
{MacroActionMacro::Action::NESTED_MACRO,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.nestedMacro"},
|
||||||
|
{MacroActionMacro::Action::RUN_ACTIONS,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.run"},
|
||||||
|
{MacroActionMacro::Action::STOP,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.stop"},
|
||||||
|
{MacroActionMacro::Action::DISABLE_ACTION,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.disableAction"},
|
||||||
|
{MacroActionMacro::Action::ENABLE_ACTION,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.enableAction"},
|
||||||
|
{MacroActionMacro::Action::TOGGLE_ACTION,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.toggleAction"},
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const auto &[value, name] : actions) {
|
||||||
|
list->addItem(obs_module_text(name.c_str()),
|
||||||
|
static_cast<int>(value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +266,7 @@ static void populateActionTypeSelection(QComboBox *list)
|
|||||||
|
|
||||||
MacroActionMacroEdit::MacroActionMacroEdit(
|
MacroActionMacroEdit::MacroActionMacroEdit(
|
||||||
QWidget *parent, std::shared_ptr<MacroActionMacro> entryData)
|
QWidget *parent, std::shared_ptr<MacroActionMacro> entryData)
|
||||||
: QWidget(parent),
|
: ResizableWidget(parent),
|
||||||
_macros(new MacroSelection(parent)),
|
_macros(new MacroSelection(parent)),
|
||||||
_actionIndex(new MacroSegmentSelection(
|
_actionIndex(new MacroSegmentSelection(
|
||||||
this, MacroSegmentSelection::Type::ACTION)),
|
this, MacroSegmentSelection::Type::ACTION)),
|
||||||
@@ -254,7 +285,13 @@ MacroActionMacroEdit::MacroActionMacroEdit(
|
|||||||
_entryLayout(new QHBoxLayout()),
|
_entryLayout(new QHBoxLayout()),
|
||||||
_conditionLayout(new QHBoxLayout()),
|
_conditionLayout(new QHBoxLayout()),
|
||||||
_reevaluateConditionStateLayout(new QHBoxLayout()),
|
_reevaluateConditionStateLayout(new QHBoxLayout()),
|
||||||
_setInputsLayout(new QHBoxLayout())
|
_setInputsLayout(new QHBoxLayout()),
|
||||||
|
_nestedMacro(new MacroEdit(
|
||||||
|
this,
|
||||||
|
QStringList()
|
||||||
|
<< "AdvSceneSwitcher.action.macro.type.nestedMacro.conditionHelp"
|
||||||
|
<< "AdvSceneSwitcher.action.macro.type.nestedMacro.actionHelp"
|
||||||
|
<< "AdvSceneSwitcher.action.macro.type.nestedMacro.elseActionHelp"))
|
||||||
{
|
{
|
||||||
populateActionSelection(_actions);
|
populateActionSelection(_actions);
|
||||||
populateConditionBehaviorSelection(_conditionBehaviors);
|
populateConditionBehaviorSelection(_conditionBehaviors);
|
||||||
@@ -303,17 +340,24 @@ MacroActionMacroEdit::MacroActionMacroEdit(
|
|||||||
layout->addLayout(_setInputsLayout);
|
layout->addLayout(_setInputsLayout);
|
||||||
layout->addWidget(_inputs);
|
layout->addWidget(_inputs);
|
||||||
layout->addWidget(_skipWhenPaused);
|
layout->addWidget(_skipWhenPaused);
|
||||||
|
layout->addWidget(_nestedMacro);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
_entryData = entryData;
|
_entryData = entryData;
|
||||||
UpdateEntryData();
|
UpdateEntryData();
|
||||||
_loading = false;
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HighligthMacroSettingsButton(bool enable);
|
void HighlightMacroSettingsButton(bool enable);
|
||||||
|
|
||||||
MacroActionMacroEdit::~MacroActionMacroEdit()
|
MacroActionMacroEdit::~MacroActionMacroEdit()
|
||||||
{
|
{
|
||||||
HighligthMacroSettingsButton(false);
|
HighlightMacroSettingsButton(false);
|
||||||
|
|
||||||
|
if (!_entryData) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_entryData->_customWidgetHeight = GetCustomHeight();
|
||||||
|
_nestedMacro->SetMacro({}); // Save splitter states
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroActionMacroEdit::UpdateEntryData()
|
void MacroActionMacroEdit::UpdateEntryData()
|
||||||
@@ -321,7 +365,8 @@ void MacroActionMacroEdit::UpdateEntryData()
|
|||||||
if (!_entryData) {
|
if (!_entryData) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_actions->setCurrentIndex(static_cast<int>(_entryData->_action));
|
_actions->setCurrentIndex(
|
||||||
|
_actions->findData(static_cast<int>(_entryData->_action)));
|
||||||
_actionIndex->SetValue(_entryData->_actionIndex);
|
_actionIndex->SetValue(_entryData->_actionIndex);
|
||||||
_actionIndex->SetMacro(_entryData->_macro.GetMacro());
|
_actionIndex->SetMacro(_entryData->_macro.GetMacro());
|
||||||
_macros->SetCurrentMacro(_entryData->_macro);
|
_macros->SetCurrentMacro(_entryData->_macro);
|
||||||
@@ -335,9 +380,20 @@ void MacroActionMacroEdit::UpdateEntryData()
|
|||||||
_skipWhenPaused->setChecked(_entryData->_runOptions.skipWhenPaused);
|
_skipWhenPaused->setChecked(_entryData->_runOptions.skipWhenPaused);
|
||||||
_setInputs->setChecked(_entryData->_runOptions.setInputs);
|
_setInputs->setChecked(_entryData->_runOptions.setInputs);
|
||||||
SetupMacroInput(_entryData->_macro.GetMacro().get());
|
SetupMacroInput(_entryData->_macro.GetMacro().get());
|
||||||
|
|
||||||
|
const auto ¯o = _entryData->_nestedMacro;
|
||||||
|
_nestedMacro->SetMacro(macro);
|
||||||
|
|
||||||
SetWidgetVisibility();
|
SetWidgetVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWidget *MacroActionMacroEdit::Create(QWidget *parent,
|
||||||
|
std::shared_ptr<MacroAction> action)
|
||||||
|
{
|
||||||
|
return new MacroActionMacroEdit(
|
||||||
|
parent, std::dynamic_pointer_cast<MacroActionMacro>(action));
|
||||||
|
}
|
||||||
|
|
||||||
void MacroActionMacroEdit::MacroChanged(const QString &text)
|
void MacroActionMacroEdit::MacroChanged(const QString &text)
|
||||||
{
|
{
|
||||||
GUARD_LOADING_AND_LOCK();
|
GUARD_LOADING_AND_LOCK();
|
||||||
@@ -350,10 +406,11 @@ void MacroActionMacroEdit::MacroChanged(const QString &text)
|
|||||||
SetWidgetVisibility();
|
SetWidgetVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroActionMacroEdit::ActionChanged(int value)
|
void MacroActionMacroEdit::ActionChanged(int idx)
|
||||||
{
|
{
|
||||||
GUARD_LOADING_AND_LOCK();
|
GUARD_LOADING_AND_LOCK();
|
||||||
_entryData->_action = static_cast<MacroActionMacro::Action>(value);
|
_entryData->_action = static_cast<MacroActionMacro::Action>(
|
||||||
|
_actions->itemData(idx).toInt());
|
||||||
SetWidgetVisibility();
|
SetWidgetVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +492,8 @@ void MacroActionMacroEdit::SetWidgetVisibility()
|
|||||||
|
|
||||||
PlaceWidgets(
|
PlaceWidgets(
|
||||||
obs_module_text(
|
obs_module_text(
|
||||||
_entryData->_action == MacroActionMacro::Action::RUN
|
_entryData->_action ==
|
||||||
|
MacroActionMacro::Action::RUN_ACTIONS
|
||||||
? "AdvSceneSwitcher.action.macro.entry.run"
|
? "AdvSceneSwitcher.action.macro.entry.run"
|
||||||
: "AdvSceneSwitcher.action.macro.entry.other"),
|
: "AdvSceneSwitcher.action.macro.entry.other"),
|
||||||
_entryLayout, placeholders);
|
_entryLayout, placeholders);
|
||||||
@@ -451,7 +509,7 @@ void MacroActionMacroEdit::SetWidgetVisibility()
|
|||||||
_conditionLayout, placeholders);
|
_conditionLayout, placeholders);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_entryData->_action == MacroActionMacro::Action::RUN ||
|
if (_entryData->_action == MacroActionMacro::Action::RUN_ACTIONS ||
|
||||||
_entryData->_action == MacroActionMacro::Action::STOP) {
|
_entryData->_action == MacroActionMacro::Action::STOP) {
|
||||||
_macros->HideSelectedMacro();
|
_macros->HideSelectedMacro();
|
||||||
} else {
|
} else {
|
||||||
@@ -467,27 +525,43 @@ void MacroActionMacroEdit::SetWidgetVisibility()
|
|||||||
_actionIndex->setVisible(isModifyingActionState);
|
_actionIndex->setVisible(isModifyingActionState);
|
||||||
|
|
||||||
SetLayoutVisible(_conditionLayout,
|
SetLayoutVisible(_conditionLayout,
|
||||||
_entryData->_action == MacroActionMacro::Action::RUN);
|
_entryData->_action ==
|
||||||
|
MacroActionMacro::Action::RUN_ACTIONS);
|
||||||
const bool needsAdditionalConditionWidgets =
|
const bool needsAdditionalConditionWidgets =
|
||||||
_entryData->_action == MacroActionMacro::Action::RUN &&
|
_entryData->_action == MacroActionMacro::Action::RUN_ACTIONS &&
|
||||||
_entryData->_runOptions.logic !=
|
_entryData->_runOptions.logic !=
|
||||||
MacroActionMacro::RunOptions::Logic::IGNORE_CONDITIONS;
|
MacroActionMacro::RunOptions::Logic::IGNORE_CONDITIONS;
|
||||||
_conditionMacros->setVisible(needsAdditionalConditionWidgets);
|
_conditionMacros->setVisible(needsAdditionalConditionWidgets);
|
||||||
SetLayoutVisible(_reevaluateConditionStateLayout,
|
SetLayoutVisible(_reevaluateConditionStateLayout,
|
||||||
needsAdditionalConditionWidgets);
|
needsAdditionalConditionWidgets);
|
||||||
SetLayoutVisible(_setInputsLayout,
|
SetLayoutVisible(_setInputsLayout,
|
||||||
_entryData->_action == MacroActionMacro::Action::RUN);
|
_entryData->_action ==
|
||||||
|
MacroActionMacro::Action::RUN_ACTIONS);
|
||||||
_inputs->setVisible(_entryData->_action ==
|
_inputs->setVisible(_entryData->_action ==
|
||||||
MacroActionMacro::Action::RUN &&
|
MacroActionMacro::Action::RUN_ACTIONS &&
|
||||||
_entryData->_runOptions.setInputs);
|
_entryData->_runOptions.setInputs);
|
||||||
HighligthMacroSettingsButton(_entryData->_action ==
|
HighlightMacroSettingsButton(
|
||||||
MacroActionMacro::Action::RUN &&
|
_entryData->_action == MacroActionMacro::Action::RUN_ACTIONS &&
|
||||||
_entryData->_runOptions.setInputs &&
|
_entryData->_runOptions.setInputs &&
|
||||||
!_inputs->HasInputsToSet());
|
!_inputs->HasInputsToSet());
|
||||||
_actionTypes->setVisible(_entryData->_action ==
|
_actionTypes->setVisible(_entryData->_action ==
|
||||||
MacroActionMacro::Action::RUN);
|
MacroActionMacro::Action::RUN_ACTIONS);
|
||||||
_skipWhenPaused->setVisible(_entryData->_action ==
|
_skipWhenPaused->setVisible(_entryData->_action ==
|
||||||
MacroActionMacro::Action::RUN);
|
MacroActionMacro::Action::RUN_ACTIONS);
|
||||||
|
|
||||||
|
_nestedMacro->setVisible(_entryData->_action ==
|
||||||
|
MacroActionMacro::Action::NESTED_MACRO);
|
||||||
|
_macros->setVisible(_entryData->_action !=
|
||||||
|
MacroActionMacro::Action::NESTED_MACRO);
|
||||||
|
SetResizingEnabled(_entryData->_action ==
|
||||||
|
MacroActionMacro::Action::NESTED_MACRO);
|
||||||
|
|
||||||
|
if (_nestedMacro->IsEmpty()) {
|
||||||
|
_nestedMacro->ShowAllMacroSections();
|
||||||
|
// TODO: find a better solution than setting a fixed height
|
||||||
|
_entryData->_customWidgetHeight = 600;
|
||||||
|
}
|
||||||
|
SetCustomHeight(_entryData->_customWidgetHeight);
|
||||||
|
|
||||||
adjustSize();
|
adjustSize();
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "macro-action-edit.hpp"
|
#include "macro-action-edit.hpp"
|
||||||
|
#include "macro.hpp"
|
||||||
|
#include "macro-edit.hpp"
|
||||||
#include "macro-input.hpp"
|
#include "macro-input.hpp"
|
||||||
#include "macro-selection.hpp"
|
#include "macro-selection.hpp"
|
||||||
#include "macro-segment-selection.hpp"
|
#include "macro-segment-selection.hpp"
|
||||||
|
#include "resizable-widget.hpp"
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
@@ -44,15 +47,19 @@ public:
|
|||||||
PAUSE,
|
PAUSE,
|
||||||
UNPAUSE,
|
UNPAUSE,
|
||||||
RESET_COUNTER,
|
RESET_COUNTER,
|
||||||
RUN,
|
RUN_ACTIONS,
|
||||||
STOP,
|
STOP,
|
||||||
DISABLE_ACTION,
|
DISABLE_ACTION,
|
||||||
ENABLE_ACTION,
|
ENABLE_ACTION,
|
||||||
TOGGLE_ACTION,
|
TOGGLE_ACTION,
|
||||||
|
TOGGLE_PAUSE,
|
||||||
|
NESTED_MACRO,
|
||||||
};
|
};
|
||||||
Action _action = Action::RUN;
|
Action _action = Action::NESTED_MACRO;
|
||||||
IntVariable _actionIndex = 1;
|
IntVariable _actionIndex = 1;
|
||||||
RunOptions _runOptions = {};
|
RunOptions _runOptions = {};
|
||||||
|
std::shared_ptr<Macro> _nestedMacro = std::make_shared<Macro>();
|
||||||
|
int _customWidgetHeight = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void RunActions(Macro *actionMacro) const;
|
void RunActions(Macro *actionMacro) const;
|
||||||
@@ -61,7 +68,7 @@ private:
|
|||||||
static const std::string id;
|
static const std::string id;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MacroActionMacroEdit final : public QWidget {
|
class MacroActionMacroEdit final : public ResizableWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@@ -70,13 +77,7 @@ public:
|
|||||||
std::shared_ptr<MacroActionMacro> entryData = nullptr);
|
std::shared_ptr<MacroActionMacro> entryData = nullptr);
|
||||||
~MacroActionMacroEdit();
|
~MacroActionMacroEdit();
|
||||||
void UpdateEntryData();
|
void UpdateEntryData();
|
||||||
static QWidget *Create(QWidget *parent,
|
static QWidget *Create(QWidget *, std::shared_ptr<MacroAction>);
|
||||||
std::shared_ptr<MacroAction> action)
|
|
||||||
{
|
|
||||||
return new MacroActionMacroEdit(
|
|
||||||
parent,
|
|
||||||
std::dynamic_pointer_cast<MacroActionMacro>(action));
|
|
||||||
}
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void MacroChanged(const QString &text);
|
void MacroChanged(const QString &text);
|
||||||
@@ -111,6 +112,7 @@ private:
|
|||||||
QHBoxLayout *_conditionLayout;
|
QHBoxLayout *_conditionLayout;
|
||||||
QHBoxLayout *_reevaluateConditionStateLayout;
|
QHBoxLayout *_reevaluateConditionStateLayout;
|
||||||
QHBoxLayout *_setInputsLayout;
|
QHBoxLayout *_setInputsLayout;
|
||||||
|
MacroEdit *_nestedMacro;
|
||||||
|
|
||||||
std::shared_ptr<MacroActionMacro> _entryData;
|
std::shared_ptr<MacroActionMacro> _entryData;
|
||||||
bool _loading = true;
|
bool _loading = true;
|
||||||
|
|||||||
@@ -170,11 +170,7 @@ void MacroActionQueueEdit::UpdateEntryData()
|
|||||||
|
|
||||||
void MacroActionQueueEdit::MacroChanged(const QString &text)
|
void MacroActionQueueEdit::MacroChanged(const QString &text)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_macro = text;
|
_entryData->_macro = text;
|
||||||
emit HeaderInfoChanged(
|
emit HeaderInfoChanged(
|
||||||
QString::fromStdString(_entryData->GetShortDesc()));
|
QString::fromStdString(_entryData->GetShortDesc()));
|
||||||
@@ -182,11 +178,7 @@ void MacroActionQueueEdit::MacroChanged(const QString &text)
|
|||||||
|
|
||||||
void MacroActionQueueEdit::QueueChanged(const QString &text)
|
void MacroActionQueueEdit::QueueChanged(const QString &text)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_queue = GetWeakActionQueueByQString(text);
|
_entryData->_queue = GetWeakActionQueueByQString(text);
|
||||||
emit HeaderInfoChanged(
|
emit HeaderInfoChanged(
|
||||||
QString::fromStdString(_entryData->GetShortDesc()));
|
QString::fromStdString(_entryData->GetShortDesc()));
|
||||||
@@ -194,11 +186,7 @@ void MacroActionQueueEdit::QueueChanged(const QString &text)
|
|||||||
|
|
||||||
void MacroActionQueueEdit::ActionChanged(int value)
|
void MacroActionQueueEdit::ActionChanged(int value)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_action = static_cast<MacroActionQueue::Action>(value);
|
_entryData->_action = static_cast<MacroActionQueue::Action>(value);
|
||||||
SetWidgetVisibility();
|
SetWidgetVisibility();
|
||||||
emit HeaderInfoChanged(
|
emit HeaderInfoChanged(
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -28,8 +28,8 @@ public:
|
|||||||
int GetSegmentIndexValue() const;
|
int GetSegmentIndexValue() const;
|
||||||
void ResolveVariablesToFixedValues();
|
void ResolveVariablesToFixedValues();
|
||||||
|
|
||||||
enum class Type {
|
enum class Action {
|
||||||
SET_FIXED_VALUE,
|
SET_VALUE,
|
||||||
APPEND,
|
APPEND,
|
||||||
APPEND_VAR,
|
APPEND_VAR,
|
||||||
INCREMENT,
|
INCREMENT,
|
||||||
@@ -52,9 +52,12 @@ public:
|
|||||||
SWAP_VALUES,
|
SWAP_VALUES,
|
||||||
TRIM,
|
TRIM,
|
||||||
CHANGE_CASE,
|
CHANGE_CASE,
|
||||||
|
RANDOM_NUMBER,
|
||||||
|
QUERY_JSON,
|
||||||
|
ARRAY_JSON,
|
||||||
};
|
};
|
||||||
|
|
||||||
Type _type = Type::SET_FIXED_VALUE;
|
Action _action = Action::SET_VALUE;
|
||||||
std::weak_ptr<Variable> _variable;
|
std::weak_ptr<Variable> _variable;
|
||||||
std::weak_ptr<Variable> _variable2;
|
std::weak_ptr<Variable> _variable2;
|
||||||
StringVariable _strValue = "";
|
StringVariable _strValue = "";
|
||||||
@@ -99,6 +102,12 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
CaseType _caseType = CaseType::LOWER_CASE;
|
CaseType _caseType = CaseType::LOWER_CASE;
|
||||||
|
DoubleVariable _randomNumberStart = 0;
|
||||||
|
DoubleVariable _randomNumberEnd = 100;
|
||||||
|
bool _generateInteger = true;
|
||||||
|
|
||||||
|
StringVariable _jsonQuery = "$.some.nested.value";
|
||||||
|
IntVariable _jsonIndex = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void DecrementCurrentSegmentVariableRef();
|
void DecrementCurrentSegmentVariableRef();
|
||||||
@@ -108,6 +117,7 @@ private:
|
|||||||
void HandleMathExpression(Variable *);
|
void HandleMathExpression(Variable *);
|
||||||
void HandleCaseChange(Variable *);
|
void HandleCaseChange(Variable *);
|
||||||
void SetToSceneItemName(Variable *);
|
void SetToSceneItemName(Variable *);
|
||||||
|
void GenerateRandomNumber(Variable *);
|
||||||
|
|
||||||
std::weak_ptr<MacroSegment> _macroSegment;
|
std::weak_ptr<MacroSegment> _macroSegment;
|
||||||
int _segmentIdxLoadValue = -1;
|
int _segmentIdxLoadValue = -1;
|
||||||
@@ -161,6 +171,11 @@ private slots:
|
|||||||
void StringLengthChanged(const NumberVariable<int> &);
|
void StringLengthChanged(const NumberVariable<int> &);
|
||||||
void CharSelectionChanged(const QString &);
|
void CharSelectionChanged(const QString &);
|
||||||
void CaseTypeChanged(int index);
|
void CaseTypeChanged(int index);
|
||||||
|
void RandomNumberStartChanged(const NumberVariable<double> &);
|
||||||
|
void RandomNumberEndChanged(const NumberVariable<double> &);
|
||||||
|
void GenerateIntegerChanged(int);
|
||||||
|
void JsonQueryChanged();
|
||||||
|
void JsonIndexChanged(const NumberVariable<int> &);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void HeaderInfoChanged(const QString &);
|
void HeaderInfoChanged(const QString &);
|
||||||
@@ -206,6 +221,13 @@ private:
|
|||||||
VariableSpinBox *_stringLength;
|
VariableSpinBox *_stringLength;
|
||||||
SingleCharSelection *_paddingCharSelection;
|
SingleCharSelection *_paddingCharSelection;
|
||||||
FilterComboBox *_caseType;
|
FilterComboBox *_caseType;
|
||||||
|
VariableDoubleSpinBox *_randomNumberStart;
|
||||||
|
VariableDoubleSpinBox *_randomNumberEnd;
|
||||||
|
QCheckBox *_generateInteger;
|
||||||
|
QVBoxLayout *_randomLayout;
|
||||||
|
VariableLineEdit *_jsonQuery;
|
||||||
|
QLabel *_jsonQueryHelp;
|
||||||
|
VariableSpinBox *_jsonIndex;
|
||||||
QHBoxLayout *_entryLayout;
|
QHBoxLayout *_entryLayout;
|
||||||
|
|
||||||
std::shared_ptr<MacroActionVariable> _entryData;
|
std::shared_ptr<MacroActionVariable> _entryData;
|
||||||
|
|||||||
@@ -11,15 +11,12 @@ bool MacroAction::Save(obs_data_t *obj) const
|
|||||||
{
|
{
|
||||||
MacroSegment::Save(obj);
|
MacroSegment::Save(obj);
|
||||||
obs_data_set_string(obj, "id", GetId().c_str());
|
obs_data_set_string(obj, "id", GetId().c_str());
|
||||||
obs_data_set_bool(obj, "enabled", _enabled);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MacroAction::Load(obs_data_t *obj)
|
bool MacroAction::Load(obs_data_t *obj)
|
||||||
{
|
{
|
||||||
MacroSegment::Load(obj);
|
MacroSegment::Load(obj);
|
||||||
obs_data_set_default_bool(obj, "enabled", true);
|
|
||||||
_enabled = obs_data_get_bool(obj, "enabled");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,16 +25,6 @@ void MacroAction::LogAction() const
|
|||||||
ablog(LOG_INFO, "performed action %s", GetId().c_str());
|
ablog(LOG_INFO, "performed action %s", GetId().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroAction::SetEnabled(bool value)
|
|
||||||
{
|
|
||||||
_enabled = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MacroAction::Enabled() const
|
|
||||||
{
|
|
||||||
return _enabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
void MacroAction::ResolveVariablesToFixedValues() {}
|
void MacroAction::ResolveVariablesToFixedValues() {}
|
||||||
|
|
||||||
std::string_view MacroAction::GetDefaultID()
|
std::string_view MacroAction::GetDefaultID()
|
||||||
|
|||||||
@@ -19,13 +19,9 @@ public:
|
|||||||
// Used to resolve variables before actions are added to action queues
|
// Used to resolve variables before actions are added to action queues
|
||||||
virtual void ResolveVariablesToFixedValues();
|
virtual void ResolveVariablesToFixedValues();
|
||||||
|
|
||||||
void SetEnabled(bool);
|
|
||||||
bool Enabled() const;
|
|
||||||
|
|
||||||
static std::string_view GetDefaultID();
|
static std::string_view GetDefaultID();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _enabled = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class EXPORT MacroRefAction : virtual public MacroAction {
|
class EXPORT MacroRefAction : virtual public MacroAction {
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ MacroConditionEdit::MacroConditionEdit(
|
|||||||
mainLayout->addWidget(_frame);
|
mainLayout->addWidget(_frame);
|
||||||
setLayout(mainLayout);
|
setLayout(mainLayout);
|
||||||
|
|
||||||
UpdateEntryData(id);
|
SetupWidgets(true);
|
||||||
_loading = false;
|
_loading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,9 +152,11 @@ void MacroConditionEdit::LogicSelectionChanged(int idx)
|
|||||||
const auto logic = static_cast<Logic::Type>(
|
const auto logic = static_cast<Logic::Type>(
|
||||||
_logicSelection->itemData(idx).toInt());
|
_logicSelection->itemData(idx).toInt());
|
||||||
(*_entryData)->SetLogicType(logic);
|
(*_entryData)->SetLogicType(logic);
|
||||||
|
|
||||||
|
SetEnableAppearance(logic != Logic::Type::NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MacroConditionEdit::IsRootNode()
|
bool MacroConditionEdit::IsRootNode() const
|
||||||
{
|
{
|
||||||
return _isRoot;
|
return _isRoot;
|
||||||
}
|
}
|
||||||
@@ -164,6 +166,7 @@ void MacroConditionEdit::SetLogicSelection()
|
|||||||
const auto logic = (*_entryData)->GetLogicType();
|
const auto logic = (*_entryData)->GetLogicType();
|
||||||
_logicSelection->setCurrentIndex(
|
_logicSelection->setCurrentIndex(
|
||||||
_logicSelection->findData(static_cast<int>(logic)));
|
_logicSelection->findData(static_cast<int>(logic)));
|
||||||
|
SetEnableAppearance(logic != Logic::Type::NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionEdit::SetRootNode(bool root)
|
void MacroConditionEdit::SetRootNode(bool root)
|
||||||
@@ -175,23 +178,36 @@ void MacroConditionEdit::SetRootNode(bool root)
|
|||||||
SetLogicSelection();
|
SetLogicSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionEdit::UpdateEntryData(const std::string &id)
|
void MacroConditionEdit::SetupWidgets(bool basicSetup)
|
||||||
{
|
{
|
||||||
|
if (_allWidgetsAreSetup) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto id = (*_entryData)->GetId();
|
||||||
_conditionSelection->setCurrentText(obs_module_text(
|
_conditionSelection->setCurrentText(obs_module_text(
|
||||||
MacroConditionFactory::GetConditionName(id).c_str()));
|
MacroConditionFactory::GetConditionName(id).c_str()));
|
||||||
auto widget =
|
|
||||||
MacroConditionFactory::CreateWidget(id, this, *_entryData);
|
|
||||||
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
|
||||||
this, SLOT(HeaderInfoChanged(const QString &)));
|
|
||||||
HeaderInfoChanged(
|
HeaderInfoChanged(
|
||||||
QString::fromStdString((*_entryData)->GetShortDesc()));
|
QString::fromStdString((*_entryData)->GetShortDesc()));
|
||||||
SetLogicSelection();
|
SetLogicSelection();
|
||||||
_section->SetContent(widget, (*_entryData)->GetCollapsed());
|
|
||||||
|
|
||||||
_dur->setVisible(MacroConditionFactory::UsesDurationModifier(id));
|
_dur->setVisible(MacroConditionFactory::UsesDurationModifier(id));
|
||||||
auto modifier = (*_entryData)->GetDurationModifier();
|
auto modifier = (*_entryData)->GetDurationModifier();
|
||||||
_dur->SetValue(modifier);
|
_dur->SetValue(modifier);
|
||||||
|
|
||||||
|
if (basicSetup) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto widget =
|
||||||
|
MacroConditionFactory::CreateWidget(id, this, *_entryData);
|
||||||
|
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
||||||
|
this, SLOT(HeaderInfoChanged(const QString &)));
|
||||||
|
_section->SetContent(widget, (*_entryData)->GetCollapsed());
|
||||||
SetFocusPolicyOfWidgets();
|
SetFocusPolicyOfWidgets();
|
||||||
|
|
||||||
|
_allWidgetsAreSetup = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionEdit::SetEntryData(std::shared_ptr<MacroCondition> *data)
|
void MacroConditionEdit::SetEntryData(std::shared_ptr<MacroCondition> *data)
|
||||||
@@ -259,289 +275,4 @@ std::shared_ptr<MacroSegment> MacroConditionEdit::Data() const
|
|||||||
return *_entryData;
|
return *_entryData;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::AddMacroCondition(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 0 || idx > (int)macro->Conditions().size()) {
|
|
||||||
assert(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string id;
|
|
||||||
Logic::Type logic;
|
|
||||||
if (idx >= 1) {
|
|
||||||
id = macro->Conditions().at(idx - 1)->GetId();
|
|
||||||
if (idx == 1) {
|
|
||||||
logic = Logic::Type::OR;
|
|
||||||
} else {
|
|
||||||
logic = macro->Conditions().at(idx - 1)->GetLogicType();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
id = MacroCondition::GetDefaultID();
|
|
||||||
logic = Logic::Type::ROOT_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
OBSDataAutoRelease data;
|
|
||||||
if (idx - 1 >= 0) {
|
|
||||||
data = obs_data_create();
|
|
||||||
macro->Conditions().at(idx - 1)->Save(data);
|
|
||||||
}
|
|
||||||
AddMacroCondition(macro.get(), idx, id, data.Get(), logic);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::AddMacroCondition(Macro *macro, int idx,
|
|
||||||
const std::string &id,
|
|
||||||
obs_data_t *data, Logic::Type logic)
|
|
||||||
{
|
|
||||||
if (idx < 0 || idx > (int)macro->Conditions().size()) {
|
|
||||||
assert(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto lock = LockContext();
|
|
||||||
auto cond = macro->Conditions().emplace(
|
|
||||||
macro->Conditions().begin() + idx,
|
|
||||||
MacroConditionFactory::Create(id, macro));
|
|
||||||
if (data) {
|
|
||||||
macro->Conditions().at(idx)->Load(data);
|
|
||||||
}
|
|
||||||
macro->Conditions().at(idx)->PostLoad();
|
|
||||||
RunPostLoadSteps();
|
|
||||||
(*cond)->SetLogicType(logic);
|
|
||||||
macro->UpdateConditionIndices();
|
|
||||||
ui->conditionsList->Insert(
|
|
||||||
idx,
|
|
||||||
new MacroConditionEdit(this, ¯o->Conditions()[idx],
|
|
||||||
id, idx == 0));
|
|
||||||
SetConditionData(*macro);
|
|
||||||
}
|
|
||||||
HighlightCondition(idx);
|
|
||||||
ui->conditionsList->SetHelpMsgVisible(false);
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_conditionAdd_clicked()
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentConditionIdx == -1) {
|
|
||||||
AddMacroCondition((int)macro->Conditions().size());
|
|
||||||
} else {
|
|
||||||
AddMacroCondition(currentConditionIdx + 1);
|
|
||||||
}
|
|
||||||
if (currentConditionIdx != -1) {
|
|
||||||
MacroConditionSelectionChanged(currentConditionIdx + 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::RemoveMacroCondition(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 0 || idx >= (int)macro->Conditions().size()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto lock = LockContext();
|
|
||||||
ui->conditionsList->Remove(idx);
|
|
||||||
macro->Conditions().erase(macro->Conditions().begin() + idx);
|
|
||||||
macro->UpdateConditionIndices();
|
|
||||||
if (idx == 0 && macro->Conditions().size() > 0) {
|
|
||||||
auto newRoot = macro->Conditions().at(0);
|
|
||||||
newRoot->SetLogicType(Logic::Type::ROOT_NONE);
|
|
||||||
static_cast<MacroConditionEdit *>(
|
|
||||||
ui->conditionsList->WidgetAt(0))
|
|
||||||
->SetRootNode(true);
|
|
||||||
}
|
|
||||||
SetConditionData(*macro);
|
|
||||||
}
|
|
||||||
MacroConditionSelectionChanged(-1);
|
|
||||||
lastInteracted = MacroSection::CONDITIONS;
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_conditionRemove_clicked()
|
|
||||||
{
|
|
||||||
if (currentConditionIdx == -1) {
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
RemoveMacroCondition((int)macro->Conditions().size() - 1);
|
|
||||||
} else {
|
|
||||||
RemoveMacroCondition(currentConditionIdx);
|
|
||||||
}
|
|
||||||
MacroConditionSelectionChanged(-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_conditionTop_clicked()
|
|
||||||
{
|
|
||||||
if (currentConditionIdx == -1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MacroConditionReorder(0, currentConditionIdx);
|
|
||||||
MacroConditionSelectionChanged(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_conditionUp_clicked()
|
|
||||||
{
|
|
||||||
if (currentConditionIdx == -1 || currentConditionIdx == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MoveMacroConditionUp(currentConditionIdx);
|
|
||||||
MacroConditionSelectionChanged(currentConditionIdx - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_conditionDown_clicked()
|
|
||||||
{
|
|
||||||
if (currentConditionIdx == -1 ||
|
|
||||||
currentConditionIdx ==
|
|
||||||
ui->conditionsList->ContentLayout()->count() - 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
MoveMacroConditionDown(currentConditionIdx);
|
|
||||||
MacroConditionSelectionChanged(currentConditionIdx + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_conditionBottom_clicked()
|
|
||||||
{
|
|
||||||
if (currentConditionIdx == -1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const int newIdx = ui->conditionsList->ContentLayout()->count() - 1;
|
|
||||||
MacroConditionReorder(newIdx, currentConditionIdx);
|
|
||||||
MacroConditionSelectionChanged(newIdx);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::SwapConditions(Macro *m, int pos1, int pos2)
|
|
||||||
{
|
|
||||||
if (pos1 == pos2) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (pos1 > pos2) {
|
|
||||||
std::swap(pos1, pos2);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool root = pos1 == 0;
|
|
||||||
auto lock = LockContext();
|
|
||||||
iter_swap(m->Conditions().begin() + pos1,
|
|
||||||
m->Conditions().begin() + pos2);
|
|
||||||
m->UpdateConditionIndices();
|
|
||||||
|
|
||||||
auto c1 = m->Conditions().begin() + pos1;
|
|
||||||
auto c2 = m->Conditions().begin() + pos2;
|
|
||||||
if (root) {
|
|
||||||
auto logic1 = (*c1)->GetLogicType();
|
|
||||||
auto logic2 = (*c2)->GetLogicType();
|
|
||||||
(*c1)->SetLogicType(logic2);
|
|
||||||
(*c2)->SetLogicType(logic1);
|
|
||||||
}
|
|
||||||
|
|
||||||
auto widget1 = static_cast<MacroConditionEdit *>(
|
|
||||||
ui->conditionsList->ContentLayout()->takeAt(pos1)->widget());
|
|
||||||
auto widget2 = static_cast<MacroConditionEdit *>(
|
|
||||||
ui->conditionsList->ContentLayout()->takeAt(pos2 - 1)->widget());
|
|
||||||
ui->conditionsList->Insert(pos1, widget2);
|
|
||||||
ui->conditionsList->Insert(pos2, widget1);
|
|
||||||
SetConditionData(*m);
|
|
||||||
widget2->SetRootNode(root);
|
|
||||||
widget1->SetRootNode(false);
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MoveMacroConditionUp(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 1 || idx >= (int)macro->Conditions().size()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SwapConditions(macro.get(), idx, idx - 1);
|
|
||||||
HighlightCondition(idx - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MoveMacroConditionDown(int idx)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < 0 || idx >= (int)macro->Conditions().size() - 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SwapConditions(macro.get(), idx, idx + 1);
|
|
||||||
HighlightCondition(idx + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MacroConditionSelectionChanged(int idx)
|
|
||||||
{
|
|
||||||
SetupMacroSegmentSelection(MacroSection::CONDITIONS, idx);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AdvSceneSwitcher::MacroConditionReorder(int to, int from)
|
|
||||||
{
|
|
||||||
auto macro = GetSelectedMacro();
|
|
||||||
if (!macro) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (to == from || from < 0 || from > (int)macro->Conditions().size() ||
|
|
||||||
to < 0 || to > (int)macro->Conditions().size()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
auto lock = LockContext();
|
|
||||||
auto condition = macro->Conditions().at(from);
|
|
||||||
if (to == 0) {
|
|
||||||
condition->SetLogicType(Logic::Type::ROOT_NONE);
|
|
||||||
static_cast<MacroConditionEdit *>(
|
|
||||||
ui->conditionsList->WidgetAt(from))
|
|
||||||
->SetRootNode(true);
|
|
||||||
macro->Conditions().at(0)->SetLogicType(
|
|
||||||
Logic::Type::AND);
|
|
||||||
static_cast<MacroConditionEdit *>(
|
|
||||||
ui->conditionsList->WidgetAt(0))
|
|
||||||
->SetRootNode(false);
|
|
||||||
}
|
|
||||||
if (from == 0) {
|
|
||||||
condition->SetLogicType(Logic::Type::AND);
|
|
||||||
static_cast<MacroConditionEdit *>(
|
|
||||||
ui->conditionsList->WidgetAt(from))
|
|
||||||
->SetRootNode(false);
|
|
||||||
macro->Conditions().at(1)->SetLogicType(
|
|
||||||
Logic::Type::ROOT_NONE);
|
|
||||||
static_cast<MacroConditionEdit *>(
|
|
||||||
ui->conditionsList->WidgetAt(1))
|
|
||||||
->SetRootNode(true);
|
|
||||||
}
|
|
||||||
macro->Conditions().erase(macro->Conditions().begin() + from);
|
|
||||||
macro->Conditions().insert(macro->Conditions().begin() + to,
|
|
||||||
condition);
|
|
||||||
macro->UpdateConditionIndices();
|
|
||||||
ui->conditionsList->ContentLayout()->insertItem(
|
|
||||||
to, ui->conditionsList->ContentLayout()->takeAt(from));
|
|
||||||
SetConditionData(*macro);
|
|
||||||
}
|
|
||||||
HighlightCondition(to);
|
|
||||||
emit(MacroSegmentOrderChanged());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ public:
|
|||||||
std::shared_ptr<MacroCondition> * = nullptr,
|
std::shared_ptr<MacroCondition> * = nullptr,
|
||||||
const std::string &id = MacroCondition::GetDefaultID().data(),
|
const std::string &id = MacroCondition::GetDefaultID().data(),
|
||||||
bool root = true);
|
bool root = true);
|
||||||
bool IsRootNode();
|
bool IsRootNode() const;
|
||||||
void SetRootNode(bool);
|
void SetRootNode(bool);
|
||||||
void UpdateEntryData(const std::string &id);
|
void SetupWidgets(bool basicSetup = false);
|
||||||
void SetEntryData(std::shared_ptr<MacroCondition> *);
|
void SetEntryData(std::shared_ptr<MacroCondition> *);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class MacroConditionFactory {
|
|||||||
public:
|
public:
|
||||||
MacroConditionFactory() = delete;
|
MacroConditionFactory() = delete;
|
||||||
EXPORT static bool Register(const std::string &, MacroConditionInfo);
|
EXPORT static bool Register(const std::string &, MacroConditionInfo);
|
||||||
static bool Deregister(const std::string &);
|
EXPORT static bool Deregister(const std::string &);
|
||||||
static std::shared_ptr<MacroCondition> Create(const std::string &,
|
static std::shared_ptr<MacroCondition> Create(const std::string &,
|
||||||
Macro *m);
|
Macro *m);
|
||||||
static QWidget *CreateWidget(const std::string &id, QWidget *parent,
|
static QWidget *CreateWidget(const std::string &id, QWidget *parent,
|
||||||
|
|||||||
@@ -538,11 +538,7 @@ void MacroConditionMacroEdit::UpdateEntryData()
|
|||||||
|
|
||||||
void MacroConditionMacroEdit::MacroChanged(const QString &text)
|
void MacroConditionMacroEdit::MacroChanged(const QString &text)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_macro = text;
|
_entryData->_macro = text;
|
||||||
_actionIndex->SetMacro(_entryData->_macro.GetMacro());
|
_actionIndex->SetMacro(_entryData->_macro.GetMacro());
|
||||||
emit HeaderInfoChanged(
|
emit HeaderInfoChanged(
|
||||||
@@ -551,21 +547,13 @@ void MacroConditionMacroEdit::MacroChanged(const QString &text)
|
|||||||
|
|
||||||
void MacroConditionMacroEdit::CountChanged(const NumberVariable<int> &value)
|
void MacroConditionMacroEdit::CountChanged(const NumberVariable<int> &value)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_count = value;
|
_entryData->_count = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionMacroEdit::CountConditionChanged(int cond)
|
void MacroConditionMacroEdit::CountConditionChanged(int cond)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_counterCondition =
|
_entryData->_counterCondition =
|
||||||
static_cast<MacroConditionMacro::CounterCondition>(cond);
|
static_cast<MacroConditionMacro::CounterCondition>(cond);
|
||||||
}
|
}
|
||||||
@@ -590,11 +578,7 @@ void MacroConditionMacroEdit::MacroRemove(const QString &)
|
|||||||
|
|
||||||
void MacroConditionMacroEdit::TypeChanged(int type)
|
void MacroConditionMacroEdit::TypeChanged(int type)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->SetType(static_cast<MacroConditionMacro::Type>(type));
|
_entryData->SetType(static_cast<MacroConditionMacro::Type>(type));
|
||||||
SetupWidgets();
|
SetupWidgets();
|
||||||
}
|
}
|
||||||
@@ -640,11 +624,7 @@ void MacroConditionMacroEdit::UpdatePaused()
|
|||||||
|
|
||||||
void MacroConditionMacroEdit::MultiStateConditionChanged(int cond)
|
void MacroConditionMacroEdit::MultiStateConditionChanged(int cond)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_multiSateCondition =
|
_entryData->_multiSateCondition =
|
||||||
static_cast<MacroConditionMacro::MultiStateCondition>(cond);
|
static_cast<MacroConditionMacro::MultiStateCondition>(cond);
|
||||||
}
|
}
|
||||||
@@ -652,21 +632,13 @@ void MacroConditionMacroEdit::MultiStateConditionChanged(int cond)
|
|||||||
void MacroConditionMacroEdit::MultiStateCountChanged(
|
void MacroConditionMacroEdit::MultiStateCountChanged(
|
||||||
const NumberVariable<int> &value)
|
const NumberVariable<int> &value)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_multiSateCount = value;
|
_entryData->_multiSateCount = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionMacroEdit::Add(const std::string &name)
|
void MacroConditionMacroEdit::Add(const std::string &name)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
MacroRef macro(name);
|
MacroRef macro(name);
|
||||||
_entryData->_macros.push_back(macro);
|
_entryData->_macros.push_back(macro);
|
||||||
adjustSize();
|
adjustSize();
|
||||||
@@ -675,11 +647,7 @@ void MacroConditionMacroEdit::Add(const std::string &name)
|
|||||||
|
|
||||||
void MacroConditionMacroEdit::Remove(int idx)
|
void MacroConditionMacroEdit::Remove(int idx)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_macros.erase(std::next(_entryData->_macros.begin(), idx));
|
_entryData->_macros.erase(std::next(_entryData->_macros.begin(), idx));
|
||||||
adjustSize();
|
adjustSize();
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
@@ -687,12 +655,8 @@ void MacroConditionMacroEdit::Remove(int idx)
|
|||||||
|
|
||||||
void MacroConditionMacroEdit::Replace(int idx, const std::string &name)
|
void MacroConditionMacroEdit::Replace(int idx, const std::string &name)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
MacroRef macro(name);
|
MacroRef macro(name);
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_macros[idx] = macro;
|
_entryData->_macros[idx] = macro;
|
||||||
adjustSize();
|
adjustSize();
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
@@ -700,11 +664,7 @@ void MacroConditionMacroEdit::Replace(int idx, const std::string &name)
|
|||||||
|
|
||||||
void MacroConditionMacroEdit::ActionIndexChanged(const IntVariable &value)
|
void MacroConditionMacroEdit::ActionIndexChanged(const IntVariable &value)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_actionIndex = value;
|
_entryData->_actionIndex = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QListWidget>
|
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
|
|||||||
@@ -115,11 +115,7 @@ MacroConditionQueueEdit::MacroConditionQueueEdit(
|
|||||||
|
|
||||||
void MacroConditionQueueEdit::ConditionChanged(int condition)
|
void MacroConditionQueueEdit::ConditionChanged(int condition)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_condition =
|
_entryData->_condition =
|
||||||
static_cast<MacroConditionQueue::Condition>(condition);
|
static_cast<MacroConditionQueue::Condition>(condition);
|
||||||
emit HeaderInfoChanged(
|
emit HeaderInfoChanged(
|
||||||
@@ -129,11 +125,7 @@ void MacroConditionQueueEdit::ConditionChanged(int condition)
|
|||||||
|
|
||||||
void MacroConditionQueueEdit::QueueChanged(const QString &text)
|
void MacroConditionQueueEdit::QueueChanged(const QString &text)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_queue = GetWeakActionQueueByQString(text);
|
_entryData->_queue = GetWeakActionQueueByQString(text);
|
||||||
emit HeaderInfoChanged(
|
emit HeaderInfoChanged(
|
||||||
QString::fromStdString(_entryData->GetShortDesc()));
|
QString::fromStdString(_entryData->GetShortDesc()));
|
||||||
@@ -141,11 +133,7 @@ void MacroConditionQueueEdit::QueueChanged(const QString &text)
|
|||||||
|
|
||||||
void MacroConditionQueueEdit::SizeChanged(const NumberVariable<int> &value)
|
void MacroConditionQueueEdit::SizeChanged(const NumberVariable<int> &value)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_size = value;
|
_entryData->_size = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -264,32 +264,19 @@ void MacroConditionTempVarEdit::UpdateEntryData()
|
|||||||
|
|
||||||
void MacroConditionTempVarEdit::VariableChanged(const TempVariableRef &var)
|
void MacroConditionTempVarEdit::VariableChanged(const TempVariableRef &var)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_tempVar = var;
|
_entryData->_tempVar = var;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionTempVarEdit::Variable2Changed(const QString &text)
|
void MacroConditionTempVarEdit::Variable2Changed(const QString &text)
|
||||||
{
|
{
|
||||||
|
GUARD_LOADING_AND_LOCK();
|
||||||
if (_loading || !_entryData) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_variable2 = GetWeakVariableByQString(text);
|
_entryData->_variable2 = GetWeakVariableByQString(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionTempVarEdit::ConditionChanged(int value)
|
void MacroConditionTempVarEdit::ConditionChanged(int value)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_type =
|
_entryData->_type =
|
||||||
static_cast<MacroConditionTempVar::Condition>(value);
|
static_cast<MacroConditionTempVar::Condition>(value);
|
||||||
SetWidgetVisibility();
|
SetWidgetVisibility();
|
||||||
@@ -297,11 +284,7 @@ void MacroConditionTempVarEdit::ConditionChanged(int value)
|
|||||||
|
|
||||||
void MacroConditionTempVarEdit::StrValueChanged()
|
void MacroConditionTempVarEdit::StrValueChanged()
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_strValue = _strValue->toPlainText().toStdString();
|
_entryData->_strValue = _strValue->toPlainText().toStdString();
|
||||||
adjustSize();
|
adjustSize();
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
@@ -309,21 +292,13 @@ void MacroConditionTempVarEdit::StrValueChanged()
|
|||||||
|
|
||||||
void MacroConditionTempVarEdit::NumValueChanged(double val)
|
void MacroConditionTempVarEdit::NumValueChanged(double val)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_numValue = val;
|
_entryData->_numValue = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionTempVarEdit::RegexChanged(const RegexConfig &conf)
|
void MacroConditionTempVarEdit::RegexChanged(const RegexConfig &conf)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_regex = conf;
|
_entryData->_regex = conf;
|
||||||
adjustSize();
|
adjustSize();
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
|
|||||||
@@ -236,11 +236,7 @@ void MacroConditionVariableEdit::UpdateEntryData()
|
|||||||
|
|
||||||
void MacroConditionVariableEdit::VariableChanged(const QString &text)
|
void MacroConditionVariableEdit::VariableChanged(const QString &text)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_variable = GetWeakVariableByQString(text);
|
_entryData->_variable = GetWeakVariableByQString(text);
|
||||||
emit HeaderInfoChanged(
|
emit HeaderInfoChanged(
|
||||||
QString::fromStdString(_entryData->GetShortDesc()));
|
QString::fromStdString(_entryData->GetShortDesc()));
|
||||||
@@ -248,22 +244,13 @@ void MacroConditionVariableEdit::VariableChanged(const QString &text)
|
|||||||
|
|
||||||
void MacroConditionVariableEdit::Variable2Changed(const QString &text)
|
void MacroConditionVariableEdit::Variable2Changed(const QString &text)
|
||||||
{
|
{
|
||||||
|
GUARD_LOADING_AND_LOCK();
|
||||||
if (_loading || !_entryData) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_variable2 = GetWeakVariableByQString(text);
|
_entryData->_variable2 = GetWeakVariableByQString(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionVariableEdit::ConditionChanged(int value)
|
void MacroConditionVariableEdit::ConditionChanged(int value)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_type =
|
_entryData->_type =
|
||||||
static_cast<MacroConditionVariable::Condition>(value);
|
static_cast<MacroConditionVariable::Condition>(value);
|
||||||
SetWidgetVisibility();
|
SetWidgetVisibility();
|
||||||
@@ -271,11 +258,7 @@ void MacroConditionVariableEdit::ConditionChanged(int value)
|
|||||||
|
|
||||||
void MacroConditionVariableEdit::StrValueChanged()
|
void MacroConditionVariableEdit::StrValueChanged()
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_strValue = _strValue->toPlainText().toStdString();
|
_entryData->_strValue = _strValue->toPlainText().toStdString();
|
||||||
adjustSize();
|
adjustSize();
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
@@ -283,21 +266,13 @@ void MacroConditionVariableEdit::StrValueChanged()
|
|||||||
|
|
||||||
void MacroConditionVariableEdit::NumValueChanged(double val)
|
void MacroConditionVariableEdit::NumValueChanged(double val)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_numValue = val;
|
_entryData->_numValue = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionVariableEdit::RegexChanged(const RegexConfig &conf)
|
void MacroConditionVariableEdit::RegexChanged(const RegexConfig &conf)
|
||||||
{
|
{
|
||||||
if (_loading || !_entryData) {
|
GUARD_LOADING_AND_LOCK();
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lock = LockContext();
|
|
||||||
_entryData->_regex = conf;
|
_entryData->_regex = conf;
|
||||||
adjustSize();
|
adjustSize();
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
|
|||||||
1824
lib/macro/macro-edit.cpp
Normal file
1824
lib/macro/macro-edit.cpp
Normal file
File diff suppressed because it is too large
Load Diff
144
lib/macro/macro-edit.hpp
Normal file
144
lib/macro/macro-edit.hpp
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
#pragma once
|
||||||
|
#include "condition-logic.hpp"
|
||||||
|
|
||||||
|
#include <ui_macro-edit.h>
|
||||||
|
|
||||||
|
namespace advss {
|
||||||
|
|
||||||
|
class Macro;
|
||||||
|
class MacroSegment;
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* Advanced Scene Switcher window
|
||||||
|
*******************************************************************************/
|
||||||
|
class MacroEdit : public QWidget {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
MacroEdit(QWidget *parent, QStringList helpMsg = {});
|
||||||
|
void SetMacro(const std::shared_ptr<Macro> &);
|
||||||
|
void ClearSegmentWidgetCacheFor(Macro *) const;
|
||||||
|
void SetControlsDisabled(bool disable) const;
|
||||||
|
void HighlightAction(int idx, QColor color = QColor(Qt::green)) const;
|
||||||
|
void HighlightElseAction(int idx,
|
||||||
|
QColor color = QColor(Qt::green)) const;
|
||||||
|
void HighlightCondition(int idx,
|
||||||
|
QColor color = QColor(Qt::green)) const;
|
||||||
|
void ResetConditionHighlights();
|
||||||
|
void ResetActionHighlights();
|
||||||
|
void SetActionData(Macro &m) const;
|
||||||
|
void SetElseActionData(Macro &m) const;
|
||||||
|
void SetConditionData(Macro &m) const;
|
||||||
|
void SwapActions(Macro *m, int pos1, int pos2);
|
||||||
|
void SwapElseActions(Macro *m, int pos1, int pos2);
|
||||||
|
void SwapConditions(Macro *m, int pos1, int pos2);
|
||||||
|
void CopyMacroSegment();
|
||||||
|
void PasteMacroSegment();
|
||||||
|
bool IsEmpty() const;
|
||||||
|
void ShowAllMacroSections();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_conditionAdd_clicked();
|
||||||
|
void on_conditionRemove_clicked();
|
||||||
|
void on_conditionTop_clicked();
|
||||||
|
void on_conditionUp_clicked();
|
||||||
|
void on_conditionDown_clicked();
|
||||||
|
void on_conditionBottom_clicked();
|
||||||
|
void on_actionAdd_clicked();
|
||||||
|
void on_actionRemove_clicked();
|
||||||
|
void on_actionTop_clicked();
|
||||||
|
void on_actionUp_clicked();
|
||||||
|
void on_actionDown_clicked();
|
||||||
|
void on_actionBottom_clicked();
|
||||||
|
void on_toggleElseActions_clicked() const;
|
||||||
|
void on_elseActionAdd_clicked();
|
||||||
|
void on_elseActionRemove_clicked();
|
||||||
|
void on_elseActionTop_clicked();
|
||||||
|
void on_elseActionUp_clicked();
|
||||||
|
void on_elseActionDown_clicked();
|
||||||
|
void on_elseActionBottom_clicked();
|
||||||
|
void UpMacroSegmentHotkey();
|
||||||
|
void DownMacroSegmentHotkey();
|
||||||
|
void DeleteMacroSegmentHotkey();
|
||||||
|
void ShowMacroActionsContextMenu(const QPoint &);
|
||||||
|
void ShowMacroElseActionsContextMenu(const QPoint &);
|
||||||
|
void ShowMacroConditionsContextMenu(const QPoint &);
|
||||||
|
void ExpandAllActions() const;
|
||||||
|
void ExpandAllElseActions() const;
|
||||||
|
void ExpandAllConditions() const;
|
||||||
|
void CollapseAllActions() const;
|
||||||
|
void CollapseAllElseActions() const;
|
||||||
|
void CollapseAllConditions() const;
|
||||||
|
void MinimizeActions() const;
|
||||||
|
void MaximizeActions() const;
|
||||||
|
void MinimizeElseActions() const;
|
||||||
|
void MaximizeElseActions() const;
|
||||||
|
void MinimizeConditions() const;
|
||||||
|
void MaximizeConditions() const;
|
||||||
|
void SetElseActionsStateToHidden() const;
|
||||||
|
void SetElseActionsStateToVisible() const;
|
||||||
|
void MacroActionSelectionChanged(int idx);
|
||||||
|
void MacroActionReorder(int to, int target);
|
||||||
|
void AddMacroAction(Macro *macro, int idx, const std::string &id,
|
||||||
|
obs_data_t *data);
|
||||||
|
void AddMacroAction(int idx);
|
||||||
|
void RemoveMacroAction(int idx);
|
||||||
|
void MoveMacroActionUp(int idx);
|
||||||
|
void MoveMacroActionDown(int idx);
|
||||||
|
void MacroElseActionSelectionChanged(int idx);
|
||||||
|
void MacroElseActionReorder(int to, int target);
|
||||||
|
void AddMacroElseAction(Macro *macro, int idx, const std::string &id,
|
||||||
|
obs_data_t *data);
|
||||||
|
void AddMacroElseAction(int idx);
|
||||||
|
void RemoveMacroElseAction(int idx);
|
||||||
|
void MoveMacroElseActionUp(int idx);
|
||||||
|
void MoveMacroElseActionDown(int idx);
|
||||||
|
void MacroConditionSelectionChanged(int idx);
|
||||||
|
void MacroConditionReorder(int to, int target);
|
||||||
|
void AddMacroCondition(int idx);
|
||||||
|
void AddMacroCondition(Macro *macro, int idx, const std::string &id,
|
||||||
|
obs_data_t *data, Logic::Type logic);
|
||||||
|
void RemoveMacroCondition(int idx);
|
||||||
|
void MoveMacroConditionUp(int idx);
|
||||||
|
void MoveMacroConditionDown(int idx);
|
||||||
|
void HighlightControls() const;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void MacroAdded(const QString &name);
|
||||||
|
void MacroRemoved(const QString &name);
|
||||||
|
void MacroRenamed(const QString &oldName, const QString &newName);
|
||||||
|
void MacroSegmentOrderChanged();
|
||||||
|
void SegmentTempVarsChanged(MacroSegment *);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool eventFilter(QObject *obj, QEvent *event) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum class MacroSection { CONDITIONS, ACTIONS, ELSE_ACTIONS };
|
||||||
|
|
||||||
|
void PopulateMacroActions(Macro &m, uint32_t afterIdx = 0);
|
||||||
|
void PopulateMacroElseActions(Macro &m, uint32_t afterIdx = 0);
|
||||||
|
void PopulateMacroConditions(Macro &m, uint32_t afterIdx = 0);
|
||||||
|
void SetupMacroSegmentSelection(MacroSection type, int idx);
|
||||||
|
void
|
||||||
|
SetupContextMenu(const QPoint &pos,
|
||||||
|
const std::function<void(MacroEdit *, int)> &remove,
|
||||||
|
const std::function<void(MacroEdit *)> &expand,
|
||||||
|
const std::function<void(MacroEdit *)> &collapse,
|
||||||
|
const std::function<void(MacroEdit *)> &maximize,
|
||||||
|
const std::function<void(MacroEdit *)> &minimize,
|
||||||
|
MacroSegmentList *list);
|
||||||
|
void RunSegmentHighlightChecks();
|
||||||
|
bool ElseSectionIsVisible() const;
|
||||||
|
|
||||||
|
MacroSection lastInteracted = MacroSection::CONDITIONS;
|
||||||
|
int currentConditionIdx = -1;
|
||||||
|
int currentActionIdx = -1;
|
||||||
|
int currentElseActionIdx = -1;
|
||||||
|
|
||||||
|
std::shared_ptr<Macro> _currentMacro;
|
||||||
|
|
||||||
|
std::unique_ptr<Ui_MacroEdit> ui;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace advss
|
||||||
@@ -67,9 +67,7 @@ void SetMacroSwitchedScene(bool value)
|
|||||||
{
|
{
|
||||||
static bool setupDone = false;
|
static bool setupDone = false;
|
||||||
if (!setupDone) {
|
if (!setupDone) {
|
||||||
// Will always be called with switcher lock already held
|
AddIntervalResetStep([]() { macroSceneSwitched = false; });
|
||||||
AddIntervalResetStep([]() { macroSceneSwitched = false; },
|
|
||||||
false);
|
|
||||||
setupDone = true;
|
setupDone = true;
|
||||||
}
|
}
|
||||||
macroSceneSwitched = value;
|
macroSceneSwitched = value;
|
||||||
@@ -80,35 +78,43 @@ bool MacroSwitchedScene()
|
|||||||
return macroSceneSwitched;
|
return macroSceneSwitched;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string GetMacroName(Macro *macro)
|
std::string GetMacroName(const Macro *macro)
|
||||||
{
|
{
|
||||||
return macro ? macro->Name() : "";
|
return macro ? macro->Name() : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::chrono::high_resolution_clock::time_point
|
std::chrono::high_resolution_clock::time_point
|
||||||
LastMacroConditionCheckTime(Macro *macro)
|
LastMacroConditionCheckTime(const Macro *macro)
|
||||||
{
|
{
|
||||||
return macro ? macro->LastConditionCheckTime()
|
return macro ? macro->LastConditionCheckTime()
|
||||||
: std::chrono::high_resolution_clock::time_point{};
|
: std::chrono::high_resolution_clock::time_point{};
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MacroIsStopped(Macro *macro)
|
bool MacroIsStopped(const Macro *macro)
|
||||||
{
|
{
|
||||||
return macro ? macro->GetStop() : true;
|
return macro ? macro->GetStop() : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MacroIsPaused(Macro *macro)
|
bool MacroIsPaused(const Macro *macro)
|
||||||
{
|
{
|
||||||
return macro ? macro->Paused() : true;
|
return macro ? macro->Paused() : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MacroWasPausedSince(
|
bool MacroWasPausedSince(
|
||||||
Macro *macro,
|
const Macro *macro,
|
||||||
const std::chrono::high_resolution_clock::time_point &time)
|
const std::chrono::high_resolution_clock::time_point &time)
|
||||||
{
|
{
|
||||||
return macro ? macro->WasPausedSince(time) : false;
|
return macro ? macro->WasPausedSince(time) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MacroWasCheckedSinceLastStart(const Macro *macro)
|
||||||
|
{
|
||||||
|
if (!macro) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return macro->LastConditionCheckTime().time_since_epoch().count() != 0;
|
||||||
|
}
|
||||||
|
|
||||||
void AddMacroHelperThread(Macro *macro, std::thread &&newThread)
|
void AddMacroHelperThread(Macro *macro, std::thread &&newThread)
|
||||||
{
|
{
|
||||||
if (!macro) {
|
if (!macro) {
|
||||||
@@ -138,7 +144,7 @@ void ResetMacroRunCount(Macro *macro)
|
|||||||
macro->ResetRunCount();
|
macro->ResetRunCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsValidMacroSegmentIndex(Macro *m, const int idx, bool isCondition)
|
bool IsValidMacroSegmentIndex(const Macro *m, const int idx, bool isCondition)
|
||||||
{
|
{
|
||||||
if (!m || idx < 0) {
|
if (!m || idx < 0) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -41,16 +41,17 @@ EXPORT std::atomic_int &GetShutdownConditionCount();
|
|||||||
EXPORT void SetMacroSwitchedScene(bool value);
|
EXPORT void SetMacroSwitchedScene(bool value);
|
||||||
EXPORT bool MacroSwitchedScene();
|
EXPORT bool MacroSwitchedScene();
|
||||||
|
|
||||||
EXPORT std::string GetMacroName(Macro *);
|
EXPORT std::string GetMacroName(const Macro *);
|
||||||
|
|
||||||
EXPORT std::chrono::high_resolution_clock::time_point
|
EXPORT std::chrono::high_resolution_clock::time_point
|
||||||
LastMacroConditionCheckTime(Macro *);
|
LastMacroConditionCheckTime(const Macro *);
|
||||||
|
|
||||||
EXPORT bool MacroIsStopped(Macro *);
|
EXPORT bool MacroIsStopped(const Macro *);
|
||||||
EXPORT bool MacroIsPaused(Macro *);
|
EXPORT bool MacroIsPaused(const Macro *);
|
||||||
EXPORT bool
|
EXPORT bool
|
||||||
MacroWasPausedSince(Macro *,
|
MacroWasPausedSince(const Macro *,
|
||||||
const std::chrono::high_resolution_clock::time_point &);
|
const std::chrono::high_resolution_clock::time_point &);
|
||||||
|
EXPORT bool MacroWasCheckedSinceLastStart(const Macro *);
|
||||||
|
|
||||||
EXPORT void AddMacroHelperThread(Macro *, std::thread &&);
|
EXPORT void AddMacroHelperThread(Macro *, std::thread &&);
|
||||||
|
|
||||||
@@ -67,6 +68,6 @@ EXPORT void InvalidateMacroTempVarValues();
|
|||||||
EXPORT void ResetMacroConditionTimers(Macro *);
|
EXPORT void ResetMacroConditionTimers(Macro *);
|
||||||
EXPORT void ResetMacroRunCount(Macro *);
|
EXPORT void ResetMacroRunCount(Macro *);
|
||||||
|
|
||||||
bool IsValidMacroSegmentIndex(Macro *m, const int idx, bool isCondition);
|
bool IsValidMacroSegmentIndex(const Macro *m, const int idx, bool isCondition);
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -181,15 +181,7 @@ void MacroInputEdit::SetInputVariablesAndValues(
|
|||||||
_variables = inputs;
|
_variables = inputs;
|
||||||
_values = values;
|
_values = values;
|
||||||
if ((size_t)_values.size() < _variables._inputVariables.size()) {
|
if ((size_t)_values.size() < _variables._inputVariables.size()) {
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
for (int i = 0;
|
|
||||||
_variables._inputVariables.size() - (size_t)_values.size();
|
|
||||||
i++) {
|
|
||||||
_values.push_back({});
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
_values.resize(_variables._inputVariables.size());
|
_values.resize(_variables._inputVariables.size());
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
SetupWidgets();
|
SetupWidgets();
|
||||||
}
|
}
|
||||||
@@ -199,7 +191,7 @@ bool MacroInputEdit::HasInputsToSet() const
|
|||||||
return !_variables._inputVariables.empty();
|
return !_variables._inputVariables.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HighligthMacroSettingsButton(bool enable);
|
void HighlightMacroSettingsButton(bool enable);
|
||||||
|
|
||||||
void MacroInputEdit::SetupWidgets()
|
void MacroInputEdit::SetupWidgets()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,11 +10,12 @@ MacroList::MacroList(QWidget *parent, bool allowDuplicates, bool reorder)
|
|||||||
: ListEditor(parent, reorder),
|
: ListEditor(parent, reorder),
|
||||||
_allowDuplicates(allowDuplicates)
|
_allowDuplicates(allowDuplicates)
|
||||||
{
|
{
|
||||||
QWidget::connect(window(),
|
QWidget::connect(GetSettingsWindow(),
|
||||||
SIGNAL(MacroRenamed(const QString &, const QString &)),
|
SIGNAL(MacroRenamed(const QString &, const QString &)),
|
||||||
this,
|
this,
|
||||||
SLOT(MacroRename(const QString &, const QString &)));
|
SLOT(MacroRename(const QString &, const QString &)));
|
||||||
QWidget::connect(window(), SIGNAL(MacroRemoved(const QString &)), this,
|
QWidget::connect(GetSettingsWindow(),
|
||||||
|
SIGNAL(MacroRemoved(const QString &)), this,
|
||||||
SLOT(MacroRemove(const QString &)));
|
SLOT(MacroRemove(const QString &)));
|
||||||
UpdateListSize();
|
UpdateListSize();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,14 @@ namespace advss {
|
|||||||
MacroRunButton::MacroRunButton(QWidget *parent) : QPushButton(parent)
|
MacroRunButton::MacroRunButton(QWidget *parent) : QPushButton(parent)
|
||||||
{
|
{
|
||||||
installEventFilter(this);
|
installEventFilter(this);
|
||||||
auto parentWindow = window();
|
|
||||||
if (parentWindow) {
|
// GetSettingsWindow() might still return null while this constructor is called
|
||||||
parentWindow->installEventFilter(this);
|
QTimer::singleShot(0, this, [this]() {
|
||||||
}
|
auto parentWindow = GetSettingsWindow();
|
||||||
|
if (parentWindow) {
|
||||||
|
parentWindow->installEventFilter(this);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
setToolTip(obs_module_text("AdvSceneSwitcher.macroTab.run.tooltip"));
|
setToolTip(obs_module_text("AdvSceneSwitcher.macroTab.run.tooltip"));
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ struct MacroSegmentCopyInfo {
|
|||||||
};
|
};
|
||||||
static MacroSegmentCopyInfo copyInfo;
|
static MacroSegmentCopyInfo copyInfo;
|
||||||
|
|
||||||
void AdvSceneSwitcher::CopyMacroSegment()
|
void MacroEdit::CopyMacroSegment()
|
||||||
{
|
{
|
||||||
copyInfo.segment.reset();
|
copyInfo.segment.reset();
|
||||||
copyInfo.type = MacroSegmentCopyInfo::Type::NONE;
|
copyInfo.type = MacroSegmentCopyInfo::Type::NONE;
|
||||||
@@ -23,7 +23,7 @@ void AdvSceneSwitcher::CopyMacroSegment()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto macro = GetSelectedMacro();
|
auto macro = _currentMacro;
|
||||||
if (!macro) {
|
if (!macro) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -43,13 +43,13 @@ void AdvSceneSwitcher::CopyMacroSegment()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::PasteMacroSegment()
|
void MacroEdit::PasteMacroSegment()
|
||||||
{
|
{
|
||||||
if (copyInfo.type == MacroSegmentCopyInfo::Type::NONE) {
|
if (copyInfo.type == MacroSegmentCopyInfo::Type::NONE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto macro = GetSelectedMacro();
|
auto macro = _currentMacro;
|
||||||
if (!macro || !copyInfo.segment) {
|
if (!macro || !copyInfo.segment) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -113,14 +113,14 @@ void SetCopySegmentTargetActionType(bool setToElseAction)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupSegmentCopyPasteShortcutHandlers(AdvSceneSwitcher *window)
|
void SetupSegmentCopyPasteShortcutHandlers(MacroEdit *edit)
|
||||||
{
|
{
|
||||||
auto copyShortcut = new QShortcut(QKeySequence("Ctrl+C"), window);
|
auto copyShortcut = new QShortcut(QKeySequence("Ctrl+C"), edit);
|
||||||
QWidget::connect(copyShortcut, &QShortcut::activated, window,
|
QWidget::connect(copyShortcut, &QShortcut::activated, edit,
|
||||||
&AdvSceneSwitcher::CopyMacroSegment);
|
&MacroEdit::CopyMacroSegment);
|
||||||
auto pasteShortcut = new QShortcut(QKeySequence("Ctrl+V"), window);
|
auto pasteShortcut = new QShortcut(QKeySequence("Ctrl+V"), edit);
|
||||||
QWidget::connect(pasteShortcut, &QShortcut::activated, window,
|
QWidget::connect(pasteShortcut, &QShortcut::activated, edit,
|
||||||
&AdvSceneSwitcher::PasteMacroSegment);
|
&MacroEdit::PasteMacroSegment);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
class AdvSceneSwitcher;
|
class MacroEdit;
|
||||||
|
|
||||||
bool MacroSegmentIsInClipboard();
|
bool MacroSegmentIsInClipboard();
|
||||||
bool MacroActionIsInClipboard();
|
bool MacroActionIsInClipboard();
|
||||||
void SetCopySegmentTargetActionType(bool setToElseAction);
|
void SetCopySegmentTargetActionType(bool setToElseAction);
|
||||||
void SetupSegmentCopyPasteShortcutHandlers(AdvSceneSwitcher *window);
|
void SetupSegmentCopyPasteShortcutHandlers(MacroEdit *edit);
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -13,36 +13,62 @@
|
|||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
|
bool MacroSegmentList::_useCache = true;
|
||||||
|
|
||||||
MacroSegmentList::MacroSegmentList(QWidget *parent)
|
MacroSegmentList::MacroSegmentList(QWidget *parent)
|
||||||
: QScrollArea(parent),
|
: QScrollArea(parent),
|
||||||
|
_stackedWidget(new QStackedWidget(this)),
|
||||||
_layout(new QVBoxLayout),
|
_layout(new QVBoxLayout),
|
||||||
_contentLayout(new QVBoxLayout),
|
_contentLayout(new QVBoxLayout),
|
||||||
_helpMsg(new QLabel)
|
_helpMsg(new QLabel(this))
|
||||||
{
|
{
|
||||||
_helpMsg->setWordWrap(true);
|
_helpMsg->setWordWrap(true);
|
||||||
_helpMsg->setAlignment(Qt::AlignCenter);
|
_helpMsg->setAlignment(Qt::AlignCenter);
|
||||||
|
auto helpWidget = new QWidget(this);
|
||||||
|
auto helpLayout = new QVBoxLayout(helpWidget);
|
||||||
|
helpLayout->addWidget(_helpMsg);
|
||||||
|
helpLayout->setAlignment(Qt::AlignCenter);
|
||||||
|
|
||||||
|
auto contentWidget = new QWidget(this);
|
||||||
|
contentWidget->setLayout(_contentLayout);
|
||||||
_contentLayout->setSpacing(0);
|
_contentLayout->setSpacing(0);
|
||||||
auto helperLayout = new QGridLayout();
|
|
||||||
helperLayout->addWidget(_helpMsg, 0, 0,
|
auto contentWrapper = new QWidget(this);
|
||||||
Qt::AlignHCenter | Qt::AlignVCenter);
|
auto wrapperLayout = new QVBoxLayout(contentWrapper);
|
||||||
helperLayout->addLayout(_contentLayout, 0, 0);
|
wrapperLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
helperLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
|
wrapperLayout->addWidget(contentWidget);
|
||||||
_layout->addLayout(helperLayout, 10);
|
// Move macro segments to the top of the list
|
||||||
_layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding,
|
wrapperLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding,
|
||||||
QSizePolicy::Expanding));
|
QSizePolicy::Expanding));
|
||||||
auto wrapper = new QWidget;
|
|
||||||
wrapper->setLayout(_layout);
|
_stackedWidget->addWidget(helpWidget);
|
||||||
setWidget(wrapper);
|
_stackedWidget->addWidget(contentWrapper);
|
||||||
|
|
||||||
|
setWidget(_stackedWidget);
|
||||||
setWidgetResizable(true);
|
setWidgetResizable(true);
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
|
||||||
|
SetHelpMsgVisible(true);
|
||||||
|
|
||||||
|
connect(verticalScrollBar(), &QScrollBar::valueChanged, this,
|
||||||
|
[this]() { SetupVisibleMacroSegmentWidgets(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void clearWidgetVector(const std::vector<QWidget *> &widgets)
|
||||||
|
{
|
||||||
|
for (auto widget : widgets) {
|
||||||
|
widget->deleteLater();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
MacroSegmentList::~MacroSegmentList()
|
MacroSegmentList::~MacroSegmentList()
|
||||||
{
|
{
|
||||||
if (_autoScrollThread.joinable()) {
|
if (_autoScrollThread.joinable()) {
|
||||||
_autoScroll = false;
|
_autoScroll = false;
|
||||||
_autoScrollThread.join();
|
_autoScrollThread.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClearWidgetCache();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool posIsInScrollbar(const QScrollBar *scrollbar, const QPoint &pos)
|
static bool posIsInScrollbar(const QScrollBar *scrollbar, const QPoint &pos)
|
||||||
@@ -53,7 +79,7 @@ static bool posIsInScrollbar(const QScrollBar *scrollbar, const QPoint &pos)
|
|||||||
if (!scrollbar->isVisible()) {
|
if (!scrollbar->isVisible()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const auto geo = scrollbar->geometry();
|
const auto &geo = scrollbar->geometry();
|
||||||
const auto globalGeo = QRect(scrollbar->mapToGlobal(geo.topLeft()),
|
const auto globalGeo = QRect(scrollbar->mapToGlobal(geo.topLeft()),
|
||||||
scrollbar->mapToGlobal(geo.bottomRight()));
|
scrollbar->mapToGlobal(geo.bottomRight()));
|
||||||
return globalGeo.contains(pos);
|
return globalGeo.contains(pos);
|
||||||
@@ -93,31 +119,102 @@ void MacroSegmentList::SetHelpMsg(const QString &msg) const
|
|||||||
_helpMsg->setText(msg);
|
_helpMsg->setText(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroSegmentList::SetHelpMsgVisible(bool visible) const
|
void MacroSegmentList::SetHelpMsgVisible(bool visible)
|
||||||
{
|
{
|
||||||
_helpMsg->setVisible(visible);
|
_stackedWidget->setCurrentIndex(visible ? 0 : 1);
|
||||||
|
adjustSize();
|
||||||
|
updateGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroSegmentList::Insert(int idx, MacroSegmentEdit *widget)
|
void MacroSegmentList::Insert(int idx, QWidget *widget)
|
||||||
{
|
{
|
||||||
widget->installEventFilter(this);
|
widget->installEventFilter(this);
|
||||||
_contentLayout->insertWidget(idx, widget);
|
_contentLayout->insertWidget(idx, widget);
|
||||||
|
SetupVisibleMacroSegmentWidgets();
|
||||||
|
SetHelpMsgVisible(false);
|
||||||
|
adjustSize();
|
||||||
|
updateGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroSegmentList::Add(QWidget *widget)
|
void MacroSegmentList::Add(QWidget *widget)
|
||||||
{
|
{
|
||||||
widget->installEventFilter(this);
|
Insert(_contentLayout->count(), widget);
|
||||||
_contentLayout->addWidget(widget);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroSegmentList::Remove(int idx) const
|
void MacroSegmentList::Remove(int idx)
|
||||||
{
|
{
|
||||||
DeleteLayoutItemWidget(_contentLayout->takeAt(idx));
|
DeleteLayoutItemWidget(_contentLayout->takeAt(idx));
|
||||||
|
adjustSize();
|
||||||
|
updateGeometry();
|
||||||
|
if (IsEmpty()) {
|
||||||
|
SetHelpMsgVisible(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroSegmentList::Clear(int idx) const
|
void MacroSegmentList::Clear(int idx)
|
||||||
{
|
{
|
||||||
ClearLayout(_contentLayout, idx);
|
ClearLayout(_contentLayout, idx);
|
||||||
|
adjustSize();
|
||||||
|
updateGeometry();
|
||||||
|
|
||||||
|
SetHelpMsgVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroSegmentList::SetCachingEnabled(bool enable)
|
||||||
|
{
|
||||||
|
_useCache = enable;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroSegmentList::CacheCurrentWidgetsFor(const Macro *macro)
|
||||||
|
{
|
||||||
|
if (!_useCache) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<QWidget *> result;
|
||||||
|
int idx = 0;
|
||||||
|
QLayoutItem *item;
|
||||||
|
while ((item = _contentLayout->takeAt(idx))) {
|
||||||
|
if (!item || !item->widget()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
auto widget = item->widget();
|
||||||
|
widget->hide();
|
||||||
|
result.emplace_back(widget);
|
||||||
|
}
|
||||||
|
|
||||||
|
_widgetCache[macro] = result;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MacroSegmentList::PopulateWidgetsFromCache(const Macro *macro)
|
||||||
|
{
|
||||||
|
if (!_useCache) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto it = _widgetCache.find(macro);
|
||||||
|
if (it == _widgetCache.end()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto widget : it->second) {
|
||||||
|
_contentLayout->addWidget(widget);
|
||||||
|
widget->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
adjustSize();
|
||||||
|
updateGeometry();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroSegmentList::ClearWidgetsFromCacheFor(const Macro *macro)
|
||||||
|
{
|
||||||
|
auto it = _widgetCache.find(macro);
|
||||||
|
if (it == _widgetCache.end()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
clearWidgetVector(it->second);
|
||||||
|
_widgetCache.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroSegmentList::Highlight(int idx, QColor color)
|
void MacroSegmentList::Highlight(int idx, QColor color)
|
||||||
@@ -178,11 +275,7 @@ void MacroSegmentList::mousePressEvent(QMouseEvent *event)
|
|||||||
{
|
{
|
||||||
if (event->button() == Qt::LeftButton ||
|
if (event->button() == Qt::LeftButton ||
|
||||||
event->button() == Qt::RightButton) {
|
event->button() == Qt::RightButton) {
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
_dragPosition = GetDragIndex(event->globalPos());
|
|
||||||
#else
|
|
||||||
_dragPosition = GetDragIndex(event->globalPosition().toPoint());
|
_dragPosition = GetDragIndex(event->globalPosition().toPoint());
|
||||||
#endif
|
|
||||||
emit SelectionChanged(_dragPosition);
|
emit SelectionChanged(_dragPosition);
|
||||||
} else {
|
} else {
|
||||||
_dragPosition = -1;
|
_dragPosition = -1;
|
||||||
@@ -269,6 +362,13 @@ void MacroSegmentList::HideLastDropLine()
|
|||||||
_dropLineIdx = -1;
|
_dropLineIdx = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroSegmentList::ClearWidgetCache()
|
||||||
|
{
|
||||||
|
for (const auto &[_, widgets] : _widgetCache) {
|
||||||
|
clearWidgetVector(widgets);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static bool isInUpperHalfOf(const QPoint &pos, const QRect &rect)
|
static bool isInUpperHalfOf(const QPoint &pos, const QRect &rect)
|
||||||
{
|
{
|
||||||
return QRect(rect.topLeft(),
|
return QRect(rect.topLeft(),
|
||||||
@@ -300,11 +400,7 @@ void MacroSegmentList::dragMoveEvent(QDragMoveEvent *event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
_dragCursorPos = (mapToGlobal(event->pos()));
|
|
||||||
#else
|
|
||||||
_dragCursorPos = (mapToGlobal(event->position().toPoint()));
|
_dragCursorPos = (mapToGlobal(event->position().toPoint()));
|
||||||
#endif
|
|
||||||
CheckDropLine(_dragCursorPos);
|
CheckDropLine(_dragCursorPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,6 +426,55 @@ QRect MacroSegmentList::GetContentItemRectWithPadding(int idx) const
|
|||||||
return rect;
|
return rect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroSegmentList::SetVisibilityCheckEnable(bool enable)
|
||||||
|
{
|
||||||
|
_checkVisibility = enable;
|
||||||
|
|
||||||
|
if (_checkVisibility) {
|
||||||
|
QTimer::singleShot(0, this, [this]() {
|
||||||
|
SetupVisibleMacroSegmentWidgets();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MacroSegmentList::IsEmpty() const
|
||||||
|
{
|
||||||
|
return _contentLayout->count() == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize MacroSegmentList::minimumSizeHint() const
|
||||||
|
{
|
||||||
|
return _stackedWidget->currentWidget()->minimumSizeHint();
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize MacroSegmentList::sizeHint() const
|
||||||
|
{
|
||||||
|
const auto contentSize = _stackedWidget->currentWidget()->sizeHint();
|
||||||
|
const auto hint =
|
||||||
|
QSize(width(), contentSize.height() + 2 * frameWidth());
|
||||||
|
return hint;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroSegmentList::SetupVisibleMacroSegmentWidgets()
|
||||||
|
{
|
||||||
|
if (!_checkVisibility) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto viewportRect = viewport()->rect();
|
||||||
|
|
||||||
|
for (auto segment : widget()->findChildren<MacroSegmentEdit *>()) {
|
||||||
|
const auto pos = segment->mapTo(viewport(), QPoint(0, 0));
|
||||||
|
const QRect rect(pos, segment->size());
|
||||||
|
if (!viewportRect.intersects(rect)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
segment->SetupWidgets();
|
||||||
|
}
|
||||||
|
updateGeometry();
|
||||||
|
}
|
||||||
|
|
||||||
int MacroSegmentList::GetSegmentIndexFromPos(const QPoint &pos) const
|
int MacroSegmentList::GetSegmentIndexFromPos(const QPoint &pos) const
|
||||||
{
|
{
|
||||||
int idx = -1;
|
int idx = -1;
|
||||||
@@ -450,16 +595,6 @@ void MacroSegmentList::dropEvent(QDropEvent *event)
|
|||||||
{
|
{
|
||||||
HideLastDropLine();
|
HideLastDropLine();
|
||||||
auto widget = qobject_cast<QWidget *>(event->source());
|
auto widget = qobject_cast<QWidget *>(event->source());
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
if (widget && !widget->geometry().contains(event->pos()) &&
|
|
||||||
widgetIsInLayout(widget, _contentLayout)) {
|
|
||||||
int dropPosition = GetDropIndex(mapToGlobal(event->pos()));
|
|
||||||
if (dropPosition == -1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
emit Reorder(dropPosition, _dragPosition);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
if (widget &&
|
if (widget &&
|
||||||
!widget->geometry().contains(event->position().toPoint()) &&
|
!widget->geometry().contains(event->position().toPoint()) &&
|
||||||
widgetIsInLayout(widget, _contentLayout)) {
|
widgetIsInLayout(widget, _contentLayout)) {
|
||||||
@@ -470,8 +605,13 @@ void MacroSegmentList::dropEvent(QDropEvent *event)
|
|||||||
}
|
}
|
||||||
emit Reorder(dropPosition, _dragPosition);
|
emit Reorder(dropPosition, _dragPosition);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
_dragPosition = -1;
|
_dragPosition = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroSegmentList::resizeEvent(QResizeEvent *event)
|
||||||
|
{
|
||||||
|
QScrollArea::resizeEvent(event);
|
||||||
|
SetupVisibleMacroSegmentWidgets();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -1,56 +1,80 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "macro-segment.hpp"
|
#include "macro-segment.hpp"
|
||||||
|
|
||||||
#include <QWidget>
|
|
||||||
#include <QScrollArea>
|
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QScrollArea>
|
||||||
|
#include <QStackedWidget>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
|
class Macro;
|
||||||
|
|
||||||
class MacroSegmentList : public QScrollArea {
|
class MacroSegmentList : public QScrollArea {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MacroSegmentList(QWidget *parent = nullptr);
|
MacroSegmentList(QWidget *parent = nullptr);
|
||||||
virtual ~MacroSegmentList();
|
~MacroSegmentList();
|
||||||
|
|
||||||
void SetHelpMsg(const QString &msg) const;
|
void SetHelpMsg(const QString &msg) const;
|
||||||
void SetHelpMsgVisible(bool visible) const;
|
void SetHelpMsgVisible(bool visible);
|
||||||
|
|
||||||
MacroSegmentEdit *WidgetAt(int idx) const;
|
MacroSegmentEdit *WidgetAt(int idx) const;
|
||||||
MacroSegmentEdit *WidgetAt(const QPoint &) const;
|
MacroSegmentEdit *WidgetAt(const QPoint &) const;
|
||||||
|
|
||||||
int IndexAt(const QPoint &) const;
|
int IndexAt(const QPoint &) const;
|
||||||
void Insert(int idx, MacroSegmentEdit *widget);
|
void Insert(int idx, QWidget *widget);
|
||||||
void Add(QWidget *widget);
|
void Add(QWidget *widget);
|
||||||
void Remove(int idx) const;
|
void Remove(int idx);
|
||||||
void Clear(int idx = 0) const; // Clear all elements >= idx
|
void Clear(int idx = 0); // Clear all elements >= idx
|
||||||
|
bool IsEmpty() const;
|
||||||
|
|
||||||
|
static void SetCachingEnabled(bool enable);
|
||||||
|
void CacheCurrentWidgetsFor(const Macro *);
|
||||||
|
bool PopulateWidgetsFromCache(const Macro *);
|
||||||
|
void ClearWidgetsFromCacheFor(const Macro *);
|
||||||
|
void SetVisibilityCheckEnable(bool enable);
|
||||||
|
|
||||||
void Highlight(int idx, QColor color = QColor(Qt::green));
|
void Highlight(int idx, QColor color = QColor(Qt::green));
|
||||||
|
|
||||||
void SetCollapsed(bool) const;
|
void SetCollapsed(bool) const;
|
||||||
void SetSelection(int idx) const;
|
void SetSelection(int idx) const;
|
||||||
QVBoxLayout *ContentLayout() const { return _contentLayout; }
|
QVBoxLayout *ContentLayout() const { return _contentLayout; }
|
||||||
|
|
||||||
|
QSize minimumSizeHint() const override;
|
||||||
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void SelectionChanged(int idx);
|
void SelectionChanged(int idx);
|
||||||
void Reorder(int source, int target);
|
void Reorder(int source, int target);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool eventFilter(QObject *object, QEvent *event);
|
bool eventFilter(QObject *object, QEvent *event) override;
|
||||||
void mousePressEvent(QMouseEvent *event);
|
void mousePressEvent(QMouseEvent *event) override;
|
||||||
void mouseMoveEvent(QMouseEvent *event);
|
void mouseMoveEvent(QMouseEvent *event) override;
|
||||||
void mouseReleaseEvent(QMouseEvent *event);
|
void mouseReleaseEvent(QMouseEvent *event) override;
|
||||||
void dragLeaveEvent(QDragLeaveEvent *event);
|
void dragLeaveEvent(QDragLeaveEvent *event) override;
|
||||||
void dragEnterEvent(QDragEnterEvent *event);
|
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||||
void dragMoveEvent(QDragMoveEvent *event);
|
void dragMoveEvent(QDragMoveEvent *event) override;
|
||||||
void dropEvent(QDropEvent *event);
|
void dropEvent(QDropEvent *event) override;
|
||||||
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void SetupVisibleMacroSegmentWidgets();
|
||||||
|
void ClearWidgetCache();
|
||||||
|
|
||||||
int GetSegmentIndexFromPos(const QPoint &) const;
|
int GetSegmentIndexFromPos(const QPoint &) const;
|
||||||
|
bool IsInListArea(const QPoint &) const;
|
||||||
|
QRect GetContentItemRectWithPadding(int idx) const;
|
||||||
|
|
||||||
int GetDragIndex(const QPoint &) const;
|
int GetDragIndex(const QPoint &) const;
|
||||||
int GetDropIndex(const QPoint &) const;
|
int GetDropIndex(const QPoint &) const;
|
||||||
void CheckScroll() const;
|
void CheckScroll() const;
|
||||||
void CheckDropLine(const QPoint &);
|
void CheckDropLine(const QPoint &);
|
||||||
bool IsInListArea(const QPoint &) const;
|
|
||||||
QRect GetContentItemRectWithPadding(int idx) const;
|
|
||||||
void HideLastDropLine();
|
void HideLastDropLine();
|
||||||
|
|
||||||
int _dragPosition = -1;
|
int _dragPosition = -1;
|
||||||
@@ -59,9 +83,15 @@ private:
|
|||||||
std::thread _autoScrollThread;
|
std::thread _autoScrollThread;
|
||||||
std::atomic_bool _autoScroll{false};
|
std::atomic_bool _autoScroll{false};
|
||||||
|
|
||||||
|
QStackedWidget *_stackedWidget;
|
||||||
QVBoxLayout *_layout;
|
QVBoxLayout *_layout;
|
||||||
QVBoxLayout *_contentLayout;
|
QVBoxLayout *_contentLayout;
|
||||||
QLabel *_helpMsg;
|
QLabel *_helpMsg;
|
||||||
|
|
||||||
|
bool _checkVisibility = true;
|
||||||
|
|
||||||
|
static bool _useCache;
|
||||||
|
std::unordered_map<const Macro *, std::vector<QWidget *>> _widgetCache;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -31,7 +31,8 @@ MacroSegmentSelection::MacroSegmentSelection(QWidget *parent, Type type,
|
|||||||
_index,
|
_index,
|
||||||
SIGNAL(NumberVariableChanged(const NumberVariable<int> &)),
|
SIGNAL(NumberVariableChanged(const NumberVariable<int> &)),
|
||||||
this, SLOT(IndexChanged(const NumberVariable<int> &)));
|
this, SLOT(IndexChanged(const NumberVariable<int> &)));
|
||||||
QWidget::connect(window(), SIGNAL(MacroSegmentOrderChanged()), this,
|
QWidget::connect(GetSettingsWindow(),
|
||||||
|
SIGNAL(MacroSegmentOrderChanged()), this,
|
||||||
SLOT(MacroSegmentOrderChanged()));
|
SLOT(MacroSegmentOrderChanged()));
|
||||||
|
|
||||||
auto layout = new QHBoxLayout;
|
auto layout = new QHBoxLayout;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
|
#include <QGraphicsOpacityEffect>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
@@ -24,24 +25,24 @@ bool MacroSegment::Save(obs_data_t *obj) const
|
|||||||
obs_data_set_bool(data, "collapsed", _collapsed);
|
obs_data_set_bool(data, "collapsed", _collapsed);
|
||||||
obs_data_set_bool(data, "useCustomLabel", _useCustomLabel);
|
obs_data_set_bool(data, "useCustomLabel", _useCustomLabel);
|
||||||
obs_data_set_string(data, "customLabel", _customLabel.c_str());
|
obs_data_set_string(data, "customLabel", _customLabel.c_str());
|
||||||
|
obs_data_set_bool(data, "enabled", _enabled);
|
||||||
|
obs_data_set_int(data, "version", 1);
|
||||||
obs_data_set_obj(obj, "segmentSettings", data);
|
obs_data_set_obj(obj, "segmentSettings", data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MacroSegment::Load(obs_data_t *obj)
|
bool MacroSegment::Load(obs_data_t *obj)
|
||||||
{
|
{
|
||||||
|
OBSDataAutoRelease data = obs_data_get_obj(obj, "segmentSettings");
|
||||||
|
_collapsed = obs_data_get_bool(data, "collapsed");
|
||||||
|
_useCustomLabel = obs_data_get_bool(data, "useCustomLabel");
|
||||||
|
_customLabel = obs_data_get_string(data, "customLabel");
|
||||||
|
obs_data_set_default_bool(data, "enabled", true);
|
||||||
|
_enabled = obs_data_get_bool(data, "enabled");
|
||||||
|
|
||||||
// TODO: remove this fallback at some point
|
// TODO: remove this fallback at some point
|
||||||
if (obs_data_has_user_value(obj, "segmentSettings")) {
|
if (!obs_data_has_user_value(data, "version")) {
|
||||||
OBSDataAutoRelease data =
|
_enabled = obs_data_get_bool(obj, "enabled");
|
||||||
obs_data_get_obj(obj, "segmentSettings");
|
|
||||||
_collapsed = obs_data_get_bool(data, "collapsed");
|
|
||||||
_useCustomLabel = obs_data_get_bool(data, "useCustomLabel");
|
|
||||||
_customLabel = obs_data_get_string(data, "customLabel");
|
|
||||||
} else {
|
|
||||||
_collapsed = obs_data_get_bool(obj, "collapsed");
|
|
||||||
_useCustomLabel = false;
|
|
||||||
_customLabel = obs_module_text(
|
|
||||||
"AdvSceneSwitcher.macroTab.segment.defaultCustomLabel");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ClearAvailableTempvars();
|
ClearAvailableTempvars();
|
||||||
@@ -73,6 +74,16 @@ bool MacroSegment::GetHighlightAndReset()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroSegment::SetEnabled(bool value)
|
||||||
|
{
|
||||||
|
_enabled = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MacroSegment::Enabled() const
|
||||||
|
{
|
||||||
|
return _enabled;
|
||||||
|
}
|
||||||
|
|
||||||
std::string MacroSegment::GetVariableValue() const
|
std::string MacroSegment::GetVariableValue() const
|
||||||
{
|
{
|
||||||
if (_supportsVariableValue) {
|
if (_supportsVariableValue) {
|
||||||
@@ -96,7 +107,7 @@ void MacroSegment::SetupTempVars()
|
|||||||
void MacroSegment::ClearAvailableTempvars()
|
void MacroSegment::ClearAvailableTempvars()
|
||||||
{
|
{
|
||||||
_tempVariables.clear();
|
_tempVariables.clear();
|
||||||
NotifyUIAboutTempVarChange();
|
NotifyUIAboutTempVarChange(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::shared_ptr<MacroSegment>
|
static std::shared_ptr<MacroSegment>
|
||||||
@@ -138,7 +149,7 @@ void MacroSegment::AddTempvar(const std::string &id, const std::string &name,
|
|||||||
|
|
||||||
TempVariable var(id, name, description, sharedSegment);
|
TempVariable var(id, name, description, sharedSegment);
|
||||||
_tempVariables.emplace_back(std::move(var));
|
_tempVariables.emplace_back(std::move(var));
|
||||||
NotifyUIAboutTempVarChange();
|
NotifyUIAboutTempVarChange(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroSegment::SetTempVarValue(const std::string &id,
|
void MacroSegment::SetTempVarValue(const std::string &id,
|
||||||
@@ -246,20 +257,25 @@ MacroSegmentEdit::MacroSegmentEdit(QWidget *parent)
|
|||||||
QWidget::connect(_section, &Section::Collapsed, this,
|
QWidget::connect(_section, &Section::Collapsed, this,
|
||||||
&MacroSegmentEdit::Collapsed);
|
&MacroSegmentEdit::Collapsed);
|
||||||
// Macro signals
|
// Macro signals
|
||||||
QWidget::connect(parent, SIGNAL(MacroAdded(const QString &)), this,
|
QWidget::connect(GetSettingsWindow(),
|
||||||
|
SIGNAL(MacroAdded(const QString &)), this,
|
||||||
SIGNAL(MacroAdded(const QString &)));
|
SIGNAL(MacroAdded(const QString &)));
|
||||||
QWidget::connect(parent, SIGNAL(MacroRemoved(const QString &)), this,
|
QWidget::connect(GetSettingsWindow(),
|
||||||
|
SIGNAL(MacroRemoved(const QString &)), this,
|
||||||
SIGNAL(MacroRemoved(const QString &)));
|
SIGNAL(MacroRemoved(const QString &)));
|
||||||
QWidget::connect(
|
QWidget::connect(
|
||||||
parent, SIGNAL(MacroRenamed(const QString &, const QString &)),
|
GetSettingsWindow(),
|
||||||
this, SIGNAL(MacroRenamed(const QString &, const QString &)));
|
SIGNAL(MacroRenamed(const QString &, const QString &)), this,
|
||||||
|
SIGNAL(MacroRenamed(const QString &, const QString &)));
|
||||||
// Scene group signals
|
// Scene group signals
|
||||||
QWidget::connect(parent, SIGNAL(SceneGroupAdded(const QString &)), this,
|
QWidget::connect(GetSettingsWindow(),
|
||||||
|
SIGNAL(SceneGroupAdded(const QString &)), this,
|
||||||
SIGNAL(SceneGroupAdded(const QString &)));
|
SIGNAL(SceneGroupAdded(const QString &)));
|
||||||
QWidget::connect(parent, SIGNAL(SceneGroupRemoved(const QString &)),
|
QWidget::connect(GetSettingsWindow(),
|
||||||
this, SIGNAL(SceneGroupRemoved(const QString &)));
|
SIGNAL(SceneGroupRemoved(const QString &)), this,
|
||||||
|
SIGNAL(SceneGroupRemoved(const QString &)));
|
||||||
QWidget::connect(
|
QWidget::connect(
|
||||||
parent,
|
GetSettingsWindow(),
|
||||||
SIGNAL(SceneGroupRenamed(const QString &, const QString)), this,
|
SIGNAL(SceneGroupRenamed(const QString &, const QString)), this,
|
||||||
SIGNAL(SceneGroupRenamed(const QString &, const QString)));
|
SIGNAL(SceneGroupRenamed(const QString &, const QString)));
|
||||||
|
|
||||||
@@ -294,13 +310,8 @@ bool MacroSegmentEdit::eventFilter(QObject *obj, QEvent *ev)
|
|||||||
QMouseEvent *newEvent = new QMouseEvent(
|
QMouseEvent *newEvent = new QMouseEvent(
|
||||||
mouseEvent->type(),
|
mouseEvent->type(),
|
||||||
_headerInfo->mapTo(this, mouseEvent->pos()),
|
_headerInfo->mapTo(this, mouseEvent->pos()),
|
||||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
mouseEvent->globalPosition(), mouseEvent->button(),
|
||||||
mouseEvent->globalPos(),
|
mouseEvent->buttons(), mouseEvent->modifiers());
|
||||||
#else
|
|
||||||
mouseEvent->globalPosition(),
|
|
||||||
#endif
|
|
||||||
mouseEvent->button(), mouseEvent->buttons(),
|
|
||||||
mouseEvent->modifiers());
|
|
||||||
QApplication::sendEvent(parentWidget(), newEvent);
|
QApplication::sendEvent(parentWidget(), newEvent);
|
||||||
}
|
}
|
||||||
return QWidget::eventFilter(obj, ev);
|
return QWidget::eventFilter(obj, ev);
|
||||||
@@ -318,13 +329,29 @@ void MacroSegmentEdit::HeaderInfoChanged(const QString &text)
|
|||||||
_headerInfo->setText(text);
|
_headerInfo->setText(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroSegmentEdit::Collapsed(bool collapsed)
|
void MacroSegmentEdit::Collapsed(bool collapsed) const
|
||||||
{
|
{
|
||||||
if (Data()) {
|
if (Data()) {
|
||||||
Data()->SetCollapsed(collapsed);
|
Data()->SetCollapsed(collapsed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroSegmentEdit::SetDisableEffect(bool value)
|
||||||
|
{
|
||||||
|
if (value) {
|
||||||
|
auto effect = new QGraphicsOpacityEffect(this);
|
||||||
|
effect->setOpacity(0.5);
|
||||||
|
_section->setGraphicsEffect(effect);
|
||||||
|
} else {
|
||||||
|
_section->setGraphicsEffect(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroSegmentEdit::SetEnableAppearance(bool value)
|
||||||
|
{
|
||||||
|
SetDisableEffect(!value);
|
||||||
|
}
|
||||||
|
|
||||||
void MacroSegmentEdit::SetFocusPolicyOfWidgets()
|
void MacroSegmentEdit::SetFocusPolicyOfWidgets()
|
||||||
{
|
{
|
||||||
QList<QWidget *> widgets = this->findChildren<QWidget *>();
|
QList<QWidget *> widgets = this->findChildren<QWidget *>();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace advss {
|
|||||||
|
|
||||||
class Macro;
|
class Macro;
|
||||||
|
|
||||||
class EXPORT MacroSegment {
|
class EXPORT MacroSegment : public Lockable {
|
||||||
public:
|
public:
|
||||||
MacroSegment(Macro *m, bool supportsVariableValue);
|
MacroSegment(Macro *m, bool supportsVariableValue);
|
||||||
virtual ~MacroSegment() = default;
|
virtual ~MacroSegment() = default;
|
||||||
@@ -39,6 +39,8 @@ public:
|
|||||||
virtual std::string GetId() const = 0;
|
virtual std::string GetId() const = 0;
|
||||||
void EnableHighlight();
|
void EnableHighlight();
|
||||||
bool GetHighlightAndReset();
|
bool GetHighlightAndReset();
|
||||||
|
void SetEnabled(bool);
|
||||||
|
bool Enabled() const;
|
||||||
virtual std::string GetVariableValue() const;
|
virtual std::string GetVariableValue() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -46,7 +48,7 @@ protected:
|
|||||||
friend void IncrementVariableRef(MacroSegment *);
|
friend void IncrementVariableRef(MacroSegment *);
|
||||||
friend void DecrementVariableRef(MacroSegment *);
|
friend void DecrementVariableRef(MacroSegment *);
|
||||||
void SetVariableValue(const std::string &value);
|
void SetVariableValue(const std::string &value);
|
||||||
bool IsReferencedInVars() { return _variableRefs != 0; }
|
bool IsReferencedInVars() const { return _variableRefs != 0; }
|
||||||
|
|
||||||
virtual void SetupTempVars();
|
virtual void SetupTempVars();
|
||||||
void AddTempvar(const std::string &id, const std::string &name,
|
void AddTempvar(const std::string &id, const std::string &name,
|
||||||
@@ -75,6 +77,7 @@ private:
|
|||||||
// UI helper
|
// UI helper
|
||||||
bool _highlight = false;
|
bool _highlight = false;
|
||||||
bool _collapsed = false;
|
bool _collapsed = false;
|
||||||
|
bool _enabled = true;
|
||||||
|
|
||||||
// Custom header labels
|
// Custom header labels
|
||||||
bool _useCustomLabel = false;
|
bool _useCustomLabel = false;
|
||||||
@@ -103,12 +106,13 @@ public:
|
|||||||
void SetCollapsed(bool collapsed);
|
void SetCollapsed(bool collapsed);
|
||||||
void SetSelected(bool);
|
void SetSelected(bool);
|
||||||
virtual std::shared_ptr<MacroSegment> Data() const = 0;
|
virtual std::shared_ptr<MacroSegment> Data() const = 0;
|
||||||
|
virtual void SetupWidgets(bool basicSetup = false) = 0;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void HeaderInfoChanged(const QString &);
|
void HeaderInfoChanged(const QString &);
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void Collapsed(bool);
|
void Collapsed(bool) const;
|
||||||
signals:
|
signals:
|
||||||
void MacroAdded(const QString &name);
|
void MacroAdded(const QString &name);
|
||||||
void MacroRemoved(const QString &name);
|
void MacroRemoved(const QString &name);
|
||||||
@@ -118,12 +122,16 @@ signals:
|
|||||||
void SceneGroupRenamed(const QString &oldName, const QString newName);
|
void SceneGroupRenamed(const QString &oldName, const QString newName);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void SetDisableEffect(bool);
|
||||||
|
void SetEnableAppearance(bool);
|
||||||
|
|
||||||
bool eventFilter(QObject *obj, QEvent *ev) override;
|
bool eventFilter(QObject *obj, QEvent *ev) override;
|
||||||
|
|
||||||
Section *_section;
|
Section *_section;
|
||||||
QLabel *_headerInfo;
|
QLabel *_headerInfo;
|
||||||
QWidget *_frame;
|
QWidget *_frame;
|
||||||
QVBoxLayout *_contentLayout;
|
QVBoxLayout *_contentLayout;
|
||||||
|
bool _allWidgetsAreSetup = false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum class DropLineState {
|
enum class DropLineState {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ void MacroSelection::SetCurrentMacro(const MacroRef ¯o)
|
|||||||
|
|
||||||
void MacroSelection::HideSelectedMacro()
|
void MacroSelection::HideSelectedMacro()
|
||||||
{
|
{
|
||||||
auto ssWindow = static_cast<AdvSceneSwitcher *>(window());
|
auto ssWindow = static_cast<AdvSceneSwitcher *>(GetSettingsWindow());
|
||||||
if (!ssWindow) {
|
if (!ssWindow) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -76,12 +76,16 @@ void MacroSelection::ShowAllMacros()
|
|||||||
|
|
||||||
void MacroSelection::MacroRemove(const QString &name)
|
void MacroSelection::MacroRemove(const QString &name)
|
||||||
{
|
{
|
||||||
|
const bool currentSelectionWasRemoved = name == currentText();
|
||||||
|
|
||||||
int idx = findText(name);
|
int idx = findText(name);
|
||||||
if (idx == -1) {
|
if (idx == -1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
removeItem(idx);
|
removeItem(idx);
|
||||||
setCurrentIndex(-1);
|
if (currentSelectionWasRemoved) {
|
||||||
|
setCurrentIndex(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroSelection::MacroRename(const QString &oldName, const QString &newName)
|
void MacroSelection::MacroRename(const QString &oldName, const QString &newName)
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ void GlobalMacroSettings::Save(obs_data_t *obj) const
|
|||||||
obs_data_set_bool(data, "highlightExecuted", _highlightExecuted);
|
obs_data_set_bool(data, "highlightExecuted", _highlightExecuted);
|
||||||
obs_data_set_bool(data, "highlightConditions", _highlightConditions);
|
obs_data_set_bool(data, "highlightConditions", _highlightConditions);
|
||||||
obs_data_set_bool(data, "highlightActions", _highlightActions);
|
obs_data_set_bool(data, "highlightActions", _highlightActions);
|
||||||
|
obs_data_set_bool(data, "newMacroCheckInParallel",
|
||||||
|
_newMacroCheckInParallel);
|
||||||
obs_data_set_bool(data, "newMacroRegisterHotkey",
|
obs_data_set_bool(data, "newMacroRegisterHotkey",
|
||||||
_newMacroRegisterHotkeys);
|
_newMacroRegisterHotkeys);
|
||||||
obs_data_set_bool(data, "newMacroUseShortCircuitEvaluation",
|
obs_data_set_bool(data, "newMacroUseShortCircuitEvaluation",
|
||||||
@@ -41,6 +43,8 @@ void GlobalMacroSettings::Load(obs_data_t *obj)
|
|||||||
_highlightExecuted = obs_data_get_bool(data, "highlightExecuted");
|
_highlightExecuted = obs_data_get_bool(data, "highlightExecuted");
|
||||||
_highlightConditions = obs_data_get_bool(data, "highlightConditions");
|
_highlightConditions = obs_data_get_bool(data, "highlightConditions");
|
||||||
_highlightActions = obs_data_get_bool(data, "highlightActions");
|
_highlightActions = obs_data_get_bool(data, "highlightActions");
|
||||||
|
_newMacroCheckInParallel =
|
||||||
|
obs_data_get_bool(data, "newMacroCheckInParallel");
|
||||||
_newMacroRegisterHotkeys =
|
_newMacroRegisterHotkeys =
|
||||||
obs_data_get_bool(data, "newMacroRegisterHotkey");
|
obs_data_get_bool(data, "newMacroRegisterHotkey");
|
||||||
_newMacroUseShortCircuitEvaluation =
|
_newMacroUseShortCircuitEvaluation =
|
||||||
@@ -62,12 +66,16 @@ MacroSettingsDialog::MacroSettingsDialog(QWidget *parent,
|
|||||||
"AdvSceneSwitcher.macroTab.highlightTrueConditions"))),
|
"AdvSceneSwitcher.macroTab.highlightTrueConditions"))),
|
||||||
_highlightActions(new QCheckBox(obs_module_text(
|
_highlightActions(new QCheckBox(obs_module_text(
|
||||||
"AdvSceneSwitcher.macroTab.highlightPerformedActions"))),
|
"AdvSceneSwitcher.macroTab.highlightPerformedActions"))),
|
||||||
|
_newMacroCheckInParallel(new QCheckBox(obs_module_text(
|
||||||
|
"AdvSceneSwitcher.macroTab.newMacroCheckInParallel"))),
|
||||||
_newMacroRegisterHotkeys(new QCheckBox(obs_module_text(
|
_newMacroRegisterHotkeys(new QCheckBox(obs_module_text(
|
||||||
"AdvSceneSwitcher.macroTab.newMacroRegisterHotkey"))),
|
"AdvSceneSwitcher.macroTab.newMacroRegisterHotkey"))),
|
||||||
_newMacroUseShortCircuitEvaluation(new QCheckBox(obs_module_text(
|
_newMacroUseShortCircuitEvaluation(new QCheckBox(obs_module_text(
|
||||||
"AdvSceneSwitcher.macroTab.newMacroUseShortCircuitEvaluation"))),
|
"AdvSceneSwitcher.macroTab.newMacroUseShortCircuitEvaluation"))),
|
||||||
_saveSettingsOnMacroChange(new QCheckBox(obs_module_text(
|
_saveSettingsOnMacroChange(new QCheckBox(obs_module_text(
|
||||||
"AdvSceneSwitcher.macroTab.saveSettingsOnMacroChange"))),
|
"AdvSceneSwitcher.macroTab.saveSettingsOnMacroChange"))),
|
||||||
|
_currentCheckInParallel(new QCheckBox(obs_module_text(
|
||||||
|
"AdvSceneSwitcher.macroTab.currentCheckInParallel"))),
|
||||||
_currentMacroRegisterHotkeys(new QCheckBox(obs_module_text(
|
_currentMacroRegisterHotkeys(new QCheckBox(obs_module_text(
|
||||||
"AdvSceneSwitcher.macroTab.currentRegisterHotkeys"))),
|
"AdvSceneSwitcher.macroTab.currentRegisterHotkeys"))),
|
||||||
_currentUseShortCircuitEvaluation(new QCheckBox(obs_module_text(
|
_currentUseShortCircuitEvaluation(new QCheckBox(obs_module_text(
|
||||||
@@ -107,6 +115,11 @@ MacroSettingsDialog::MacroSettingsDialog(QWidget *parent,
|
|||||||
setWindowModality(Qt::WindowModality::WindowModal);
|
setWindowModality(Qt::WindowModality::WindowModal);
|
||||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||||
|
|
||||||
|
_newMacroCheckInParallel->setToolTip(obs_module_text(
|
||||||
|
"AdvSceneSwitcher.macroTab.checkInParallel.tooltip"));
|
||||||
|
_currentCheckInParallel->setToolTip(obs_module_text(
|
||||||
|
"AdvSceneSwitcher.macroTab.checkInParallel.tooltip"));
|
||||||
|
|
||||||
_newMacroUseShortCircuitEvaluation->setToolTip(obs_module_text(
|
_newMacroUseShortCircuitEvaluation->setToolTip(obs_module_text(
|
||||||
"AdvSceneSwitcher.macroTab.shortCircuit.tooltip"));
|
"AdvSceneSwitcher.macroTab.shortCircuit.tooltip"));
|
||||||
_saveSettingsOnMacroChange->setToolTip(obs_module_text(
|
_saveSettingsOnMacroChange->setToolTip(obs_module_text(
|
||||||
@@ -146,6 +159,8 @@ MacroSettingsDialog::MacroSettingsDialog(QWidget *parent,
|
|||||||
obs_module_text("AdvSceneSwitcher.macroTab.generalSettings"));
|
obs_module_text("AdvSceneSwitcher.macroTab.generalSettings"));
|
||||||
auto generalLayout = new QVBoxLayout;
|
auto generalLayout = new QVBoxLayout;
|
||||||
generalLayout->addWidget(_saveSettingsOnMacroChange);
|
generalLayout->addWidget(_saveSettingsOnMacroChange);
|
||||||
|
generalLayout->addWidget(_currentCheckInParallel);
|
||||||
|
generalLayout->addWidget(_newMacroCheckInParallel);
|
||||||
generalLayout->addWidget(_currentSkipOnStartup);
|
generalLayout->addWidget(_currentSkipOnStartup);
|
||||||
generalLayout->addWidget(_currentStopActionsIfNotDone);
|
generalLayout->addWidget(_currentStopActionsIfNotDone);
|
||||||
generalLayout->addWidget(_currentUseShortCircuitEvaluation);
|
generalLayout->addWidget(_currentUseShortCircuitEvaluation);
|
||||||
@@ -273,6 +288,7 @@ MacroSettingsDialog::MacroSettingsDialog(QWidget *parent,
|
|||||||
_highlightExecutedMacros->setChecked(settings._highlightExecuted);
|
_highlightExecutedMacros->setChecked(settings._highlightExecuted);
|
||||||
_highlightConditions->setChecked(settings._highlightConditions);
|
_highlightConditions->setChecked(settings._highlightConditions);
|
||||||
_highlightActions->setChecked(settings._highlightActions);
|
_highlightActions->setChecked(settings._highlightActions);
|
||||||
|
_newMacroCheckInParallel->setChecked(settings._newMacroCheckInParallel);
|
||||||
_newMacroRegisterHotkeys->setChecked(settings._newMacroRegisterHotkeys);
|
_newMacroRegisterHotkeys->setChecked(settings._newMacroRegisterHotkeys);
|
||||||
_newMacroUseShortCircuitEvaluation->setChecked(
|
_newMacroUseShortCircuitEvaluation->setChecked(
|
||||||
settings._newMacroUseShortCircuitEvaluation);
|
settings._newMacroUseShortCircuitEvaluation);
|
||||||
@@ -280,20 +296,23 @@ MacroSettingsDialog::MacroSettingsDialog(QWidget *parent,
|
|||||||
settings._saveSettingsOnMacroChange);
|
settings._saveSettingsOnMacroChange);
|
||||||
|
|
||||||
if (!macro || macro->IsGroup()) {
|
if (!macro || macro->IsGroup()) {
|
||||||
hotkeyOptions->hide();
|
|
||||||
|
|
||||||
// General group
|
// General group
|
||||||
_currentSkipOnStartup->hide();
|
_currentSkipOnStartup->hide();
|
||||||
_currentStopActionsIfNotDone->hide();
|
_currentStopActionsIfNotDone->hide();
|
||||||
_currentUseShortCircuitEvaluation->hide();
|
_currentUseShortCircuitEvaluation->hide();
|
||||||
|
_currentCheckInParallel->hide();
|
||||||
SetLayoutVisible(customConditionIntervalLayout, false);
|
SetLayoutVisible(customConditionIntervalLayout, false);
|
||||||
SetLayoutVisible(pauseStateSaveBehavorLayout, false);
|
SetLayoutVisible(pauseStateSaveBehavorLayout, false);
|
||||||
|
|
||||||
|
// Hotkey group
|
||||||
|
_currentMacroRegisterHotkeys->hide();
|
||||||
|
|
||||||
inputOptions->hide();
|
inputOptions->hide();
|
||||||
_dockOptions->hide();
|
_dockOptions->hide();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_currentCheckInParallel->setChecked(macro->CheckInParallel());
|
||||||
_currentMacroRegisterHotkeys->setChecked(macro->PauseHotkeysEnabled());
|
_currentMacroRegisterHotkeys->setChecked(macro->PauseHotkeysEnabled());
|
||||||
_currentUseShortCircuitEvaluation->setChecked(
|
_currentUseShortCircuitEvaluation->setChecked(
|
||||||
macro->ShortCircuitEvaluationEnabled());
|
macro->ShortCircuitEvaluationEnabled());
|
||||||
@@ -431,6 +450,8 @@ bool MacroSettingsDialog::AskForSettings(QWidget *parent,
|
|||||||
userInput._highlightConditions =
|
userInput._highlightConditions =
|
||||||
dialog._highlightConditions->isChecked();
|
dialog._highlightConditions->isChecked();
|
||||||
userInput._highlightActions = dialog._highlightActions->isChecked();
|
userInput._highlightActions = dialog._highlightActions->isChecked();
|
||||||
|
userInput._newMacroCheckInParallel =
|
||||||
|
dialog._newMacroCheckInParallel->isChecked();
|
||||||
userInput._newMacroRegisterHotkeys =
|
userInput._newMacroRegisterHotkeys =
|
||||||
dialog._newMacroRegisterHotkeys->isChecked();
|
dialog._newMacroRegisterHotkeys->isChecked();
|
||||||
userInput._newMacroUseShortCircuitEvaluation =
|
userInput._newMacroUseShortCircuitEvaluation =
|
||||||
@@ -441,6 +462,7 @@ bool MacroSettingsDialog::AskForSettings(QWidget *parent,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
macro->SetCheckInParallel(dialog._currentCheckInParallel->isChecked());
|
||||||
macro->EnablePauseHotkeys(
|
macro->EnablePauseHotkeys(
|
||||||
dialog._currentMacroRegisterHotkeys->isChecked());
|
dialog._currentMacroRegisterHotkeys->isChecked());
|
||||||
macro->SetShortCircuitEvaluation(
|
macro->SetShortCircuitEvaluation(
|
||||||
@@ -456,7 +478,14 @@ bool MacroSettingsDialog::AskForSettings(QWidget *parent,
|
|||||||
macro->SetSkipExecOnStart(dialog._currentSkipOnStartup->isChecked());
|
macro->SetSkipExecOnStart(dialog._currentSkipOnStartup->isChecked());
|
||||||
macro->SetStopActionsIfNotDone(
|
macro->SetStopActionsIfNotDone(
|
||||||
dialog._currentStopActionsIfNotDone->isChecked());
|
dialog._currentStopActionsIfNotDone->isChecked());
|
||||||
macro->EnableDock(dialog._currentMacroRegisterDock->isChecked());
|
|
||||||
|
// Only apply "on change" to avoid recreation of the dock widget
|
||||||
|
const bool enableDock = dialog._currentMacroRegisterDock->isChecked();
|
||||||
|
if (macro->DockEnabled() != enableDock) {
|
||||||
|
macro->EnableDock(
|
||||||
|
dialog._currentMacroRegisterDock->isChecked());
|
||||||
|
}
|
||||||
|
|
||||||
macro->SetDockHasRunButton(
|
macro->SetDockHasRunButton(
|
||||||
dialog._currentMacroDockAddRunButton->isChecked());
|
dialog._currentMacroDockAddRunButton->isChecked());
|
||||||
macro->SetDockHasPauseButton(
|
macro->SetDockHasPauseButton(
|
||||||
|
|||||||
@@ -20,9 +20,10 @@ public:
|
|||||||
void Save(obs_data_t *obj) const;
|
void Save(obs_data_t *obj) const;
|
||||||
void Load(obs_data_t *obj);
|
void Load(obs_data_t *obj);
|
||||||
|
|
||||||
bool _highlightExecuted = false;
|
bool _highlightExecuted = true;
|
||||||
bool _highlightConditions = false;
|
bool _highlightConditions = true;
|
||||||
bool _highlightActions = false;
|
bool _highlightActions = true;
|
||||||
|
bool _newMacroCheckInParallel = false;
|
||||||
bool _newMacroRegisterHotkeys = true;
|
bool _newMacroRegisterHotkeys = true;
|
||||||
bool _newMacroUseShortCircuitEvaluation = false;
|
bool _newMacroUseShortCircuitEvaluation = false;
|
||||||
bool _saveSettingsOnMacroChange = true;
|
bool _saveSettingsOnMacroChange = true;
|
||||||
@@ -52,10 +53,12 @@ private:
|
|||||||
QCheckBox *_highlightExecutedMacros;
|
QCheckBox *_highlightExecutedMacros;
|
||||||
QCheckBox *_highlightConditions;
|
QCheckBox *_highlightConditions;
|
||||||
QCheckBox *_highlightActions;
|
QCheckBox *_highlightActions;
|
||||||
|
QCheckBox *_newMacroCheckInParallel;
|
||||||
QCheckBox *_newMacroRegisterHotkeys;
|
QCheckBox *_newMacroRegisterHotkeys;
|
||||||
QCheckBox *_newMacroUseShortCircuitEvaluation;
|
QCheckBox *_newMacroUseShortCircuitEvaluation;
|
||||||
QCheckBox *_saveSettingsOnMacroChange;
|
QCheckBox *_saveSettingsOnMacroChange;
|
||||||
// Current macro specific settings
|
// Current macro specific settings
|
||||||
|
QCheckBox *_currentCheckInParallel;
|
||||||
QCheckBox *_currentMacroRegisterHotkeys;
|
QCheckBox *_currentMacroRegisterHotkeys;
|
||||||
QCheckBox *_currentUseShortCircuitEvaluation;
|
QCheckBox *_currentUseShortCircuitEvaluation;
|
||||||
QCheckBox *_currentUseCustomConditionCheckInterval;
|
QCheckBox *_currentUseCustomConditionCheckInterval;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -178,6 +178,7 @@ void MacroTreeItem::Update(bool force)
|
|||||||
QSizePolicy::Maximum);
|
QSizePolicy::Maximum);
|
||||||
_expand->setMaximumSize(10, 16);
|
_expand->setMaximumSize(10, 16);
|
||||||
_expand->setMinimumSize(10, 0);
|
_expand->setMinimumSize(10, 0);
|
||||||
|
_expand->setProperty("class", "checkbox-icon indicator-expand");
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
_expand->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
_expand->setAttribute(Qt::WA_LayoutUsesWidgetRect);
|
||||||
#endif
|
#endif
|
||||||
@@ -413,6 +414,20 @@ void MacroTreeModel::Add(std::shared_ptr<Macro> item)
|
|||||||
QItemSelectionModel::Select);
|
QItemSelectionModel::Select);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroTreeModel::MoveToBeginningOfGroup(std::shared_ptr<Macro> item,
|
||||||
|
std::shared_ptr<Macro> group)
|
||||||
|
{
|
||||||
|
auto it = std::find(_macros.begin(), _macros.end(), item);
|
||||||
|
assert(it != _macros.end());
|
||||||
|
std::shared_ptr<Macro> tmp = *it;
|
||||||
|
_macros.erase(it);
|
||||||
|
it = std::find(_macros.begin(), _macros.end(), group);
|
||||||
|
assert(it != _macros.end());
|
||||||
|
_macros.insert(std::next(it), tmp);
|
||||||
|
|
||||||
|
Reset(_macros);
|
||||||
|
}
|
||||||
|
|
||||||
void MacroTreeModel::Remove(std::shared_ptr<Macro> item)
|
void MacroTreeModel::Remove(std::shared_ptr<Macro> item)
|
||||||
{
|
{
|
||||||
auto lock = LockContext();
|
auto lock = LockContext();
|
||||||
@@ -788,6 +803,13 @@ void MacroTree::Add(std::shared_ptr<Macro> item,
|
|||||||
assert(GetModel()->IsInValidState());
|
assert(GetModel()->IsInValidState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroTree::AddToGroup(std::shared_ptr<Macro> item,
|
||||||
|
std::shared_ptr<Macro> group) const
|
||||||
|
{
|
||||||
|
GetModel()->Add(item);
|
||||||
|
GetModel()->MoveToBeginningOfGroup(item, group);
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<Macro> MacroTree::GetCurrentMacro() const
|
std::shared_ptr<Macro> MacroTree::GetCurrentMacro() const
|
||||||
{
|
{
|
||||||
return GetModel()->GetCurrentMacro();
|
return GetModel()->GetCurrentMacro();
|
||||||
@@ -888,14 +910,7 @@ void MacroTree::dropEvent(QDropEvent *event)
|
|||||||
QModelIndexList indices = selectedIndexes();
|
QModelIndexList indices = selectedIndexes();
|
||||||
|
|
||||||
DropIndicatorPosition indicator = dropIndicatorPosition();
|
DropIndicatorPosition indicator = dropIndicatorPosition();
|
||||||
int row = indexAt(
|
int row = indexAt(event->position().toPoint()).row();
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
event->position().toPoint()
|
|
||||||
#else
|
|
||||||
event->pos()
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
.row();
|
|
||||||
bool emptyDrop = row == -1;
|
bool emptyDrop = row == -1;
|
||||||
|
|
||||||
if (emptyDrop) {
|
if (emptyDrop) {
|
||||||
@@ -1166,6 +1181,28 @@ bool MacroTree::SelectionEmpty() const
|
|||||||
return selectedIndexes().empty();
|
return selectedIndexes().empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MacroTree::GroupsExist() const
|
||||||
|
{
|
||||||
|
for (const auto ¯o : GetMacros()) {
|
||||||
|
if (macro->IsGroup()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroTree::ExpandGroup(std::shared_ptr<Macro> item) const
|
||||||
|
{
|
||||||
|
auto *mtm = GetModel();
|
||||||
|
mtm->ExpandGroup(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroTree::CollapseGroup(std::shared_ptr<Macro> item) const
|
||||||
|
{
|
||||||
|
auto *mtm = GetModel();
|
||||||
|
mtm->CollapseGroup(item);
|
||||||
|
}
|
||||||
|
|
||||||
void MacroTree::MoveItemBefore(const std::shared_ptr<Macro> &item,
|
void MacroTree::MoveItemBefore(const std::shared_ptr<Macro> &item,
|
||||||
const std::shared_ptr<Macro> &after) const
|
const std::shared_ptr<Macro> &after) const
|
||||||
{
|
{
|
||||||
@@ -1266,6 +1303,26 @@ void MacroTree::UngroupSelectedGroups()
|
|||||||
assert(GetModel()->IsInValidState());
|
assert(GetModel()->IsInValidState());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroTree::ExpandAll()
|
||||||
|
{
|
||||||
|
for (const auto ¯o : GetMacros()) {
|
||||||
|
if (!macro->IsGroup()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ExpandGroup(macro);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroTree::CollapseAll()
|
||||||
|
{
|
||||||
|
for (const auto ¯o : GetMacros()) {
|
||||||
|
if (!macro->IsGroup()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
CollapseGroup(macro);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MacroTree::SelectionChangedHelper(const QItemSelection &,
|
void MacroTree::SelectionChangedHelper(const QItemSelection &,
|
||||||
const QItemSelection &)
|
const QItemSelection &)
|
||||||
{
|
{
|
||||||
@@ -1307,10 +1364,10 @@ QSize MacroTreeDelegate::sizeHint(const QStyleOptionViewItem &option,
|
|||||||
QWidget *item = tree->indexWidget(index);
|
QWidget *item = tree->indexWidget(index);
|
||||||
|
|
||||||
if (!item) {
|
if (!item) {
|
||||||
return (QSize(0, 0));
|
return QStyledItemDelegate::sizeHint(option, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (QSize(option.widget->minimumWidth(), item->height()));
|
return QSize(item->sizeHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -91,6 +91,8 @@ private:
|
|||||||
void MoveItemAfter(const std::shared_ptr<Macro> &item,
|
void MoveItemAfter(const std::shared_ptr<Macro> &item,
|
||||||
const std::shared_ptr<Macro> &after);
|
const std::shared_ptr<Macro> &after);
|
||||||
void Add(std::shared_ptr<Macro> item);
|
void Add(std::shared_ptr<Macro> item);
|
||||||
|
void MoveToBeginningOfGroup(std::shared_ptr<Macro> item,
|
||||||
|
std::shared_ptr<Macro>);
|
||||||
void Remove(std::shared_ptr<Macro> item);
|
void Remove(std::shared_ptr<Macro> item);
|
||||||
std::shared_ptr<Macro> Neighbor(const std::shared_ptr<Macro> &m,
|
std::shared_ptr<Macro> Neighbor(const std::shared_ptr<Macro> &m,
|
||||||
bool above) const;
|
bool above) const;
|
||||||
@@ -126,6 +128,8 @@ public:
|
|||||||
void Reset(std::deque<std::shared_ptr<Macro>> &, bool highlight);
|
void Reset(std::deque<std::shared_ptr<Macro>> &, bool highlight);
|
||||||
void Add(std::shared_ptr<Macro> item,
|
void Add(std::shared_ptr<Macro> item,
|
||||||
std::shared_ptr<Macro> after = {}) const;
|
std::shared_ptr<Macro> after = {}) const;
|
||||||
|
void AddToGroup(std::shared_ptr<Macro> item,
|
||||||
|
std::shared_ptr<Macro> group) const;
|
||||||
void Remove(std::shared_ptr<Macro> item) const;
|
void Remove(std::shared_ptr<Macro> item) const;
|
||||||
void Up(std::shared_ptr<Macro> item) const;
|
void Up(std::shared_ptr<Macro> item) const;
|
||||||
void Down(std::shared_ptr<Macro> item) const;
|
void Down(std::shared_ptr<Macro> item) const;
|
||||||
@@ -135,10 +139,15 @@ public:
|
|||||||
bool GroupedItemsSelected() const;
|
bool GroupedItemsSelected() const;
|
||||||
bool SingleItemSelected() const;
|
bool SingleItemSelected() const;
|
||||||
bool SelectionEmpty() const;
|
bool SelectionEmpty() const;
|
||||||
|
bool GroupsExist() const;
|
||||||
|
void ExpandGroup(std::shared_ptr<Macro> item) const;
|
||||||
|
void CollapseGroup(std::shared_ptr<Macro> item) const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void GroupSelectedItems();
|
void GroupSelectedItems();
|
||||||
void UngroupSelectedGroups();
|
void UngroupSelectedGroups();
|
||||||
|
void ExpandAll();
|
||||||
|
void CollapseAll();
|
||||||
void SelectionChangedHelper(const QItemSelection &,
|
void SelectionChangedHelper(const QItemSelection &,
|
||||||
const QItemSelection &);
|
const QItemSelection &);
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include "macro-condition-factory.hpp"
|
#include "macro-condition-factory.hpp"
|
||||||
#include "macro-dock.hpp"
|
#include "macro-dock.hpp"
|
||||||
#include "macro-helpers.hpp"
|
#include "macro-helpers.hpp"
|
||||||
|
#include "macro-settings.hpp"
|
||||||
#include "plugin-state-helpers.hpp"
|
#include "plugin-state-helpers.hpp"
|
||||||
#include "splitter-helpers.hpp"
|
#include "splitter-helpers.hpp"
|
||||||
#include "sync-helpers.hpp"
|
#include "sync-helpers.hpp"
|
||||||
@@ -76,15 +77,21 @@ namespace advss {
|
|||||||
|
|
||||||
static std::deque<std::shared_ptr<Macro>> macros;
|
static std::deque<std::shared_ptr<Macro>> macros;
|
||||||
|
|
||||||
Macro::Macro(const std::string &name, const bool addHotkey,
|
Macro::Macro(const std::string &name)
|
||||||
const bool shortCircuitEvaluation)
|
|
||||||
{
|
{
|
||||||
SetName(name);
|
SetName(name);
|
||||||
if (addHotkey) {
|
}
|
||||||
|
|
||||||
|
Macro::Macro(const std::string &name, const GlobalMacroSettings &settings)
|
||||||
|
: Macro(name)
|
||||||
|
{
|
||||||
|
if (settings._newMacroRegisterHotkeys) {
|
||||||
SetupHotkeys();
|
SetupHotkeys();
|
||||||
}
|
}
|
||||||
_registerHotkeys = addHotkey;
|
_registerHotkeys = settings._newMacroRegisterHotkeys;
|
||||||
_useShortCircuitEvaluation = shortCircuitEvaluation;
|
_checkInParallel = settings._newMacroCheckInParallel;
|
||||||
|
_useShortCircuitEvaluation =
|
||||||
|
settings._newMacroUseShortCircuitEvaluation;
|
||||||
}
|
}
|
||||||
|
|
||||||
Macro::~Macro()
|
Macro::~Macro()
|
||||||
@@ -104,7 +111,8 @@ std::shared_ptr<Macro>
|
|||||||
Macro::CreateGroup(const std::string &name,
|
Macro::CreateGroup(const std::string &name,
|
||||||
std::vector<std::shared_ptr<Macro>> &children)
|
std::vector<std::shared_ptr<Macro>> &children)
|
||||||
{
|
{
|
||||||
auto group = std::make_shared<Macro>(name, false);
|
auto group = std::make_shared<Macro>(name);
|
||||||
|
group->_registerHotkeys = false;
|
||||||
for (auto &c : children) {
|
for (auto &c : children) {
|
||||||
c->SetParent(group);
|
c->SetParent(group);
|
||||||
}
|
}
|
||||||
@@ -165,7 +173,10 @@ static bool checkCondition(const std::shared_ptr<MacroCondition> &condition)
|
|||||||
static constexpr auto perfLogThreshold = 300ms;
|
static constexpr auto perfLogThreshold = 300ms;
|
||||||
|
|
||||||
const auto startTime = std::chrono::high_resolution_clock::now();
|
const auto startTime = std::chrono::high_resolution_clock::now();
|
||||||
const bool conditionMatched = condition->CheckCondition();
|
bool conditionMatched = false;
|
||||||
|
condition->WithLock([&condition, &conditionMatched]() {
|
||||||
|
conditionMatched = condition->CheckCondition();
|
||||||
|
});
|
||||||
const auto endTime = std::chrono::high_resolution_clock::now();
|
const auto endTime = std::chrono::high_resolution_clock::now();
|
||||||
const auto timeSpent = endTime - startTime;
|
const auto timeSpent = endTime - startTime;
|
||||||
|
|
||||||
@@ -244,14 +255,52 @@ bool Macro::CheckConditions(bool ignorePause)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_matched = false;
|
const auto checkConditionsTask =
|
||||||
for (auto &condition : _conditions) {
|
[this,
|
||||||
if (_paused && !ignorePause) {
|
ignorePause](const std::deque<std::shared_ptr<MacroCondition>>
|
||||||
vblog(LOG_INFO, "Macro %s is paused", _name.c_str());
|
&conditions) {
|
||||||
|
for (auto &condition : conditions) {
|
||||||
|
if (!condition) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_paused && !ignorePause) {
|
||||||
|
vblog(LOG_INFO, "Macro %s is paused",
|
||||||
|
_name.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
_matched = CheckConditionHelper(condition);
|
||||||
|
}
|
||||||
|
return _matched;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (CheckInParallel()) {
|
||||||
|
if (!_conditionCheckFuture.valid()) {
|
||||||
|
_stop = false;
|
||||||
|
_matched = false;
|
||||||
|
_conditionCheckFuture = std::async(
|
||||||
|
std::launch::async,
|
||||||
|
[this, checkConditionsTask]() {
|
||||||
|
// Copy to avoid settings modifications
|
||||||
|
// causing issues
|
||||||
|
const auto conditionsCopy = _conditions;
|
||||||
|
checkConditionsTask(conditionsCopy);
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (_conditionCheckFuture.wait_for(std::chrono::seconds(0)) !=
|
||||||
_matched = CheckConditionHelper(condition);
|
std::future_status::ready) {
|
||||||
|
vblog(LOG_INFO,
|
||||||
|
"Macro %s still waiting for condition check result",
|
||||||
|
_name.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
_conditionCheckFuture.get();
|
||||||
|
} else {
|
||||||
|
_stop = false;
|
||||||
|
_matched = false;
|
||||||
|
_matched = checkConditionsTask(_conditions);
|
||||||
}
|
}
|
||||||
|
|
||||||
vblog(LOG_INFO, "Macro %s returned %d", _name.c_str(), _matched);
|
vblog(LOG_INFO, "Macro %s returned %d", _name.c_str(), _matched);
|
||||||
@@ -268,7 +317,9 @@ bool Macro::CheckConditions(bool ignorePause)
|
|||||||
|
|
||||||
bool Macro::PerformActions(bool match, bool forceParallel, bool ignorePause)
|
bool Macro::PerformActions(bool match, bool forceParallel, bool ignorePause)
|
||||||
{
|
{
|
||||||
if (!_done) {
|
if (_actionRunFuture.valid() &&
|
||||||
|
_actionRunFuture.wait_for(std::chrono::seconds(0)) !=
|
||||||
|
std::future_status::ready) {
|
||||||
vblog(LOG_INFO, "Macro %s already running", _name.c_str());
|
vblog(LOG_INFO, "Macro %s already running", _name.c_str());
|
||||||
|
|
||||||
if (!_stopActionsIfNotDone) {
|
if (!_stopActionsIfNotDone) {
|
||||||
@@ -286,14 +337,15 @@ bool Macro::PerformActions(bool match, bool forceParallel, bool ignorePause)
|
|||||||
: std::bind(&Macro::RunElseActions, this,
|
: std::bind(&Macro::RunElseActions, this,
|
||||||
std::placeholders::_1);
|
std::placeholders::_1);
|
||||||
_stop = false;
|
_stop = false;
|
||||||
_done = false;
|
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
if (_runInParallel || forceParallel) {
|
if (_runInParallel || forceParallel) {
|
||||||
if (_backgroundThread.joinable()) {
|
if (_actionRunFuture.valid()) {
|
||||||
_backgroundThread.join();
|
_actionRunFuture.get();
|
||||||
}
|
}
|
||||||
_backgroundThread = std::thread(
|
_actionRunFuture = std::async(std::launch::async,
|
||||||
[this, runFunc, ignorePause] { runFunc(ignorePause); });
|
[this, runFunc, ignorePause] {
|
||||||
|
runFunc(ignorePause);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
ret = runFunc(ignorePause);
|
ret = runFunc(ignorePause);
|
||||||
}
|
}
|
||||||
@@ -331,6 +383,13 @@ bool Macro::ConditionsShouldBeChecked() const
|
|||||||
|
|
||||||
bool Macro::ShouldRunActions() const
|
bool Macro::ShouldRunActions() const
|
||||||
{
|
{
|
||||||
|
if (CheckInParallel() && _conditionCheckFuture.valid()) {
|
||||||
|
vblog(LOG_INFO,
|
||||||
|
"%s not ready to perform actions as condition check is still running",
|
||||||
|
_name.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const bool hasActionsToExecute =
|
const bool hasActionsToExecute =
|
||||||
!_paused && (_matched || _elseActions.size() > 0) &&
|
!_paused && (_matched || _elseActions.size() > 0) &&
|
||||||
(!_performActionsOnChange || _conditionSateChanged);
|
(!_performActionsOnChange || _conditionSateChanged);
|
||||||
@@ -383,11 +442,17 @@ bool Macro::RunActionsHelper(
|
|||||||
|
|
||||||
bool actionsExecutedSuccessfully = true;
|
bool actionsExecutedSuccessfully = true;
|
||||||
for (auto &action : actions) {
|
for (auto &action : actions) {
|
||||||
|
if (!action) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (action->Enabled()) {
|
if (action->Enabled()) {
|
||||||
action->LogAction();
|
action->LogAction();
|
||||||
|
bool actionResult = false;
|
||||||
|
action->WithLock([&action, &actionResult]() {
|
||||||
|
actionResult = action->PerformAction();
|
||||||
|
});
|
||||||
actionsExecutedSuccessfully =
|
actionsExecutedSuccessfully =
|
||||||
actionsExecutedSuccessfully &&
|
actionsExecutedSuccessfully && actionResult;
|
||||||
action->PerformAction();
|
|
||||||
} else {
|
} else {
|
||||||
vblog(LOG_INFO, "skipping disabled action %s",
|
vblog(LOG_INFO, "skipping disabled action %s",
|
||||||
action->GetId().c_str());
|
action->GetId().c_str());
|
||||||
@@ -400,7 +465,6 @@ bool Macro::RunActionsHelper(
|
|||||||
action->EnableHighlight();
|
action->EnableHighlight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_done = true;
|
|
||||||
return actionsExecutedSuccessfully;
|
return actionsExecutedSuccessfully;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,9 +564,35 @@ void Macro::Stop()
|
|||||||
t.join();
|
t.join();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_backgroundThread.joinable()) {
|
if (_actionRunFuture.valid()) {
|
||||||
_backgroundThread.join();
|
_actionRunFuture.get();
|
||||||
}
|
}
|
||||||
|
if (_conditionCheckFuture.valid()) {
|
||||||
|
_conditionCheckFuture.get();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Macro::SetCheckInParallel(bool parallel)
|
||||||
|
{
|
||||||
|
_checkInParallel = parallel;
|
||||||
|
_conditionCheckFuture = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Macro::ParallelTasksCompleted() const
|
||||||
|
{
|
||||||
|
// A parallel action run might be triggered by RunInParallel() or the
|
||||||
|
// "Run Macro" button, so checking just for RunInParallel() will not
|
||||||
|
// suffice
|
||||||
|
if (!CheckInParallel() && !_actionRunFuture.valid()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (_actionRunFuture.valid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (CheckInParallel() && _conditionCheckFuture.valid()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
MacroInputVariables Macro::GetInputVariables() const
|
MacroInputVariables Macro::GetInputVariables() const
|
||||||
@@ -640,16 +730,31 @@ std::deque<std::shared_ptr<MacroCondition>> &Macro::Conditions()
|
|||||||
return _conditions;
|
return _conditions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::deque<std::shared_ptr<MacroCondition>> &Macro::Conditions() const
|
||||||
|
{
|
||||||
|
return _conditions;
|
||||||
|
}
|
||||||
|
|
||||||
std::deque<std::shared_ptr<MacroAction>> &Macro::Actions()
|
std::deque<std::shared_ptr<MacroAction>> &Macro::Actions()
|
||||||
{
|
{
|
||||||
return _actions;
|
return _actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::deque<std::shared_ptr<MacroAction>> &Macro::Actions() const
|
||||||
|
{
|
||||||
|
return _actions;
|
||||||
|
}
|
||||||
|
|
||||||
std::deque<std::shared_ptr<MacroAction>> &Macro::ElseActions()
|
std::deque<std::shared_ptr<MacroAction>> &Macro::ElseActions()
|
||||||
{
|
{
|
||||||
return _elseActions;
|
return _elseActions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::deque<std::shared_ptr<MacroAction>> &Macro::ElseActions() const
|
||||||
|
{
|
||||||
|
return _elseActions;
|
||||||
|
}
|
||||||
|
|
||||||
static void updateIndicesHelper(std::deque<std::shared_ptr<MacroSegment>> &list)
|
static void updateIndicesHelper(std::deque<std::shared_ptr<MacroSegment>> &list)
|
||||||
{
|
{
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
@@ -704,6 +809,7 @@ bool Macro::Save(obs_data_t *obj, bool saveForCopy) const
|
|||||||
static_cast<int>(_pauseSaveBehavior));
|
static_cast<int>(_pauseSaveBehavior));
|
||||||
obs_data_set_bool(obj, "pause", _paused);
|
obs_data_set_bool(obj, "pause", _paused);
|
||||||
obs_data_set_bool(obj, "parallel", _runInParallel);
|
obs_data_set_bool(obj, "parallel", _runInParallel);
|
||||||
|
obs_data_set_bool(obj, "checkConditionsInParallel", _checkInParallel);
|
||||||
obs_data_set_bool(obj, "onChange", _performActionsOnChange);
|
obs_data_set_bool(obj, "onChange", _performActionsOnChange);
|
||||||
obs_data_set_bool(obj, "skipExecOnStart", _skipExecOnStart);
|
obs_data_set_bool(obj, "skipExecOnStart", _skipExecOnStart);
|
||||||
obs_data_set_bool(obj, "stopActionsIfNotDone", _stopActionsIfNotDone);
|
obs_data_set_bool(obj, "stopActionsIfNotDone", _stopActionsIfNotDone);
|
||||||
@@ -789,6 +895,7 @@ bool Macro::Load(obs_data_t *obj)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_runInParallel = obs_data_get_bool(obj, "parallel");
|
_runInParallel = obs_data_get_bool(obj, "parallel");
|
||||||
|
_checkInParallel = obs_data_get_bool(obj, "checkConditionsInParallel");
|
||||||
_performActionsOnChange = obs_data_get_bool(obj, "onChange");
|
_performActionsOnChange = obs_data_get_bool(obj, "onChange");
|
||||||
_skipExecOnStart = obs_data_get_bool(obj, "skipExecOnStart");
|
_skipExecOnStart = obs_data_get_bool(obj, "skipExecOnStart");
|
||||||
_stopActionsIfNotDone = obs_data_get_bool(obj, "stopActionsIfNotDone");
|
_stopActionsIfNotDone = obs_data_get_bool(obj, "stopActionsIfNotDone");
|
||||||
@@ -832,9 +939,12 @@ bool Macro::Load(obs_data_t *obj)
|
|||||||
auto newEntry = MacroConditionFactory::Create(id, this);
|
auto newEntry = MacroConditionFactory::Create(id, this);
|
||||||
if (newEntry) {
|
if (newEntry) {
|
||||||
_conditions.emplace_back(newEntry);
|
_conditions.emplace_back(newEntry);
|
||||||
auto c = _conditions.back().get();
|
auto condition = _conditions.back().get();
|
||||||
c->Load(arrayObj);
|
condition->WithLock([&]() {
|
||||||
c->ValidateLogicSelection(root, Name().c_str());
|
condition->Load(arrayObj);
|
||||||
|
condition->ValidateLogicSelection(
|
||||||
|
root, Name().c_str());
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
blog(LOG_WARNING,
|
blog(LOG_WARNING,
|
||||||
"discarding condition entry with unknown id (%s) for macro %s",
|
"discarding condition entry with unknown id (%s) for macro %s",
|
||||||
@@ -847,12 +957,15 @@ bool Macro::Load(obs_data_t *obj)
|
|||||||
OBSDataArrayAutoRelease actions = obs_data_get_array(obj, "actions");
|
OBSDataArrayAutoRelease actions = obs_data_get_array(obj, "actions");
|
||||||
count = obs_data_array_count(actions);
|
count = obs_data_array_count(actions);
|
||||||
for (size_t i = 0; i < count; i++) {
|
for (size_t i = 0; i < count; i++) {
|
||||||
OBSDataAutoRelease array_obj = obs_data_array_item(actions, i);
|
OBSDataAutoRelease arrayObj = obs_data_array_item(actions, i);
|
||||||
std::string id = obs_data_get_string(array_obj, "id");
|
std::string id = obs_data_get_string(arrayObj, "id");
|
||||||
auto newEntry = MacroActionFactory::Create(id, this);
|
auto newEntry = MacroActionFactory::Create(id, this);
|
||||||
if (newEntry) {
|
if (newEntry) {
|
||||||
_actions.emplace_back(newEntry);
|
_actions.emplace_back(newEntry);
|
||||||
_actions.back()->Load(array_obj);
|
auto action = _actions.back().get();
|
||||||
|
action->WithLock([action, &arrayObj]() {
|
||||||
|
action->Load(arrayObj);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
blog(LOG_WARNING,
|
blog(LOG_WARNING,
|
||||||
"discarding action entry with unknown id (%s) for macro %s",
|
"discarding action entry with unknown id (%s) for macro %s",
|
||||||
@@ -865,13 +978,16 @@ bool Macro::Load(obs_data_t *obj)
|
|||||||
obs_data_get_array(obj, "elseActions");
|
obs_data_get_array(obj, "elseActions");
|
||||||
count = obs_data_array_count(elseActions);
|
count = obs_data_array_count(elseActions);
|
||||||
for (size_t i = 0; i < count; i++) {
|
for (size_t i = 0; i < count; i++) {
|
||||||
OBSDataAutoRelease array_obj =
|
OBSDataAutoRelease arrayObj =
|
||||||
obs_data_array_item(elseActions, i);
|
obs_data_array_item(elseActions, i);
|
||||||
std::string id = obs_data_get_string(array_obj, "id");
|
std::string id = obs_data_get_string(arrayObj, "id");
|
||||||
auto newEntry = MacroActionFactory::Create(id, this);
|
auto newEntry = MacroActionFactory::Create(id, this);
|
||||||
if (newEntry) {
|
if (newEntry) {
|
||||||
_elseActions.emplace_back(newEntry);
|
_elseActions.emplace_back(newEntry);
|
||||||
_elseActions.back()->Load(array_obj);
|
auto action = _elseActions.back().get();
|
||||||
|
action->WithLock([action, &arrayObj]() {
|
||||||
|
action->Load(arrayObj);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
blog(LOG_WARNING,
|
blog(LOG_WARNING,
|
||||||
"discarding elseAction entry with unknown id (%s) for macro %s",
|
"discarding elseAction entry with unknown id (%s) for macro %s",
|
||||||
@@ -888,13 +1004,13 @@ bool Macro::Load(obs_data_t *obj)
|
|||||||
bool Macro::PostLoad()
|
bool Macro::PostLoad()
|
||||||
{
|
{
|
||||||
for (auto &c : _conditions) {
|
for (auto &c : _conditions) {
|
||||||
c->PostLoad();
|
c->WithLock([c]() { c->PostLoad(); });
|
||||||
}
|
}
|
||||||
for (auto &a : _actions) {
|
for (auto &a : _actions) {
|
||||||
a->PostLoad();
|
a->WithLock([a]() { a->PostLoad(); });
|
||||||
}
|
}
|
||||||
for (auto &a : _elseActions) {
|
for (auto &a : _elseActions) {
|
||||||
a->PostLoad();
|
a->WithLock([a]() { a->PostLoad(); });
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1460,6 +1576,14 @@ std::weak_ptr<Macro> GetWeakMacroByName(const char *name)
|
|||||||
void InvalidateMacroTempVarValues()
|
void InvalidateMacroTempVarValues()
|
||||||
{
|
{
|
||||||
for (const auto &m : macros) {
|
for (const auto &m : macros) {
|
||||||
|
// Do not invalidate the temp vars set during condition checks
|
||||||
|
// or action executions running in parallel to the "main" macro
|
||||||
|
// loop, as otherwise access to the information stored in those
|
||||||
|
// variables might get lost while those checks or actions are
|
||||||
|
// still ongoing.
|
||||||
|
if (!m->ParallelTasksCompleted()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
m->InvalidateTempVarValues();
|
m->InvalidateTempVarValues();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "variable-string.hpp"
|
#include "variable-string.hpp"
|
||||||
#include "temp-variable.hpp"
|
#include "temp-variable.hpp"
|
||||||
|
|
||||||
|
#include <future>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
class MacroDock;
|
class MacroDock;
|
||||||
|
class GlobalMacroSettings;
|
||||||
|
|
||||||
class Macro {
|
class Macro {
|
||||||
using TimePoint = std::chrono::high_resolution_clock::time_point;
|
using TimePoint = std::chrono::high_resolution_clock::time_point;
|
||||||
@@ -27,8 +29,8 @@ class Macro {
|
|||||||
public:
|
public:
|
||||||
enum class PauseStateSaveBehavior { PERSIST, PAUSE, UNPAUSE };
|
enum class PauseStateSaveBehavior { PERSIST, PAUSE, UNPAUSE };
|
||||||
|
|
||||||
Macro(const std::string &name = "", const bool addHotkey = false,
|
Macro(const std::string &name = "");
|
||||||
const bool shortCircuitEvaluation = false);
|
Macro(const std::string &name, const GlobalMacroSettings &settings);
|
||||||
~Macro();
|
~Macro();
|
||||||
|
|
||||||
std::string Name() const { return _name; }
|
std::string Name() const { return _name; }
|
||||||
@@ -77,6 +79,9 @@ public:
|
|||||||
void AddHelperThread(std::thread &&);
|
void AddHelperThread(std::thread &&);
|
||||||
void SetRunInParallel(bool parallel) { _runInParallel = parallel; }
|
void SetRunInParallel(bool parallel) { _runInParallel = parallel; }
|
||||||
bool RunInParallel() const { return _runInParallel; }
|
bool RunInParallel() const { return _runInParallel; }
|
||||||
|
bool CheckInParallel() const { return _checkInParallel; }
|
||||||
|
void SetCheckInParallel(bool parallel);
|
||||||
|
bool ParallelTasksCompleted() const;
|
||||||
|
|
||||||
// Input variables
|
// Input variables
|
||||||
MacroInputVariables GetInputVariables() const;
|
MacroInputVariables GetInputVariables() const;
|
||||||
@@ -90,8 +95,11 @@ public:
|
|||||||
|
|
||||||
// Macro segments
|
// Macro segments
|
||||||
std::deque<std::shared_ptr<MacroCondition>> &Conditions();
|
std::deque<std::shared_ptr<MacroCondition>> &Conditions();
|
||||||
|
const std::deque<std::shared_ptr<MacroCondition>> &Conditions() const;
|
||||||
std::deque<std::shared_ptr<MacroAction>> &Actions();
|
std::deque<std::shared_ptr<MacroAction>> &Actions();
|
||||||
|
const std::deque<std::shared_ptr<MacroAction>> &Actions() const;
|
||||||
std::deque<std::shared_ptr<MacroAction>> &ElseActions();
|
std::deque<std::shared_ptr<MacroAction>> &ElseActions();
|
||||||
|
const std::deque<std::shared_ptr<MacroAction>> &ElseActions() const;
|
||||||
void UpdateActionIndices();
|
void UpdateActionIndices();
|
||||||
void UpdateElseActionIndices();
|
void UpdateElseActionIndices();
|
||||||
void UpdateConditionIndices();
|
void UpdateConditionIndices();
|
||||||
@@ -182,11 +190,10 @@ private:
|
|||||||
std::string _name = "";
|
std::string _name = "";
|
||||||
bool _die = false;
|
bool _die = false;
|
||||||
bool _stop = false;
|
bool _stop = false;
|
||||||
bool _done = true;
|
std::future<void> _actionRunFuture;
|
||||||
TimePoint _lastCheckTime{};
|
TimePoint _lastCheckTime{};
|
||||||
TimePoint _lastUnpauseTime{};
|
TimePoint _lastUnpauseTime{};
|
||||||
TimePoint _lastExecutionTime{};
|
TimePoint _lastExecutionTime{};
|
||||||
std::thread _backgroundThread;
|
|
||||||
std::vector<std::thread> _helperThreads;
|
std::vector<std::thread> _helperThreads;
|
||||||
|
|
||||||
std::deque<std::shared_ptr<MacroCondition>> _conditions;
|
std::deque<std::shared_ptr<MacroCondition>> _conditions;
|
||||||
@@ -204,7 +211,9 @@ private:
|
|||||||
bool _conditionSateChanged = false;
|
bool _conditionSateChanged = false;
|
||||||
|
|
||||||
bool _runInParallel = false;
|
bool _runInParallel = false;
|
||||||
|
bool _checkInParallel = false;
|
||||||
bool _matched = false;
|
bool _matched = false;
|
||||||
|
std::future<void> _conditionCheckFuture;
|
||||||
bool _lastMatched = false;
|
bool _lastMatched = false;
|
||||||
bool _performActionsOnChange = true;
|
bool _performActionsOnChange = true;
|
||||||
bool _skipExecOnStart = false;
|
bool _skipExecOnStart = false;
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ ActionQueueTable *ActionQueueTable::Create()
|
|||||||
void ActionQueueTable::Add()
|
void ActionQueueTable::Add()
|
||||||
{
|
{
|
||||||
auto newQueue = std::make_shared<ActionQueue>();
|
auto newQueue = std::make_shared<ActionQueue>();
|
||||||
auto accepted =
|
auto accepted = ActionQueueSettingsDialog::AskForSettings(
|
||||||
ActionQueueSettingsDialog::AskForSettings(this, *newQueue);
|
GetSettingsWindow(), *newQueue);
|
||||||
if (!accepted) {
|
if (!accepted) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,7 @@ static void openSettingsDialog()
|
|||||||
|
|
||||||
auto oldName = queue->Name();
|
auto oldName = queue->Name();
|
||||||
bool accepted = ActionQueueSettingsDialog::AskForSettings(
|
bool accepted = ActionQueueSettingsDialog::AskForSettings(
|
||||||
tabWidget->Table(), *queue.get());
|
GetSettingsWindow(), *queue.get());
|
||||||
if (accepted && oldName != queue->Name()) {
|
if (accepted && oldName != queue->Name()) {
|
||||||
ActionQueueSignalManager::Instance()->Rename(
|
ActionQueueSignalManager::Instance()->Rename(
|
||||||
QString::fromStdString(oldName),
|
QString::fromStdString(oldName),
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ void ActionQueue::Add(const std::shared_ptr<MacroAction> &action)
|
|||||||
action->Save(data);
|
action->Save(data);
|
||||||
copy->Load(data);
|
copy->Load(data);
|
||||||
copy->PostLoad();
|
copy->PostLoad();
|
||||||
|
RunPostLoadSteps();
|
||||||
copy->ResolveVariablesToFixedValues();
|
copy->ResolveVariablesToFixedValues();
|
||||||
_actions.emplace_back(copy);
|
_actions.emplace_back(copy);
|
||||||
} else {
|
} else {
|
||||||
@@ -179,7 +180,7 @@ ActionQueueSettingsDialog::ActionQueueSettingsDialog(QWidget *parent,
|
|||||||
"AdvSceneSwitcher.actionQueues.select",
|
"AdvSceneSwitcher.actionQueues.select",
|
||||||
"AdvSceneSwitcher.actionQueues.add",
|
"AdvSceneSwitcher.actionQueues.add",
|
||||||
"AdvSceneSwitcher.actionQueues.nameNotAvailable",
|
"AdvSceneSwitcher.actionQueues.nameNotAvailable",
|
||||||
parent),
|
true, parent),
|
||||||
_queueRunStatus(new QLabel()),
|
_queueRunStatus(new QLabel()),
|
||||||
_startStopToggle(new QPushButton()),
|
_startStopToggle(new QPushButton()),
|
||||||
_queueSize(new QLabel()),
|
_queueSize(new QLabel()),
|
||||||
|
|||||||
@@ -168,17 +168,6 @@ void SwitcherData::SaveVersion(obs_data_t *obj,
|
|||||||
obs_data_set_string(obj, "version", currentVersion.c_str());
|
obs_data_set_string(obj, "version", currentVersion.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitcherData::AddIntervalResetStep(std::function<void()> function,
|
|
||||||
bool tryLock)
|
|
||||||
{
|
|
||||||
if (!tryLock) {
|
|
||||||
resetIntervalSteps.emplace_back(function);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
std::lock_guard<std::mutex> lock(switcher->m);
|
|
||||||
resetIntervalSteps.emplace_back(function);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SwitcherData::RunPostLoadSteps()
|
void SwitcherData::RunPostLoadSteps()
|
||||||
{
|
{
|
||||||
for (const auto &func : postLoadSteps) {
|
for (const auto &func : postLoadSteps) {
|
||||||
@@ -266,6 +255,16 @@ static void removeMacroSegmentHotkeyFunc(void *, obs_hotkey_id, obs_hotkey_t *,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void addNewMacroHotkeyFunc(void *, obs_hotkey_id, obs_hotkey_t *,
|
||||||
|
bool pressed)
|
||||||
|
{
|
||||||
|
if (pressed && SettingsWindowIsOpened()) {
|
||||||
|
QMetaObject::invokeMethod(GetSettingsWindow(),
|
||||||
|
"on_macroAdd_clicked",
|
||||||
|
Qt::QueuedConnection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void registerHotkeys()
|
static void registerHotkeys()
|
||||||
{
|
{
|
||||||
switcher->startHotkey = obs_hotkey_register_frontend(
|
switcher->startHotkey = obs_hotkey_register_frontend(
|
||||||
@@ -281,19 +280,21 @@ static void registerHotkeys()
|
|||||||
obs_module_text(
|
obs_module_text(
|
||||||
"AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey"),
|
"AdvSceneSwitcher.hotkey.startStopToggleSwitcherHotkey"),
|
||||||
startStopToggleHotkeyFunc, NULL);
|
startStopToggleHotkeyFunc, NULL);
|
||||||
|
switcher->newMacroHotkey = obs_hotkey_register_frontend(
|
||||||
|
"newMacroSwitcherHotkey",
|
||||||
|
obs_module_text("AdvSceneSwitcher.hotkey.macro.new"),
|
||||||
|
addNewMacroHotkeyFunc, NULL);
|
||||||
switcher->upMacroSegment = obs_hotkey_register_frontend(
|
switcher->upMacroSegment = obs_hotkey_register_frontend(
|
||||||
"upMacroSegmentSwitcherHotkey",
|
"upMacroSegmentSwitcherHotkey",
|
||||||
obs_module_text("AdvSceneSwitcher.hotkey.upMacroSegmentHotkey"),
|
obs_module_text("AdvSceneSwitcher.hotkey.macro.segment.up"),
|
||||||
upMacroSegmentHotkeyFunc, NULL);
|
upMacroSegmentHotkeyFunc, NULL);
|
||||||
switcher->downMacroSegment = obs_hotkey_register_frontend(
|
switcher->downMacroSegment = obs_hotkey_register_frontend(
|
||||||
"downMacroSegmentSwitcherHotkey",
|
"downMacroSegmentSwitcherHotkey",
|
||||||
obs_module_text(
|
obs_module_text("AdvSceneSwitcher.hotkey.macro.segment.down"),
|
||||||
"AdvSceneSwitcher.hotkey.downMacroSegmentHotkey"),
|
|
||||||
downMacroSegmentHotkeyFunc, NULL);
|
downMacroSegmentHotkeyFunc, NULL);
|
||||||
switcher->removeMacroSegment = obs_hotkey_register_frontend(
|
switcher->removeMacroSegment = obs_hotkey_register_frontend(
|
||||||
"removeMacroSegmentSwitcherHotkey",
|
"removeMacroSegmentSwitcherHotkey",
|
||||||
obs_module_text(
|
obs_module_text("AdvSceneSwitcher.hotkey.macro.segment.remove"),
|
||||||
"AdvSceneSwitcher.hotkey.removeMacroSegmentHotkey"),
|
|
||||||
removeMacroSegmentHotkeyFunc, NULL);
|
removeMacroSegmentHotkeyFunc, NULL);
|
||||||
|
|
||||||
switcher->hotkeysRegistered = true;
|
switcher->hotkeysRegistered = true;
|
||||||
@@ -311,6 +312,7 @@ void SwitcherData::SaveHotkeys(obs_data_t *obj)
|
|||||||
saveHotkey(obj, startHotkey, "startHotkey");
|
saveHotkey(obj, startHotkey, "startHotkey");
|
||||||
saveHotkey(obj, stopHotkey, "stopHotkey");
|
saveHotkey(obj, stopHotkey, "stopHotkey");
|
||||||
saveHotkey(obj, toggleHotkey, "toggleHotkey");
|
saveHotkey(obj, toggleHotkey, "toggleHotkey");
|
||||||
|
saveHotkey(obj, newMacroHotkey, "newMacroHotkey");
|
||||||
saveHotkey(obj, upMacroSegment, "upMacroSegmentHotkey");
|
saveHotkey(obj, upMacroSegment, "upMacroSegmentHotkey");
|
||||||
saveHotkey(obj, downMacroSegment, "downMacroSegmentHotkey");
|
saveHotkey(obj, downMacroSegment, "downMacroSegmentHotkey");
|
||||||
saveHotkey(obj, removeMacroSegment, "removeMacroSegmentHotkey");
|
saveHotkey(obj, removeMacroSegment, "removeMacroSegmentHotkey");
|
||||||
@@ -323,14 +325,31 @@ static void loadHotkey(obs_data_t *obj, obs_hotkey_id id, const char *name)
|
|||||||
obs_data_array_release(a);
|
obs_data_array_release(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void setDefaultHotkeyBinding(obs_data_t *data, const char *name,
|
||||||
|
const char *value)
|
||||||
|
{
|
||||||
|
OBSDataAutoRelease hotkeyData = obs_data_create_from_json(value);
|
||||||
|
OBSDataArrayAutoRelease hotkeyArray = obs_data_array_create();
|
||||||
|
obs_data_array_push_back(hotkeyArray, hotkeyData);
|
||||||
|
obs_data_set_default_array(data, name, hotkeyArray);
|
||||||
|
}
|
||||||
|
|
||||||
void SwitcherData::LoadHotkeys(obs_data_t *obj)
|
void SwitcherData::LoadHotkeys(obs_data_t *obj)
|
||||||
{
|
{
|
||||||
if (!hotkeysRegistered) {
|
if (!hotkeysRegistered) {
|
||||||
registerHotkeys();
|
registerHotkeys();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setDefaultHotkeyBinding(obj, "newMacroHotkey",
|
||||||
|
"{"
|
||||||
|
"\"control\": true,"
|
||||||
|
"\"key\": \"OBS_KEY_N\""
|
||||||
|
"}");
|
||||||
|
|
||||||
loadHotkey(obj, startHotkey, "startHotkey");
|
loadHotkey(obj, startHotkey, "startHotkey");
|
||||||
loadHotkey(obj, stopHotkey, "stopHotkey");
|
loadHotkey(obj, stopHotkey, "stopHotkey");
|
||||||
loadHotkey(obj, toggleHotkey, "toggleHotkey");
|
loadHotkey(obj, toggleHotkey, "toggleHotkey");
|
||||||
|
loadHotkey(obj, newMacroHotkey, "newMacroHotkey");
|
||||||
loadHotkey(obj, upMacroSegment, "upMacroSegmentHotkey");
|
loadHotkey(obj, upMacroSegment, "upMacroSegmentHotkey");
|
||||||
loadHotkey(obj, downMacroSegment, "downMacroSegmentHotkey");
|
loadHotkey(obj, downMacroSegment, "downMacroSegmentHotkey");
|
||||||
loadHotkey(obj, removeMacroSegment, "removeMacroSegmentHotkey");
|
loadHotkey(obj, removeMacroSegment, "removeMacroSegmentHotkey");
|
||||||
|
|||||||
@@ -57,11 +57,9 @@ public:
|
|||||||
bool AnySceneTransitionStarted();
|
bool AnySceneTransitionStarted();
|
||||||
|
|
||||||
void SetPreconditions();
|
void SetPreconditions();
|
||||||
void ResetForNextInterval();
|
|
||||||
void AddSaveStep(std::function<void(obs_data_t *)>);
|
void AddSaveStep(std::function<void(obs_data_t *)>);
|
||||||
void AddLoadStep(std::function<void(obs_data_t *)>);
|
void AddLoadStep(std::function<void(obs_data_t *)>);
|
||||||
void AddPostLoadStep(std::function<void()>);
|
void AddPostLoadStep(std::function<void()>);
|
||||||
void AddIntervalResetStep(std::function<void()>, bool lock = true);
|
|
||||||
void RunPostLoadSteps();
|
void RunPostLoadSteps();
|
||||||
bool CheckForMatch(OBSWeakSource &scene, OBSWeakSource &transition,
|
bool CheckForMatch(OBSWeakSource &scene, OBSWeakSource &transition,
|
||||||
int &linger, bool &setPreviousSceneAsMatch,
|
int &linger, bool &setPreviousSceneAsMatch,
|
||||||
@@ -100,11 +98,10 @@ public:
|
|||||||
std::vector<std::function<void(obs_data_t *)>> saveSteps;
|
std::vector<std::function<void(obs_data_t *)>> saveSteps;
|
||||||
std::vector<std::function<void(obs_data_t *)>> loadSteps;
|
std::vector<std::function<void(obs_data_t *)>> loadSteps;
|
||||||
std::vector<std::function<void()>> postLoadSteps;
|
std::vector<std::function<void()>> postLoadSteps;
|
||||||
std::vector<std::function<void()>> resetIntervalSteps;
|
|
||||||
|
|
||||||
bool firstBoot = true;
|
bool firstBoot = true;
|
||||||
bool transitionActive = false;
|
bool transitionActive = false;
|
||||||
bool sceneColletionStop = false;
|
bool sceneCollectionStop = false;
|
||||||
bool obsIsShuttingDown = false;
|
bool obsIsShuttingDown = false;
|
||||||
bool firstInterval = true;
|
bool firstInterval = true;
|
||||||
bool firstIntervalAfterStop = true;
|
bool firstIntervalAfterStop = true;
|
||||||
@@ -135,9 +132,6 @@ public:
|
|||||||
bool transitionOverrideOverride = false;
|
bool transitionOverrideOverride = false;
|
||||||
bool adjustActiveTransitionType = true;
|
bool adjustActiveTransitionType = true;
|
||||||
|
|
||||||
enum class LogLevel { DEFAULT, LOG_MACRO, LOG_ACTION, VERBOSE };
|
|
||||||
LogLevel logLevel = LogLevel::DEFAULT;
|
|
||||||
|
|
||||||
/* --- End of General tab section --- */
|
/* --- End of General tab section --- */
|
||||||
|
|
||||||
std::string lastTitle;
|
std::string lastTitle;
|
||||||
@@ -155,6 +149,7 @@ public:
|
|||||||
obs_hotkey_id startHotkey = OBS_INVALID_HOTKEY_ID;
|
obs_hotkey_id startHotkey = OBS_INVALID_HOTKEY_ID;
|
||||||
obs_hotkey_id stopHotkey = OBS_INVALID_HOTKEY_ID;
|
obs_hotkey_id stopHotkey = OBS_INVALID_HOTKEY_ID;
|
||||||
obs_hotkey_id toggleHotkey = OBS_INVALID_HOTKEY_ID;
|
obs_hotkey_id toggleHotkey = OBS_INVALID_HOTKEY_ID;
|
||||||
|
obs_hotkey_id newMacroHotkey = OBS_INVALID_HOTKEY_ID;
|
||||||
obs_hotkey_id upMacroSegment = OBS_INVALID_HOTKEY_ID;
|
obs_hotkey_id upMacroSegment = OBS_INVALID_HOTKEY_ID;
|
||||||
obs_hotkey_id downMacroSegment = OBS_INVALID_HOTKEY_ID;
|
obs_hotkey_id downMacroSegment = OBS_INVALID_HOTKEY_ID;
|
||||||
obs_hotkey_id removeMacroSegment = OBS_INVALID_HOTKEY_ID;
|
obs_hotkey_id removeMacroSegment = OBS_INVALID_HOTKEY_ID;
|
||||||
@@ -169,6 +164,7 @@ public:
|
|||||||
bool warnPluginLoadFailure = true;
|
bool warnPluginLoadFailure = true;
|
||||||
bool disableHints = false;
|
bool disableHints = false;
|
||||||
bool disableFilterComboboxFilter = false;
|
bool disableFilterComboboxFilter = false;
|
||||||
|
bool disableMacroWidgetCache = false;
|
||||||
bool hideLegacyTabs = true;
|
bool hideLegacyTabs = true;
|
||||||
bool saveWindowGeo = false;
|
bool saveWindowGeo = false;
|
||||||
QPoint windowPos = {};
|
QPoint windowPos = {};
|
||||||
@@ -233,7 +229,6 @@ public:
|
|||||||
bool checkPause();
|
bool checkPause();
|
||||||
void checkDefaultSceneTransitions();
|
void checkDefaultSceneTransitions();
|
||||||
void writeSceneInfoToFile();
|
void writeSceneInfoToFile();
|
||||||
void writeToStatusFile(const QString &msg);
|
|
||||||
void checkSwitchCooldown(bool &match);
|
void checkSwitchCooldown(bool &match);
|
||||||
|
|
||||||
std::deque<WindowSwitch> windowSwitches;
|
std::deque<WindowSwitch> windowSwitches;
|
||||||
|
|||||||
@@ -14,11 +14,7 @@ AutoUpdateTooltipLabel::AutoUpdateTooltipLabel(
|
|||||||
&AutoUpdateTooltipLabel::UpdateTooltip);
|
&AutoUpdateTooltipLabel::UpdateTooltip);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
void AutoUpdateTooltipLabel::enterEvent(QEnterEvent *event)
|
void AutoUpdateTooltipLabel::enterEvent(QEnterEvent *event)
|
||||||
#else
|
|
||||||
void AutoUpdateTooltipLabel::enterEvent(QEvent *event)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
_timer->start(_updateIntervalMs);
|
_timer->start(_updateIntervalMs);
|
||||||
QLabel::enterEvent(event);
|
QLabel::enterEvent(event);
|
||||||
|
|||||||
@@ -17,11 +17,7 @@ public:
|
|||||||
int updateIntervalMs = 300);
|
int updateIntervalMs = 300);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0)
|
|
||||||
void enterEvent(QEnterEvent *event) override;
|
void enterEvent(QEnterEvent *event) override;
|
||||||
#else
|
|
||||||
void enterEvent(QEvent *event) override;
|
|
||||||
#endif
|
|
||||||
void leaveEvent(QEvent *event) override;
|
void leaveEvent(QEvent *event) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
class SliderIgnoreScroll : public QSlider {
|
class ADVSS_EXPORT SliderIgnoreScroll : public QSlider {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -9,15 +9,14 @@
|
|||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
class DurationSelection : public QWidget {
|
class ADVSS_EXPORT DurationSelection : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
EXPORT DurationSelection(QWidget *parent = nullptr,
|
DurationSelection(QWidget *parent = nullptr,
|
||||||
bool showUnitSelection = true,
|
bool showUnitSelection = true, double minValue = 0.0);
|
||||||
double minValue = 0.0);
|
void SetDuration(const Duration &);
|
||||||
EXPORT void SetDuration(const Duration &);
|
|
||||||
Duration GetDuration() const { return _current; }
|
Duration GetDuration() const { return _current; }
|
||||||
EXPORT QDoubleSpinBox *SpinBox() { return _duration->SpinBox(); }
|
QDoubleSpinBox *SpinBox() { return _duration->SpinBox(); }
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void _DurationChanged(const NumberVariable<double> &value);
|
void _DurationChanged(const NumberVariable<double> &value);
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ void Duration::Load(obs_data_t *obj, const char *name)
|
|||||||
// TODO: remove this fallback
|
// TODO: remove this fallback
|
||||||
if (!data || !obs_data_has_user_value(data, "version") ||
|
if (!data || !obs_data_has_user_value(data, "version") ||
|
||||||
obs_data_get_int(data, "version") != 1) {
|
obs_data_get_int(data, "version") != 1) {
|
||||||
|
_value = 0.;
|
||||||
bool usingDefaultArgs = strcmp("duration", name) == 0;
|
bool usingDefaultArgs = strcmp("duration", name) == 0;
|
||||||
if (usingDefaultArgs) {
|
if (usingDefaultArgs) {
|
||||||
_value = obs_data_get_double(obj, "seconds");
|
_value = obs_data_get_double(obj, "seconds");
|
||||||
|
|||||||
@@ -62,6 +62,11 @@ void FilterComboBox::SetFilterBehaviourEnabled(bool value)
|
|||||||
FilterComboBox::_filteringEnabled = value;
|
FilterComboBox::_filteringEnabled = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FilterComboBox::SetAllowUnmatchedSelection(bool allow)
|
||||||
|
{
|
||||||
|
_allowUnmatchedSelection = allow;
|
||||||
|
}
|
||||||
|
|
||||||
void FilterComboBox::setCurrentText(const QString &text)
|
void FilterComboBox::setCurrentText(const QString &text)
|
||||||
{
|
{
|
||||||
if (_filteringEnabled) {
|
if (_filteringEnabled) {
|
||||||
@@ -82,7 +87,7 @@ void FilterComboBox::setItemText(int index, const QString &text)
|
|||||||
void FilterComboBox::focusOutEvent(QFocusEvent *event)
|
void FilterComboBox::focusOutEvent(QFocusEvent *event)
|
||||||
{
|
{
|
||||||
// Reset on invalid selection
|
// Reset on invalid selection
|
||||||
if (findText(currentText()) == -1) {
|
if (!_allowUnmatchedSelection && findText(currentText()) == -1) {
|
||||||
setCurrentIndex(-1);
|
setCurrentIndex(-1);
|
||||||
Emit(-1, "");
|
Emit(-1, "");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ public:
|
|||||||
FilterComboBox(QWidget *parent = nullptr,
|
FilterComboBox(QWidget *parent = nullptr,
|
||||||
const QString &placehodler = "");
|
const QString &placehodler = "");
|
||||||
static void SetFilterBehaviourEnabled(bool);
|
static void SetFilterBehaviourEnabled(bool);
|
||||||
|
void SetAllowUnmatchedSelection(bool allow);
|
||||||
|
|
||||||
void setCurrentText(const QString &text);
|
void setCurrentText(const QString &text);
|
||||||
void setItemText(int index, const QString &text);
|
void setItemText(int index, const QString &text);
|
||||||
@@ -27,6 +28,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
void Emit(int index, const QString &text);
|
void Emit(int index, const QString &text);
|
||||||
|
|
||||||
|
bool _allowUnmatchedSelection = false;
|
||||||
int _lastEmittedIndex = -1;
|
int _lastEmittedIndex = -1;
|
||||||
QString _lastEmittedText;
|
QString _lastEmittedText;
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,10 @@ ItemSelection::ItemSelection(std::deque<std::shared_ptr<Item>> &items,
|
|||||||
_conflictStr(conflict)
|
_conflictStr(conflict)
|
||||||
{
|
{
|
||||||
_modify->setMaximumWidth(22);
|
_modify->setMaximumWidth(22);
|
||||||
SetButtonIcon(_modify, ":/settings/images/settings/general.svg");
|
SetButtonIcon(_modify,
|
||||||
|
GetThemeTypeName() == "Light"
|
||||||
|
? ":/settings/images/settings/general.svg"
|
||||||
|
: "theme:Dark/settings/general.svg");
|
||||||
_modify->setFlat(true);
|
_modify->setFlat(true);
|
||||||
if (!configureTooltip.empty()) {
|
if (!configureTooltip.empty()) {
|
||||||
_modify->setToolTip(obs_module_text(configureTooltip.data()));
|
_modify->setToolTip(obs_module_text(configureTooltip.data()));
|
||||||
@@ -265,6 +268,7 @@ ItemSettingsDialog::ItemSettingsDialog(const Item &settings,
|
|||||||
std::string_view select,
|
std::string_view select,
|
||||||
std::string_view add,
|
std::string_view add,
|
||||||
std::string_view nameConflict,
|
std::string_view nameConflict,
|
||||||
|
bool showNameEmptyWarning,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
: QDialog(parent),
|
: QDialog(parent),
|
||||||
_name(new QLineEdit()),
|
_name(new QLineEdit()),
|
||||||
@@ -274,7 +278,8 @@ ItemSettingsDialog::ItemSettingsDialog(const Item &settings,
|
|||||||
_items(items),
|
_items(items),
|
||||||
_selectStr(select),
|
_selectStr(select),
|
||||||
_addStr(add),
|
_addStr(add),
|
||||||
_conflictStr(nameConflict)
|
_conflictStr(nameConflict),
|
||||||
|
_showNameEmptyWarning(showNameEmptyWarning)
|
||||||
{
|
{
|
||||||
setModal(true);
|
setModal(true);
|
||||||
setWindowModality(Qt::WindowModality::WindowModal);
|
setWindowModality(Qt::WindowModality::WindowModal);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
std::string_view addString = "AdvSceneSwitcher.item.add",
|
std::string_view addString = "AdvSceneSwitcher.item.add",
|
||||||
std::string_view conflictString =
|
std::string_view conflictString =
|
||||||
"AdvSceneSwitcher.item.nameNotAvailable",
|
"AdvSceneSwitcher.item.nameNotAvailable",
|
||||||
QWidget *parent = 0);
|
bool showEmptyNameWarning = true, QWidget *parent = 0);
|
||||||
virtual ~ItemSettingsDialog() = default;
|
virtual ~ItemSettingsDialog() = default;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user