KChart
KChartLegend.h
281 * Actually that's exactly the code KChart is using as default position for any floating legends,
AbstractDiagram defines the interface for diagram classes.
Definition KChartAbstractDiagram.h:37
Legend defines the interface for the legend drawing class.
Definition KChartLegend.h:42
const RelativePosition floatingPosition() const
Returns the position of a floating legend.
Definition KChartLegend.cpp:522
Qt::Alignment textAlignment() const
Returns the alignment used while rendering text elements within the legend.
Definition KChartLegend.cpp:494
bool compare(const Legend *other) const
Returns true if both legends have the same settings.
Definition KChartLegend.cpp:197
void replaceDiagram(KChart::AbstractDiagram *newDiagram, KChart::AbstractDiagram *oldDiagram=nullptr)
Replaces the old diagram, or appends the new diagram, it there is none yet.
Definition KChartLegend.cpp:390
void resetTexts()
Removes all legend texts that might have been set by setText.
Definition KChartLegend.cpp:584
virtual void paint(QPainter *painter) override
Overwrite this to paint the inner contents of your widget.
Definition KChartLegend.cpp:227
void setHiddenDatasets(const QList< uint > hiddenDatasets)
Sets a list of datasets that are to be hidden in the legend.
Definition KChartLegend.cpp:1243
DiagramList diagrams() const
The list of all diagrams associated with the legend.
Definition KChartLegend.cpp:307
void setMarkerAttributes(uint dataset, const MarkerAttributes &)
Note that any sizes specified via setMarkerAttributes are ignored, unless you disable the automatic s...
Definition KChartLegend.cpp:691
void forceRebuild() override
Call this to trigger an unconditional re-building of the widget's internals.
Definition KChartLegend.cpp:760
void setPosition(Position position)
Specify the position of a non-floating legend.
Definition KChartLegend.cpp:450
Qt::Alignment legendSymbolAlignment() const
Returns the alignment used while drawing legend symbol(alignment of Legend::LinesOnly) within the leg...
Definition KChartLegend.cpp:508
void needSizeHint() override
Call this to trigger an conditional re-building of the widget's internals.
Definition KChartLegend.cpp:141
void setUseAutomaticMarkerSize(bool useAutomaticMarkerSize)
This option is on by default, it means that Marker sizes in the Legend will be the same as the font h...
Definition KChartLegend.cpp:572
void setColor(uint dataset, const QColor &color)
Note: there is no color() getter method, since setColor just sets a QBrush with the respective color,...
Definition KChartLegend.cpp:616
void setDiagram(KChart::AbstractDiagram *newDiagram)
A convenience method doing the same as replaceDiagram( newDiagram, 0 );.
Definition KChartLegend.cpp:426
void setLegendSymbolAlignment(Qt::Alignment)
Specify the alignment of the legend symbol( alignment of Legend::LinesOnly) within the legend.
Definition KChartLegend.cpp:499
void propertiesChanged()
Emitted upon change of a property of the Legend or any of its components.
void removeDiagrams()
Removes all diagrams from the legend's list of diagrams.
Definition KChartLegend.cpp:377
void addDiagram(KChart::AbstractDiagram *newDiagram)
Add the given diagram to the legend.
Definition KChartLegend.cpp:325
Qt::Alignment alignment() const
Returns the alignment of a non-floating legend.
Definition KChartLegend.cpp:480
void setReferenceArea(const QWidget *area)
Specifies the reference area for font size of title text, and for font size of the item texts,...
Definition KChartLegend.cpp:284
const QWidget * referenceArea() const
Returns the reference area, that is used for font size of title text, and for font size of the item t...
Definition KChartLegend.cpp:293
uint dataSetOffset(KChart::AbstractDiagram *diagram)
Returns the offset of the first dataset of diagram.
Definition KChartLegend.cpp:408
void setTextAlignment(Qt::Alignment)
Specify the alignment of the text elements within the legend.
Definition KChartLegend.cpp:485
KChart::AbstractDiagram * diagram() const
The first diagram of the legend or 0 if there was none added to the legend.
Definition KChartLegend.cpp:299
void removeDiagram(KChart::AbstractDiagram *oldDiagram)
Removes the diagram from the legend's list of diagrams.
Definition KChartLegend.cpp:349
Position position() const
Returns the position of a non-floating legend.
Definition KChartLegend.cpp:466
void setAlignment(Qt::Alignment)
Specify the alignment of a non-floating legend.
Definition KChartLegend.cpp:471
void setFloatingPosition(const RelativePosition &relativePosition)
Definition KChartLegend.cpp:513
A set of attributes controlling the appearance of data set markers.
Definition KChartMarkerAttributes.h:30
Defines relative position information: reference area, position in this area (reference position),...
Definition KChartRelativePosition.h:44
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
typedef Alignment
Orientation
SortOrder
QWidget(QWidget *parent, Qt::WindowFlags f)
virtual bool event(QEvent *event) override
rect
size
QStyle * style() const const
visible
width
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:24 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.