AlignmentHorizontalButtons.qml 2.04 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import Qt 4.6
import Bauhaus 1.0

QGroupBox {
    id: aligmentHorizontalButtons
    layout: HorizontalLayout {
        topMargin: 6

        QWidget {
            fixedHeight: 32

            QPushButton {
                id: leftButton
                checkable: true
                fixedWidth: 32
16
				width: fixedWidth
17
                fixedHeight: 32
18
				height: fixedHeight
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
                styleSheetFile: "alignmentleftbutton.css";
                checked: backendValues.horizontalAlignment.value == "AlignLeft"

                onClicked: {
                    backendValues.horizontalAlignment.value = "AlignLeft";
                    checked = true;
                    centerButton.checked =  false;
                    rightButton.checked = false;
                }

            }
            QPushButton {
                id: centerButton
                x: 32
                checkable: true
                fixedWidth: 32
35
				width: fixedWidth
36
                fixedHeight: 32
37
				height: fixedHeight
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

                styleSheetFile: "alignmentcenterhbutton.css";
                checked: backendValues.horizontalAlignment.value == "AlignHCenter"

                onClicked: {
                    backendValues.horizontalAlignment.value = "AlignHCenter";
                    checked = true;
                    leftButton.checked =  false;
                    rightButton.checked = false;
                }

            }
            QPushButton {
                id: rightButton
                x: 64
                checkable: true
                fixedWidth: 32
55
				width: fixedWidth
56
                fixedHeight: 32
57
				height: fixedHeight
58
59
60
61
62
63
64
65
66
67
68
69
70
71

                styleSheetFile: "alignmentrightbutton.css";
                checked: backendValues.horizontalAlignment.value == "AlignRight"

                onClicked: {
                    backendValues.horizontalAlignment.value = "AlignRight";
                    checked = true;
                    centerButton.checked =  false;
                    leftButton.checked = false;
                }
            }
        }
    }
}