Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
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_ */
QSet< Saveable::Pointer > Set
Definition: berrySaveable.h:51
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:72
bool operator<(const StaticParameterMap::ValueType &a, const StaticParameterMap::ValueType &b)
Compares two var lists and returns true if the first list&#39;s first item is lower than the second one&#39;s...
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:33
#define BERRY_UI_QT