summaryrefstree
path: root/usr/bin/qml_link/AppLink/Com/HMIRoundBar_big.qml
blob: af08867fe6dcf8010e4a0a4b5be9034f34ffa057 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
import QtQuick 2.0

Item
{
    property double progress:0
//    property bool pressflag:false
//    property bool dragflag:false
//    property bool barpointflag:true
//    property string imagePath

//    signal dragingStart();
//    signal dragingEnd();
//    x:100
//    y:100
//    Image{
//        id:bg_all
//        x:0
//        y:0
//        source: imagePath + "M8X_music_BG_full-screen.png"
//    }

//    Image{
//        id:bg_r
//        x:0
//        y:0
//        source:imagePath + "M8X_music_BG_full-screen_R.png"
//    }

//    Image{
//        id:pro_l
//        x:14
//        y:14
//        source:imagePath + "M8X_music_progress_full-screen_L.png"

//    }

//    Image{
//        id:bg_l
//        x:0
//        y:0
//        source:imagePath + "M8X_music_BG_full-screen_L.png"

//    }

//    Image{
//        id:pro_r
//        x:14
//        y:14
//        source:imagePath + "M8X_music_progress_full-screen_R.png"
//        visible: false
//    }

//    Item{
//        id:bar
//        x:0
//        y:0
//        width: 386
//        height: 386
//        visible: barpointflag
//        Image{
//            x:182
//            y:12
//            source:imagePath + "M8X_music_progress-bar_full-screen.png"
//        }
//    }

//    function pro_ctrl()
//    {
//        bar.rotation = progress
//        if(progress <= 180)
//        {
//            pro_r.visible = false
//            pro_r.rotation = 0
//            pro_l.rotation = progress

//        }
//        else if(progress >180 && progress <= 360)
//        {
//            pro_r.visible = true
//            pro_l.rotation = 180
//            pro_r.rotation = (progress-180)
//        }
//    }

//    HMIMouseArea{
//        id:drag
//        x:0
//        y:0
//        width: 386
//        height: 386
//        enabled: dragflag
//        onMouseXChanged: {
//            progress = systemCtrlLink.systemRoundBarAngleBig(mouseX,mouseY)
//            pro_ctrl()
//        }
//        onMouseYChanged: {
//            progress = systemCtrlLink.systemRoundBarAngleBig(mouseX,mouseY)
//            pro_ctrl()
//        }
//        onReleased: {
//               dragingEnd();
//               pressflag = false
//        }
//        onPressed: {
//            dragingStart();
//            pressflag = true
//        }
//        onCanceled: {
//            dragingEnd();
//            pressflag = false
//        }
//    }

//    onProgressChanged: {
//        pro_ctrl()
//    }

    Rectangle{
        id:greyBar
        x:150
        y:849-160
        width:660
        height:8
        color:"#262626"
    }
    Rectangle{
        id:redBar
        x:150
        y:849-160
        width:660*progress
        height:8
        color:"#c80707"
    }
    Rectangle{
        id:whiteBall
        x:150+660*progress-width/2
        width: 20
        height: 20
        color: "#ffffff"
        radius: 180
        anchors.verticalCenter:redBar.verticalCenter
    }
}