aboutsummaryrefslogtreecommitdiff
path: root/brushinghandler.cpp
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-01-26 18:15:50 +0100
committerSamuel Fadel <samuelfadel@gmail.com>2016-01-26 18:15:50 +0100
commit41e1b2bfb8e2ba3d0e74180200e7cc109171213e (patch)
tree27c7dbaa8fcdcc7efb300c0ea0a44b28d2ac76c0 /brushinghandler.cpp
parent7f0f945c35bc8c12d55efbce7545995fc76892c1 (diff)
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
Diffstat (limited to 'brushinghandler.cpp')
-rw-r--r--brushinghandler.cpp17
1 files changed, 17 insertions, 0 deletions
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);
+}