#pragma once #include #include "iPlotBase_global.h" class ZxRenderItem; /// 图件树的迭代器 class I_PLOTBASE_EXPORT ZxRenderItemIterator { public: ZxRenderItemIterator(ZxRenderItem* pRootItem); ZxRenderItemIterator(const ZxRenderItemIterator& c); const ZxRenderItemIterator& operator=(const ZxRenderItemIterator& c); public: // 先根遍历 class I_PLOTBASE_EXPORT const_iterator { QStack stack; const_iterator(ZxRenderItem* p); public: const_iterator(const const_iterator& c); ZxRenderItem* operator*(); bool operator!=( const const_iterator& ) const; bool operator==( const const_iterator& ) const; const_iterator& operator++(); const const_iterator& operator=(const const_iterator& c); friend class ZxRenderItemIterator; }; const_iterator begin() const; const_iterator end() const; private: ZxRenderItem* m_pRootItem; };