23 #ifndef KDCHARTLEGEND_H 24 #define KDCHARTLEGEND_H 70 MarkersAndLines = 2 };
77 virtual Legend * clone()
const;
82 bool compare(
const Legend* other )
const;
84 void resizeEvent( QResizeEvent * event )
override;
86 void paint( QPainter* painter )
override;
87 void setVisible(
bool visible )
override;
104 void setReferenceArea(
const QWidget* area );
112 const QWidget* referenceArea()
const;
128 DiagramList diagrams()
const;
133 ConstDiagramList constDiagrams()
const;
155 void removeDiagrams();
198 void setPosition(
Position position );
214 void setAlignment( Qt::Alignment );
220 Qt::Alignment alignment()
const;
227 void setTextAlignment( Qt::Alignment );
234 Qt::Alignment textAlignment()
const;
242 void setLegendSymbolAlignment(Qt::Alignment);
250 Qt::Alignment legendSymbolAlignment()
const;
304 void setOrientation( Qt::Orientation orientation );
305 Qt::Orientation orientation()
const;
308 void setSortOrder( Qt::SortOrder order );
309 Qt::SortOrder sortOrder()
const;
311 void setShowLines(
bool legendShowLines );
312 bool showLines()
const;
315 void setText( uint dataset,
const QString& text );
316 QString text( uint dataset )
const;
326 void setHiddenDatasets(
const QList<uint> hiddenDatasets );
328 void setDatasetHidden( uint dataset,
bool hidden );
329 bool datasetIsHidden( uint dataset )
const;
331 uint datasetCount()
const;
333 void setDefaultColors();
334 void setRainbowColors();
335 void setSubduedColors(
bool ordered =
false );
344 void setColor( uint dataset,
const QColor& color );
346 void setBrush( uint dataset,
const QBrush& brush );
347 QBrush brush( uint dataset )
const;
350 void setPen( uint dataset,
const QPen& pen );
351 QPen pen( uint dataset )
const;
370 void setUseAutomaticMarkerSize(
bool useAutomaticMarkerSize );
371 bool useAutomaticMarkerSize()
const;
376 void setTitleText(
const QString& text );
377 QString titleText()
const;
382 void setSpacing( uint space );
383 uint spacing()
const;
386 void forceRebuild()
override;
388 QSize minimumSizeHint()
const override;
389 QSize sizeHint()
const override;
390 bool hasHeightForWidth()
const;
391 int heightForWidth(
int width )
const override;
392 void needSizeHint()
override;
393 void resizeLayout(
const QSize& size )
override;
396 void destroyedLegend(
Legend* );
398 void propertiesChanged();
401 void emitPositionChanged();
403 void activateTheLayout();
404 void setNeedRebuild();
411 #endif // KDCHARTLEGEND_H
AbstractDiagram defines the interface for diagram classes.
Legend defines the interface for the legend drawing class.
QList< AbstractDiagram * > DiagramList
A set of attributes controlling the appearance of data set markers.
#define KDCHART_DECLARE_PRIVATE_DERIVED_QWIDGET(X)
Defines relative position information: reference area, position in this area (reference position)...
Defines a position, using compass terminology.
QList< const AbstractDiagram * > ConstDiagramList
A set of text attributes.