AlignmentVerticalButtons.qml 1.89 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import Qt 4.6
import Bauhaus 1.0

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

        QWidget {
            fixedHeight: 32

            QPushButton {
                id: topButton;
                checkable: true
                fixedWidth: 32
                fixedHeight: 32
                styleSheetFile: "alignmenttopbutton.css";
                checked: backendValues.verticalAlignment.value == "AlignTop"

                onClicked: {
                    backendValues.verticalAlignment.value = "AlignTop";
                    checked = true;
                    bottomButton.checked = false;
                    centerButton.checked = false;
                }

            }
            QPushButton {
                x: 32
                id: centerButton;
                checkable: true
                fixedWidth: 32
                fixedHeight: 32

                styleSheetFile: "alignmentcentervbutton.css";
                checked: backendValues.verticalAlignment.value == "AlignVCenter"

                onClicked: {
                    backendValues.verticalAlignment.value = "AlignVCenter";
                    checked = true;
                    bottomButton.checked = false;
                    topButton.checked = false;
                }

            }
            QPushButton {
                x: 64
                id: bottomButton;
                checkable: true
                fixedWidth: 32
                fixedHeight: 32

                styleSheetFile: "alignmentbottombutton.css";
                checked: backendValues.verticalAlignment.value == "AlignBottom"

                onClicked: {
                    backendValues.verticalAlignment.value = "AlignBottom";
                    checked = true;
                    centerButton.checked = false;
                    topButton.checked = false;
                }
            }
        }

    }

}