5 property alias textInButton: buttonText.text
6 property bool checkable: false
7 property bool checked: false
15 function setText(string) { textInButton = qsTr(string); }
16 function press() { mouseArea.pressed }
17 border { left: 10; top: 10; right: 10; bottom: 10 }
21 anchors.centerIn: parent;
23 height: parent.height;
27 button.checked=!button.checked;
37 anchors.centerIn: parent;
38 horizontalAlignment: Text.AlignHCenter
39 font.pixelSize: parent.height * .5
40 elide: Text.ElideRight;
41 style: Text.Sunken; color: "white"; styleColor: "black"; smooth: true
46 width: (image1.sourceSize.width*parent.height)/image1.sourceSize.height +1 //(35*parent.height)/107 +1
48 anchors.left: parent.left
49 source: "qrc:/button/buttonLeft.png"
51 fillMode:Image.Stretch
58 anchors.right: image2.left
59 anchors.rightMargin: -1
60 anchors.left: image1.right
61 anchors.leftMargin: -1
62 source: "qrc:/button/buttonCenter.png"
63 fillMode:Image.Stretch
69 width: (image1.sourceSize.width*parent.height)/image1.sourceSize.height +1//(35*parent.height)/107 +1
71 anchors.right: parent.right
72 source: "qrc:/button/buttonR.png"
73 fillMode:Image.Stretch
79 when: ((button.enabled) && (mouseArea.pressed || (button.checkable && button.checked) ) )
81 PropertyChanges { target: image1; source: "qrc:/button/buttonLeftPushed.png" }
82 PropertyChanges { target: image3; source: "qrc:/button/buttonCenterPushed.png" }
83 PropertyChanges { target: image2; source: "qrc:/button/buttonRightPushed.png" }
87 when: (button.enabled == false);
89 PropertyChanges { target: image1; source: "qrc:/button/buttonLeftDisabled.png" }
90 PropertyChanges { target: image3; source: "qrc:/button/buttonCenterDisabled.png" }
91 PropertyChanges { target: image2; source: "qrc:/button/buttonRightDisabled.png" }