KChart
10 #define KCHARTLEGEND_H
12 #include "KChartAbstractAreaWidget.h"
13 #include "KChartPosition.h"
14 #include "KChartMarkerAttributes.h"
20 class AbstractDiagram;
46 KCHART_DECLARE_PRIVATE_DERIVED_QWIDGET(
Legend )
54 enum LegendStyle { MarkersOnly = 0,
56 MarkersAndLines = 2 };
59 void setLegendStyle( LegendStyle style );
60 LegendStyle legendStyle()
const;
67 virtual Legend * clone()
const;
72 bool compare(
const Legend* other )
const;
76 virtual void paint(
QPainter* painter )
override;
78 void setVisible(
bool visible )
override;
95 void setReferenceArea(
const QWidget* area );
103 const QWidget* referenceArea()
const;
146 void removeDiagrams();
189 void setPosition(
Position position );
302 void setShowLines(
bool legendShowLines );
303 bool showLines()
const;
312 void setText( uint dataset,
const QString& text );
313 QString text( uint dataset )
const;
323 void setHiddenDatasets(
const QList<uint> hiddenDatasets );
325 void setDatasetHidden( uint dataset,
bool hidden );
326 bool datasetIsHidden( uint dataset )
const;
328 uint datasetCount()
const;
330 void setDefaultColors();
331 void setRainbowColors();
332 void setSubduedColors(
bool ordered =
false );
341 void setColor( uint dataset,
const QColor& color );
343 void setBrush( uint dataset,
const QBrush& brush );
344 QBrush brush( uint dataset )
const;
347 void setPen( uint dataset,
const QPen& pen );
348 QPen pen( uint dataset )
const;
367 void setUseAutomaticMarkerSize(
bool useAutomaticMarkerSize );
368 bool useAutomaticMarkerSize()
const;
373 void setTitleText(
const QString& text );
379 void setSpacing( uint space );
380 uint spacing()
const;
383 void forceRebuild()
override;
385 QSize minimumSizeHint()
const override;
386 QSize sizeHint()
const override;
387 bool hasHeightForWidth()
const override;
388 int heightForWidth(
int width )
const override;
389 void needSizeHint()
override;
390 void resizeLayout(
const QSize& size )
override;
395 void propertiesChanged();
398 void emitPositionChanged();
400 void activateTheLayout();
401 void setNeedRebuild();
408 #endif // KCHARTLEGEND_H
Defines a position, using compass terminology.
A set of attributes controlling the appearance of data set markers.
Defines relative position information: reference area, position in this area (reference position),...
AbstractDiagram defines the interface for diagram classes.
A set of text attributes.
Legend defines the interface for the legend drawing class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Fri Jul 1 2022 05:09:20 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.