| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QCPStringLegendItem Class Reference

A legend item that displays a static text string. More...

`#include <qcp_string_legend_item.h>`

Inheritance diagram for QCPStringLegendItem:

## Public Member Functions
| 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.

## Protected Member Functions
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.

## Detailed Description

A legend item that displays a static text string.

## Constructor & Destructor Documentation

## ◆ 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.

## Member Function Documentation

## ◆ draw()

void QCPStringLegendItem::draw | ( | QCPPainter * | painter | ) |
| override protected virtual

Draws the string legend item.

Parameters

  painter | The painter used for drawing.

## ◆ minimumOuterSizeHint()

QSize QCPStringLegendItem::minimumOuterSizeHint | ( |  | ) | const
| override protected virtual

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:

- /builds/wireshark/wireshark/ui/qt/widgets/qcp_string_legend_item.h
- /builds/wireshark/wireshark/ui/qt/widgets/qcp_string_legend_item.cpp