rename some classes

This commit is contained in:
Peter Hartmann 2021-04-21 12:06:17 +02:00
parent a3e32778b9
commit 49cbf87d78
5 changed files with 16 additions and 16 deletions

View File

@ -88,7 +88,7 @@ QSGNode* DiagramSkinlet::updateChartNode( const Diagram* diagram, QSGNode* node
{
if( node == nullptr )
{
node = new IdlChartNode; // ### rename
node = new DiagramDataNode;
}
using Q = Diagram;
@ -121,19 +121,19 @@ QSGNode* DiagramSkinlet::updateChartNode( const Diagram* diagram, QSGNode* node
{
if( diagram->typesAt( i ) & types.at( j ) )
{
IdlChartNode* dataPointNode;
DiagramDataNode* dataPointNode;
if( chartNode->childCount() > nodeIndex )
{
dataPointNode = static_cast<IdlChartNode*>( chartNode->childAtIndex( nodeIndex ) );
dataPointNode = static_cast<DiagramDataNode*>( chartNode->childAtIndex( nodeIndex ) );
}
else
{
dataPointNode = new IdlChartNode;
dataPointNode = new DiagramDataNode;
chartNode->appendChildNode( dataPointNode );
}
const IdlChartNode::Type nodeType = ( types.at( j ) == Diagram::Line ) ? IdlChartNode::Line : IdlChartNode::Area;
const DiagramDataNode::Type nodeType = ( types.at( j ) == Diagram::Line ) ? DiagramDataNode::Line : DiagramDataNode::Area;
const QColor color = ( types.at( j ) == Diagram::Line ) ? diagram->color( lineSubcontrol )
: diagram->color( areaSubcontrol );
@ -162,11 +162,11 @@ QSGNode* DiagramSkinlet::updateSeparatorNode( const Diagram* diagram, QSGNode* n
return nullptr;
}
auto* separatorNode = static_cast<IdlChartSegmentsNode*>( node );
auto* separatorNode = static_cast<DiagramSegmentsNode*>( node );
if( separatorNode == nullptr )
{
separatorNode = new IdlChartSegmentsNode;
separatorNode = new DiagramSegmentsNode;
}
using Q = Diagram;

View File

@ -7,15 +7,15 @@
#include <QTransform>
#include <QskFunctions.h>
IdlChartNode::IdlChartNode()
DiagramDataNode::DiagramDataNode()
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
{
setGeometry( &m_geometry );
setMaterial( &m_material );
}
void IdlChartNode::update( const QRectF& rect, Type type, const QColor& color, const QVector<QPointF>& dataPoints,
const qreal yMax, Qsk::Position position, int lineWidth )
void DiagramDataNode::update( const QRectF& rect, Type type, const QColor& color, const QVector<QPointF>& dataPoints,
const qreal yMax, Qsk::Position position, int lineWidth )
{
Q_UNUSED( rect );

View File

@ -12,7 +12,7 @@
#include <QSGFlatColorMaterial>
#include <QSGGeometryNode>
class IdlChartNode : public QSGGeometryNode
class DiagramDataNode : public QSGGeometryNode
{
public:
enum Type
@ -21,7 +21,7 @@ class IdlChartNode : public QSGGeometryNode
Area,
};
IdlChartNode();
DiagramDataNode();
void update( const QRectF& rect, Type type, const QColor& color, const QVector<QPointF>& dataPoints, const qreal yMax, Qsk::Position position, int lineWidth );

View File

@ -7,7 +7,7 @@
#include <QtMath>
IdlChartSegmentsNode::IdlChartSegmentsNode()
DiagramSegmentsNode::DiagramSegmentsNode()
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
{
m_geometry.setDrawingMode( GL_LINES );
@ -16,7 +16,7 @@ IdlChartSegmentsNode::IdlChartSegmentsNode()
setMaterial( &m_material );
}
void IdlChartSegmentsNode::update( const QRectF& rect, const QColor& color, const QVector<QVector<QPointF> >& dataPoints, int xGridLines )
void DiagramSegmentsNode::update( const QRectF& rect, const QColor& color, const QVector<QVector<QPointF> >& dataPoints, int xGridLines )
{
Q_UNUSED( rect );

View File

@ -10,10 +10,10 @@
#include <QSGFlatColorMaterial>
#include <QSGGeometryNode>
class IdlChartSegmentsNode : public QSGGeometryNode
class DiagramSegmentsNode : public QSGGeometryNode
{
public:
IdlChartSegmentsNode();
DiagramSegmentsNode();
void update( const QRectF& rect, const QColor& color, const QVector< QVector<QPointF> >& dataPoints, int xGridLines );