KChart
KChartRadarGrid.cpp
36static qreal fitFontSizeToGeometry( const QString& text, const QFont& font, const QRectF& geometry, const TextAttributes& ta )
62QPointF scaleToRealPosition( const QPointF& origin, const QRectF& sourceRect, const QRectF& destRect, const AbstractCoordinatePlane& plane )
86 RadarCoordinatePlane* plane = dynamic_cast< RadarCoordinatePlane* >( context->coordinatePlane() );
131 const qreal labelFontSize = fitFontSizeToGeometry( QString::fromLatin1( "TestXYWQgqy" ), ta.font(), fontRect, ta );
147 const QLineF startLine( origin, scaleToRealPosition( QPointF( r - qAbs( min ), 0 ), context->rectangle(), destRect, *plane ) );
150 const QLineF currentLine( origin, scaleToRealPosition( QPointF( r - qAbs( min ), i ), context->rectangle(), destRect, *plane ) );
156 context->painter()->drawText( currentLine.pointAt( 1 ) + QPointF( -xOffset, labelHeight + qAbs( min ) ) , data );
158 context->painter()->drawText( currentLine.pointAt( 1 ) - QPointF( xOffset, labelHeight + qAbs( min ) ) , data );
160 context->painter()->drawText( currentLine.pointAt( 1 ) - QPointF( xOffset * 2 + qAbs( min ) + aWidth, -labelHeight/ 2.0 + qAbs( min ) ) , data );
162 context->painter()->drawText( currentLine.pointAt( 1 ) + QPointF( qAbs( min ) + aWidth, labelHeight/ 2.0 + qAbs( min ) ) , data );
171 QPointF oldPoint( scaleToRealPosition( QPointF( j * step - qAbs( min ), numberOfSpokes - 1 ), context->rectangle(), destRect, *plane ) );
173 const QPointF newPoint = scaleToRealPosition( QPointF( j * step - qAbs( min ), i ), context->rectangle(), destRect, *plane );
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane,...
Definition KChartAbstractCoordinatePlane.h:31
virtual const QPointF translate(const QPointF &diagramPoint) const =0
Translate the given point in value space coordinates to a position in pixel space.
AbstractDiagramList diagrams()
Definition KChartAbstractCoordinatePlane.cpp:124
AbstractDiagram * diagram()
Definition KChartAbstractCoordinatePlane.cpp:114
GridAttributes globalGridAttributes() const
Definition KChartAbstractCoordinatePlane.cpp:147
const QPair< QPointF, QPointF > dataBoundaries() const
Return the bottom left and top right data point, that the diagram will display (unless the grid adjus...
Definition KChartAbstractDiagram.cpp:101
Base class for diagrams based on a polar coordinate system.
Definition KChartAbstractPolarDiagram.h:23
A set of attributes controlling the appearance of grids.
Definition KChartGridAttributes.h:26
const GridAttributes gridAttributes(bool circular) const
Definition KChartPolarCoordinatePlane.cpp:323
const QPointF translate(const QPointF &diagramPoint) const override
Translate the given point in value space coordinates to a position in pixel space.
Definition KChartPolarCoordinatePlane.cpp:180
void setTextAttributes(const TextAttributes &attr)
Set the attributes to be used for axis captions.
Definition KChartRadarCoordinatePlane.cpp:25
const TextAttributes textAttributes() const
Definition KChartRadarCoordinatePlane.cpp:30
void drawGrid(PaintContext *context) override
Doing the actual drawing.
Definition KChartRadarGrid.cpp:82
void setFontSize(const Measure &measure)
Set the size of the font used for rendering text.
Definition KChartTextAttributes.cpp:126
void setFont(const QFont &font)
Set the font to be used for rendering the text.
Definition KChartTextAttributes.cpp:114
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const const
virtual int rowCount(const QModelIndex &parent) const const=0
QAbstractItemModel * model() const const
qreal pointSizeF() const const
void setPointSizeF(qreal pointSize)
QRect boundingRect(QChar ch) const const
int height() const const
QRectF boundingRect(QChar ch) const const
qreal height() const const
qreal angleTo(const QLineF &line) const const
QPointF pointAt(qreal t) const const
T & first()
const QBrush & brush() const const
void drawLine(const QLine &line)
void drawText(const QPoint &position, const QString &text)
void setBrush(Qt::BrushStyle style)
void setFont(const QFont &font)
void setPen(Qt::PenStyle style)
void setX(qreal x)
void setY(qreal y)
qreal x() const const
qreal y() const const
int width() const const
qreal height() const const
QRectF normalized() const const
void setHeight(qreal height)
void setSize(const QSizeF &size)
void setY(qreal y)
QSizeF size() const const
QPointF topLeft() const const
qreal width() const const
qreal y() const const
qreal height() const const
bool isNull() const const
qreal width() const const
QString fromLatin1(QByteArrayView str)
QString number(double n, char format, int precision)
lightGray
Vertical
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.