File indexing completed on 2024-04-21 03:41:38
0001 /* 0002 SPDX-FileCopyrightText: 2007, 2008 Carsten Niehaus <cniehaus@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef INFORMATIONITEM_H 0008 #define INFORMATIONITEM_H 0009 0010 #include <QGraphicsRectItem> 0011 0012 class IsotopeItem; 0013 0014 class QGraphicsTextItem; 0015 0016 class InformationItem : public QGraphicsRectItem 0017 { 0018 public: 0019 enum { Type = UserType + 2 }; 0020 0021 /** 0022 * @param isotope The Isotope represented 0023 */ 0024 InformationItem(qreal x, qreal y, qreal width, qreal height, QGraphicsItem *parent = nullptr); 0025 0026 /** 0027 * @return the Type of the item 0028 */ 0029 int type() const override 0030 { 0031 return Type; 0032 } 0033 0034 void setIsotope(IsotopeItem *item); 0035 0036 private: 0037 QGraphicsTextItem *m_textitem = nullptr; 0038 }; 0039 0040 #endif // INFORMATIONITEM_H