KChart
KChartPlotter.cpp
56 // The signal is connected to the superclass's slot at this point because the connection happened
58 disconnect( this, SIGNAL(attributesModelAboutToChange(KChart::AttributesModel*,KChart::AttributesModel*)),
60 connect( this, SIGNAL(attributesModelAboutToChange(KChart::AttributesModel*,KChart::AttributesModel*)),
105 connect( &d->plotterCompressor, SIGNAL(boundariesChanged()), this, SLOT(setDataBoundariesDirty()) );
251 d->attributesModel->mapFromSource( index ), KChart::LineAttributesRole ).value<LineAttributes>();
268void Plotter::setThreeDLineAttributes( const QModelIndex& index, const ThreeDLineAttributes& la )
271 d->attributesModel->setData( d->attributesModel->mapFromSource( index ), QVariant::fromValue( la ),
278 return d->attributesModel->data( KChart::ThreeDLineAttributesRole ).value<ThreeDLineAttributes>();
293 d->attributesModel->mapFromSource( index ), KChart::ThreeDLineAttributesRole ).value<ThreeDLineAttributes>();
306void Plotter::setValueTrackerAttributes( const QModelIndex & index, const ValueTrackerAttributes & va )
316 d->attributesModel->mapFromSource( index ), KChart::ValueTrackerAttributesRole ).value<ValueTrackerAttributes>();
394 CartesianCoordinatePlane *plane = dynamic_cast< CartesianCoordinatePlane* >( coordinatePlane() );
396 //Q_ASSERT( plane->translate( plane->translateBack( plane->visibleDiagramArea().topLeft() ) ) == plane->visibleDiagramArea().topLeft() );
399 const qreal radius = std::sqrt( ( range.x() + range.width() ) * ( range.y() + range.height() ) );
Base class for diagrams based on a cartesian coordianate system.
Definition KChartAbstractCartesianDiagram.h:28
bool compare(const AbstractCartesianDiagram *other) const
Returns true if both diagrams have the same settings.
Definition KChartAbstractCartesianDiagram.cpp:26
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane,...
Definition KChartAbstractCoordinatePlane.h:31
virtual AttributesModel * attributesModel() const
Returns the AttributesModel, that is used by this diagram.
Definition KChartAbstractDiagram.cpp:187
QModelIndex attributesModelRootIndex() const
Definition KChartAbstractDiagram.cpp:212
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
void propertiesChanged()
Emitted upon change of a property of the Diagram.
void attributesModelAboutToChange(KChart::AttributesModel *newModel, KChart::AttributesModel *oldModel)
This signal is emitted just before the new attributes model is connected internally.
void layoutChanged(KChart::AbstractDiagram *)
Diagrams are supposed to emit this signal, when the layout of one of their element changes.
AbstractCoordinatePlane * coordinatePlane() const
The coordinate plane associated with the diagram.
Definition KChartAbstractDiagram.cpp:96
int datasetDimension() const
The dataset dimension of a diagram determines how many value dimensions it expects each datapoint to ...
Definition KChartAbstractDiagram.cpp:1138
void boundariesChanged()
Emitted upon change of a data boundary.
static bool isBoundariesValid(const QRectF &r)
Checks whether both coordinates of r are valid according to isValueValid.
Definition KChartAbstractGrid.cpp:58
A proxy model used for decorating data with attributes.
Definition KChartAttributesModel.h:33
Cartesian coordinate plane.
Definition KChartCartesianCoordinatePlane.h:26
QRectF visibleDataRange() const
Returns the currently visible data range.
Definition KChartCartesianCoordinatePlane.cpp:845
Set of attributes for changing the appearance of line charts.
Definition KChartLineAttributes.h:21
Plotter defines a diagram type plotting two-dimensional data.
Definition KChartPlotter.h:25
void setThreeDLineAttributes(const ThreeDLineAttributes &la)
Sets the global 3D line attributes to la.
Definition KChartPlotter.cpp:254
bool compare(const Plotter *other) const
Returns true if both diagrams have the same settings.
Definition KChartPlotter.cpp:76
void setLineAttributes(const LineAttributes &la)
Sets the global line attributes to la.
Definition KChartPlotter.cpp:203
void resize(const QSizeF &area) override
Called by the widget's sizeEvent.
Definition KChartPlotter.cpp:370
virtual Plotter * clone() const
Creates an exact copy of this diagram.
Definition KChartPlotter.cpp:69
ThreeDLineAttributes threeDLineAttributes() const
Definition KChartPlotter.cpp:276
void paint(PaintContext *paintContext) override
Draw the diagram contents to the rectangle and painter, that are passed in as part of the paint conte...
Definition KChartPlotter.cpp:346
void resetLineAttributes(int column)
Resets the line attributes of data set column.
Definition KChartPlotter.cpp:215
LineAttributes lineAttributes() const
Definition KChartPlotter.cpp:235
const QPair< QPointF, QPointF > calculateDataBoundaries() const override
\reimpl
Definition KChartPlotter.cpp:323
qreal threeDItemDepth(const QModelIndex &index) const override
Definition KChartPlotter.cpp:296
ValueTrackerAttributes valueTrackerAttributes(const QModelIndex &index) const
Returns the value tracker attributes of the model index index.
Definition KChartPlotter.cpp:313
void setValueTrackerAttributes(const QModelIndex &index, const ValueTrackerAttributes &va)
Sets the value tracker attributes of the model index index to va.
Definition KChartPlotter.cpp:306
Cell-specific attributes regarding value tracking.
Definition KChartValueTrackerAttributes.h:29
void init(KXmlGuiWindow *window, KGameDifficulty *difficulty=nullptr)
KGuiItem test()
QAbstractItemModel * model() const const
QModelIndex rootIndex() const const
QWidget * viewport() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
qreal height() const const
qreal width() const const
qreal x() const const
qreal y() const const
QVariant fromValue(T &&value)
bool isValid() const const
T value() const const
height
size
width
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:54:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:54:32 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.