/* * Copyright (C) 2016 by myf * Author : mengyufeng * */ import QtQuick 2.0 Image { id: loading property alias timer: loadingTimer property int loadImg: 1 property string bgImageStyle: systemCtrl.style //ADD DESIGN 2017/1/10 liduo begin width:60 height:60 //ADD DESIGN 2017/1/10 liduo end //ADD By qu-shh for auto display off start property bool display_flag:false //ADD By qu-shh for auto display off end onVisibleChanged: { if(visible) { loadingStart(); //ADD By qu-shh for auto display off start if(!display_flag) { systemCtrl.auto_Displayoff_Shield() display_flag = true } //ADD By qu-shh for auto display off end } else { loadingStop(); //ADD By qu-shh for auto display off start if(display_flag) { systemCtrl.auto_Displayoff_Unshield() display_flag = false } //ADD By qu-shh for auto display off end } } //FOD design 2017/01/11 liduo begin source:"qrc:MATERIAL/MATERIAL_LOADING_60_"+loadImg+bgImageStyle //FOD design 2017/01/11 liduo end Timer{ id: loadingTimer interval: 100 repeat: true triggeredOnStart: true onTriggered: { loading.loadImg = loading.loadImg == 10 ? 1 : (loading.loadImg + 1) } } function loadingStart() { loadingTimer.start() } function loadingStop() { loadingTimer.stop() } }