mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-06 03:31:41 +00:00
Ui rework (#96)
* updated libs, folder rework * started store modules added data handle mixin * more store rework * name refractor and component split * bug fixes and code cleanup
This commit is contained in:
62
chameleon-client/src/views/PipelineViewes/InputTab.vue
Normal file
62
chameleon-client/src/views/PipelineViewes/InputTab.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div>
|
||||
<CVslider name="Exposure" v-model="value.exposure" :min="0" :max="100" @input="handleData('exposure')"/>
|
||||
<CVslider name="Brightness" v-model="value.brightness" :min="0" :max="100" @input="handleData('brightness')"/>
|
||||
<CVslider name="Gain" v-if="value.gain !== -1" v-model="value.gain" :min="0" :max="100"
|
||||
@input="handleData('gain')"/>
|
||||
<CVselect name="Orientation" v-model="value.rotationMode" :list="['Normal','90° CW','180°','90° CCW']"
|
||||
@input="handleData('rotationMode')"/>
|
||||
<CVselect name="Resolution" v-model="value.videoModeIndex" :list="resolutionList"
|
||||
@input="handleData('videoModeIndex')"/>
|
||||
<CVselect name="Stream Resolution" v-model="value.streamDivisor"
|
||||
:list="streamResolutionList" @input="handleData('streamDivisor')"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CVslider from '../../components/common/cv-slider'
|
||||
import CVselect from '../../components/common/cv-select'
|
||||
|
||||
export default {
|
||||
name: 'Input',
|
||||
props: ['value'],
|
||||
components: {
|
||||
CVslider,
|
||||
CVselect,
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
t: 0,
|
||||
a: 1
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
resolutionList: {
|
||||
get() {
|
||||
let tmp_list = [];
|
||||
for (let i of this.$store.state.resolutionList) {
|
||||
tmp_list.push(`${i['width']} X ${i['height']} at ${i['fps']} FPS, ${i['pixelFormat']}`)
|
||||
}
|
||||
return tmp_list;
|
||||
}
|
||||
},
|
||||
streamResolutionList: {
|
||||
get() {
|
||||
let cam_res = this.$store.state.resolutionList[this.value.videoModeIndex];
|
||||
let tmp_list = [];
|
||||
tmp_list.push(`${Math.floor(cam_res['width'])} X ${Math.floor(cam_res['height'])}`);
|
||||
for (let x = 2; x <= 6; x += 2) {
|
||||
tmp_list.push(`${Math.floor(cam_res['width'] / x)} X ${Math.floor(cam_res['height'] / x)}`);
|
||||
}
|
||||
return tmp_list;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user