diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-14 12:37:26 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2021-01-20 08:47:18 +0100 |
commit | 9b7565e81a0b62711eaeafb633047a819e149170 (patch) | |
tree | 6f4b2fff445f6bccd17236566d49ca10dc54528e /stats/statsgrid.h | |
parent | c74975632e4ed6a63773b893b164055e4b17920f (diff) | |
download | subsurface-9b7565e81a0b62711eaeafb633047a819e149170.tar.gz |
statistics: turn ChartGrid into QSGNodes
Turn the background grid into QSGNodes. Each grid line is
represented by a QSG line item. An alternative would be
drawing the grid into a QImage and blasting that onto the
screen. It is unclear which one is preferred.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/statsgrid.h')
-rw-r--r-- | stats/statsgrid.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/stats/statsgrid.h b/stats/statsgrid.h index 47b48b3ac..ab1b0a513 100644 --- a/stats/statsgrid.h +++ b/stats/statsgrid.h @@ -3,18 +3,17 @@ #include <memory> #include <vector> -#include <QVector> -#include <QGraphicsLineItem> class StatsAxis; -class QGraphicsScene; +class StatsView; +class ChartLineItem; class StatsGrid { public: - StatsGrid(QGraphicsScene *scene, const StatsAxis &xAxis, const StatsAxis &yAxis); + StatsGrid(StatsView &view, const StatsAxis &xAxis, const StatsAxis &yAxis); void updatePositions(); private: - QGraphicsScene *scene; + StatsView &view; const StatsAxis &xAxis, &yAxis; - std::vector<std::unique_ptr<QGraphicsLineItem>> lines; + std::vector<std::unique_ptr<ChartLineItem>> lines; }; |