Visibility.qml 2 KB
Newer Older
1
import Qt 4.7
2 3 4 5
import Bauhaus 1.0

GroupBox {
    finished: finishedNotify;
6
    caption: qsTr("Visibility")
7 8 9 10 11 12 13
    maximumHeight: 200;
    id: visibility;

    layout: VerticalLayout {

        QWidget {
            layout: HorizontalLayout {
14 15
                Label {                    
                    text: qsTr("Visibility")
16 17 18
                }
                CheckBox {
                    id: visibleCheckBox;
19
                    text: qsTr("Is visible")
20
                    backendValue: backendValues.visible;
21 22 23 24 25
                    baseStateFlag: isBaseState;
                    checkable: true;
                }
                CheckBox {
                    id: clipCheckBox;
26
                    text: qsTr("Clip")
27
                    backendValue: backendValues.clip;
28 29 30 31 32 33 34 35 36
                    baseStateFlag: isBaseState;
                    checkable: true;
                }
            }
        }
        QWidget {
            layout: HorizontalLayout {

                Label {
37
                    text: qsTr("Opacity")
38 39 40 41 42
                }

                DoubleSpinBox {
                    text: ""
                    id: opacitySpinBox;
43
                    backendValue: backendValues.opacity
44
                    property variant backendValueValue: backendValues.opacity.value;
45 46 47 48 49 50 51 52 53 54 55 56 57 58
                    minimumWidth: 60;
                    minimum: 0;
                    maximum: 1;
                    singleStep: 0.1
                    baseStateFlag: isBaseState;
                    onBackendValueValueChanged: {
                        opacitySlider.value = backendValue.value * 100;
                    }
                }
                SliderWidget {
                    id: opacitySlider
                    minimum: 0
                    maximum: 100
                    singleStep: 5;
59
                    backendValue: backendValues.opacity
60 61 62 63 64 65 66 67
                    onValueChanged: {
                        backendValues.opacity.value = value / 100;
                    }
                }
            }
        }       
    }
}