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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
   | ApplicationWindow {
    id: root
    visible: true
    width: 360
    height:360
    color: '#ffffff'
    MouseArea{
        anchors.fill:parent
        onClicked:{
            men.visible=false;
            radio.start();
       }
    }
    Radio {
            id: radio
            band: Radio.FM
        }
 
    Menus{
        id:men
        anchors.top: parent.top
        anchors.topMargin: 5
        anchors.right: parent.right
        anchors.rightMargin: 43
        visible:false
        opacity: 0.5
        z:20
        property bool etat: true
        MouseArea{
            anchors.fill: parent
            onPressed:men.etat? men.visible=true : men.visible=false
        }
    }
 
    Rectangle{
        id:affichage
        anchors.top: parent.top
        anchors.topMargin: 10
        anchors.horizontalCenter: parent.horizontalCenter
        width:root.width/2
        height:root.height/4
        color: "#000000"
        Text {
                    id:name
                    text: radio.radioData.stationName
                    anchors.top: parent.top
                    anchors.topMargin: 10
                    anchors.horizontalCenter: parent.horizontalCenter
                    color:"white"
                }
 
                Text {
                    id:freq
                    anchors.top:name.bottom
                    anchors.topMargin: 5
                    anchors.horizontalCenter: parent.horizontalCenter
                    text: "" + radio.frequency / 1000 + " kHz"
                    color:"white"
                }
 
                Text {
                    text: radio.radioData.radioText
                    anchors.top:freq.bottom
                    anchors.topMargin: 10
                    anchors.horizontalCenter: parent.horizontalCenter
                    color:"white"
                }
    }
    Rectangle{
        id:touchmenu
        anchors.right: parent.right
        anchors.top: parent.top
        Image {
            id: img
            anchors.right: parent.right
            anchors.rightMargin: 5
            anchors.top: parent.top
            anchors.topMargin: 5
          //  fillMode:
            source: "menu.fw.png"
            MouseArea{
                anchors.fill: parent
                onClicked:men.visible = true;
        }
    }
    }
 
    Slider {
        id: sliderHorizontal1
        tickmarksEnabled: true
        anchors.left: parent.left
        anchors.leftMargin: 50
        stepSize:radio.frequencyStep
        minimumValue: 88
        value: 0.5
        maximumValue: 108
        anchors.right: parent.right
        anchors.rightMargin: 50
        anchors.bottom: parent.bottom
        anchors.bottomMargin: 218
        anchors.top: parent.top
        anchors.topMargin: 120
        onValueChanged: radio.frequency = value
        updateValueWhileDragging:true
        style: SliderStyle {
            groove: Rectangle{
                implicitWidth: 200
                implicitHeight: 4
                color: "gray"
                radius: 8
            }
            handle: Rectangle {
                anchors.centerIn: parent
                color: control.pressed ? "#00BFFF" : "black"
                border.color: "gray"
                border.width: 2
                implicitWidth: 10
                implicitHeight: 20
                radius: 5
            }
 
        }
    }
    Rectangle{
        id:fleche
        width: 100
        anchors.top: parent.top
        anchors.topMargin: 180
        anchors.right: parent.right
        anchors.rightMargin: 130
        anchors.bottom: sliderHorizontal1.top
        anchors.bottomMargin: -110
        clip: false
        opacity: 0.3
        //anchors.centerIn: parent
        //anchors.horizontalCenter: parent.horizontalCenter
 
 
    Image {
        id: gauche
        x: 2
        y: 10
        source:"gauche.fw.png"
        MouseArea {
                anchors.fill: parent
                height: gauche.height
                width: gauche.width
                onClicked:{ radio.tuneDown()
                sliderHorizontal1.activeFocusOnPress = true
                    sliderHorizontal1.value-=0.5
                }
            }
    }
    Image {
        id: droit
        x: 69
        y: 10
        source:"droit.fw.png"
        MouseArea {
                anchors.fill: parent
                height: droit.width
                width: droit.height
                onClicked:{ radio.tuneUp()
                    sliderHorizontal1.activeFocusOnPress = true
                    sliderHorizontal1.value+=0.5
                }
    }
    }
}
} | 
Partager