增加禁用融合参数选项

This commit is contained in:
ljqing 2023-01-17 19:18:57 +08:00
parent ddb5e15800
commit ee96b91aef
4 changed files with 163 additions and 142 deletions

View File

@ -75,6 +75,9 @@
<q-card-actions align="right"> <q-card-actions align="right">
<span>{{ $t("Whether to hide the desktop") }}</span><q-checkbox style="justify-content: flex-start" <span>{{ $t("Whether to hide the desktop") }}</span><q-checkbox style="justify-content: flex-start"
v-model="hide_desktop_value" @click="send_hide_desktop" /> v-model="hide_desktop_value" @click="send_hide_desktop" />
<span>{{ $t("disable blending params") }}</span>
<q-checkbox style="justify-content: flex-start"
v-model="disable_blending_params" @click="send_disable_blending_params" />
<div class="q-space" data-v-39efcd1f=""></div> <div class="q-space" data-v-39efcd1f=""></div>
<q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" /> <q-btn color="white" @click="resetall" text-color="black" :label="$t('resetall config')" />
<div class="q-space" data-v-39efcd1f=""></div> <div class="q-space" data-v-39efcd1f=""></div>
@ -98,7 +101,7 @@
</style> </style>
<script lang="ts"> <script lang="ts">
import { import {
defineComponent, defineComponent,
ref, ref,
Ref, Ref,
@ -106,23 +109,23 @@ import {
computed, computed,
onMounted, onMounted,
onBeforeMount, onBeforeMount,
} from "vue"; } from "vue";
import { useStore } from "src/store"; import { useStore } from "src/store";
import { useQuasar, copyToClipboard } from "quasar"; import { useQuasar, copyToClipboard } from "quasar";
import { useI18n } from "vue-i18n"; import { useI18n } from "vue-i18n";
import GlobalData from "src/common/GlobalData"; import GlobalData from "src/common/GlobalData";
import { Protocol } from "src/entities/WSProtocol"; import { Protocol } from "src/entities/WSProtocol";
import { EDeviceAttribute } from "src/entities/EDeviceAttribute"; import { EDeviceAttribute } from "src/entities/EDeviceAttribute";
import ProjectorItem from "src/components/FusionSettings/ProjectorItem.vue"; import ProjectorItem from "src/components/FusionSettings/ProjectorItem.vue";
import FusionLocale from "src/components/FusionSettings/FusionLocale.vue"; import FusionLocale from "src/components/FusionSettings/FusionLocale.vue";
import FourPointCalibration from "src/components/FusionSettings/FourPointCalibration.vue"; import FourPointCalibration from "src/components/FusionSettings/FourPointCalibration.vue";
import GridSettings from "src/components/FusionSettings/GridSettings.vue"; import GridSettings from "src/components/FusionSettings/GridSettings.vue";
import SurfaceCorrection from "src/components/FusionSettings/SurfaceCorrection.vue"; import SurfaceCorrection from "src/components/FusionSettings/SurfaceCorrection.vue";
import DensityCorrection from "src/components/FusionSettings/DensityCorrection.vue"; import DensityCorrection from "src/components/FusionSettings/DensityCorrection.vue";
export default defineComponent({ export default defineComponent({
name: "ComponentFusionSettingsDialog", name: "ComponentFusionSettingsDialog",
components: { components: {
ProjectorItem, ProjectorItem,
@ -144,6 +147,9 @@ export default defineComponent({
const send_hide_desktop = () => { const send_hide_desktop = () => {
set?.SetBlendingOption(0, hide_desktop_value.value ? 1 : 0); set?.SetBlendingOption(0, hide_desktop_value.value ? 1 : 0);
}; };
const send_disable_blending_params = () => {
set?.SetBlendingOption(1, disable_blending_params.value ? 1 : 0);
};
const resetall=()=>{ const resetall=()=>{
set?.ResetBlendingConfig() set?.ResetBlendingConfig()
} }
@ -152,7 +158,7 @@ export default defineComponent({
let optionsstr = ref(); let optionsstr = ref();
optionsstr.value = "FusionLocale"; optionsstr.value = "FusionLocale";
const hide_desktop_value = ref(true); const hide_desktop_value = ref(true);
const hide_desktop_id = ref(0); const disable_blending_params = ref(false);
const options = computed({ const options = computed({
get() { get() {
return optionsstr.value; return optionsstr.value;
@ -233,15 +239,28 @@ export default defineComponent({
setTimeout(() => { setTimeout(() => {
set?.GetBlendingConfig("").then((res) => { set?.GetBlendingConfig("").then((res) => {
let tmp = JSON.parse(res ? res.config : ""); let tmp = JSON.parse(res ? res.config : "");
hide_desktop_id.value = tmp.options[0][0];
hide_desktop_value.value = tmp.options[0][1] == 0 ? false : true;
//console.log(tmp.options[0][1]) //console.log(tmp.options[0][1])
let local_options = [ [ref(0), hide_desktop_value], [ref(1), disable_blending_params] ];
let k:any;
for(k in local_options) {
let local_opt = local_options[k];
let ii:any;
for(ii in tmp.options){
let opt = tmp.options[ii];
if (2 == opt.length && local_opt[0].value == opt[0]){
local_opt[1].value = (opt[1] == 0 ? false : true);
break;
}
}
}
}); });
}, 1000); }, 1000);
}); });
return { return {
send_hide_desktop, send_hide_desktop,
hide_desktop_value, hide_desktop_value,
send_disable_blending_params,
disable_blending_params,
clear, clear,
show_dialog, show_dialog,
options, options,
@ -253,5 +272,5 @@ export default defineComponent({
resetall resetall
}; };
}, },
}); });
</script> </script>

View File

@ -426,4 +426,5 @@ export default {
"Whether to enable integration":"Whether to enable integration", "Whether to enable integration":"Whether to enable integration",
"Whether to hide the desktop":"Whether to hide the desktop", "Whether to hide the desktop":"Whether to hide the desktop",
"resetall config":"resetall config", "resetall config":"resetall config",
"disable blending params":"Dsable blending params",
}; };

View File

@ -695,4 +695,5 @@ export default {
"Whether to enable integration":"是否启用融合", "Whether to enable integration":"是否启用融合",
"Whether to hide the desktop":"是否隐藏桌面", "Whether to hide the desktop":"是否隐藏桌面",
"resetall config":"重置所有配置", "resetall config":"重置所有配置",
"disable blending params":"禁用融合参数",
}; };