X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolBaseBase.h;h=fa93d14d7e8085588c11d30aa69d0c139621a2b4;hb=8dc75d1449323b08bf7378cded6f0bec24b2016f;hp=ffd169be217d5d40fcca7ad3382de5b03d511139;hpb=d8b45274cd67177427f3480f2ce4e9345d83612f;p=clitk.git diff --git a/vv/vvToolBaseBase.h b/vv/vvToolBaseBase.h index ffd169b..fa93d14 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,35 @@ - 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 #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