ImagingTools Core SDK
CEventGroupLabelItem.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtGui/QFont>
7#include <QtWidgets/QGraphicsItem>
8
9
10namespace imtloggui
11{
12
13
14class CEventGroupLabelItem: public QGraphicsItem
15{
16public:
17 typedef QGraphicsItem BaseClass;
18
19 CEventGroupLabelItem(QGraphicsItem* parent = nullptr);
20
21 void SetBackgroundColor(const QColor& color);
22 void SetGroupName(const QString& name);
23 void SetHeight(double height);
24
25 // reimplemented (QGraphicsItem)
26 virtual QRectF boundingRect() const override;
27 virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override;
28
29private:
30 QFont m_font;
31 QColor m_backgroundColor;
32 QString m_name;
33 double m_height;
34};
35
36
37} // namespace imtloggui
38
39