From 41e1b2bfb8e2ba3d0e74180200e7cc109171213e Mon Sep 17 00:00:00 2001 From: Samuel Fadel Date: Tue, 26 Jan 2016 18:15:50 +0100 Subject: Scatterplot & BarChart: initial brushing mechanism. * Both components now support brushing (support in Scatterplot for activating a brush is still incomplete, though it can be brushed on by other components) * Added a handler for linking the brushing between components * Added crosshair geometry handler to geometry lib * Fixed issue #15 --- brushinghandler.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 brushinghandler.cpp (limited to 'brushinghandler.cpp') diff --git a/brushinghandler.cpp b/brushinghandler.cpp new file mode 100644 index 0000000..0a8b9aa --- /dev/null +++ b/brushinghandler.cpp @@ -0,0 +1,17 @@ +#include "brushinghandler.h" + +BrushingHandler::BrushingHandler() + : m_brushedItem(-1) +{ +} + +void BrushingHandler::clearBrush() +{ + brushItem(-1); +} + +void BrushingHandler::brushItem(int item) +{ + m_brushedItem = item; + emit itemBrushed(item); +} -- cgit v1.2.3