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 )
|
if( node == nullptr )
|
||||||
{
|
{
|
||||||
node = new IdlChartNode; // ### rename
|
node = new DiagramDataNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
using Q = Diagram;
|
using Q = Diagram;
|
||||||
|
@ -121,19 +121,19 @@ QSGNode* DiagramSkinlet::updateChartNode( const Diagram* diagram, QSGNode* node
|
||||||
{
|
{
|
||||||
if( diagram->typesAt( i ) & types.at( j ) )
|
if( diagram->typesAt( i ) & types.at( j ) )
|
||||||
{
|
{
|
||||||
IdlChartNode* dataPointNode;
|
DiagramDataNode* dataPointNode;
|
||||||
|
|
||||||
if( chartNode->childCount() > nodeIndex )
|
if( chartNode->childCount() > nodeIndex )
|
||||||
{
|
{
|
||||||
dataPointNode = static_cast<IdlChartNode*>( chartNode->childAtIndex( nodeIndex ) );
|
dataPointNode = static_cast<DiagramDataNode*>( chartNode->childAtIndex( nodeIndex ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dataPointNode = new IdlChartNode;
|
dataPointNode = new DiagramDataNode;
|
||||||
chartNode->appendChildNode( dataPointNode );
|
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 )
|
const QColor color = ( types.at( j ) == Diagram::Line ) ? diagram->color( lineSubcontrol )
|
||||||
: diagram->color( areaSubcontrol );
|
: diagram->color( areaSubcontrol );
|
||||||
|
|
||||||
|
@ -162,11 +162,11 @@ QSGNode* DiagramSkinlet::updateSeparatorNode( const Diagram* diagram, QSGNode* n
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto* separatorNode = static_cast<IdlChartSegmentsNode*>( node );
|
auto* separatorNode = static_cast<DiagramSegmentsNode*>( node );
|
||||||
|
|
||||||
if( separatorNode == nullptr )
|
if( separatorNode == nullptr )
|
||||||
{
|
{
|
||||||
separatorNode = new IdlChartSegmentsNode;
|
separatorNode = new DiagramSegmentsNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
using Q = Diagram;
|
using Q = Diagram;
|
||||||
|
|
|
@ -7,14 +7,14 @@
|
||||||
#include <QTransform>
|
#include <QTransform>
|
||||||
#include <QskFunctions.h>
|
#include <QskFunctions.h>
|
||||||
|
|
||||||
IdlChartNode::IdlChartNode()
|
DiagramDataNode::DiagramDataNode()
|
||||||
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
|
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
|
||||||
{
|
{
|
||||||
setGeometry( &m_geometry );
|
setGeometry( &m_geometry );
|
||||||
setMaterial( &m_material );
|
setMaterial( &m_material );
|
||||||
}
|
}
|
||||||
|
|
||||||
void IdlChartNode::update( const QRectF& rect, Type type, const QColor& color, const QVector<QPointF>& dataPoints,
|
void DiagramDataNode::update( const QRectF& rect, Type type, const QColor& color, const QVector<QPointF>& dataPoints,
|
||||||
const qreal yMax, Qsk::Position position, int lineWidth )
|
const qreal yMax, Qsk::Position position, int lineWidth )
|
||||||
{
|
{
|
||||||
Q_UNUSED( rect );
|
Q_UNUSED( rect );
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <QSGFlatColorMaterial>
|
#include <QSGFlatColorMaterial>
|
||||||
#include <QSGGeometryNode>
|
#include <QSGGeometryNode>
|
||||||
|
|
||||||
class IdlChartNode : public QSGGeometryNode
|
class DiagramDataNode : public QSGGeometryNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum Type
|
enum Type
|
||||||
|
@ -21,7 +21,7 @@ class IdlChartNode : public QSGGeometryNode
|
||||||
Area,
|
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 );
|
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>
|
#include <QtMath>
|
||||||
|
|
||||||
IdlChartSegmentsNode::IdlChartSegmentsNode()
|
DiagramSegmentsNode::DiagramSegmentsNode()
|
||||||
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
|
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
|
||||||
{
|
{
|
||||||
m_geometry.setDrawingMode( GL_LINES );
|
m_geometry.setDrawingMode( GL_LINES );
|
||||||
|
@ -16,7 +16,7 @@ IdlChartSegmentsNode::IdlChartSegmentsNode()
|
||||||
setMaterial( &m_material );
|
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 );
|
Q_UNUSED( rect );
|
||||||
|
|
||||||
|
|
|
@ -10,10 +10,10 @@
|
||||||
#include <QSGFlatColorMaterial>
|
#include <QSGFlatColorMaterial>
|
||||||
#include <QSGGeometryNode>
|
#include <QSGGeometryNode>
|
||||||
|
|
||||||
class IdlChartSegmentsNode : public QSGGeometryNode
|
class DiagramSegmentsNode : public QSGGeometryNode
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IdlChartSegmentsNode();
|
DiagramSegmentsNode();
|
||||||
|
|
||||||
void update( const QRectF& rect, const QColor& color, const QVector< QVector<QPointF> >& dataPoints, int xGridLines );
|
void update( const QRectF& rect, const QColor& color, const QVector< QVector<QPointF> >& dataPoints, int xGridLines );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue