Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berrySaveable.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 
18 #ifndef BERRYSAVEABLE_H_
19 #define BERRYSAVEABLE_H_
20 
21 #include <berryMacros.h>
22 #include <berryObject.h>
23 #include <berryIAdaptable.h>
24 
26 
27 namespace berry {
28 
29 struct IWorkbenchPage;
30 struct IWorkbenchPart;
31 
48 class BERRY_UI_QT Saveable : /*public InternalSaveable*/ public virtual Object, public IAdaptable
49 {
50 
51 public:
52 
54 
55 private:
56  //Cursor waitCursor;
57  //Cursor originalCursor;
58 
59 public:
60 
61  typedef QSet<Saveable::Pointer> Set;
62 
73  virtual bool Show(SmartPointer<IWorkbenchPage> page);
74 
80  virtual QString GetName() const = 0;
81 
90  virtual QString GetToolTipText() const = 0;
91 
98  virtual QIcon GetImageDescriptor() const = 0;
99 
118  virtual void DoSave(/*IProgressMonitor monitor*/) = 0;
119 
132  virtual bool IsDirty() const = 0;
133 
145  virtual bool operator<(const Object* object) const = 0;
146 
169  virtual uint HashCode() const = 0;
170 
218  //TODO Saveable IJobRunnable, IProgressMonitor, and IShellProvider
219 // virtual /*IJobRunnable*/void DoSave(/*IProgressMonitor monitor,
220 // IShellProvider shellProvider*/);
221 
251  virtual void DisableUI(const QList<SmartPointer<IWorkbenchPart> >& parts, bool closing);
252 
267  virtual void EnableUI(QList<SmartPointer<IWorkbenchPart> >& parts);
268 
269 protected:
270 
280  virtual Object* GetAdapter(const QString& adapter) const override;
281 };
282 
283 }
284 
285 
286 #endif /* BERRYSAVEABLE_H_ */
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:78
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:37
unsigned int uint
static std::string GetName(std::string fileName, std::string suffix)
#define BERRY_UI_QT