Modifiers.qml 4.26 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 9 10
    minimumHeight: 180;
    id: Mofifiers;

11
    layout: VerticalLayout {        
12 13

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

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

38
                Label {
39 40
                    text: "Opacity"
                }
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
                DoubleSpinBox {
                    text: ""
                    id: OpacitySpinBox;
                    backendValue: backendValues.opacity === undefined ? null : backendValues.opacity
                    minimumWidth: 60;
                    minimum: 0;
                    maximum: 1;
                    singleStep: 0.1
                    baseStateFlag: isBaseState;
                }
                SliderWidget {
                    minimum: 0
                    maximum: 100
                    singleStep: 5;
                    value: backendValues.opacity === undefined ? 0 : (backendValues.opacity.value * 100)
                    onValueChanged: {
                        if (backendValues.opacity !== undefined)
                            backendValues.opacity.value = value / 100;
                    }
                }
            }
        }
        QWidget {
            layout: HorizontalLayout {
66

67
                Label {
68 69
                    text: "Origin";
                }
70
                ComboBox {
71
                    minimumWidth: 20
72 73
					
					backendValue: backendValues.transformOrigin
74 75 76 77 78 79 80 81 82 83 84
                    items : { [
                        "TopLeft", "Top", "TopRight", "Left", "Center", "Right", "BottomLeft", "Bottom",
                        "BottomRight"
                        ] }

                    currentText: backendValues.transformOrigin.value;
                    onItemsChanged: {
                        currentText =  backendValues.transformOrigin.value;
                    }
                    onCurrentTextChanged: {
                        backendValues.transformOrigin.value = currentText;
85 86
                    }
                }
87 88 89 90
            }
        }
        QWidget {
            layout: HorizontalLayout {
91

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

96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116
                DoubleSpinBox {
                    text: ""
                    id: ScaleSpinBox;
                    objectName: "ScaleSpinBox";
                    backendValue: backendValues.scale;
                    minimumWidth: 60;
                    minimum: 0.01
                    maximum: 10
                    singleStep: 0.1
                    baseStateFlag: isBaseState;
                    onBackendValueChanged: {
                        ScaleSlider.value = backendValue.value * 10;
                    }
                }
                SliderWidget {
                    id: ScaleSlider;
                    minimum: 1;
                    maximum: 100;
                    singleStep: 1;
                    onValueChanged: {
                        backendValues.scale.value = value / 10;
117 118 119 120
                    }
                }
            }
        }
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
        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;
            minimumValue: 0;
            maximumValue: 100;
        }
138 139
    }
}