1 Star 0 Fork 79

AaronDoge / evm

forked from scriptiot / evm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
watch.qml 2.40 KB
一键复制 编辑 原始数据 按行查看 历史
edmundwz 提交于 2020-03-23 23:02 . Initial commit
Rectangle {
id: rect
x: 0
y: 0
width: 800
height: 600
color:'lightblue'
gradient:'lightblue'
Rectangle{
x: 200
y: 100
width: 400
height: 400
color:'lightblue'
gradient:'lightblue'
Image{
source: 'images/wear/ico_watch_background_011.bin'
}
CircularGauge{
id: gvsec
x:45
y:45
width:300
height:300
CircularGaugeStyle{
angleRange:360
labelCount:0
tickmarkCount:0
needleColor: 'red'
}
minimumValue:0
maximumValue:360
value:0
function animation(){
var date = new Date();
var offset = 31;
var hx = date.getHours();
var mx = date.getMinutes();
var sx = date.getSeconds();
if( hx > 12) hx = hx - 12;
if( hx <= 6 ) hx = hx * 360 / 12 + 180;
if( hx > 6 && hx <= 12) hx = hx * 360 / 12 - 180;
if( sx >= 30 ) sx = sx * 6 - 180;
else sx = sx * 6 + 180;
if( mx >= 30 ) mx = mx * 6 - 180;
else mx = mx * 6 + 180;
hx = hx + date.getMinutes() * 30 / 60;
gvhour.value = hx;
gvmin.value = mx;
gvsec.value = sx;
}
timer_id:0
onCompleted: {
gvsec.timer_id = setInterval(gvsec.animation, 200);
}
}
CircularGauge{
id:gvmin
x:95
y:95
width:200
height:200
CircularGaugeStyle{
angleRange:360
labelCount:0
tickmarkCount:0
needleColor: 'yellow'
}
minimumValue:0
maximumValue:360
value:0
}
CircularGauge{
id:gvhour
x:120
y:120
width:150
height:150
CircularGaugeStyle{
angleRange:360
labelCount:0
tickmarkCount:0
needleColor: 'white'
}
minimumValue:0
maximumValue:360
value:0
}
}
}
C
1
https://gitee.com/AaronDoge/evm.git
git@gitee.com:AaronDoge/evm.git
AaronDoge
evm
evm
master

搜索帮助