Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
berryStackPresentation.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 BERRYSTACKPRESENTATION_H_
19 #define BERRYSTACKPRESENTATION_H_
20 
21 #include <berryMacros.h>
22 
24 
27 #include "berryStackDropResult.h"
28 
29 #include "berryISizeProvider.h"
30 #include "berryIMemento.h"
31 
32 namespace berry
33 {
34 
57 
58 public:
59 
61 
62 private:
63 
68 
69 protected:
70 
77 
79 
85 
86 public:
87 
91  static const int AS_INACTIVE; // = 0;
92 
96  static const int AS_ACTIVE_FOCUS; // = 1;
97 
102  static const int AS_ACTIVE_NOFOCUS; // = 2;
103 
109  virtual void SetBounds(const QRect& bounds) = 0;
110 
122  virtual QSize ComputeMinimumSize();
123 
124  /*
125  * @see ISizeProvider#getSizeFlags(boolean)
126  */
127  virtual int GetSizeFlags(bool width) override;
128 
129  /*
130  * @see ISizeProvider#computePreferredSize(boolean, int, int, int)
131  */
132  virtual int ComputePreferredSize(bool width, int availableParallel, int availablePerpendicular, int preferredResult) override;
133 
141  virtual void SetActive(int newState) = 0;
142 
154  virtual void SetVisible(bool isVisible) = 0;
155 
169  virtual void SetState(int state) = 0;
170 
176  virtual QWidget* GetControl() = 0;
177 
190  virtual void AddPart(IPresentablePart::Pointer newPart, Object::Pointer cookie) = 0;
191 
197  virtual void RemovePart(IPresentablePart::Pointer oldPart) = 0;
198 
207  virtual void MovePart(IPresentablePart::Pointer toMove, Object::Pointer cookie);
208 
215  virtual void SelectPart(IPresentablePart::Pointer toSelect) = 0;
216 
227  virtual StackDropResult::Pointer DragOver(QWidget* currentControl, const QPoint& location) = 0;
228 
233  // virtual void ShowSystemMenu() = 0;
234 
238  // virtual void ShowPaneMenu() = 0;
239 
244  virtual void ShowPartList();
245 
253  virtual void SaveState(IPresentationSerializer* context, IMemento::Pointer memento);
254 
262  virtual void RestoreState(IPresentationSerializer* context, IMemento::Pointer memento);
263 
270  virtual QList<QWidget*> GetTabList(IPresentablePart::Pointer part) = 0;
271 };
272 
273 }
274 
275 #endif /* BERRYSTACKPRESENTATION_H_ */
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:78
#define berryObjectMacro(...)
Definition: berryMacros.h:37
#define BERRY_UI_QT