AlignmentVerticalButtons.qml 2.03 KB
Newer Older
1
import Qt 4.7
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import Bauhaus 1.0

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

        QWidget {
            fixedHeight: 32

            QPushButton {
                id: topButton;
                checkable: true
                fixedWidth: 32
                fixedHeight: 32
17 18
				width: fixedWidth
				height: fixedHeight
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
                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
36 37
				width: fixedWidth
				height: fixedHeight
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55

                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
56 57
				width: fixedWidth
				height: fixedHeight
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73

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

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

    }

}