diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-10-29 14:01:42 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-10-30 10:06:08 +0200 |
commit | 84c156d3e2fcceeab608f401fbc638f2d01219b3 (patch) | |
tree | 74de2de1635c60645f4864d08f6afb941948aea8 /examples/qmlbars | |
parent | 233d5c02638903e96687d580ada7188f0e6a9756 (diff) |
Selection overhaul
Selection modes are now proper flags, so you can easily mix and match
item, row, and column modes as you wish. Slice flag means automatic
slicing control - if user wishes to control slicing himself, he should
not set this mode flag.
Clicking an item on graph now emits clicked signal from renderer to
controller on all graphs instead of setting the selected item.
Controller will set the selected item based on this information.
Task-number: QTRD-2366
Task-number: QTRD-2491
Change-Id: I6251c42e22ea676613fbd36685e33574e6eb9a1a
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'examples/qmlbars')
-rw-r--r-- | examples/qmlbars/qml/qmlbars/main.qml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/qmlbars/qml/qmlbars/main.qml b/examples/qmlbars/qml/qmlbars/main.qml index 5b1cc006..3d8aa7e0 100644 --- a/examples/qmlbars/qml/qmlbars/main.qml +++ b/examples/qmlbars/qml/qmlbars/main.qml @@ -46,7 +46,7 @@ Item { width: dataView.width height: dataView.height shadowQuality: AbstractGraph3D.ShadowQualityMedium - selectionMode: AbstractGraph3D.SelectionModeItem + selectionMode: AbstractGraph3D.SelectionItem font.pointSize: 35 theme: AbstractGraph3D.ThemeRetro labelStyle: AbstractGraph3D.LabelStyleFromTheme @@ -59,7 +59,7 @@ Item { valueAxis: graphAxes.expenses itemLabelFormat: "@valueTitle for @colLabel, @rowLabel: @valueLabel" - onSelectedBarPosChanged: { + onSelectedBarChanged: { // Set tableView current row to selected bar var rowRole = graphData.proxy.rowLabels[position.x]; var colRole = graphData.proxy.columnLabels[position.y]; @@ -161,7 +161,7 @@ Item { onCurrentRowChanged: { var rowIndex = graphData.proxy.activeMapping.rowCategoryIndex(graphData.model.get(currentRow).year) var colIndex = graphData.proxy.activeMapping.columnCategoryIndex(graphData.model.get(currentRow).month) - testGraph.selectedBarPos = Qt.point(rowIndex, colIndex) + testGraph.selectedBar = Qt.point(rowIndex, colIndex) } //! [2] } |