KChart
KChartAbstractDiagram.cpp
143 disconnect( selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SIGNAL(modelsChanged()) );
144 disconnect( selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SIGNAL(modelsChanged()) );
149 connect( selectionModel(), SIGNAL(currentChanged(QModelIndex,QModelIndex)), this, SIGNAL(modelsChanged()) );
150 connect( selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)), this, SIGNAL(modelsChanged()) );
194 Q_ASSERT( !index.isValid() || index.model() == attributesModel() || index.model() == attributesModel()->sourceModel() );
308 return attributesModel()->modelData( KChart::DataValueLabelAttributesRole ).value< DataValueAttributes >();
459 if ((ma.markerStyle() == MarkerAttributes::Marker4Pixels) || (ma.markerStyle() == MarkerAttributes::Marker1Pixel)) {
900 attributesModel()->data( conditionallyMapFromSource( index ), DatasetBrushRole ).value< QBrush >();
909void AbstractDiagram::setUnitPrefix( const QString& prefix, int column, Qt::Orientation orientation )
930void AbstractDiagram::setUnitSuffix( const QString& suffix, int column, Qt::Orientation orientation )
949 * @param fallback if true, the global prefix is return when no specific one is set for that value
952QString AbstractDiagram::unitPrefix( int column, Qt::Orientation orientation, bool fallback ) const
972 * @param fallback if true, the global suffix is return when no specific one is set for that value
975QString AbstractDiagram::unitSuffix( int column, Qt::Orientation orientation, bool fallback ) const
1014void AbstractDiagram::setSelection(const QRect& rect , QItemSelectionModel::SelectionFlags command )
1062 //qDebug() << "AbstractDiagram::itemRowLabels(): " << attributesModel()->rowCount(attributesModelRootIndex()) << "entries";
Declaring the class KChart::DataValueAttributes.
Base class common for all coordinate planes, CartesianCoordinatePlane, PolarCoordinatePlane,...
Definition KChartAbstractCoordinatePlane.h:31
AbstractDiagram defines the interface for diagram classes.
Definition KChartAbstractDiagram.h:37
void setModel(QAbstractItemModel *model) override
Associate a model with the diagram.
Definition KChartAbstractDiagram.cpp:122
void setDataValueAttributes(const QModelIndex &index, const DataValueAttributes &a)
Set the DataValueAttributes for the given index.
Definition KChartAbstractDiagram.cpp:291
virtual void paintDataValueTexts(QPainter *painter)
Definition KChartAbstractDiagram.cpp:390
virtual AttributesModel * attributesModel() const
Returns the AttributesModel, that is used by this diagram.
Definition KChartAbstractDiagram.cpp:187
bool compare(const AbstractDiagram *other) const
Returns true if both diagrams have the same settings.
Definition KChartAbstractDiagram.cpp:54
void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command) override
\reimpl
Definition KChartAbstractDiagram.cpp:1014
void modelsChanged()
This signal is emitted when either the model or the AttributesModel is replaced.
void setUnitPrefix(const QString &prefix, int column, Qt::Orientation orientation)
Set the unit prefix to be used on axes for one specific column.
Definition KChartAbstractDiagram.cpp:909
void setPen(const QModelIndex &index, const QPen &pen)
Set the pen to be used, for painting the datapoint at the given index.
Definition KChartAbstractDiagram.cpp:822
void aboutToBeDestroyed()
This signal is emitted when this diagram is being destroyed, but before all the data,...
virtual void resize(const QSizeF &area)
Called by the widget's sizeEvent.
Definition KChartAbstractDiagram.cpp:116
QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override
\reimpl
Definition KChartAbstractDiagram.cpp:1002
DataValueAttributes dataValueAttributes() const
Retrieve the DataValueAttributes specified globally.
Definition KChartAbstractDiagram.cpp:306
void setAntiAliasing(bool enabled)
Set whether anti-aliasing is to be used while rendering this diagram.
Definition KChartAbstractDiagram.cpp:358
QStringList datasetLabels() const
The set of dataset labels currently displayed, for use in legends, etc.
Definition KChartAbstractDiagram.cpp:1074
QRect visualRect(const QModelIndex &index) const override
\reimpl
Definition KChartAbstractDiagram.cpp:992
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 scrollTo(const QModelIndex &index, ScrollHint hint=EnsureVisible) override
\reimpl
Definition KChartAbstractDiagram.cpp:997
QPen pen() const
Retrieve the pen to be used for painting datapoints globally.
Definition KChartAbstractDiagram.cpp:843
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles=QVector< int >()) override
\reimpl
Definition KChartAbstractDiagram.cpp:233
void layoutChanged(KChart::AbstractDiagram *)
Diagrams are supposed to emit this signal, when the layout of one of their element changes.
QList< QBrush > datasetBrushes() const
The set of dataset brushes currently used, for use in legends, etc.
Definition KChartAbstractDiagram.cpp:1087
virtual void setAttributesModel(AttributesModel *model)
Associate an AttributesModel with this diagram.
Definition KChartAbstractDiagram.cpp:162
qreal valueForCell(int row, int column) const
Helper method, retrieving the data value (DisplayRole) for a given row and column.
Definition KChartAbstractDiagram.cpp:1162
QString unitPrefix(int column, Qt::Orientation orientation, bool fallback=false) const
Retrieves the axis unit prefix for a specific column.
Definition KChartAbstractDiagram.cpp:952
bool allowOverlappingDataValueTexts() const
Definition KChartAbstractDiagram.cpp:353
AbstractCoordinatePlane * coordinatePlane() const
The coordinate plane associated with the diagram.
Definition KChartAbstractDiagram.cpp:96
void setHidden(const QModelIndex &index, bool hidden)
Hide (or unhide, resp.) a data cell.
Definition KChartAbstractDiagram.cpp:245
void useDefaultColors()
Set the palette to be used, for painting datasets to the default palette.
Definition KChartAbstractDiagram.cpp:1043
bool isIndexHidden(const QModelIndex &index) const override
\reimpl
Definition KChartAbstractDiagram.cpp:1011
QList< QPen > datasetPens() const
The set of dataset pens currently used, for use in legends, etc.
Definition KChartAbstractDiagram.cpp:1100
void setUnitSuffix(const QString &suffix, int column, Qt::Orientation orientation)
Set the unit prefix to be used on axes for one specific column.
Definition KChartAbstractDiagram.cpp:930
void setBrush(const QModelIndex &index, const QBrush &brush)
Set the brush to be used, for painting the datapoint at the given index.
Definition KChartAbstractDiagram.cpp:863
void setPercentMode(bool percent)
Deprecated method that turns the percent mode of this diagram on or off.
Definition KChartAbstractDiagram.cpp:369
void setAllowOverlappingDataValueTexts(bool allow)
Set whether data value labels are allowed to overlap.
Definition KChartAbstractDiagram.cpp:344
QStringList itemRowLabels() const
The set of item row labels currently displayed, for use in Abscissa axes, etc.
Definition KChartAbstractDiagram.cpp:1058
bool percentMode() const
Returns whether this diagram is drawn in percent mode.
Definition KChartAbstractDiagram.cpp:375
void setSelectionModel(QItemSelectionModel *selectionModel) override
Associate a seleection model with the diagrom.
Definition KChartAbstractDiagram.cpp:139
void setDatasetDimension(int dimension)
Definition KChartAbstractDiagram.cpp:1143
virtual bool usesExternalAttributesModel() const
Returns whether the diagram is using its own built-in attributes model or an attributes model that wa...
Definition KChartAbstractDiagram.cpp:182
QBrush brush() const
Retrieve the brush to be used for painting datapoints globally.
Definition KChartAbstractDiagram.cpp:884
int datasetDimension() const
The dataset dimension of a diagram determines how many value dimensions it expects each datapoint to ...
Definition KChartAbstractDiagram.cpp:1138
virtual void setCoordinatePlane(AbstractCoordinatePlane *plane)
Set the coordinate plane associated with the diagram.
Definition KChartAbstractDiagram.cpp:219
QModelIndex indexAt(const QPoint &point) const override
\reimpl
Definition KChartAbstractDiagram.cpp:1179
bool antiAliasing() const
Definition KChartAbstractDiagram.cpp:364
void dataHidden()
This signal is emitted, when the hidden status of at least one data cell was (un)set.
QModelIndexList indexesAt(const QPoint &point) const
This method is added alongside with indexAt from QAIM, since in KChart multiple indexes can be displa...
Definition KChartAbstractDiagram.cpp:1184
void setRootIndex(const QModelIndex &idx) override
Set the root index in the model, where the diagram starts referencing data for display.
Definition KChartAbstractDiagram.cpp:199
void useSubduedColors()
Set the palette to be used, for painting datasets to the subdued palette.
Definition KChartAbstractDiagram.cpp:1048
virtual void paintMarkers(QPainter *painter)
Definition KChartAbstractDiagram.cpp:796
QList< MarkerAttributes > datasetMarkers() const
The set of dataset markers currently used, for use in legends, etc.
Definition KChartAbstractDiagram.cpp:1113
QString unitSuffix(int column, Qt::Orientation orientation, bool fallback=false) const
Retrieves the axis unit suffix for a specific column.
Definition KChartAbstractDiagram.cpp:975
bool isHidden() const
Retrieve the hidden status specified globally.
Definition KChartAbstractDiagram.cpp:266
void setAttributesModelRootIndex(const QModelIndex &)
Definition KChartAbstractDiagram.cpp:205
void useRainbowColors()
Set the palette to be used, for painting datasets to the rainbow palette.
Definition KChartAbstractDiagram.cpp:1053
QRegion visualRegionForSelection(const QItemSelection &selection) const override
\reimpl
Definition KChartAbstractDiagram.cpp:1025
QModelIndex mapFromSource(const QModelIndex &sourceIndex) const override
Definition KChartAbstractProxyModel.cpp:39
A proxy model used for decorating data with attributes.
Definition KChartAttributesModel.h:33
QVariant data(int role) const
Returns the data that were specified at global level, or the default data, or QVariant().
Definition KChartAttributesModel.cpp:284
void initFrom(const AttributesModel *other)
Copies the internal data (maps and palette) of another AttributesModel* into this one.
Definition KChartAttributesModel.cpp:77
bool compare(const AttributesModel *other) const
Returns true if both, all of the attributes set, and the palette set is equal in both of the Attribut...
Definition KChartAttributesModel.cpp:108
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::DisplayRole) override
\reimpl
Definition KChartAttributesModel.cpp:382
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
\reimpl
Definition KChartAttributesModel.cpp:232
Diagram attributes dealing with data value labels.
Definition KChartDataValueAttributes.h:42
bool isVisible() const
Definition KChartDataValueAttributes.cpp:148
MarkerAttributes markerAttributes() const
Definition KChartDataValueAttributes.cpp:188
void setShowOverlappingDataLabels(bool showOverlappingDataLabels)
Set whether data value texts overlapping other data value texts of the same diagram should be drawn.
Definition KChartDataValueAttributes.cpp:268
A set of attributes controlling the appearance of data set markers.
Definition KChartMarkerAttributes.h:30
@ RelativeToDiagramWidthHeightMin
the marker size is relative to the diagram's min(width, height)
Definition KChartMarkerAttributes.h:68
@ AbsoluteSizeScaled
the marker size is specified in pixels, but scaled by the painter's zoom level
Definition KChartMarkerAttributes.h:66
Internally used class just adding a special constructor used by AbstractDiagram.
Definition KChartAbstractDiagram.h:720
QString path(const QString &relativePath)
QCA_EXPORT void init()
virtual int columnCount(const QModelIndex &parent) const const=0
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual int rowCount(const QModelIndex &parent) const const=0
CursorAction
ScrollHint
alternatingRowColors
bool hasAutoScroll() const const
virtual void currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
dragDropMode
dragDropOverwriteMode
dragEnabled
editTriggers
horizontalScrollMode
iconSize
QAbstractItemModel * model() const const
QModelIndex rootIndex() const const
void scheduleDelayedItemsLayout()
selectionBehavior
virtual void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
selectionMode
QItemSelectionModel * selectionModel() const const
virtual void setModel(QAbstractItemModel *model)
virtual void setRootIndex(const QModelIndex &index)
virtual void setSelectionModel(QItemSelectionModel *selectionModel)
showDropIndicator
textElideMode
verticalScrollMode
sourceModel
horizontalScrollBarPolicy
verticalScrollBarPolicy
const QColor & color() const const
QTransform transform() const const
QColor darker(int factor) const const
bool isValid() const const
QColor lighter(int factor) const const
frameShadow
frameShape
lineWidth
midLineWidth
ObjectBoundingMode
void setColorAt(qreal position, const QColor &color)
void setCoordinateMode(CoordinateMode mode)
QModelIndexList indexes() const const
SelectionFlags
virtual void select(const QItemSelection &selection, QItemSelectionModel::SelectionFlags command)
void append(QList< T > &&value)
bool isEmpty() const const
void reserve(qsizetype size)
int column() const const
QVariant data(int role) const const
bool isValid() const const
const QAbstractItemModel * model() const const
int row() const const
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
QObject * parent() const const
T qobject_cast(QObject *object)
Antialiasing
void drawEllipse(const QPoint ¢er, int rx, int ry)
void drawLine(const QLine &line)
void drawPath(const QPainterPath &path)
void drawPoint(const QPoint &position)
void drawPolygon(const QPoint *points, int pointCount, Qt::FillRule fillRule)
void drawRect(const QRect &rectangle)
const QPen & pen() const const
void scale(qreal sx, qreal sy)
void setBrush(Qt::BrushStyle style)
void setPen(Qt::PenStyle style)
void setRenderHint(RenderHint hint, bool on)
const QTransform & transform() const const
void translate(const QPoint &offset)
void lineTo(const QPointF &endPoint)
void moveTo(const QPointF &point)
QPainterPath createStroke(const QPainterPath &path) const const
void setCapStyle(Qt::PenCapStyle style)
void setWidth(qreal width)
Qt::PenCapStyle capStyle() const const
qreal widthF() const const
QPolygon toPolygon() const const
void setCenter(const QPointF ¢er)
void setFocalPoint(const QPointF &focalPoint)
void setRadius(qreal radius)
qreal height() const const
void moveCenter(const QPointF &position)
qreal width() const const
qreal height() const const
qreal & rheight()
qreal & rwidth()
qreal width() const const
NoBrush
DisplayRole
typedef KeyboardModifiers
Orientation
QTextStream & left(QTextStream &stream)
QTextStream & right(QTextStream &stream)
qreal m11() const const
qreal m22() const const
QVariant fromValue(T &&value)
bool isValid() const const
qreal toReal(bool *ok) const const
QString toString() const const
T value() const const
enabled
pos
rect
size
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.