Medical Imaging Interaction Toolkit  2018.4.99-4c24e3cb
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 private:
52  //Cursor waitCursor;
53  //Cursor originalCursor;
54 
55 public:
56 
57  typedef QSet<Saveable::Pointer> Set;
58 
69  virtual bool Show(SmartPointer<IWorkbenchPage> page);
70 
76  virtual QString GetName() const = 0;
77 
86  virtual QString GetToolTipText() const = 0;
87 
94  virtual QIcon GetImageDescriptor() const = 0;
95 
114  virtual void DoSave(/*IProgressMonitor monitor*/) = 0;
115 
128  virtual bool IsDirty() const = 0;
129 
141  bool operator<(const Object* object) const override = 0;
142 
165  uint HashCode() const override = 0;
166 
214  //TODO Saveable IJobRunnable, IProgressMonitor, and IShellProvider
215 // virtual /*IJobRunnable*/void DoSave(/*IProgressMonitor monitor,
216 // IShellProvider shellProvider*/);
217 
247  virtual void DisableUI(const QList<SmartPointer<IWorkbenchPart> >& parts, bool closing);
248 
263  virtual void EnableUI(QList<SmartPointer<IWorkbenchPart> >& parts);
264 
265 protected:
266 
276  Object* GetAdapter(const QString& adapter) const override;
277 };
278 
279 }
280 
281 
282 #endif /* BERRYSAVEABLE_H_ */
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
unsigned int uint
static std::string GetName(std::string fileName, std::string suffix)
#define BERRY_UI_QT