Wireshark 4.7.0
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
pParentThe parent legend this item belongs to.
strTextThe text string to display.

Member Function Documentation

◆ draw()

void QCPStringLegendItem::draw ( QCPPainter *  painter)
overrideprotectedvirtual

Draws the string legend item.

Parameters
painterThe 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
strTextThe 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: