aboutsummaryrefslogtreecommitdiffstats
path: root/stats/pieseries.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-02-07 20:48:43 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-02-13 13:02:54 -0800
commit21b8cded56854f81327f4f553e32a15ffe5c7b82 (patch)
tree354194513eed9bdb69d31f1855edbade60bb0ad5 /stats/pieseries.h
parentbd252fc8201c7e77882ac95ef90ddbf4a16356d3 (diff)
downloadsubsurface-21b8cded56854f81327f4f553e32a15ffe5c7b82.tar.gz
statistics: highlight selected pie slices
In analogy to the other charts, highlight selected pie slices. Overlay them with a checkerboard pattern, like in the bar charts. Since all charts now support highlighting, the divesSelected() virtual function now doesn't need a default implementation anymore. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/pieseries.h')
-rw-r--r--stats/pieseries.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/stats/pieseries.h b/stats/pieseries.h
index 05372e84f..83e9acba7 100644
--- a/stats/pieseries.h
+++ b/stats/pieseries.h
@@ -46,6 +46,7 @@ private:
double angleFrom, angleTo; // In fraction of total
std::vector<dive *> dives;
QPointF innerLabelPos, outerLabelPos; // With respect to a (-1, -1)-(1, 1) rectangle.
+ bool selected;
Item(StatsView &view, const QString &name, int from, std::vector<dive *> dives, int totalCount,
int bin_nr, int numBins);
void updatePositions(const QPointF &center, double radius);
@@ -65,6 +66,7 @@ private:
QPointF center; // center of drawing area
double radius; // radius of pie
int highlighted;
+ void divesSelected(const QVector<dive *> &) override;
};
#endif