WebViewSpecifics.qml 3.14 KB
Newer Older
1
import Qt 4.7
2 3
import Bauhaus 1.0

4 5 6 7 8 9 10 11
QWidget {
    layout: QVBoxLayout {
        topMargin: 0
        bottomMargin: 0
        leftMargin: 0
        rightMargin: 0
        spacing: 0
        GroupBox {
12 13


14 15
            GroupBox {
                maximumHeight: 200;
16

17
                finished: finishedNotify;
18
                caption: qsTr("WebView")
19
                id: webViewSpecifics;
20

21 22 23 24 25 26 27 28 29 30 31 32 33 34
                layout: VerticalLayout {
                    QWidget {
                        layout: HorizontalLayout {
                            leftMargin: 0;
                            rightMargin: 0;
                            Label {
                                text: "Url"
                            }
                            LineEdit {
                                backendValue: backendValues.url
                                baseStateFlag: isBaseState;
                            }
                        }
                    }
35

36 37 38
                    IntEditor {
                        id: preferredWidth;
                        backendValue: backendValues.preferredWidth;
39
                        caption: qsTr("Preferred Width")
40 41 42 43 44
                        baseStateFlag: isBaseState;
                        step: 1;
                        minimumValue: 0;
                        maximumValue: 2000;
                    }
45

46 47 48
                    IntEditor {
                        id: webPageWidth;
                        backendValue: backendValues.preferredHeight;
49
                        caption: qsTr("Page Height")
50 51 52 53
                        baseStateFlag: isBaseState;
                        step: 1;
                        minimumValue: 0;
                        maximumValue: 2000;
54
                    }
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86

                    QWidget {
                        layout: HorizontalLayout {

                            Label {
                                minimumHeight: 20;
                                text: "Zoom Factor"
                            }
                            DoubleSpinBox {
                                id: zoomSpinBox;
                                minimumWidth: 60;
                                text: ""
                                backendValue: backendValues.zoomFactor;
                                minimum: 0.01
                                maximum: 10
                                singleStep: 0.1
                                baseStateFlag: isBaseState;
                                onBackendValueChanged: {
                                    zoomSlider.value = backendValue.value * 10;
                                }
                            }
                            QSlider {
                                id: zoomSlider;
                                orientation: "Qt::Horizontal";
                                minimum: 1;
                                maximum: 100;
                                singleStep: 1;
                                onValueChanged: {
                                    backendValues.zoomFactor.value = value / 10;
                                }
                            }
                        }
87 88 89
                    }
                }
            }
90

91
        }
92
    }
93
}