A legend item that displays a static text string.
More...
#include <qcp_string_legend_item.h>
|
| | QCPStringLegendItem (QCPLegend *pParent, const QString &strText) |
| | Constructs a new QCPStringLegendItem object.
|
| |
| QString | text () const |
| | Retrieves the text string displayed by this legend item.
|
| |
| void | setText (const QString &strText) |
| | Sets the text string to be displayed.
|
| |
|
| virtual void | draw (QCPPainter *painter) override |
| | Draws the string legend item.
|
| |
| virtual QSize | minimumOuterSizeHint () const override |
| | Calculates the minimum outer size hint required for the text.
|
| |
A legend item that displays a static text string.
◆ QCPStringLegendItem()
| QCPStringLegendItem::QCPStringLegendItem |
( |
QCPLegend * |
pParent, |
|
|
const QString & |
strText |
|
) |
| |
|
explicit |
Constructs a new QCPStringLegendItem object.
- Parameters
-
| pParent | The parent legend this item belongs to. |
| strText | The text string to display. |
◆ draw()
| void QCPStringLegendItem::draw |
( |
QCPPainter * |
painter | ) |
|
|
overrideprotectedvirtual |
Draws the string legend item.
- Parameters
-
| painter | The painter used for drawing. |
◆ minimumOuterSizeHint()
| QSize QCPStringLegendItem::minimumOuterSizeHint |
( |
| ) |
const |
|
overrideprotectedvirtual |
Calculates the minimum outer size hint required for the text.
- Returns
- A QSize representing the minimum outer size.
◆ setText()
| void QCPStringLegendItem::setText |
( |
const QString & |
strText | ) |
|
Sets the text string to be displayed.
- Parameters
-
| strText | The new text string. |
◆ text()
| QString QCPStringLegendItem::text |
( |
| ) |
const |
Retrieves the text string displayed by this legend item.
- Returns
- The current text string.
The documentation for this class was generated from the following files: