QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Slots | Public Member Functions | List of all members
QwtAbstractLegend Class Referenceabstract

Abstract base class for legend widgets. More...

#include <qwt_abstract_legend.h>

Inheritance diagram for QwtAbstractLegend:
QwtLegend

Public Slots

virtual void updateLegend (const QVariant &itemInfo, const QList< QwtLegendData > &data)=0
 

Public Member Functions

 QwtAbstractLegend (QWidget *parent=nullptr)
 Constructor for QwtAbstractLegend.
 
 ~QwtAbstractLegend () override
 Destructor for QwtAbstractLegend.
 
virtual void renderLegend (QPainter *painter, const QRectF &rect, bool fillBackground) const =0
 
virtual bool isEmpty () const =0
 
virtual int scrollExtent (Qt::Orientation) const
 Return the extent needed for scroll elements.
 

Detailed Description

Abstract base class for legend widgets.

Legends that need to be under control of the QwtPlot layout system need to be derived from QwtAbstractLegend.

Note
Other type of legends can be implemented by connecting to the QwtPlot::legendDataChanged() signal. But as these legends are unknown to the plot layout system the layout code (on screen and for QwtPlotRenderer) need to be organized in application code.
See also
QwtLegend

Constructor & Destructor Documentation

◆ QwtAbstractLegend()

QwtAbstractLegend::QwtAbstractLegend ( QWidget *  parent = nullptr)
explicit

Constructor for QwtAbstractLegend.

Parameters
parentParent widget

Member Function Documentation

◆ isEmpty()

virtual bool QwtAbstractLegend::isEmpty ( ) const
pure virtual

Implemented in QwtLegend.

◆ renderLegend()

virtual void QwtAbstractLegend::renderLegend ( QPainter *  painter,
const QRectF &  rect,
bool  fillBackground 
) const
pure virtual

Implemented in QwtLegend.

◆ scrollExtent()

int QwtAbstractLegend::scrollExtent ( Qt::Orientation  orientation) const
virtual

Return the extent needed for scroll elements.

Returns the space needed for elements to scroll the legend (usually scrollbars).

Parameters
orientationOrientation (Horizontal or Vertical)
Returns
Extent of the corresponding scroll element (0 by default)

Reimplemented in QwtLegend.


The documentation for this class was generated from the following files: