Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryIWorkbenchConfigurer.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 #ifndef BERRYIWORKBENCHCONFIGURER_H_
18 #define BERRYIWORKBENCHCONFIGURER_H_
19 
20 #include <berryMacros.h>
21 
23 #include "berryIWorkbench.h"
24 
26 
27 namespace berry {
28 
43 {
44 
46 
48 
56  static const int RESTORE_CODE_RESET = 1;
57 
64  static const int RESTORE_CODE_EXIT = 2;
65 
71  virtual IWorkbench* GetWorkbench() = 0;
72 
83  virtual bool GetSaveAndRestore() = 0;
84 
92  virtual void SetSaveAndRestore(bool enabled) = 0;
93 
102  virtual IWorkbenchWindowConfigurer::Pointer RestoreWorkbenchWindow(IMemento::Pointer memento) = 0;
103 
104  /*
105  * Declares a workbench image.
106  * <p>
107  * The workbench remembers the given image descriptor under the given name,
108  * and makes the image available to plug-ins via
109  * {@link IWorkbench#GetSharedImages() IWorkbench.getSharedImages()}.
110  * For "shared" images, the workbench remembers the image descriptor and
111  * will manages the image object create from it; clients retrieve "shared"
112  * images via
113  * {@link org.blueberry.ui.ISharedImages#getImage ISharedImages.getImage()}.
114  * For the other, "non-shared" images, the workbench remembers only the
115  * image descriptor; clients retrieve the image descriptor via
116  * {@link org.blueberry.ui.ISharedImages#getImageDescriptor
117  * ISharedImages.getImageDescriptor()} and are entirely
118  * responsible for managing the image objects they create from it.
119  * (This is made confusing by the historical fact that the API interface
120  * is called "ISharedImages".)
121  * </p>
122  *
123  * @param symbolicName the symbolic name of the image
124  * @param descriptor the image descriptor
125  * @param shared <code>true</code> if this is a shared image, and
126  * <code>false</code> if this is not a shared image
127  * @see org.blueberry.ui.ISharedImages#getImage
128  * @see org.blueberry.ui.ISharedImages#getImageDescriptor
129  */
130 // virtual void declareImage(String symbolicName, ImageDescriptor descriptor,
131 // boolean shared);
132 
147  virtual void EmergencyClose() = 0;
148 
159  virtual bool EmergencyClosing() = 0;
160 
167  virtual IWorkbenchWindowConfigurer::Pointer GetWindowConfigurer(
168  IWorkbenchWindow::Pointer window) = 0;
169 
177  virtual Object::Pointer GetData(const QString& key) const = 0;
178 
185  virtual void SetData(const QString& key, Object::Pointer data) = 0;
186 
202  virtual bool RestoreState() = 0;
203 
214  virtual void OpenFirstTimeWindow() = 0;
215 
241  virtual bool GetExitOnLastWindowClose() = 0;
242 
256  virtual void SetExitOnLastWindowClose(bool enabled) = 0;
257 };
258 
259 }
260 
261 #endif /*BERRYIWORKBENCHCONFIGURER_H_*/
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:78
T::Pointer GetData(const std::string &name)
#define berryObjectMacro(...)
Definition: berryMacros.h:37
#define BERRY_UI_QT