Modifiers.qml 4.32 KB
Newer Older
1
import Qt 4.6
2
import Bauhaus 1.0
3 4 5

GroupBox {
    finished: finishedNotify;
6 7
    caption: "Manipulation"
    maximumHeight: 200;
8
    minimumHeight: 180;
9
    id: mofifiers;
10

11
    layout: VerticalLayout {
12 13

        QWidget {
14
            layout: HorizontalLayout {
15
                Label {
16 17
                    text: "Visibility"
                }
18

19
                CheckBox {
20
                    id: visibleCheckBox;
21 22 23 24 25 26
                    text: "Is visible";
                    backendValue: backendValues.visible === undefined ? false : backendValues.visible;
                    baseStateFlag: isBaseState;
                    checkable: true;
                }
                CheckBox {
27
                    id: clipCheckBox;
28
                    text: "Clip Content";
29 30 31 32 33 34 35 36
                    backendValue: backendValues.clip === undefined ? false : backendValues.clip;
                    baseStateFlag: isBaseState;
                    checkable: true;
                }
            }
        }
        QWidget {
            layout: HorizontalLayout {
37

38
                Label {
39 40
                    text: "Opacity"
                }
41

42 43
                DoubleSpinBox {
                    text: ""
44
                    id: opacitySpinBox;
45
                    backendValue: backendValues.opacity === undefined ? null : backendValues.opacity
46
                    property var backendValueValue: backendValues.opacity.value;
47 48 49 50 51
                    minimumWidth: 60;
                    minimum: 0;
                    maximum: 1;
                    singleStep: 0.1
                    baseStateFlag: isBaseState;
52
                    onBackendValueValueChanged: {
53 54
                        opacitySlider.value = backendValue.value * 100;
                    }
55 56
                }
                SliderWidget {
57
                    id: opacitySlider
58 59 60
                    minimum: 0
                    maximum: 100
                    singleStep: 5;
61
                    backendValue: backendValues.opacity === undefined ? null : backendValues.opacity
62 63
                    onValueChanged: {
                        if (backendValues.opacity !== undefined)
64
                        backendValues.opacity.value = value / 100;
65 66 67 68 69 70
                    }
                }
            }
        }
        QWidget {
            layout: HorizontalLayout {
71

72
                Label {
73 74
                    text: "Origin";
                }
75
                ComboBox {
76
                    minimumWidth: 20
77 78
                    baseStateFlag: isBaseState

79
                    items : { [
80 81 82
                            "TopLeft", "Top", "TopRight", "Left", "Center", "Right", "BottomLeft", "Bottom",
                            "BottomRight"
                            ] }
83 84
										
					backendValue: backendValues.transformOrigin
85
                }
86 87 88 89
            }
        }
        QWidget {
            layout: HorizontalLayout {
90

91
                Label {
92 93
                    text: "Scale"
                }
94

95 96
                DoubleSpinBox {
                    text: ""
97
                    id: scaleSpinBox;
98

99
                    backendValue: backendValues.scale;
100
                    property var backendValueValue: backendValues.scale.value;
101 102 103 104 105
                    minimumWidth: 60;
                    minimum: 0.01
                    maximum: 10
                    singleStep: 0.1
                    baseStateFlag: isBaseState;
106
                    onBackendValueValueChanged: {
107
                        scaleSlider.value = backendValue.value * 10;
108 109 110
                    }
                }
                SliderWidget {
111
                    id: scaleSlider;
112
                    backendValue: backendValues.scale;
113 114 115
                    minimum: 1;
                    maximum: 100;
                    singleStep: 1;
116
                    onValueChanged: {
117
                        backendValues.scale.value = value / 10;
118 119 120 121
                    }
                }
            }
        }
122 123 124 125 126 127 128 129 130 131 132 133 134 135
        IntEditor {
            backendValue: backendValues.rotation
            caption: "Rotation"
            baseStateFlag: isBaseState;
            step: 10;
            minimumValue: 0;
            maximumValue: 360;
        }

        IntEditor {
            backendValue: backendValues.z == undefined ? 0 : backendValues.z
            caption: "z"
            baseStateFlag: isBaseState;
            step: 1;
136
            minimumValue: -100;
137 138
            maximumValue: 100;
        }
139 140
    }
}