5 property alias textInButton: buttonText.text
9 function setText(string) { textInButton = string; }
10 border { left: 10; top: 10; right: 10; bottom: 10 }
14 anchors.centerIn: parent;
16 height: parent.height;
25 anchors.centerIn: parent;
26 font.pixelSize: parent.height * .5
27 style: Text.Sunken; color: "white"; styleColor: "black"; smooth: true
32 // anchors.centerIn: parent;
33 // radius: parent.height*.4;
36 // width: parent.width;
37 // height: parent.height;
42 width: (35*parent.height)/107 +1
44 anchors.left: parent.left
45 source: "qrc:/button/buttonLeft.png"
46 fillMode:Image.Stretch
52 width: parent.width - ((70*parent.height)/107) +1;
54 anchors.horizontalCenter: parent.horizontalCenter
55 source: "qrc:/button/buttonCenter.png"
56 fillMode:Image.Stretch
62 width: (35*parent.height)/107 +1
64 anchors.right: parent.right
65 source: "qrc:/button/buttonR.png"
66 fillMode:Image.Stretch
72 when: (mouseArea.pressed == true && button.enabled == true);
74 PropertyChanges { target: image1; source: "qrc:/button/buttonLeftPushed.png" }
75 PropertyChanges { target: image3; source: "qrc:/button/buttonCenterPushed.png" }
76 PropertyChanges { target: image2; source: "qrc:/button/buttonRightPushed.png" }
80 when: (button.enabled == false);
82 PropertyChanges { target: image1; source: "qrc:/button/buttonLeftDisabled.png" }
83 PropertyChanges { target: image3; source: "qrc:/button/buttonCenterDisabled.png" }
84 PropertyChanges { target: image2; source: "qrc:/button/buttonRightDisabled.png" }
92 anchors.centerIn: parent;
93 width: ((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60)) - ((70*parent.height)/107)
103 anchors.centerIn: parent;
104 font.pixelSize: parent.height * .5
105 style: Text.Sunken; color: "white"; styleColor: "black"; smooth: true
108 width: (button.width> buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.8)
114 anchors.centerIn: parent;
115 radius: parent.height*.4;
118 width: ((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60))
119 height: parent.height
124 width: (35*parent.height)/107 +1
125 height: parent.height
126 anchors.left: parent.left
127 anchors.leftMargin: (parent.width - ((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60)))/2
128 source: "qrc:/button/buttonLeft.png"
134 width: (((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60)) - ((70*parent.height)/107))+1
135 height: parent.height
136 anchors.horizontalCenter: parent.horizontalCenter
137 source: "qrc:/button/buttonCenter.png"
143 width: (35*parent.height)/107 +1
144 height: parent.height
145 anchors.right: parent.right
146 anchors.rightMargin: (parent.width - ((parent.width > buttonText.text.length*buttonText.font.pixelSize*.8) ? (parent.width) : (buttonText.text.length*buttonText.font.pixelSize*.60)))/2
147 source: "qrc:/button/buttonR.png"
152 name: "pressed"; when: mouseArea.pressed == true
153 PropertyChanges { target: shade; opacity: 0.4 }
154 PropertyChanges { target: image1; opacity: 0.5 }
155 PropertyChanges { target: image3; opacity: 0.5 }
156 PropertyChanges { target: image2; opacity: 0.5 }