aboutsummaryrefslogtreecommitdiffstats
path: root/stats/statsview.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-02-01 23:17:04 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-02-13 13:02:54 -0800
commitd63d4cd3c357a4294e4810ad320acf519b37882d (patch)
tree3659929714d26a32cca8b2501a609ef2a6b55be2 /stats/statsview.h
parente38b78b2aa787e3d1de97fb737601dc30a7fad6b (diff)
downloadsubsurface-d63d4cd3c357a4294e4810ad320acf519b37882d.tar.gz
statistics: implement rectangle selection in scatter plot
Allow the user to select regions of the scatter plot using a rectangular selection. When shift is pressed, do an incremental selection. Unfortunately, the list-selection code is so slow that this becomes unusable for a large number of selected dives. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/statsview.h')
-rw-r--r--stats/statsview.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/stats/statsview.h b/stats/statsview.h
index 87dcdad29..279889104 100644
--- a/stats/statsview.h
+++ b/stats/statsview.h
@@ -19,6 +19,7 @@ struct StatsVariable;
class StatsSeries;
class CategoryAxis;
class ChartItem;
+class ChartRectLineItem;
class ChartTextItem;
class CountAxis;
class HistogramAxis;
@@ -142,7 +143,10 @@ private:
ChartItemPtr<Legend> legend;
Legend *draggedItem;
ChartItemPtr<RegressionItem> regressionItem;
+ ChartItemPtr<ChartRectLineItem> selectionRect;
QPointF dragStartMouse, dragStartItem;
+ bool shiftSelection;
+ std::vector<dive *> oldSelection;
void hoverEnterEvent(QHoverEvent *event) override;
void hoverMoveEvent(QHoverEvent *event) override;