ImagingTools Core SDK
CIconBasedEventFactoryComp.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/QPixmap>
7
8// ImtCore includes
9#include <imtloggui/CEventFactoryCompBase.h>
10
11
12namespace imtloggui
13{
14
15
16class CIconBasedEventFactoryComp: public CEventFactoryCompBase
17{
18public:
19 typedef CEventFactoryCompBase BaseClass;
20
21 I_BEGIN_COMPONENT(CIconBasedEventFactoryComp)
22 I_ASSIGN(m_iconAttrPtr, "Icon", "Icon for events", true, "");
23 I_ASSIGN(m_iconSizeAttrPtr, "IconSize", "Size of icons", true, 24);
24 I_END_COMPONENT
25
26 // reimplemented (imtloggui::IEventItemFactory)
27 virtual IEventItem* CreateInstance(const ilog::IMessageConsumer::MessagePtr& messagePtr) const override;
28
29protected:
30 I_ATTR(QByteArray, m_iconAttrPtr);
31 I_ATTR(int, m_iconSizeAttrPtr);
32
33 mutable QPixmap m_icon;
34};
35
36
37} // namespace imtloggui
38
39