diff options
Diffstat (limited to 'src/plugins/scxmleditor/plugin_interface/eventitem.h')
-rw-r--r-- | src/plugins/scxmleditor/plugin_interface/eventitem.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/plugins/scxmleditor/plugin_interface/eventitem.h b/src/plugins/scxmleditor/plugin_interface/eventitem.h new file mode 100644 index 00000000000..cf8ff3a9e34 --- /dev/null +++ b/src/plugins/scxmleditor/plugin_interface/eventitem.h @@ -0,0 +1,41 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +#pragma once + +#include "baseitem.h" +#include "textitem.h" + +namespace ScxmlEditor::PluginInterface { + +class EventItem : public BaseItem +{ +public: + explicit EventItem(const QPointF &pos = QPointF(), BaseItem *parent = nullptr); + + void updateAttributes() override; + void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override {} + +private: + TextItem *m_eventNameItem; +}; + +class OnEntryExitItem : public BaseItem +{ +public: + explicit OnEntryExitItem(BaseItem *parent = nullptr); + + int type() const override { return StateWarningType; } + + void updateAttributes() override; + void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override {} + void finalizeCreation() override; + void addChild(ScxmlTag *tag) override; + + QRectF childBoundingRect() const; + +private: + TextItem *m_eventNameItem; +}; + +} // namespace ScxmlEditor::PluginInterface |