6 property string buttonName: "NOT SET"
\r
7 property string target: "NOT SET"
\r
8 property string text: "NOT SET"
\r
10 property string fontName: "Helvetica"
\r
11 property int fontSize: 14
\r
12 property color fontColor: "black"
\r
14 property bool active: false
\r
16 property string bgImage: theme_manager.theme.datepicker.button
\r
17 property string bgImagePressed: theme_manager.theme.datepicker.button_pressed
\r
18 property string bgImageActive: theme_manager.theme.datepicker.button_active
\r
20 // These Component properties can be used to modify the Button's LaF
\r
21 // from the calling component. They have to define a BorderImage component.
\r
22 property Component bg: defaultBackground
\r
23 property Component bgPressed: defaultPressedBackground
\r
24 property Component bgActive: defaultActiveBackground
\r
26 signal clicked(string target, string button)
\r
30 opacity: enabled ? 1.0 : 0.5
\r
34 sourceComponent: container.bg
\r
35 anchors.fill: parent
\r
39 id: defaultBackground
\r
41 border { top: 8; bottom: 8; left: 8; right: 8 }
\r
46 id: defaultPressedBackground
\r
48 border { top: 8; bottom: 8; left: 8; right: 8 }
\r
49 source: bgImagePressed
\r
54 id: defaultActiveBackground
\r
56 border { top: 8; bottom: 8; left: 8; right: 8 }
\r
57 source: bgImageActive
\r
64 wrapMode: Text.WordWrap
\r
67 horizontalCenter: parent.horizontalCenter
\r
68 verticalCenter: parent.verticalCenter
\r
71 family: container.fontName
\r
72 pointSize: container.fontSize
\r
74 color: container.fontColor
\r
79 anchors.fill: parent
\r
85 name: 'pressed'; when: mouseArea.pressed
\r
86 PropertyChanges { target: background; sourceComponent: container.bgPressed }
\r
89 name: 'active'; when: container.active
\r
90 PropertyChanges { target: background; sourceComponent: container.defaultActiveBackground; }
\r