summaryrefstree
path: root/usr/bin/qml_link/AppLink/Com/HMIRadioPlayCtrlButton.qml
blob: 991fe78483de1a1f6a26227b7fe0bce8ed19210d (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
import QtQuick 2.0
//import "../windowsList.js" as WindowsList
//import "usb_define.js" as StatusList
//import "../layoutList.js" as Layout
Rectangle
{
    id:usbPlayCtrl

    property int istatus:1
    property string imagePath

    HMIButton
    {
        id:previous_button
        x:311
        y:884-160
        btnIcon:imagePath + "M8X_icon_Previous-file.png"
        btnImg:imagePath + "M8X_Media_Button.png"
        btnImgOnPressed: imagePath + "M8X_Media_Button_p.png"
        onClicked: {
             if(2 != applinkControl.QML_GetSourceCtrlType()){
                 applinkControl.QML_NIF_XM_RequestPlayPrevRadion()
                 bLoading = true
                 bPlayFailed = false
             }
        }
    }
    HMIButton
    {
        id:play_pause_button
        x:424
        y:884-160
        btnImg:imagePath + "M8X_Media_Button.png"
        btnImgOnPressed: imagePath + "M8X_Media_Button_p.png"
        btnIcon:istatus?imagePath+"M8X_icon_Pause.png":imagePath+"M8X_icon_play.png"

        onClicked: {
             if(2 != applinkControl.QML_GetSourceCtrlType()){
                 if(istatus)
                 {
                     applinkControl.QML_NIF_XM_RequestPauseRadioPlay()
                     istatus=0
                 }
                 else
                 {
                     applinkControl.QML_NIF_XM_RequestResumeRadioPlay()
                     istatus=1
                 }
             }
        }
    }
    HMIButton
    {
        id:next_button
        x:537
        y:884-160
        btnIcon:imagePath + "M8X_icon_Next-file.png"
        btnImg:imagePath + "M8X_Media_Button.png"
        btnImgOnPressed: imagePath + "M8X_Media_Button_p.png"
        onClicked: {
             if(2 != applinkControl.QML_GetSourceCtrlType()){
                 applinkControl.QML_NIF_XM_RequestPlayNextRadio()
                 bLoading = true
                 bPlayFailed = false
             }
        }
    }
}