|
rock_widget_collection
0.1
|
The abstract base class for all items in a QCPLegend. More...
#include <qcustomplot.h>
Inherited by QCPPlottableLegendItem.
Public Member Functions | |
| QCPAbstractLegendItem (QCPLegend *parent) | |
| virtual | ~QCPAbstractLegendItem () |
| QFont | font () const |
| void | setFont (const QFont &font) |
Protected Member Functions | |
| virtual void | draw (QPainter *painter, const QRect &rect) const =0 |
| virtual QSize | size (const QSize &targetSize) const =0 |
Protected Attributes | |
| QCPLegend * | mParentLegend |
| QFont | mFont |
Friends | |
| class | QCPLegend |
The abstract base class for all items in a QCPLegend.
It defines a very basic interface to items in a QCPLegend. For representing plottables in the legend, the subclass QCPPlottableLegendItem is more suitable.
Only derive directly from this class when you need absolute freedom (i.e. a legend item that's not associated with a plottable).
You must implement the following pure virtual functions:
You inherit the following members you may use:
Definition at line 512 of file qcustomplot.h.
| QCPAbstractLegendItem::QCPAbstractLegendItem | ( | QCPLegend * | parent | ) |
Constructs a QCPAbstractLegendItem and associates it with the QCPLegend parent. This does not cause the item to be added to parent, so QCPLegend::addItem must be called separately.
Definition at line 6368 of file qcustomplot.cc.
|
inlinevirtual |
Definition at line 516 of file qcustomplot.h.
|
protectedpure virtual |
Draws this legend item with painter inside the specified rect. The rect typically has the size which was returned from a preceding size call.
Implemented in QCPPlottableLegendItem.
|
inline |
Definition at line 519 of file qcustomplot.h.
| void QCPAbstractLegendItem::setFont | ( | const QFont & | font | ) |
Sets the default font of this specific legend item to font.
Definition at line 6379 of file qcustomplot.cc.
|
protectedpure virtual |
Returns the size this item occupies in the legend. The legend will adapt its layout with the help of this function. If this legend item can have a variable width (e.g. auto-wrapping text), this function tries to find a size with a width close to the width of targetSize. The height of targetSize only may have meaning in specific sublasses. Typically, it's ignored.
Implemented in QCPPlottableLegendItem.
|
friend |
Definition at line 530 of file qcustomplot.h.
|
protected |
Definition at line 525 of file qcustomplot.h.
|
protected |
Definition at line 524 of file qcustomplot.h.
1.8.13