Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
berryStackPresentation.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 BERRYSTACKPRESENTATION_H_
15 #define BERRYSTACKPRESENTATION_H_
16 
17 #include <berryMacros.h>
18 
20 
23 #include "berryStackDropResult.h"
24 
25 #include "berryISizeProvider.h"
26 #include "berryIMemento.h"
27 
28 namespace berry
29 {
30 
53 
54 public:
55 
57 
58 private:
59 
64 
65 protected:
66 
73 
74  ~StackPresentation() override;
75 
81 
82 public:
83 
87  static const int AS_INACTIVE; // = 0;
88 
92  static const int AS_ACTIVE_FOCUS; // = 1;
93 
98  static const int AS_ACTIVE_NOFOCUS; // = 2;
99 
105  virtual void SetBounds(const QRect& bounds) = 0;
106 
116  virtual QSize ComputeMinimumSize();
117 
118  /*
119  * @see ISizeProvider#getSizeFlags(boolean)
120  */
121  int GetSizeFlags(bool width) override;
122 
123  /*
124  * @see ISizeProvider#computePreferredSize(boolean, int, int, int)
125  */
126  int ComputePreferredSize(bool width, int availableParallel, int availablePerpendicular, int preferredResult) override;
127 
135  virtual void SetActive(int newState) = 0;
136 
148  virtual void SetVisible(bool isVisible) = 0;
149 
163  virtual void SetState(int state) = 0;
164 
170  virtual QWidget* GetControl() = 0;
171 
184  virtual void AddPart(IPresentablePart::Pointer newPart, Object::Pointer cookie) = 0;
185 
191  virtual void RemovePart(IPresentablePart::Pointer oldPart) = 0;
192 
201  virtual void MovePart(IPresentablePart::Pointer toMove, Object::Pointer cookie);
202 
209  virtual void SelectPart(IPresentablePart::Pointer toSelect) = 0;
210 
221  virtual StackDropResult::Pointer DragOver(QWidget* currentControl, const QPoint& location) = 0;
222 
227  // virtual void ShowSystemMenu() = 0;
228 
232  // virtual void ShowPaneMenu() = 0;
233 
238  virtual void ShowPartList();
239 
247  virtual void SaveState(IPresentationSerializer* context, IMemento::Pointer memento);
248 
256  virtual void RestoreState(IPresentationSerializer* context, IMemento::Pointer memento);
257 
264  virtual QList<QWidget*> GetTabList(IPresentablePart::Pointer part) = 0;
265 };
266 
267 }
268 
269 #endif /* BERRYSTACKPRESENTATION_H_ */
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:68
Implements transparent reference counting.
virtual void ShowPartList()
virtual QSize ComputeMinimumSize()
virtual QList< QWidget * > GetTabList(IPresentablePart::Pointer part)=0
virtual void SaveState(IPresentationSerializer *context, IMemento::Pointer memento)
virtual void RestoreState(IPresentationSerializer *context, IMemento::Pointer memento)
virtual QWidget * GetControl()=0
StackPresentation(IStackPresentationSite::Pointer stackSite)
virtual void RemovePart(IPresentablePart::Pointer oldPart)=0
virtual void SelectPart(IPresentablePart::Pointer toSelect)=0
int ComputePreferredSize(bool width, int availableParallel, int availablePerpendicular, int preferredResult) override
virtual void SetActive(int newState)=0
virtual void SetVisible(bool isVisible)=0
virtual void SetState(int state)=0
berryObjectMacro(StackPresentation)
IStackPresentationSite::Pointer GetSite()
virtual void AddPart(IPresentablePart::Pointer newPart, Object::Pointer cookie)=0
virtual void SetBounds(const QRect &bounds)=0
virtual void MovePart(IPresentablePart::Pointer toMove, Object::Pointer cookie)
virtual StackDropResult::Pointer DragOver(QWidget *currentControl, const QPoint &location)=0
int GetSizeFlags(bool width) override
implements a WeakPointer class to deal with circular reference problems.
#define BERRY_UI_QT