qskinny/examples/iot-dashboard/nodes/DiagramSegmentsNode.h

31 lines
873 B
C
Raw Normal View History

2021-04-21 10:00:34 +00:00
/******************************************************************************
* QSkinny - Copyright (C) 2021 Uwe Rathmann
* This file may be used under the terms of the QSkinny License, Version 1.0
*****************************************************************************/
2021-04-21 09:26:39 +00:00
#ifndef DIAGRAMSEGMENTSNODE_H
#define DIAGRAMSEGMENTSNODE_H
2021-04-16 07:48:43 +00:00
#include <QPolygonF>
#include <QSGFlatColorMaterial>
#include <QSGGeometryNode>
class IdlChartSegmentsNode : public QSGGeometryNode
{
public:
IdlChartSegmentsNode();
void update( const QRectF& rect, const QColor& color, const QVector< QVector<QPointF> >& dataPoints, int xGridLines );
2021-04-16 07:48:43 +00:00
private:
QSGFlatColorMaterial m_material;
QSGGeometry m_geometry;
QRectF m_rect;
QColor m_color;
QVector< QVector<QPointF> > m_dataPoints;
2021-04-16 07:48:43 +00:00
int m_xGridLines;
};
2021-04-21 09:26:39 +00:00
#endif