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

QWidget {
    layout: QVBoxLayout {
        topMargin: 0
        bottomMargin: 0
        leftMargin: 0
        rightMargin: 0
        spacing: 0
        FlickableGroupBox {
        }
        GroupBox {
            finished: finishedNotify;
            caption: qsTr("Grid View")
            layout: VerticalLayout {
                IntEditor {
                    backendValue: backendValues.cacheBuffer
19
                    caption: qsTr("Cache")
20
                    toolTip: qsTr("Cache buffer")
21 22 23 24 25 26 27
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                IntEditor {
                    backendValue: backendValues.cellHeight
28
                    caption: qsTr("Cell height")
29 30 31 32 33 34 35
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 200;
                }
                IntEditor {
                    backendValue: backendValues.cellWidth
36
                    caption: qsTr("Cell width")
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                QWidget {
                    layout: HorizontalLayout {
                        Label {
                            text: qsTr("Flow")
                        }

                        ComboBox {
                            baseStateFlag: isBaseState
                            items : { ["LeftToRight", "TopToBottom"] }
                            currentText: backendValues.flow.value;
                            onItemsChanged: {
                                currentText =  backendValues.flow.value;
                            }
                            backendValue: backendValues.flow
                        }
                    }
                } //QWidget

                IntEditor {
                    backendValue: backendValues.keyNavigationWraps
62
                    caption: qsTr("Resize wraps")
63
                    toolTip: qsTr("Determines whether the grid wraps key navigation.")
64 65 66 67 68
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
69 70 71 72
                //                Qt namespace enums not supported by the rewriter
                //                QWidget {
                //                    layout: HorizontalLayout {
                //                        Label {
73
                //                            text: qsTr("Layout direction")
74
                //                        }
75

76 77 78 79 80 81 82 83 84 85 86
                //                        ComboBox {
                //                            baseStateFlag: isBaseState
                //                            items : { ["LeftToRight", "RightToLeft"] }
                //                            currentText: backendValues.layoutDirection.value;
                //                            onItemsChanged: {
                //                                currentText =  backendValues.layoutDirection.value;
                //                            }
                //                            backendValue: backendValues.layoutDirection
                //                        }
                //                    }
                //                } //QWidget
87 88 89
                QWidget {
                    layout: HorizontalLayout {
                        Label {
90
                            text: qsTr("Snap mode")
91
                            toolTip: qsTr("Determines how the view scrolling will settle following a drag or flick.")
92 93 94 95 96 97 98 99 100 101 102 103 104
                        }

                        ComboBox {
                            baseStateFlag: isBaseState
                            items : { ["NoSnap", "SnapToRow", "SnapOneRow"] }
                            currentText: backendValues.snapMode.value;
                            onItemsChanged: {
                                currentText =  backendValues.snapMode.value;
                            }
                            backendValue: backendValues.snapMode
                        }
                    }
                } //QWidget
105 106 107 108 109 110 111 112 113 114
            }
        }
        GroupBox {
            finished: finishedNotify;
            caption: qsTr("Grid View Highlight")
            layout: VerticalLayout {
                QWidget {
                    layout: HorizontalLayout {
                        Label {
                            text: qsTr("Range")
115
                            toolTip: qsTr("Highlight range")
116
                        }
117

118 119 120 121 122 123
                        ComboBox {
                            baseStateFlag: isBaseState
                            items : { ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"] }
                            currentText: backendValues.highlightRangeMode.value;
                            onItemsChanged: {
                                currentText =  backendValues.highlightRangeMode.value;
124
                            }
125
                            backendValue: backendValues.highlightRangeMode
126
                        }
127 128 129 130
                    }
                } //QWidget
                IntEditor {
                    backendValue: backendValues.highlightMoveDuration
131
                    caption: qsTr("Move duration")
132
                    toolTip: qsTr("Move animation duration of the highlight delegate.")
133 134 135 136 137 138 139
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                IntEditor {
                    backendValue: backendValues.highlightMoveSpeed
140
                    caption: qsTr("Move speed")
141
                    toolTip: qsTr("Move animation speed of the highlight delegate.")
142 143 144 145 146 147 148
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                IntEditor {
                    backendValue: backendValues.preferredHighlightBegin
149 150
                    caption: qsTr("Preferred begin")
                    toolTip: qsTr("Preferred highlight begin - must be smaller than Preferred end.")
151 152 153 154 155 156 157
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                IntEditor {
                    backendValue: backendValues.preferredHighlightEnd
158 159
                    caption: qsTr("Preferred end")
                    toolTip: qsTr("Preferred highlight end - must be larger than Preferred begin.")
160 161 162 163 164 165 166 167 168
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                QWidget {  // 1
                    layout: HorizontalLayout {

                        Label {
169
                            text: qsTr("Follows current")
170
                        }
171 172
                        CheckBox {
                            backendValue: backendValues.highlightFollowsCurrentItem
173
                            toolTip: qsTr("Determines whether the highlight is managed by the view.")
174
                            baseStateFlag: isBaseState;
175
                            checkable: True
176 177 178 179 180
                        }
                    }
                }
            }
        }
181 182
        QScrollArea {
        }
183 184
    }
}