KChart
20 #ifndef KCHARTLEGEND_H 21 #define KCHARTLEGEND_H 23 #include "KChartAbstractAreaWidget.h" 24 #include "KChartPosition.h" 25 #include "KChartMarkerAttributes.h" 31 class AbstractDiagram;
57 KCHART_DECLARE_PRIVATE_DERIVED_QWIDGET(
Legend )
65 enum LegendStyle { MarkersOnly = 0,
67 MarkersAndLines = 2 };
70 void setLegendStyle( LegendStyle style );
71 LegendStyle legendStyle()
const;
78 virtual Legend * clone()
const;
83 bool compare(
const Legend* other )
const;
87 virtual void paint(
QPainter* painter )
override;
89 void setVisible(
bool visible )
override;
106 void setReferenceArea(
const QWidget* area );
114 const QWidget* referenceArea()
const;
130 DiagramList diagrams()
const;
135 ConstDiagramList constDiagrams()
const;
157 void removeDiagrams();
200 void setPosition(
Position position );
313 void setShowLines(
bool legendShowLines );
314 bool showLines()
const;
323 void setText( uint dataset,
const QString& text );
324 QString text( uint dataset )
const;
334 void setHiddenDatasets(
const QList<uint> hiddenDatasets );
336 void setDatasetHidden( uint dataset,
bool hidden );
337 bool datasetIsHidden( uint dataset )
const;
339 uint datasetCount()
const;
341 void setDefaultColors();
342 void setRainbowColors();
343 void setSubduedColors(
bool ordered =
false );
352 void setColor( uint dataset,
const QColor& color );
354 void setBrush( uint dataset,
const QBrush& brush );
355 QBrush brush( uint dataset )
const;
358 void setPen( uint dataset,
const QPen& pen );
359 QPen pen( uint dataset )
const;
378 void setUseAutomaticMarkerSize(
bool useAutomaticMarkerSize );
379 bool useAutomaticMarkerSize()
const;
384 void setTitleText(
const QString& text );
390 void setSpacing( uint space );
391 uint spacing()
const;
394 void forceRebuild()
override;
396 QSize minimumSizeHint()
const override;
397 QSize sizeHint()
const override;
398 bool hasHeightForWidth()
const override;
399 int heightForWidth(
int width )
const override;
400 void needSizeHint()
override;
401 void resizeLayout(
const QSize& size )
override;
404 void destroyedLegend(
Legend* );
406 void propertiesChanged();
409 void emitPositionChanged();
411 void activateTheLayout();
412 void setNeedRebuild();
419 #endif // KCHARTLEGEND_H
Defines relative position information: reference area, position in this area (reference position)...
Legend defines the interface for the legend drawing class.
AbstractDiagram defines the interface for diagram classes.
A set of attributes controlling the appearance of data set markers.
Defines a position, using compass terminology.
A set of text attributes.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Mar 2 2021 23:33:13 by
doxygen 1.8.11 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.