Medical Imaging Interaction Toolkit  2018.4.99-f51274ea
Medical Imaging Interaction Toolkit
QmitkRenderWindow Class Reference

MITK implementation of the QVTKWidget. More...

#include <QmitkRenderWindow.h>

Inheritance diagram for QmitkRenderWindow:
Collaboration diagram for QmitkRenderWindow:


void LayoutDesignChanged (QmitkRenderWindowMenu::LayoutDesign)
void ResetView ()
void CrosshairRotationModeChanged (int)
void CrosshairVisibilityChanged (bool)
void moved ()
void NodesDropped (QmitkRenderWindow *thisWindow, std::vector< mitk::DataNode *> nodes)
 Emits a signal to say that this window has had the following nodes dropped on it. More...

Public Member Functions

 QmitkRenderWindow (QWidget *parent=nullptr, const QString &name="unnamed renderwindow", mitk::VtkPropRenderer *renderer=nullptr)
 ~QmitkRenderWindow () override
virtual void SetResendQtEvents (bool resend)
 Whether Qt events should be passed to parent (default: true) More...
void SetLayoutIndex (QmitkRenderWindowMenu::LayoutIndex layoutIndex)
QmitkRenderWindowMenu::LayoutIndex GetLayoutIndex ()
void LayoutDesignListChanged (QmitkRenderWindowMenu::LayoutDesign layoutDesign)
void ActivateMenuWidget (bool state)
bool GetActivateMenuWidgetFlag ()
vtkRenderWindow * GetVtkRenderWindow () override
vtkRenderWindowInteractor * GetVtkRenderWindowInteractor () override
- Public Member Functions inherited from mitk::RenderWindowBase
virtual ~RenderWindowBase ()
void InitRenderer ()
virtual mitk::SliceNavigationControllerGetSliceNavigationController ()
virtual mitk::CameraRotationControllerGetCameraRotationController ()
virtual mitk::BaseControllerGetController ()
virtual mitk::VtkPropRendererGetRenderer ()
virtual bool HandleEvent (InteractionEvent *interactionEvent)

Protected Member Functions

void moveEvent (QMoveEvent *event) override
void showEvent (QShowEvent *event) override
void mousePressEvent (QMouseEvent *event) override
void mouseDoubleClickEvent (QMouseEvent *event) override
void mouseMoveEvent (QMouseEvent *event) override
void mouseReleaseEvent (QMouseEvent *event) override
void keyPressEvent (QKeyEvent *event) override
void enterEvent (QEvent *) override
void leaveEvent (QEvent *) override
void resizeGL (int w, int h) override
void dragEnterEvent (QDragEnterEvent *event) override
 Simply says we accept the event type. More...
void dropEvent (QDropEvent *event) override
 If the dropped type is application/x-mitk-datanodes we process the request by converting to mitk::DataNode pointers and emitting the NodesDropped signal. More...
void wheelEvent (QWheelEvent *) override
void AdjustRenderWindowMenuVisibility (const QPoint &pos)
- Protected Member Functions inherited from mitk::RenderWindowBase
 RenderWindowBase ()
void Initialize (const char *name="unnamed renderer")
void Destroy ()

Additional Inherited Members

- Protected Attributes inherited from mitk::RenderWindowBase
mitk::VtkPropRenderer::Pointer m_Renderer
bool m_InResize

Detailed Description

MITK implementation of the QVTKWidget.

Step1.cpp, Step2.cpp, Step3.cpp, Step4.cpp, Step5.cpp, and Step6.cpp.

Definition at line 35 of file QmitkRenderWindow.h.

Constructor & Destructor Documentation

◆ QmitkRenderWindow()

QmitkRenderWindow::QmitkRenderWindow ( QWidget *  parent = nullptr,
const QString &  name = "unnamed renderwindow",
mitk::VtkPropRenderer renderer = nullptr 

Definition at line 36 of file QmitkRenderWindow.cpp.

References mitk::RenderWindowBase::Initialize().

◆ ~QmitkRenderWindow()

QmitkRenderWindow::~QmitkRenderWindow ( )

Definition at line 57 of file QmitkRenderWindow.cpp.

References mitk::RenderWindowBase::Destroy().

Member Function Documentation

◆ ActivateMenuWidget()

◆ AdjustRenderWindowMenuVisibility()

void QmitkRenderWindow::AdjustRenderWindowMenuVisibility ( const QPoint &  pos)

Definition at line 286 of file QmitkRenderWindow.cpp.

References mitk::InteractionEvent::AltKey, mitk::InteractionEvent::ControlKey, QmitkRenderWindowMenu::HideMenu(), mitk::Key_Delete, mitk::Key_Down, mitk::Key_End, mitk::Key_Enter, mitk::Key_Escape, mitk::Key_F1, mitk::Key_F10, mitk::Key_F11, mitk::Key_F12, mitk::Key_F2, mitk::Key_F3, mitk::Key_F4, mitk::Key_F5, mitk::Key_F6, mitk::Key_F7, mitk::Key_F8, mitk::Key_F9, mitk::Key_Home, mitk::Key_Insert, mitk::Key_Left, mitk::Key_PageDown, mitk::Key_PageUp, mitk::Key_Return, mitk::Key_Right, mitk::Key_Space, mitk::Key_Up, mitk::InteractionEvent::KeyArrowDown, mitk::InteractionEvent::KeyArrowLeft, mitk::InteractionEvent::KeyArrowRight, mitk::InteractionEvent::KeyArrowUp, mitk::InteractionEvent::KeyDelete, mitk::InteractionEvent::KeyEnd, mitk::InteractionEvent::KeyEnter, mitk::InteractionEvent::KeyEsc, mitk::InteractionEvent::KeyF1, mitk::InteractionEvent::KeyF10, mitk::InteractionEvent::KeyF11, mitk::InteractionEvent::KeyF12, mitk::InteractionEvent::KeyF2, mitk::InteractionEvent::KeyF3, mitk::InteractionEvent::KeyF4, mitk::InteractionEvent::KeyF5, mitk::InteractionEvent::KeyF6, mitk::InteractionEvent::KeyF7, mitk::InteractionEvent::KeyF8, mitk::InteractionEvent::KeyF9, mitk::InteractionEvent::KeyInsert, mitk::InteractionEvent::KeyPageDown, mitk::InteractionEvent::KeyPageUp, mitk::InteractionEvent::KeyPos1, mitk::InteractionEvent::KeyReturn, mitk::InteractionEvent::KeySpace, mitk::InteractionEvent::LeftMouseButton, mitk::RenderWindowBase::m_Renderer, mitk::InteractionEvent::MiddleMouseButton, MITK_DEBUG, QmitkRenderWindowMenu::MoveWidgetToCorrectPos(), mitk::InteractionEvent::NoButton, mitk::InteractionEvent::NoKey, mitk::InteractionEvent::RightMouseButton, mitk::InteractionEvent::ShiftKey, and QmitkRenderWindowMenu::ShowMenu().

Referenced by mouseMoveEvent().

◆ CrosshairRotationModeChanged

void QmitkRenderWindow::CrosshairRotationModeChanged ( int  )

◆ CrosshairVisibilityChanged

void QmitkRenderWindow::CrosshairVisibilityChanged ( bool  )

◆ dragEnterEvent()

void QmitkRenderWindow::dragEnterEvent ( QDragEnterEvent *  event)

Simply says we accept the event type.

Definition at line 269 of file QmitkRenderWindow.cpp.

◆ dropEvent()

void QmitkRenderWindow::dropEvent ( QDropEvent *  event)

If the dropped type is application/x-mitk-datanodes we process the request by converting to mitk::DataNode pointers and emitting the NodesDropped signal.

Definition at line 277 of file QmitkRenderWindow.cpp.

References NodesDropped(), and QmitkMimeTypes::ToDataNodePtrList().

◆ enterEvent()

void QmitkRenderWindow::enterEvent ( QEvent *  e)

Definition at line 243 of file QmitkRenderWindow.cpp.

◆ GetActivateMenuWidgetFlag()

bool QmitkRenderWindow::GetActivateMenuWidgetFlag ( )

◆ GetLayoutIndex()

QmitkRenderWindowMenu::LayoutIndex QmitkRenderWindow::GetLayoutIndex ( )

◆ GetVtkRenderWindow()

vtkRenderWindow* QmitkRenderWindow::GetVtkRenderWindow ( )

◆ GetVtkRenderWindowInteractor()

vtkRenderWindowInteractor* QmitkRenderWindow::GetVtkRenderWindowInteractor ( )

Implements mitk::RenderWindowBase.

Definition at line 80 of file QmitkRenderWindow.h.

References GetButtonState(), and GetEventButton().

◆ keyPressEvent()

void QmitkRenderWindow::keyPressEvent ( QKeyEvent *  event)

◆ LayoutDesignChanged

◆ LayoutDesignListChanged()

void QmitkRenderWindow::LayoutDesignListChanged ( QmitkRenderWindowMenu::LayoutDesign  layoutDesign)

◆ leaveEvent()

void QmitkRenderWindow::leaveEvent ( QEvent *  e)

◆ mouseDoubleClickEvent()

void QmitkRenderWindow::mouseDoubleClickEvent ( QMouseEvent *  event)

◆ mouseMoveEvent()

void QmitkRenderWindow::mouseMoveEvent ( QMouseEvent *  event)

◆ mousePressEvent()

void QmitkRenderWindow::mousePressEvent ( QMouseEvent *  event)

◆ mouseReleaseEvent()

void QmitkRenderWindow::mouseReleaseEvent ( QMouseEvent *  event)

◆ moved

void QmitkRenderWindow::moved ( )

Referenced by moveEvent(), and showEvent().

◆ moveEvent()

void QmitkRenderWindow::moveEvent ( QMoveEvent *  event)

Definition at line 124 of file QmitkRenderWindow.cpp.

References moved().

◆ NodesDropped

void QmitkRenderWindow::NodesDropped ( QmitkRenderWindow thisWindow,
std::vector< mitk::DataNode *>  nodes 

Emits a signal to say that this window has had the following nodes dropped on it.

Referenced by dropEvent().

◆ ResetView

void QmitkRenderWindow::ResetView ( )

◆ resizeGL()

void QmitkRenderWindow::resizeGL ( int  w,
int  h 

◆ SetLayoutIndex()

void QmitkRenderWindow::SetLayoutIndex ( QmitkRenderWindowMenu::LayoutIndex  layoutIndex)

◆ SetResendQtEvents()

void QmitkRenderWindow::SetResendQtEvents ( bool  resend)

Whether Qt events should be passed to parent (default: true)

With introduction of the QVTKWidget the behaviour regarding Qt events changed. QVTKWidget "accepts" Qt events like mouse clicks (i.e. set an "accepted" flag). When this flag is set, Qt fininshed handling of this event – otherwise it is reached through to the widget's parent.

This reaching through to the parent was implicitly required by QmitkMaterialWidget / QmitkMaterialShowCase.

The default behaviour of QmitkRenderWindow is now to clear the "accepted" flag of Qt events after they were handled by QVTKWidget. This way parents can also handle events.

If you don't want this behaviour, call SetResendQtEvents(true) on your render window.

Definition at line 62 of file QmitkRenderWindow.cpp.

◆ showEvent()

void QmitkRenderWindow::showEvent ( QShowEvent *  event)

Definition at line 132 of file QmitkRenderWindow.cpp.

References moved().

◆ wheelEvent()

void QmitkRenderWindow::wheelEvent ( QWheelEvent *  we)

The documentation for this class was generated from the following files: