mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
c74975632e
commit
9b7565e81a
4 changed files with 17 additions and 20 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue