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
QmitkStdMultiWidgetEditor.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
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 
18 
19 #include <berryUIException.h>
20 #include <berryIWorkbenchPage.h>
22 #include <berryIPartListener.h>
23 #include <berryIPreferences.h>
24 
25 #include <QWidget>
26 
27 #include <mitkColorProperty.h>
28 #include <mitkNodePredicateNot.h>
30 
33 
34 #include <QmitkMouseModeSwitcher.h>
35 #include <QmitkStdMultiWidget.h>
36 
37 #include <mbilogo.h>
38 
39 class QmitkStdMultiWidgetEditorPrivate
40 {
41 public:
42 
43  QmitkStdMultiWidgetEditorPrivate();
44  ~QmitkStdMultiWidgetEditorPrivate();
45 
46  QmitkStdMultiWidget* m_StdMultiWidget;
47  QmitkMouseModeSwitcher* m_MouseModeToolbar;
51  QString m_WidgetBackgroundColor1[4];
52  QString m_WidgetBackgroundColor2[4];
53  QString m_WidgetDecorationColor[4];
54  QString m_WidgetAnnotation[4];
55  bool m_MenuWidgetsEnabled;
56  QScopedPointer<berry::IPartListener> m_PartListener;
57 
58  QHash<QString, QmitkRenderWindow*> m_RenderWindows;
59 
60 };
61 
62 struct QmitkStdMultiWidgetPartListener : public berry::IPartListener
63 {
64  QmitkStdMultiWidgetPartListener(QmitkStdMultiWidgetEditorPrivate* dd)
65  : d(dd)
66  {}
67 
68  Events::Types GetPartEventTypes() const override
69  {
71  }
72 
73  void PartClosed(const berry::IWorkbenchPartReference::Pointer& partRef) override
74  {
75  if (partRef->GetId() == QmitkStdMultiWidgetEditor::EDITOR_ID)
76  {
77  QmitkStdMultiWidgetEditor::Pointer stdMultiWidgetEditor = partRef->GetPart(false).Cast<QmitkStdMultiWidgetEditor>();
78 
79  if (d->m_StdMultiWidget == stdMultiWidgetEditor->GetStdMultiWidget())
80  {
81  d->m_StdMultiWidget->RemovePlanesFromDataStorage();
82  stdMultiWidgetEditor->RequestActivateMenuWidget(false);
83  }
84  }
85  }
86 
87  void PartHidden(const berry::IWorkbenchPartReference::Pointer& partRef) override
88  {
89  if (partRef->GetId() == QmitkStdMultiWidgetEditor::EDITOR_ID)
90  {
91  QmitkStdMultiWidgetEditor::Pointer stdMultiWidgetEditor = partRef->GetPart(false).Cast<QmitkStdMultiWidgetEditor>();
92 
93  if (d->m_StdMultiWidget == stdMultiWidgetEditor->GetStdMultiWidget())
94  {
95  stdMultiWidgetEditor->RequestActivateMenuWidget(false);
96  }
97  }
98  }
99 
100  void PartVisible(const berry::IWorkbenchPartReference::Pointer& partRef) override
101  {
102  if (partRef->GetId() == QmitkStdMultiWidgetEditor::EDITOR_ID)
103  {
104  QmitkStdMultiWidgetEditor::Pointer stdMultiWidgetEditor = partRef->GetPart(false).Cast<QmitkStdMultiWidgetEditor>();
105 
106  if (d->m_StdMultiWidget == stdMultiWidgetEditor->GetStdMultiWidget())
107  {
108  stdMultiWidgetEditor->RequestActivateMenuWidget(true);
109  }
110  }
111  }
112 
113  void PartOpened(const berry::IWorkbenchPartReference::Pointer& partRef) override
114  {
115  if (partRef->GetId() == QmitkStdMultiWidgetEditor::EDITOR_ID)
116  {
117  QmitkStdMultiWidgetEditor::Pointer stdMultiWidgetEditor = partRef->GetPart(false).Cast<QmitkStdMultiWidgetEditor>();
118 
119  if (d->m_StdMultiWidget == stdMultiWidgetEditor->GetStdMultiWidget())
120  {
121  d->m_StdMultiWidget->AddPlanesToDataStorage();
122  stdMultiWidgetEditor->RequestActivateMenuWidget(true);
123  }
124  }
125  }
126 
127 private:
128 
129  QmitkStdMultiWidgetEditorPrivate* const d;
130 
131 };
132 
133 QmitkStdMultiWidgetEditorPrivate::QmitkStdMultiWidgetEditorPrivate()
134  : m_StdMultiWidget(0), m_MouseModeToolbar(0)
135  , m_MenuWidgetsEnabled(false)
136  , m_PartListener(new QmitkStdMultiWidgetPartListener(this))
137 {}
138 
139 QmitkStdMultiWidgetEditorPrivate::~QmitkStdMultiWidgetEditorPrivate()
140 {
141 }
142 
143 const QString QmitkStdMultiWidgetEditor::EDITOR_ID = "org.mitk.editors.stdmultiwidget";
144 
146  : d(new QmitkStdMultiWidgetEditorPrivate)
147 {
148 }
149 
151 {
152  this->GetSite()->GetPage()->RemovePartListener(d->m_PartListener.data());
153 }
154 
156 {
157  return d->m_StdMultiWidget;
158 }
159 
161 {
162  if (d->m_StdMultiWidget) return d->m_StdMultiWidget->GetRenderWindow1();
163  return 0;
164 }
165 
166 QHash<QString, QmitkRenderWindow *> QmitkStdMultiWidgetEditor::GetQmitkRenderWindows() const
167 {
168  return d->m_RenderWindows;
169 }
170 
172 {
173  if (d->m_RenderWindows.contains(id))
174  return d->m_RenderWindows[id];
175 
176  return 0;
177 }
178 
180 {
181  return d->m_StdMultiWidget->GetCrossPosition();
182 }
183 
184 void QmitkStdMultiWidgetEditor::SetSelectedPosition(const mitk::Point3D &pos, const QString &/*id*/)
185 {
186  d->m_StdMultiWidget->MoveCrossToPosition(pos);
187 }
188 
189 void QmitkStdMultiWidgetEditor::EnableDecorations(bool enable, const QStringList &decorations)
190 {
191  if (decorations.isEmpty() || decorations.contains(DECORATION_BORDER))
192  {
193  enable ? d->m_StdMultiWidget->EnableColoredRectangles()
194  : d->m_StdMultiWidget->DisableColoredRectangles();
195  }
196  if (decorations.isEmpty() || decorations.contains(DECORATION_LOGO))
197  {
198  enable ? d->m_StdMultiWidget->EnableDepartmentLogo()
199  : d->m_StdMultiWidget->DisableDepartmentLogo();
200  }
201  if (decorations.isEmpty() || decorations.contains(DECORATION_MENU))
202  {
203  d->m_StdMultiWidget->ActivateMenuWidget(enable);
204  }
205  if (decorations.isEmpty() || decorations.contains(DECORATION_BACKGROUND))
206  {
207  enable ? d->m_StdMultiWidget->EnableGradientBackground()
208  : d->m_StdMultiWidget->DisableGradientBackground();
209  }
210  if (decorations.isEmpty() || decorations.contains(DECORATION_CORNER_ANNOTATION))
211  {
212  enable ? d->m_StdMultiWidget->SetCornerAnnotationVisibility(true)
213  : d->m_StdMultiWidget->SetCornerAnnotationVisibility(false);
214  }
215 }
216 
217 bool QmitkStdMultiWidgetEditor::IsDecorationEnabled(const QString &decoration) const
218 {
219  if (decoration == DECORATION_BORDER)
220  {
221  return d->m_StdMultiWidget->IsColoredRectanglesEnabled();
222  }
223  else if (decoration == DECORATION_LOGO)
224  {
225  return d->m_StdMultiWidget->IsColoredRectanglesEnabled();
226  }
227  else if (decoration == DECORATION_MENU)
228  {
229  return d->m_StdMultiWidget->IsMenuWidgetEnabled();
230  }
231  else if (decoration == DECORATION_BACKGROUND)
232  {
233  return d->m_StdMultiWidget->GetGradientBackgroundFlag();
234  }
235  else if (decoration == DECORATION_CORNER_ANNOTATION)
236  {
237  return d->m_StdMultiWidget->IsCornerAnnotationVisible();
238  }
239 
240  return false;
241 }
242 
244 {
245  QStringList decorations;
247  return decorations;
248 }
249 
251 {
252  d->m_StdMultiWidget->SetWidgetPlanesVisibility(enable);
253 }
254 
256 {
257  mitk::DataNode::Pointer node = this->d->m_StdMultiWidget->GetWidgetPlane1();
258  if (node.IsNotNull())
259  {
260  bool visible = false;
261  node->GetVisibility(visible, 0);
262  return visible;
263  }
264  else
265  {
266  return false;
267  }
268 }
269 
271 {
272  if (d->m_StdMultiWidget == 0)
273  {
274  QHBoxLayout* layout = new QHBoxLayout(parent);
275  layout->setContentsMargins(0,0,0,0);
276 
277  if (d->m_MouseModeToolbar == NULL)
278  {
279  d->m_MouseModeToolbar = new QmitkMouseModeSwitcher(parent); // delete by Qt via parent
280  layout->addWidget(d->m_MouseModeToolbar);
281  }
282 
284 
285  mitk::BaseRenderer::RenderingMode::Type renderingMode = static_cast<mitk::BaseRenderer::RenderingMode::Type>(prefs->GetInt( "Rendering Mode" , 0 ));
286 
287  d->m_StdMultiWidget = new QmitkStdMultiWidget(parent,0,0,renderingMode);
288  d->m_RenderWindows.insert("axial", d->m_StdMultiWidget->GetRenderWindow1());
289  d->m_RenderWindows.insert("sagittal", d->m_StdMultiWidget->GetRenderWindow2());
290  d->m_RenderWindows.insert("coronal", d->m_StdMultiWidget->GetRenderWindow3());
291  d->m_RenderWindows.insert("3d", d->m_StdMultiWidget->GetRenderWindow4());
292 
293  d->m_MouseModeToolbar->setMouseModeSwitcher( d->m_StdMultiWidget->GetMouseModeSwitcher() );
294 
295  layout->addWidget(d->m_StdMultiWidget);
296 
298 
299  // Tell the multiWidget which (part of) the tree to render
300  d->m_StdMultiWidget->SetDataStorage(ds);
301 
302  // Initialize views as axial, sagittal, coronar to all data objects in DataStorage
303  // (from top-left to bottom)
304  mitk::TimeGeometry::Pointer geo = ds->ComputeBoundingGeometry3D(ds->GetAll());
306 
307  // Initialize bottom-right view as 3D view
308  d->m_StdMultiWidget->GetRenderWindow4()->GetRenderer()->SetMapperID(
310 
311  // Enable standard handler for levelwindow-slider
312  d->m_StdMultiWidget->EnableStandardLevelWindow();
313 
314  // Add the displayed views to the tree to see their positions
315  // in 2D and 3D
316  d->m_StdMultiWidget->AddDisplayPlaneSubTree();
317 
318  //d->m_StdMultiWidget->EnableNavigationControllerEventListening();
319 
320  // Store the initial visibility status of the menu widget.
321  d->m_MenuWidgetsEnabled = d->m_StdMultiWidget->IsMenuWidgetEnabled();
322 
323  this->GetSite()->GetPage()->AddPartListener(d->m_PartListener.data());
324 
325  berry::IBerryPreferences* berryprefs = dynamic_cast<berry::IBerryPreferences*>(prefs.GetPointer());
326  InitializePreferences(berryprefs);
327  this->OnPreferencesChanged(berryprefs);
328 
329  this->RequestUpdate();
330  }
331 }
332 
334 {
335  // Enable change of logo. If no DepartmentLogo was set explicitly, MBILogo is used.
336  // Set new department logo by prefs->Set("DepartmentLogo", "PathToImage");
337 
338  // If no logo was set for this plug-in specifically, walk the parent preference nodes
339  // and lookup a logo value there.
340 
341  const berry::IPreferences* currentNode = prefs;
342 
343  while(currentNode)
344  {
345  bool logoFound = false;
346  foreach (const QString& key, currentNode->Keys())
347  {
348  if( key == "DepartmentLogo")
349  {
350  QString departmentLogoLocation = currentNode->Get("DepartmentLogo", "");
351 
352  if (departmentLogoLocation.isEmpty())
353  {
354  d->m_StdMultiWidget->DisableDepartmentLogo();
355  }
356  else
357  {
358  // we need to disable the logo first, otherwise setting a new logo will have
359  // no effect due to how mitkManufacturerLogo works...
360  d->m_StdMultiWidget->DisableDepartmentLogo();
361  d->m_StdMultiWidget->SetDepartmentLogoPath(qPrintable(departmentLogoLocation));
362  d->m_StdMultiWidget->EnableDepartmentLogo();
363  }
364  logoFound = true;
365  break;
366  }
367  }
368 
369  if (logoFound) break;
370  currentNode = currentNode->Parent().GetPointer();
371  }
372 
373  //Update internal members
375  this->GetPreferenceDecorations(prefs);
376  //Now the members can be used to modify the stdmultiwidget
377  mitk::Color upper = HexColorToMitkColor(d->m_WidgetBackgroundColor1[0]);
378  mitk::Color lower = HexColorToMitkColor(d->m_WidgetBackgroundColor2[0]);
379  d->m_StdMultiWidget->SetGradientBackgroundColorForRenderWindow(upper, lower, 0);
380  upper = HexColorToMitkColor(d->m_WidgetBackgroundColor1[1]);
381  lower = HexColorToMitkColor(d->m_WidgetBackgroundColor2[1]);
382  d->m_StdMultiWidget->SetGradientBackgroundColorForRenderWindow(upper, lower, 1);
383  upper = HexColorToMitkColor(d->m_WidgetBackgroundColor1[2]);
384  lower = HexColorToMitkColor(d->m_WidgetBackgroundColor2[2]);
385  d->m_StdMultiWidget->SetGradientBackgroundColorForRenderWindow(upper, lower, 2);
386  upper = HexColorToMitkColor(d->m_WidgetBackgroundColor1[3]);
387  lower = HexColorToMitkColor(d->m_WidgetBackgroundColor2[3]);
388  d->m_StdMultiWidget->SetGradientBackgroundColorForRenderWindow(upper, lower, 3);
389  d->m_StdMultiWidget->EnableGradientBackground();
390 
391  // preferences for renderWindows
392  mitk::Color colorDecorationWidget1 = HexColorToMitkColor(d->m_WidgetDecorationColor[0]);
393  mitk::Color colorDecorationWidget2 = HexColorToMitkColor(d->m_WidgetDecorationColor[1]);
394  mitk::Color colorDecorationWidget3 = HexColorToMitkColor(d->m_WidgetDecorationColor[2]);
395  mitk::Color colorDecorationWidget4 = HexColorToMitkColor(d->m_WidgetDecorationColor[3]);
396  d->m_StdMultiWidget->SetDecorationColor(0, colorDecorationWidget1);
397  d->m_StdMultiWidget->SetDecorationColor(1, colorDecorationWidget2);
398  d->m_StdMultiWidget->SetDecorationColor(2, colorDecorationWidget3);
399  d->m_StdMultiWidget->SetDecorationColor(3, colorDecorationWidget4);
400 
401  for(unsigned int i = 0; i < 4; ++i)
402  {
403  d->m_StdMultiWidget->SetDecorationProperties(d->m_WidgetAnnotation[i].toStdString(),
404  HexColorToMitkColor(d->m_WidgetDecorationColor[i]), i);
405  }
406  //The crosshair gap
407  int crosshairgapsize = prefs->GetInt("crosshair gap size", 32);
408  d->m_StdMultiWidget->GetWidgetPlane1()->SetIntProperty("Crosshair.Gap Size", crosshairgapsize);
409  d->m_StdMultiWidget->GetWidgetPlane2()->SetIntProperty("Crosshair.Gap Size", crosshairgapsize);
410  d->m_StdMultiWidget->GetWidgetPlane3()->SetIntProperty("Crosshair.Gap Size", crosshairgapsize);
411 
412  //refresh colors of rectangles
413  d->m_StdMultiWidget->EnableColoredRectangles();
414 
415  // Set preferences respecting zooming and panning
416  bool constrainedZooming = prefs->GetBool("Use constrained zooming and panning", true);
417 
419 
421 
423 
424  // level window setting
425  bool showLevelWindowWidget = prefs->GetBool("Show level/window widget", true);
426  if (showLevelWindowWidget)
427  {
428  d->m_StdMultiWidget->EnableStandardLevelWindow();
429  }
430  else
431  {
432  d->m_StdMultiWidget->DisableStandardLevelWindow();
433  }
434 
435  // mouse modes toolbar
436  bool newMode = prefs->GetBool("PACS like mouse interaction", false);
437  d->m_MouseModeToolbar->setVisible( newMode );
438  d->m_StdMultiWidget->GetMouseModeSwitcher()->SetInteractionScheme( newMode ? mitk::MouseModeSwitcher::PACS : mitk::MouseModeSwitcher::MITK );
439 }
440 
442 {
443  QColor qColor(widgetColorInHex);
444  mitk::Color returnColor;
445  float colorMax = 255.0f;
446  if (widgetColorInHex.isEmpty()) // default value
447  {
448  returnColor[0] = 1.0;
449  returnColor[1] = 1.0;
450  returnColor[2] = 1.0;
451  MITK_ERROR << "Using default color for unknown widget " << qPrintable(widgetColorInHex);
452  }
453  else
454  {
455  returnColor[0] = qColor.red() / colorMax;
456  returnColor[1] = qColor.green() / colorMax;
457  returnColor[2] = qColor.blue() / colorMax;
458  }
459  return returnColor;
460 }
461 
463 {
464  QColor returnColor;
465  float colorMax = 255.0f;
466  returnColor.setRed(static_cast<int>(color[0]* colorMax + 0.5));
467  returnColor.setGreen(static_cast<int>(color[1]* colorMax + 0.5));
468  returnColor.setBlue(static_cast<int>(color[2]* colorMax + 0.5));
469  return returnColor.name();
470 }
471 
473 {
474  //fill members with current values (or default values) from the std multi widget
475  for(unsigned int i = 0; i < 4; ++i)
476  {
477  d->m_WidgetDecorationColor[i] = MitkColorToHex(d->m_StdMultiWidget->GetDecorationColor(i));
478  d->m_WidgetBackgroundColor1[i] = MitkColorToHex(d->m_StdMultiWidget->GetGradientColors(i).first);
479  d->m_WidgetBackgroundColor2[i] = MitkColorToHex(d->m_StdMultiWidget->GetGradientColors(i).second);
480  d->m_WidgetAnnotation[i] = QString::fromStdString(d->m_StdMultiWidget->GetCornerAnnotationText(i));
481  }
482 }
483 
485 {
486  //overwrite members with values from the preferences, if they the prefrence is defined
487  d->m_WidgetBackgroundColor1[0] = preferences->Get("widget1 first background color", d->m_WidgetBackgroundColor1[0]);
488  d->m_WidgetBackgroundColor2[0] = preferences->Get("widget1 second background color", d->m_WidgetBackgroundColor2[0]);
489  d->m_WidgetBackgroundColor1[1] = preferences->Get("widget2 first background color", d->m_WidgetBackgroundColor1[1]);
490  d->m_WidgetBackgroundColor2[1] = preferences->Get("widget2 second background color", d->m_WidgetBackgroundColor2[1]);
491  d->m_WidgetBackgroundColor1[2] = preferences->Get("widget3 first background color", d->m_WidgetBackgroundColor1[2]);
492  d->m_WidgetBackgroundColor2[2] = preferences->Get("widget3 second background color", d->m_WidgetBackgroundColor2[2]);
493  d->m_WidgetBackgroundColor1[3] = preferences->Get("widget4 first background color", d->m_WidgetBackgroundColor1[3]);
494  d->m_WidgetBackgroundColor2[3] = preferences->Get("widget4 second background color", d->m_WidgetBackgroundColor2[3]);
495 
496  d->m_WidgetDecorationColor[0] = preferences->Get("widget1 decoration color", d->m_WidgetDecorationColor[0]);
497  d->m_WidgetDecorationColor[1] = preferences->Get("widget2 decoration color", d->m_WidgetDecorationColor[1]);
498  d->m_WidgetDecorationColor[2] = preferences->Get("widget3 decoration color", d->m_WidgetDecorationColor[2]);
499  d->m_WidgetDecorationColor[3] = preferences->Get("widget4 decoration color", d->m_WidgetDecorationColor[3]);
500 
501  d->m_WidgetAnnotation[0] = preferences->Get("widget1 corner annotation", d->m_WidgetAnnotation[0]);
502  d->m_WidgetAnnotation[1] = preferences->Get("widget2 corner annotation", d->m_WidgetAnnotation[1]);
503  d->m_WidgetAnnotation[2] = preferences->Get("widget3 corner annotation", d->m_WidgetAnnotation[2]);
504  d->m_WidgetAnnotation[3] = preferences->Get("widget4 corner annotation", d->m_WidgetAnnotation[3]);
505 }
506 
508 {
509  this->FillMembersWithCurrentDecorations(); //fill members
510  this->GetPreferenceDecorations(preferences); //overwrite if preferences are defined
511 
512  //create new preferences
513  preferences->Put("widget1 corner annotation", d->m_WidgetAnnotation[0]);
514  preferences->Put("widget2 corner annotation", d->m_WidgetAnnotation[1]);
515  preferences->Put("widget3 corner annotation", d->m_WidgetAnnotation[2]);
516  preferences->Put("widget4 corner annotation", d->m_WidgetAnnotation[3]);
517 
518  preferences->Put("widget1 decoration color", d->m_WidgetDecorationColor[0]);
519  preferences->Put("widget2 decoration color", d->m_WidgetDecorationColor[1]);
520  preferences->Put("widget3 decoration color", d->m_WidgetDecorationColor[2]);
521  preferences->Put("widget4 decoration color", d->m_WidgetDecorationColor[3]);
522 
523  preferences->Put("widget1 first background color", d->m_WidgetBackgroundColor1[0]);
524  preferences->Put("widget2 first background color", d->m_WidgetBackgroundColor1[1]);
525  preferences->Put("widget3 first background color", d->m_WidgetBackgroundColor1[2]);
526  preferences->Put("widget4 first background color", d->m_WidgetBackgroundColor1[3]);
527  preferences->Put("widget1 second background color", d->m_WidgetBackgroundColor2[0]);
528  preferences->Put("widget2 second background color", d->m_WidgetBackgroundColor2[1]);
529  preferences->Put("widget3 second background color", d->m_WidgetBackgroundColor2[2]);
530  preferences->Put("widget4 second background color", d->m_WidgetBackgroundColor2[3]);
531 }
532 
534 {
535  if (d->m_StdMultiWidget != 0)
536  d->m_StdMultiWidget->setFocus();
537 }
538 
540 {
541  if (d->m_StdMultiWidget)
542  {
543  if (on)
544  {
545  d->m_StdMultiWidget->ActivateMenuWidget(d->m_MenuWidgetsEnabled);
546  }
547  else
548  {
549  d->m_MenuWidgetsEnabled = d->m_StdMultiWidget->IsMenuWidgetEnabled();
550  d->m_StdMultiWidget->ActivateMenuWidget(false);
551  }
552  }
553 }
554 
QmitkRenderWindow * GetActiveQmitkRenderWindow() const override
virtual void PartHidden(const IWorkbenchPartReference::Pointer &)
virtual bool InitializeViews(const BaseGeometry *geometry, RequestType type=REQUEST_UPDATE_ALL, bool preserveRoughOrientationInWorldSpace=false)
virtual void SetConstrainedPanningZooming(bool _arg)
mitk::Color HexColorToMitkColor(const QString &widgetColorInHex)
GetColorForWidget helper method to convert a saved color string to mitk::Color.
void OnPreferencesChanged(const berry::IBerryPreferences *) override
#define MITK_ERROR
Definition: mitkLogMacros.h:24
QString MitkColorToHex(const mitk::Color &color)
MitkColorToHex Convert an mitk::Color to hex string.
bool IsDecorationEnabled(const QString &decoration) const override
void EnableDecorations(bool enable, const QStringList &decorations=QStringList()) override
virtual void PartOpened(const IWorkbenchPartReference::Pointer &)
bool IsSlicingPlanesEnabled() const override
void EnableSlicingPlanes(bool enable) override
virtual bool GetBool(const QString &key, bool def) const =0
void SetSelectedPosition(const mitk::Point3D &pos, const QString &id=QString()) override
void GetPreferenceDecorations(const berry::IBerryPreferences *preferences)
GetPreferenceDecorations Getter to fill internal members with values of preferences.
virtual mitk::DataStorage::Pointer GetDataStorage() const
void FillMembersWithCurrentDecorations()
FillMembersWithCurrentDecorations Helper method to fill internal members with current values of the s...
static RenderingManager * GetInstance()
QHash< QString, QmitkRenderWindow * > GetQmitkRenderWindows() const override
static const QString DECORATION_MENU
QStringList GetDecorations() const override
MITK implementation of the QVTKWidget.
void RequestActivateMenuWidget(bool on)
If on=true will request the QmitkStdMultiWidget set the Menu widget to whatever was the last known en...
QmitkRenderWindow * GetQmitkRenderWindow(const QString &id) const override
virtual QStringList Keys() const =0
virtual IPreferences::Pointer Parent() const =0
static const QString DECORATION_CORNER_ANNOTATION
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
virtual void PartClosed(const IWorkbenchPartReference::Pointer &)
virtual QString Get(const QString &key, const QString &def) const =0
QmitkStdMultiWidget * GetStdMultiWidget()
virtual void Put(const QString &key, const QString &value)=0
virtual void PartVisible(const IWorkbenchPartReference::Pointer &)
ObjectType * GetPointer() const
virtual berry::IPreferences::Pointer GetPreferences() const
static const QString DECORATION_BORDER
Qt toolbar representing mitk::MouseModeSwitcher.
mitk::Point3D GetSelectedPosition(const QString &id=QString()) const override
virtual int GetInt(const QString &key, int def) const =0
static const QString DECORATION_LOGO
void InitializePreferences(berry::IBerryPreferences *preferences)
InitializePreferences Internal helper method to set default preferences. This method is used to show ...
SmartPointer< Other > Cast() const
virtual Events::Types GetPartEventTypes() const =0
void CreateQtPartControl(QWidget *parent) override
virtual void InitializeViewsByBoundingObjects(const DataStorage *)
Initializes the renderwindows by the aggregated geometry of all objects that are held in the data sto...
static const QString DECORATION_BACKGROUND
void RequestUpdate(mitk::RenderingManager::RequestType requestType=mitk::RenderingManager::REQUEST_UPDATE_ALL) override
void RequestUpdateAll(RequestType type=REQUEST_UPDATE_ALL)
IWorkbenchPartSite::Pointer GetSite() const override