summaryrefslogtreecommitdiffstats
path: root/stats/statshelper.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-02-07 18:10:08 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-02-13 13:02:54 -0800
commitbd252fc8201c7e77882ac95ef90ddbf4a16356d3 (patch)
tree15bfc73e8e569d6616ab3edd2d55c025b6b2af10 /stats/statshelper.cpp
parent91d371374b618ea6a173dcd94f9f11b2e96b85ce (diff)
downloadsubsurface-bd252fc8201c7e77882ac95ef90ddbf4a16356d3.tar.gz
statistics: highlight selected boxes in box plot
In analogy to bar plots, highlight selected boxes in box plots. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/statshelper.cpp')
-rw-r--r--stats/statshelper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/stats/statshelper.cpp b/stats/statshelper.cpp
index d84ce20cf..b08c12077 100644
--- a/stats/statshelper.cpp
+++ b/stats/statshelper.cpp
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
#include "statshelper.h"
+#include "core/dive.h"
#include <cmath>
@@ -8,3 +9,9 @@ QPointF roundPos(const QPointF &p)
{
return QPointF(round(p.x()), round(p.y()));
}
+
+bool allDivesSelected(const std::vector<dive *> &dives)
+{
+ return std::all_of(dives.begin(), dives.end(),
+ [] (const dive *d) { return d->selected; });
+}