File indexing completed on 2022-11-29 12:50:42

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 ISOTOPESCENE_H
0008 #define ISOTOPESCENE_H
0009 
0010 #include <QGraphicsScene>
0011 
0012 class IsotopeItem;
0013 
0014 class IsotopeScene : public QGraphicsScene
0015 {
0016     Q_OBJECT
0017 
0018 public:
0019     explicit IsotopeScene(QObject *parent, int mode);
0020     ~IsotopeScene() override;
0021 
0022     void updateContextHelp(IsotopeItem *item);
0023 
0024 private:
0025     void initialize();
0026 
0027 private:
0028     void drawIsotopes();
0029 
0030     // the size of each item
0031     int m_itemSize;
0032     int m_mode;
0033 
0034     /// this group stores all IsotopeItems
0035     QGraphicsItemGroup *m_isotopeGroup;
0036 
0037 public:
0038     int mode() const
0039     {
0040         return m_mode;
0041     }
0042 
0043 Q_SIGNALS:
0044     void itemSelected(IsotopeItem *item);
0045 
0046 public:
0047     void setMode(int mode);
0048 };
0049 
0050 #endif // ISOTOPESCENE_H