summaryrefslogtreecommitdiffstats
path: root/BtnPresentPosition.qml
blob: 282259b2375921a223da851f353b04e6b804abcb (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
// SPDX-License-Identifier: GPL-3.0+
// Copyright (C) 2021 AISIN CORPORATION

import QtQuick 2.0
import QtQuick.Controls 1.5

Item {
    id: btn_present_position

    Image {
        id: image_present_position
        x: 4
        y: 4
        width: 92
        height: 92
        visible: false
        source: "images/05_CENTER-POSITION.png"
    }

    Button {
        id: btn_present_position_
        width: 100
        height: 100
        opacity: 0
        visible: true

        function present_position_clicked() {
            map.center = map.currentpostion
            btn_present_position.state = "Flowing"
        }
        onClicked: { present_position_clicked() }
    }

    states: [
        State{
            name: "Flowing"
            PropertyChanges { target: image_present_position; visible: false }
            PropertyChanges { target: btn_present_position; visible: false }
        },
        State{
            name: "Optional"
            PropertyChanges { target: image_present_position; visible: true }
            PropertyChanges { target: btn_present_position; visible: true }
        }
    ]

}

/*##^##
Designer {
    D{i:0;autoSize:true;height:480;width:640}
}
##^##*/