Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
qcp_string_legend_item.h
Go to the documentation of this file.
1
12#ifndef QCP_STRING_LEGEND_ITEM_H
13#define QCP_STRING_LEGEND_ITEM_H
14
15#include <ui/qt/widgets/qcustomplot.h>
16
20class QCPStringLegendItem : public QCPAbstractLegendItem
21{
22 Q_OBJECT
23
24public:
30 explicit QCPStringLegendItem(QCPLegend *pParent, const QString& strText);
31
36 QString text() const;
37
42 void setText(const QString& strText);
43
44protected:
49 virtual void draw(QCPPainter *painter) override;
50
55 virtual QSize minimumOuterSizeHint() const override;
56
57private:
59 QString m_strText;
60};
61
62#endif
A legend item that displays a static text string.
Definition qcp_string_legend_item.h:21
virtual void draw(QCPPainter *painter) override
Draws the string legend item.
Definition qcp_string_legend_item.cpp:30
void setText(const QString &strText)
Sets the text string to be displayed.
Definition qcp_string_legend_item.cpp:25
virtual QSize minimumOuterSizeHint() const override
Calculates the minimum outer size hint required for the text.
Definition qcp_string_legend_item.cpp:38
QString text() const
Retrieves the text string displayed by this legend item.
Definition qcp_string_legend_item.cpp:20