Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkStdMultiWidgetEditor.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,
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 QmitkStdMultiWidgetEditor_h
18 #define QmitkStdMultiWidgetEditor_h
19 
21 
23 
25 
28 class QmitkStdMultiWidgetEditorPrivate;
29 
35 {
36  Q_OBJECT
37 
38 public:
39 
41 
42  static const QString EDITOR_ID;
43 
46 
47  QmitkStdMultiWidget* GetStdMultiWidget();
48 
51  void RequestActivateMenuWidget(bool on);
52 
53  // ------------------- mitk::IRenderWindowPart ----------------------
54 
59 
63  QHash<QString,QmitkRenderWindow*> GetQmitkRenderWindows() const override;
64 
68  QmitkRenderWindow* GetQmitkRenderWindow(const QString& id) const override;
69 
73  mitk::Point3D GetSelectedPosition(const QString& id = QString()) const override;
74 
78  void SetSelectedPosition(const mitk::Point3D& pos, const QString& id = QString()) override;
79 
83  void EnableDecorations(bool enable, const QStringList& decorations = QStringList()) override;
84 
88  bool IsDecorationEnabled(const QString& decoration) const override;
89 
93  QStringList GetDecorations() const override;
94 
95  // ------------------- mitk::ILinkedRenderWindowPart ----------------------
96 
97  void EnableSlicingPlanes(bool enable) override;
98  bool IsSlicingPlanesEnabled() const override;
99 
100 
101 protected:
102 
107  void FillMembersWithCurrentDecorations();
108 
116  void GetPreferenceDecorations(const berry::IBerryPreferences *preferences);
117 
118  void SetFocus() override;
119 
120  void OnPreferencesChanged(const berry::IBerryPreferences*) override;
121 
122  void CreateQtPartControl(QWidget* parent) override;
123 
129  mitk::Color HexColorToMitkColor(const QString& widgetColorInHex);
135  QString MitkColorToHex(const mitk::Color& color);
136 
144  void InitializePreferences(berry::IBerryPreferences *preferences);
145 
146 private:
147  const QScopedPointer<QmitkStdMultiWidgetEditorPrivate> d;
148 };
149 #endif /*QmitkStdMultiWidgetEditor_h*/
virtual void SetFocus() override=0
virtual QmitkRenderWindow * GetQmitkRenderWindow(const QString &id) const =0
virtual void EnableSlicingPlanes(bool enable)=0
virtual QHash< QString, QmitkRenderWindow * > GetQmitkRenderWindows() const =0
virtual bool IsSlicingPlanesEnabled() const =0
virtual bool IsDecorationEnabled(const QString &decoration) const =0
virtual void SetSelectedPosition(const mitk::Point3D &pos, const QString &id=QString())=0
berryObjectMacro(QmitkAbstractRenderEditor, QtEditorPart, mitk::IRenderWindowPart) QmitkAbstractRenderEditor()
virtual QmitkRenderWindow * GetActiveQmitkRenderWindow() const =0
Extends the IRenderWindowPart interface with methods for controlling linked render windows...
MITK implementation of the QVTKWidget.
virtual QStringList GetDecorations() const =0
virtual mitk::Point3D GetSelectedPosition(const QString &id=QString()) const =0
#define ORG_MITK_GUI_QT_STDMULTIWIDGETEDITOR
itk::RGBPixel< float > Color
Color Standard RGB color typedef (float)
virtual void CreateQtPartControl(QWidget *parent)=0
Qt toolbar representing mitk::MouseModeSwitcher.
A convenient base class for MITK render window BlueBerry Editors.
virtual void EnableDecorations(bool enable, const QStringList &decorations=QStringList())=0