X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolBaseBase.h;h=37d974a38db900711df65315a4578f992fa00f76;hb=23175b0894c66c909349e03d31cc205443c443e6;hp=ffd169be217d5d40fcca7ad3382de5b03d511139;hpb=d8b45274cd67177427f3480f2ce4e9345d83612f;p=clitk.git diff --git a/vv/vvToolBaseBase.h b/vv/vvToolBaseBase.h index ffd169b..37d974a 100644 --- a/vv/vvToolBaseBase.h +++ b/vv/vvToolBaseBase.h @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,20 +14,34 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef VVTOOLBASEBASE_H #define VVTOOLBASEBASE_H #include "vvMainWindowBase.h" +#include "vvToolCreatorBase.h" +class QXmlStreamWriter; +class QXmlStreamReader; //------------------------------------------------------------------------------ class vvToolBaseBase { public: - virtual ~vvToolBaseBase() {}; + virtual ~vvToolBaseBase() { + std::vector & v = mCreator->GetListOfTool(); + v.erase(std::find(v.begin(), v.end(), this)); + }; + 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