blob: 4d6f9876fdf35a29ce195341196ef3383633910e (
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
|
// SPDX-License-Identifier: GPL-3.0+
// Copyright (C) 2021 AISIN CORPORATION
import QtQuick 2.0
import QtQuick.Controls 1.5
Item {
Button {
id: btn_arrow
width: 100
height: 100
function settleState() {
if(btn_arrow.state == "1"){
btn_arrow.state = "2";
} else if(btn_arrow.state == "2"){
btn_arrow.state = "3";
} else {
btn_arrow.state = "1";
}
}
onClicked: { settleState() }
Image {
id: image
width: 92
height: 92
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
source: "images/SW_Patern_1.bmp"
}
states: [
State {
name: "1"
PropertyChanges { target: image; source: "images/SW_Patern_1.bmp" }
},
State {
name: "2"
PropertyChanges { target: image; source: "images/SW_Patern_2.bmp" }
},
State {
name: "3"
PropertyChanges { target: image; source: "images/SW_Patern_3.bmp" }
}
]
}
}
|