X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvToolBaseBase.h;h=9c76bb125bfbd4aba518bda40e903ce3e1b2ee77;hb=HEAD;hp=9e4382eb0ad078cb54ad089694ac11c4fd460b7f;hpb=b94d9bb7521f276be56532762e2d3c4e81526a07;p=clitk.git diff --git a/vv/vvToolBaseBase.h b/vv/vvToolBaseBase.h index 9e4382e..9c76bb1 100644 --- a/vv/vvToolBaseBase.h +++ b/vv/vvToolBaseBase.h @@ -1,39 +1,51 @@ /*========================================================================= + Program: vv http://www.creatis.insa-lyon.fr/rio/vv - Program: vv - Module: $RCSfile: vvToolBaseBase.h,v $ - Language: C++ - Date: $Date: 2010/02/24 11:49:57 $ - Version: $Revision: 1.1 $ - Author : David Sarrut (david.sarrut@creatis.insa-lyon.fr) + 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 - Copyright (C) 2008 - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr - CREATIS 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. - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, version 3 of the License. + It is distributed under dual licence - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - - =========================================================================*/ + - 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)); + }; +#if __cplusplus > 199711L + virtual void SaveState(std::shared_ptr & m_XmlWriter); +#else + virtual void SaveState(std::auto_ptr & m_XmlWriter); +#endif + 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