src/GUI/qml/DeleteButton.qml
raw| 1 | import QtQuick 2.4 |
| 2 | import FlightGear 1.0 |
| 3 | |
| 4 | Item { |
| 5 | id: root |
| 6 | |
| 7 | property bool enabled: true |
| 8 | signal clicked |
| 9 | |
| 10 | width: height |
| 11 | height: icon.implicitHeight + 1 |
| 12 | |
| 13 | Image { |
| 14 | id: icon |
| 15 | x: 0 |
| 16 | y: 0 |
| 17 | source: "image://colored-icon/cancel-small?destructive" |
| 18 | } |
| 19 | |
| 20 | MouseArea { |
| 21 | id: mouse |
| 22 | anchors.fill: parent |
| 23 | enabled: root.enabled |
| 24 | |
| 25 | onClicked: { |
| 26 | root.clicked(); |
| 27 | } |
| 28 | |
| 29 | } |
| 30 | } |