Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
QCPSpacerLegendItem Class Reference

A spacer item for legends to create empty space between other legend items. More...

#include <qcp_spacer_legend_item.h>

Inheritance diagram for QCPSpacerLegendItem:

Public Member Functions

 QCPSpacerLegendItem (QCPLegend *pParent, int size=10, bool horizontal=false)
 Constructs a new QCPSpacerLegendItem object.
 
int size () const
 Gets the size of the spacer.
 
void setSize (int size)
 Sets the size of the spacer.
 
bool isHorizontal () const
 Checks if the spacer is horizontal.
 
void setIsHorizontal (bool horiz)
 Sets the orientation of the spacer.
 

Protected Member Functions

virtual void draw (QCPPainter *) override
 Draws the spacer item (intentionally does nothing).
 
virtual QSize minimumOuterSizeHint () const override
 Calculates the minimum outer size hint required for the spacer.
 

Detailed Description

A spacer item for legends to create empty space between other legend items.

Constructor & Destructor Documentation

◆ QCPSpacerLegendItem()

QCPSpacerLegendItem::QCPSpacerLegendItem ( QCPLegend *  pParent,
int  size = 10,
bool  horizontal = false 
)
explicit

Constructs a new QCPSpacerLegendItem object.

Parameters
pParentThe parent legend this item belongs to.
sizeThe size of the spacer in pixels.
horizontalTrue if the spacer is horizontal, false if vertical.

Member Function Documentation

◆ isHorizontal()

bool QCPSpacerLegendItem::isHorizontal ( ) const
inline

Checks if the spacer is horizontal.

Returns
True if the spacer is horizontal, false if it is vertical.

◆ minimumOuterSizeHint()

QSize QCPSpacerLegendItem::minimumOuterSizeHint ( ) const
overrideprotectedvirtual

Calculates the minimum outer size hint required for the spacer.

Returns
A QSize representing the minimum outer size.

◆ setIsHorizontal()

void QCPSpacerLegendItem::setIsHorizontal ( bool  horiz)
inline

Sets the orientation of the spacer.

Parameters
horizTrue to set the spacer to horizontal, false for vertical.

◆ setSize()

void QCPSpacerLegendItem::setSize ( int  size)
inline

Sets the size of the spacer.

Parameters
sizeThe new size of the spacer in pixels.

◆ size()

int QCPSpacerLegendItem::size ( ) const
inline

Gets the size of the spacer.

Returns
The size of the spacer in pixels.

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