123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import QtQuick 1.0
- Rectangle {
- color: "transparent"
- id: commandButton
- width: 60
- height: 60
- signal stateChancgeRequested()
- property string previousView : ""
- onPreviousViewChanged: (previousView!= "" ? state = "back" : state = "")
- Image {
- id: icon
- source: "qrc:/shut"
- opacity: commandButtonMa.pressed ? 0.5 : 1
- }
- MouseArea {
- id: commandButtonMa
- anchors.fill: parent
- onClicked: {
- Qt.quit();
- }
- }
- states: [
- State{
- name:"back"
- PropertyChanges {
- target: commandButtonMa;
- onClicked: {
- stateChancgeRequested();
- }
- }
- PropertyChanges { target: icon; source: "qrc:/back"}
- }
- ]
- }
|