Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
qcp_spacer_legend_item.h
Go to the documentation of this file.
1
9#ifndef QCP_SPACER_LEGEND_ITEM_H
10#define QCP_SPACER_LEGEND_ITEM_H
11
12#include <ui/qt/widgets/qcustomplot.h>
13
17class QCPSpacerLegendItem : public QCPAbstractLegendItem
18{
19 Q_OBJECT
20
21public:
28 explicit QCPSpacerLegendItem(QCPLegend* pParent, int size = 10, bool horizontal = false);
29
34 int size() const { return m_size; }
35
40 void setSize(int size) { m_size = size; }
41
46 bool isHorizontal() const { return m_horiz; }
47
52 void setIsHorizontal(bool horiz) { m_horiz = horiz; }
53
54protected:
58 virtual void draw(QCPPainter*) override {}
59
64 virtual QSize minimumOuterSizeHint() const override;
65
66private:
68 int m_size;
69
71 bool m_horiz;
72};
73
74#endif // QCP_SPACER_LEGEND_ITEM_H
A spacer item for legends to create empty space between other legend items.
Definition qcp_spacer_legend_item.h:18
bool isHorizontal() const
Checks if the spacer is horizontal.
Definition qcp_spacer_legend_item.h:46
int size() const
Gets the size of the spacer.
Definition qcp_spacer_legend_item.h:34
virtual void draw(QCPPainter *) override
Draws the spacer item (intentionally does nothing).
Definition qcp_spacer_legend_item.h:58
virtual QSize minimumOuterSizeHint() const override
Calculates the minimum outer size hint required for the spacer.
Definition qcp_spacer_legend_item.cpp:19
void setSize(int size)
Sets the size of the spacer.
Definition qcp_spacer_legend_item.h:40
void setIsHorizontal(bool horiz)
Sets the orientation of the spacer.
Definition qcp_spacer_legend_item.h:52