From: David Sarrut Date: Fri, 30 Mar 2012 09:52:01 +0000 (+0200) Subject: Add SaveState and XmlReader capabilities X-Git-Tag: v1.3.0~52^2~24 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=ca46263ac99b5efca28a552c1b7bfb93a8a85715;p=clitk.git Add SaveState and XmlReader capabilities --- diff --git a/vv/vvToolBaseBase.h b/vv/vvToolBaseBase.h index dda5acd..c763010 100644 --- a/vv/vvToolBaseBase.h +++ b/vv/vvToolBaseBase.h @@ -20,14 +20,30 @@ #define VVTOOLBASEBASE_H #include "vvMainWindowBase.h" +#include "vvToolCreatorBase.h" +class QXmlStreamWriter; +class QXmlStreamReader; //------------------------------------------------------------------------------ class vvToolBaseBase { public: - virtual ~vvToolBaseBase() {}; + virtual ~vvToolBaseBase() { + DD("destrucotr vvToolBaseBase"); + std::vector & v = mCreator->GetListOfTool(); + v.erase(std::find(v.begin(), v.end(), this)); + DD("end dest"); + }; + virtual void SaveState(std::auto_ptr & m_XmlWriter); + virtual void InitializeNewTool(bool ReadStateFlag); + void SetCreator(vvToolCreatorBase * m) { mCreator = m; } + void SetXmlReader(QXmlStreamReader * r, int index) { m_XmlReader = r; mImageIndex = index;} + protected: vvMainWindowBase * mMainWindowBase; + QXmlStreamReader * m_XmlReader; + vvToolCreatorBase * mCreator; + int mImageIndex; }; //------------------------------------------------------------------------------ #endif