Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
berrySaveable.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 
14 #ifndef BERRYSAVEABLE_H_
15 #define BERRYSAVEABLE_H_
16 
17 #include <berryMacros.h>
18 #include <berryObject.h>
19 #include <berryIAdaptable.h>
20 
22 
23 namespace berry {
24 
25 struct IWorkbenchPage;
26 struct IWorkbenchPart;
27 
44 class BERRY_UI_QT Saveable : /*public InternalSaveable*/ public virtual Object, public IAdaptable
45 {
46 
47 public:
48 
50 
51  typedef QSet<Saveable::Pointer> Set;
52 
63  virtual bool Show(SmartPointer<IWorkbenchPage> page);
64 
70  virtual QString GetName() const = 0;
71 
80  virtual QString GetToolTipText() const = 0;
81 
88  virtual QIcon GetImageDescriptor() const = 0;
89 
106  virtual void DoSave(/*IProgressMonitor monitor*/) = 0;
107 
120  virtual bool IsDirty() const = 0;
121 
133  bool operator<(const Object* object) const override = 0;
134 
157  uint HashCode() const override = 0;
158 
188  virtual void DisableUI(const QList<SmartPointer<IWorkbenchPart> >& parts, bool closing);
189 
204  virtual void EnableUI(QList<SmartPointer<IWorkbenchPart> >& parts);
205 
206 protected:
207 
217  Object* GetAdapter(const QString& adapter) const override;
218 };
219 
220 }
221 
222 
223 #endif /* BERRYSAVEABLE_H_ */
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:73
virtual void DisableUI(const QList< SmartPointer< IWorkbenchPart > > &parts, bool closing)
virtual QString GetName() const =0
Object * GetAdapter(const QString &adapter) const override
virtual QIcon GetImageDescriptor() const =0
berryObjectMacro(Saveable)
virtual QString GetToolTipText() const =0
virtual void DoSave()=0
virtual void EnableUI(QList< SmartPointer< IWorkbenchPart > > &parts)
uint HashCode() const override=0
virtual bool Show(SmartPointer< IWorkbenchPage > page)
virtual bool IsDirty() const =0
bool operator<(const Object *object) const override=0
QSet< Saveable::Pointer > Set
Definition: berrySaveable.h:51
Implements transparent reference counting.
#define BERRY_UI_QT