summaryrefslogtreecommitdiffstats
path: root/stats/scatterseries.h
diff options
context:
space:
mode:
Diffstat (limited to 'stats/scatterseries.h')
-rw-r--r--stats/scatterseries.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/stats/scatterseries.h b/stats/scatterseries.h
index 5f8b4b2e6..e1642f4c6 100644
--- a/stats/scatterseries.h
+++ b/stats/scatterseries.h
@@ -4,21 +4,20 @@
#ifndef SCATTER_SERIES_H
#define SCATTER_SERIES_H
+#include "statshelper.h"
#include "statsseries.h"
#include <memory>
#include <vector>
-#include <QGraphicsRectItem>
-class QGraphicsPixmapItem;
-class QGraphicsScene;
+class ChartScatterItem;
struct InformationBox;
struct StatsVariable;
struct dive;
class ScatterSeries : public StatsSeries {
public:
- ScatterSeries(QGraphicsScene *scene, StatsAxis *xAxis, StatsAxis *yAxis,
+ ScatterSeries(StatsView &view, StatsAxis *xAxis, StatsAxis *yAxis,
const StatsVariable &varX, const StatsVariable &varY);
~ScatterSeries();
@@ -34,15 +33,15 @@ private:
std::vector<int> getItemsUnderMouse(const QPointF &f) const;
struct Item {
- std::unique_ptr<QGraphicsPixmapItem> item;
+ ChartItemPtr<ChartScatterItem> item;
dive *d;
double pos, value;
- Item(QGraphicsScene *scene, ScatterSeries *series, dive *d, double pos, double value);
+ Item(StatsView &view, ScatterSeries *series, dive *d, double pos, double value);
void updatePosition(ScatterSeries *series);
void highlight(bool highlight);
};
- std::unique_ptr<InformationBox> information;
+ ChartItemPtr<InformationBox> information;
std::vector<Item> items;
std::vector<int> highlighted;
const StatsVariable &varX;