rename some classes
This commit is contained in:
parent
a3e32778b9
commit
49cbf87d78
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue