1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
19 #ifndef VVTOOLBASEBASE_H
20 #define VVTOOLBASEBASE_H
23 #include "vvMainWindowBase.h"
24 #include "vvToolCreatorBase.h"
25 class QXmlStreamWriter;
26 class QXmlStreamReader;
28 //------------------------------------------------------------------------------
29 class vvToolBaseBase {
31 virtual ~vvToolBaseBase() {
32 std::vector<vvToolBaseBase*> & v = mCreator->GetListOfTool();
33 v.erase(std::find(v.begin(), v.end(), this));
36 virtual void SaveState(std::auto_ptr<QXmlStreamWriter> & m_XmlWriter);
37 virtual void InitializeNewTool(bool ReadStateFlag);
38 void SetCreator(vvToolCreatorBase * m) { mCreator = m; }
39 void SetXmlReader(QXmlStreamReader * r, int index) { m_XmlReader = r; mImageIndex = index;}
42 vvMainWindowBase * mMainWindowBase;
43 QXmlStreamReader * m_XmlReader;
44 vvToolCreatorBase * mCreator;
47 //------------------------------------------------------------------------------