ListViewSpecifics.qml 9.43 KB
Newer Older
1
import Qt 4.7
2 3
import Bauhaus 1.0

4
QWidget {
5 6 7 8 9 10 11
    layout: QVBoxLayout {
        topMargin: 0
        bottomMargin: 0
        leftMargin: 0
        rightMargin: 0
        spacing: 0
        FlickableGroupBox {
12
            finished: finishedNotify;
13 14 15 16 17 18 19
        }
        GroupBox {
            finished: finishedNotify;
            caption: qsTr("List View")
            layout: VerticalLayout {
                IntEditor {
                    backendValue: backendValues.cacheBuffer
20
                    caption: qsTr("Cache")
21
                    toolTip: qsTr("Cache buffer")
22 23 24 25 26 27 28
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                IntEditor {
                    backendValue: backendValues.cellHeight
29
                    caption: qsTr("Cell height")
30 31 32 33 34 35 36
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 200;
                }
                IntEditor {
                    backendValue: backendValues.cellWidth
37
                    caption: qsTr("Cell width")
38 39 40 41 42 43 44 45 46 47
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                QWidget {
                    layout: HorizontalLayout {
                        Label {
                            text: qsTr("Flow")
                        }
48

49 50 51 52 53 54 55 56 57 58 59 60 61
                        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("Navigation 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", "TopToBottom"] }
                //                            currentText: backendValues.layoutDirection.value;
                //                            onItemsChanged: {
                //                                currentText =  backendValues.layoutDirection.value;
                //                            }
                //                            backendValue: backendValues.layoutDirection
                //                        }
                //                    }
                //                } //QWidget
87 88 89 90 91

                QWidget {
                    layout: HorizontalLayout {
                        Label {
                            text: qsTr("Orientation")
92
                            toolTip: qsTr("Orientation of the list.")
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
                        }

                        ComboBox {
                            baseStateFlag: isBaseState
                            items : { ["Horizontal", "Vertical"] }
                            currentText: backendValues.snapMode.value;
                            onItemsChanged: {
                                currentText =  backendValues.snapMode.value;
                            }
                            backendValue: backendValues.snapMode
                        }
                    }
                } //QWidget
                QWidget {
                    layout: HorizontalLayout {
                        Label {
109
                            text: qsTr("Snap mode")
110
                            toolTip: qsTr("Determines how the view scrolling will settle following a drag or flick.")
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
                        }

                        ComboBox {
                            baseStateFlag: isBaseState
                            items : { ["NoSnap", "SnapToRow", "SnapOneRow"] }
                            currentText: backendValues.snapMode.value;
                            onItemsChanged: {
                                currentText =  backendValues.snapMode.value;
                            }
                            backendValue: backendValues.snapMode
                        }
                    }
                } //QWidget
                IntEditor {
                    backendValue: backendValues.spacing
                    caption: qsTr("Spacing")
127
                    toolTip: qsTr("Spacing between items.")
128 129 130 131 132
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
133 134 135 136 137 138 139 140 141 142
            }
        }
        GroupBox {
            finished: finishedNotify;
            caption: qsTr("List View Highlight")
            layout: VerticalLayout {
                QWidget {
                    layout: HorizontalLayout {
                        Label {
                            text: qsTr("Range")
143
                            toolTip: qsTr("Highlight range")
144
                        }
145

146 147 148 149 150 151
                        ComboBox {
                            baseStateFlag: isBaseState
                            items : { ["NoHighlightRange", "ApplyRange", "StrictlyEnforceRange"] }
                            currentText: backendValues.highlightRangeMode.value;
                            onItemsChanged: {
                                currentText =  backendValues.highlightRangeMode.value;
152
                            }
153
                            backendValue: backendValues.highlightRangeMode
154
                        }
155 156 157 158
                    }
                } //QWidget
                IntEditor {
                    backendValue: backendValues.highlightMoveDuration
159
                    caption: qsTr("Move duration")
160
                    toolTip: qsTr("Move animation duration of the highlight delegate.")
161 162 163 164 165 166 167
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                IntEditor {
                    backendValue: backendValues.highlightMoveSpeed
168
                    caption: qsTr("Move speed")
169
                    toolTip: qsTr("Move animation speed of the highlight delegate.")
170 171 172 173 174 175 176
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                IntEditor {
                    backendValue: backendValues.highlightResizeDuration
177
                    caption: qsTr("Resize duration")
178
                    toolTip: qsTr("Resize animation duration of the highlight delegate.")
179 180 181 182 183 184 185
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                IntEditor {
                    backendValue: backendValues.highlightResizeSpeed
186
                    caption: qsTr("Resize speed")
187
                    toolTip: qsTr("Resize animation speed of the highlight delegate.")
188 189 190 191 192 193 194
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                IntEditor {
                    backendValue: backendValues.preferredHighlightBegin
195 196
                    caption: qsTr("Preferred begin")
                    toolTip: qsTr("Preferred highlight begin - must be smaller than Preferred end.")
197 198 199 200 201 202 203
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                IntEditor {
                    backendValue: backendValues.preferredHighlightEnd
204 205
                    caption: qsTr("Preferred end")
                    toolTip: qsTr("Preferred highlight end - must be larger than Preferred begin.")
206 207 208 209 210 211 212 213 214
                    baseStateFlag: isBaseState;
                    step: 1;
                    minimumValue: 0;
                    maximumValue: 1000;
                }
                QWidget {  // 1
                    layout: HorizontalLayout {

                        Label {
215
                            text: qsTr("Follows current")
216
                        }
217 218
                        CheckBox {
                            backendValue: backendValues.highlightFollowsCurrentItem
219
                            toolTip: qsTr("Determines whether the highlight is managed by the view.")
220
                            baseStateFlag: isBaseState;
221
                            checkable: True
222 223 224 225 226
                        }
                    }
                }
            }
        }
227 228
        QScrollArea {
        }
229
    }
230
}