aboutsummaryrefslogtreecommitdiff
path: root/scatterplot.h
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 /scatterplot.h
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 'scatterplot.h')
-rw-r--r--scatterplot.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/scatterplot.h b/scatterplot.h
index 0fb12ba..040f272 100644
--- a/scatterplot.h
+++ b/scatterplot.h
@@ -38,6 +38,8 @@ signals:
void opacityDataChanged(const arma::vec &opacityData) const;
void selectionChanged(const std::vector<bool> &selection) const;
void selectionInteractivelyChanged(const std::vector<bool> &selection) const;
+ void itemBrushed(int item) const;
+ void itemInteractivelyBrushed(int item) const;
void scaleChanged(const LinearScale<float> &sx, const LinearScale<float> &sy) const;
void glyphSizeChanged(float glyphSize) const;
@@ -46,6 +48,7 @@ public slots:
void setColorData(const arma::vec &colorData);
void setOpacityData(const arma::vec &opacityData);
void setSelection(const std::vector<bool> &selection);
+ void brushItem(int item);
void setScale(const LinearScale<float> &sx, const LinearScale<float> &sy);
Q_INVOKABLE void setGlyphSize(float glyphSize);
@@ -61,6 +64,7 @@ private:
void applyManipulation();
void updateGlyphs(QSGNode *node);
+ void updateBrush(QSGNode *node);
// Data
arma::mat m_xy;
@@ -78,6 +82,7 @@ private:
// Internal state
bool interactiveSelection(bool mergeSelection);
std::vector<bool> m_selection;
+ int m_brushedItem;
enum InteractionState {
INTERACTION_NONE,