#ifndef CSCHEMEVIEW_H #define CSCHEMEVIEW_H #include class CSchemeItem; class CSchemeView : public QGraphicsView { public: CSchemeView(QWidget *parent = nullptr); void addItem(CSchemeItem *item); void clear(); void refreshItems(); qreal maxItemHeight() const; void refreshItemsGeometry(); private: QGraphicsItemGroup *m_group = nullptr; // 场景中显示的项目 QList m_schemes; QList m_items; qreal m_hNodeSpace = 50; }; #endif // CSCHEMEVIEW_H