summaryrefslogtreecommitdiffstats
path: root/examples/surface
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2013-10-29 14:01:42 +0200
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2013-10-30 10:06:08 +0200
commit84c156d3e2fcceeab608f401fbc638f2d01219b3 (patch)
tree74de2de1635c60645f4864d08f6afb941948aea8 /examples/surface
parent233d5c02638903e96687d580ada7188f0e6a9756 (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/surface')
-rw-r--r--examples/surface/surfacegraph.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/surface/surfacegraph.h b/examples/surface/surfacegraph.h
index ac297bf6..ff0e5fc4 100644
--- a/examples/surface/surfacegraph.h
+++ b/examples/surface/surfacegraph.h
@@ -37,10 +37,12 @@ public:
void enableSqrtSinModel();
//! [0]
- void toggleModeNone() { m_graph->setSelectionMode(QDataVis::SelectionModeNone); }
- void toggleModeItem() { m_graph->setSelectionMode(QDataVis::SelectionModeItem); }
- void toggleModeSliceRow() { m_graph->setSelectionMode(QDataVis::SelectionModeSliceRow); }
- void toggleModeSliceColumn() { m_graph->setSelectionMode(QDataVis::SelectionModeSliceColumn); }
+ void toggleModeNone() { m_graph->setSelectionMode(QDataVis::SelectionNone); }
+ void toggleModeItem() { m_graph->setSelectionMode(QDataVis::SelectionItem); }
+ void toggleModeSliceRow() { m_graph->setSelectionMode(QDataVis::SelectionItemAndRow
+ | QDataVis::SelectionSlice); }
+ void toggleModeSliceColumn() { m_graph->setSelectionMode(QDataVis::SelectionItemAndColumn
+ | QDataVis::SelectionSlice); }
//! [0]
void setBlackToYellowGradient();