X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolBaseBase.h;h=fa93d14d7e8085588c11d30aa69d0c139621a2b4;hb=bff12b935c8c8f9c55f474e7b773fa8fa9d84865;hp=a70d36bef07c5e298d8ba2606db537586f5297aa;hpb=0083c3fb2c66812489631c7551709d121de51625;p=clitk.git diff --git a/vv/vvToolBaseBase.h b/vv/vvToolBaseBase.h index a70d36b..fa93d14 100644 --- a/vv/vvToolBaseBase.h +++ b/vv/vvToolBaseBase.h @@ -1,11 +1,48 @@ +/*========================================================================= + Program: vv http://www.creatis.insa-lyon.fr/rio/vv + + Authors belong to: + - University of LYON http://www.universite-lyon.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 + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the copyright notices for more information. + + It is distributed under dual licence + + - 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() { + 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