Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkRenderWindowMenu Class Reference

The QmitkRenderWindowMenu is a popup Widget which shows up when the mouse cursor enter a QmitkRenderWindow. The Menu Widget is located in the right top corner of each RenderWindow. It includes different settings. For example the layout design can be changed with the setting button. Switching between full-screen mode and layout design can be done with the full-screen button. The popup Widget can be deactivated with ActivateMenuWidget(false) in QmitkRenderWindow. More...

#include <QmitkRenderWindowMenu.h>

Inheritance diagram for QmitkRenderWindowMenu:
Collaboration diagram for QmitkRenderWindowMenu:

Public Types

using LayoutIndex = mitk::BaseRenderer::ViewDirection
 
using LayoutDesign = QmitkMultiWidgetLayoutManager::LayoutDesign
 

Public Slots

void DeferredShowMenu ()
 
void DeferredHideMenu ()
 
void smoothHide ()
 

Signals

void ResetView ()
 
void CrosshairVisibilityChanged (bool)
 
void CrosshairRotationModeChanged (int)
 
void LayoutDesignChanged (LayoutDesign layoutDesign)
 

Public Member Functions

 QmitkRenderWindowMenu (QWidget *parent=nullptr, Qt::WindowFlags f=nullptr, mitk::BaseRenderer *b=nullptr)
 
 ~QmitkRenderWindowMenu () override
 
bool GetSettingsMenuVisibilty ()
 
void SetLayoutIndex (LayoutIndex layoutIndex)
 
LayoutIndex GetLayoutIndex ()
 
void UpdateLayoutDesignList (LayoutDesign layoutDesign)
 
void MoveWidgetToCorrectPos (float)
 
void ShowMenu ()
 
void HideMenu ()
 

Protected Slots

void enterEvent (QEvent *) override
 
void leaveEvent (QEvent *) override
 
void AutoRotateNextStep ()
 
void OnAutoRotationActionTriggered ()
 
void OnTSNumChanged (int)
 
void OnCrosshairMenuAboutToShow ()
 
void OnCrosshairVisibilityChanged (bool)
 
void OnCrosshairRotationModeSelected (QAction *)
 
void OnFullScreenButton (bool checked)
 
void OnLayoutDesignButton (bool checked)
 
void OnSetLayout (LayoutDesign layoutDesign)
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 
void CreateMenuWidget ()
 
void CreateSettingsWidget ()
 
void ChangeFullScreenIcon ()
 

Protected Attributes

QToolButton * m_CrosshairModeButton
 
QToolButton * m_FullScreenButton
 
QToolButton * m_LayoutDesignButton
 
QMenu * m_LayoutActionsMenu
 
QAction * m_DefaultLayoutAction
 
QAction * m_All2DTop3DBottomLayoutAction
 
QAction * m_All2DLeft3DRightLayoutAction
 
QAction * m_OneBigLayoutAction
 
QAction * m_Only2DHorizontalLayoutAction
 
QAction * m_Only2DVerticalLayoutAction
 
QAction * m_OneTop3DBottomLayoutAction
 
QAction * m_OneLeft3DRightLayoutAction
 
QAction * m_AllHorizontalLayoutAction
 
QAction * m_AllVerticalLayoutAction
 
QAction * m_RemoveOneLayoutAction
 
QLabel * m_TSLabel
 
QMenu * m_CrosshairMenu
 
bool m_FullScreenMode
 

Detailed Description

The QmitkRenderWindowMenu is a popup Widget which shows up when the mouse cursor enter a QmitkRenderWindow. The Menu Widget is located in the right top corner of each RenderWindow. It includes different settings. For example the layout design can be changed with the setting button. Switching between full-screen mode and layout design can be done with the full-screen button. The popup Widget can be deactivated with ActivateMenuWidget(false) in QmitkRenderWindow.

See also
QmitkRenderWindow

Definition at line 52 of file QmitkRenderWindowMenu.h.

Member Typedef Documentation

◆ LayoutDesign

◆ LayoutIndex

Constructor & Destructor Documentation

◆ QmitkRenderWindowMenu()

QmitkRenderWindowMenu::QmitkRenderWindowMenu ( QWidget *  parent = nullptr,
Qt::WindowFlags  f = nullptr,
mitk::BaseRenderer b = nullptr 
)

Definition at line 50 of file QmitkRenderWindowMenu.cpp.

References AutoRotateNextStep(), and DeferredHideMenu().

◆ ~QmitkRenderWindowMenu()

QmitkRenderWindowMenu::~QmitkRenderWindowMenu ( )
override

Definition at line 94 of file QmitkRenderWindowMenu.cpp.

Member Function Documentation

◆ AutoRotateNextStep

void QmitkRenderWindowMenu::AutoRotateNextStep ( )
protectedslot

this function is continuously called by a timer to do the auto rotation

Definition at line 396 of file QmitkRenderWindowMenu.cpp.

Referenced by QmitkRenderWindowMenu().

◆ ChangeFullScreenIcon()

void QmitkRenderWindowMenu::ChangeFullScreenIcon ( )
protected

Change Icon of full-screen button depending on full-screen mode.

Definition at line 342 of file QmitkRenderWindowMenu.cpp.

References m_FullScreenButton, and m_FullScreenMode.

Referenced by OnFullScreenButton(), and OnSetLayout().

◆ CreateMenuWidget()

void QmitkRenderWindowMenu::CreateMenuWidget ( )
protected

◆ CreateSettingsWidget()

◆ CrosshairRotationModeChanged

void QmitkRenderWindowMenu::CrosshairRotationModeChanged ( int  )
signal

◆ CrosshairVisibilityChanged

void QmitkRenderWindowMenu::CrosshairVisibilityChanged ( bool  )
signal

◆ DeferredHideMenu

void QmitkRenderWindowMenu::DeferredHideMenu ( )
slot

Definition at line 364 of file QmitkRenderWindowMenu.cpp.

References MITK_DEBUG.

Referenced by HideMenu(), and QmitkRenderWindowMenu().

◆ DeferredShowMenu

void QmitkRenderWindowMenu::DeferredShowMenu ( )
slot

Definition at line 347 of file QmitkRenderWindowMenu.cpp.

References MITK_DEBUG.

Referenced by enterEvent(), OnFullScreenButton(), OnSetLayout(), and ShowMenu().

◆ enterEvent

void QmitkRenderWindowMenu::enterEvent ( QEvent *  )
overrideprotectedslot

Definition at line 384 of file QmitkRenderWindowMenu.cpp.

References DeferredShowMenu(), and MITK_DEBUG.

◆ GetLayoutIndex()

LayoutIndex QmitkRenderWindowMenu::GetLayoutIndex ( )
inline

Return layout direction of parent (axial, coronal, sagital or threeD)

Definition at line 81 of file QmitkRenderWindowMenu.h.

Referenced by QmitkRenderWindow::GetLayoutIndex().

◆ GetSettingsMenuVisibilty()

bool QmitkRenderWindowMenu::GetSettingsMenuVisibilty ( )
inline

Return visibility of settings menu. The menu is connected with m_SettingsButton and includes layout direction (axial, coronal .. ) and layout design (standard layout, 2D images top, 3D bottom ... ).

Definition at line 69 of file QmitkRenderWindowMenu.h.

◆ HideMenu()

void QmitkRenderWindowMenu::HideMenu ( )

◆ LayoutDesignChanged

void QmitkRenderWindowMenu::LayoutDesignChanged ( LayoutDesign  layoutDesign)
signal

emit signal, when layout design changed by the setting menu.

Referenced by QmitkRenderWindow::ActivateMenuWidget(), OnFullScreenButton(), and OnSetLayout().

◆ leaveEvent

void QmitkRenderWindowMenu::leaveEvent ( QEvent *  )
overrideprotectedslot

Definition at line 390 of file QmitkRenderWindowMenu.cpp.

References MITK_DEBUG, and smoothHide().

◆ MoveWidgetToCorrectPos()

void QmitkRenderWindowMenu::MoveWidgetToCorrectPos ( float  )

Move menu widget to correct position (right upper corner). E.g. it is necessary when the full-screen mode is activated.

Definition at line 195 of file QmitkRenderWindowMenu.cpp.

Referenced by QmitkRenderWindow::AdjustRenderWindowMenuVisibility(), OnFullScreenButton(), and UpdateLayoutDesignList().

◆ OnAutoRotationActionTriggered

void QmitkRenderWindowMenu::OnAutoRotationActionTriggered ( )
protectedslot

this function is invoked when the auto-rotate action is clicked

Definition at line 404 of file QmitkRenderWindowMenu.cpp.

Referenced by OnCrosshairMenuAboutToShow().

◆ OnCrosshairMenuAboutToShow

◆ OnCrosshairRotationModeSelected

void QmitkRenderWindowMenu::OnCrosshairRotationModeSelected ( QAction *  action)
protectedslot

Definition at line 600 of file QmitkRenderWindowMenu.cpp.

References CrosshairRotationModeChanged().

Referenced by OnCrosshairMenuAboutToShow().

◆ OnCrosshairVisibilityChanged

void QmitkRenderWindowMenu::OnCrosshairVisibilityChanged ( bool  visible)
protectedslot

Definition at line 594 of file QmitkRenderWindowMenu.cpp.

References CrosshairVisibilityChanged().

Referenced by OnCrosshairMenuAboutToShow().

◆ OnFullScreenButton

void QmitkRenderWindowMenu::OnFullScreenButton ( bool  checked)
protectedslot

slot for activating/deactivating the full-screen mode. The slot is connected to the clicked() event of m_FullScreenButton. Activating the full-screen maximize the current widget, deactivating restore If layout design changed by the settings menu, the full-Screen mode is automatically switched to false.

Definition at line 606 of file QmitkRenderWindowMenu.cpp.

References ChangeFullScreenIcon(), DeferredShowMenu(), LayoutDesignChanged(), m_FullScreenMode, MoveWidgetToCorrectPos(), and QmitkMultiWidgetLayoutManager::ONE_BIG.

Referenced by CreateMenuWidget().

◆ OnLayoutDesignButton

void QmitkRenderWindowMenu::OnLayoutDesignButton ( bool  checked)
protectedslot

Slot for opening setting menu. The slot is connected to the clicked() event of m_SettingsButton. The settings menu includes different layout directions (axial, coronal, sagittal and 3D) as well all layout design (standard layout, 2D images top, 3D bottom ..)

Definition at line 627 of file QmitkRenderWindowMenu.cpp.

References CreateSettingsWidget(), m_LayoutActionsMenu, and m_LayoutDesignButton.

Referenced by CreateMenuWidget().

◆ OnSetLayout

void QmitkRenderWindowMenu::OnSetLayout ( LayoutDesign  layoutDesign)
protectedslot

◆ OnTSNumChanged

◆ paintEvent()

void QmitkRenderWindowMenu::paintEvent ( QPaintEvent *  event)
overrideprotected

Reimplemented from QWidget. The paint event is a request to repaint all or part of a widget.

Definition at line 231 of file QmitkRenderWindowMenu.cpp.

◆ ResetView

void QmitkRenderWindowMenu::ResetView ( )
signal

◆ SetLayoutIndex()

void QmitkRenderWindowMenu::SetLayoutIndex ( LayoutIndex  layoutIndex)

Set layout index. Defines layout direction (axial, coronal, sagital or threeD) of the parent.

Definition at line 102 of file QmitkRenderWindowMenu.cpp.

Referenced by QmitkRenderWindow::ActivateMenuWidget(), and QmitkRenderWindow::SetLayoutIndex().

◆ ShowMenu()

void QmitkRenderWindowMenu::ShowMenu ( )

◆ smoothHide

void QmitkRenderWindowMenu::smoothHide ( )
slot

This method is responsible for non fluttering of the renderWindowMenu when mouse cursor moves along the renderWindowMenu

Definition at line 378 of file QmitkRenderWindowMenu.cpp.

References MITK_DEBUG.

Referenced by QmitkRenderWindow::leaveEvent(), and leaveEvent().

◆ UpdateLayoutDesignList()

Member Data Documentation

◆ m_All2DLeft3DRightLayoutAction

QAction* QmitkRenderWindowMenu::m_All2DLeft3DRightLayoutAction
protected

Definition at line 172 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_All2DTop3DBottomLayoutAction

QAction* QmitkRenderWindowMenu::m_All2DTop3DBottomLayoutAction
protected

Definition at line 171 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_AllHorizontalLayoutAction

QAction* QmitkRenderWindowMenu::m_AllHorizontalLayoutAction
protected

Definition at line 178 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_AllVerticalLayoutAction

QAction* QmitkRenderWindowMenu::m_AllVerticalLayoutAction
protected

Definition at line 179 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_CrosshairMenu

QMenu* QmitkRenderWindowMenu::m_CrosshairMenu
protected

Definition at line 184 of file QmitkRenderWindowMenu.h.

Referenced by CreateMenuWidget(), and OnCrosshairMenuAboutToShow().

◆ m_CrosshairModeButton

QToolButton* QmitkRenderWindowMenu::m_CrosshairModeButton
protected

Definition at line 164 of file QmitkRenderWindowMenu.h.

Referenced by CreateMenuWidget().

◆ m_DefaultLayoutAction

QAction* QmitkRenderWindowMenu::m_DefaultLayoutAction
protected

Definition at line 170 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_FullScreenButton

QToolButton* QmitkRenderWindowMenu::m_FullScreenButton
protected

Definition at line 166 of file QmitkRenderWindowMenu.h.

Referenced by ChangeFullScreenIcon(), and CreateMenuWidget().

◆ m_FullScreenMode

bool QmitkRenderWindowMenu::m_FullScreenMode
protected

Flag if full-screen mode is activated or deactivated.

Definition at line 187 of file QmitkRenderWindowMenu.h.

Referenced by ChangeFullScreenIcon(), OnFullScreenButton(), and OnSetLayout().

◆ m_LayoutActionsMenu

QMenu* QmitkRenderWindowMenu::m_LayoutActionsMenu
protected

◆ m_LayoutDesignButton

QToolButton* QmitkRenderWindowMenu::m_LayoutDesignButton
protected

Definition at line 168 of file QmitkRenderWindowMenu.h.

Referenced by CreateMenuWidget(), and OnLayoutDesignButton().

◆ m_OneBigLayoutAction

QAction* QmitkRenderWindowMenu::m_OneBigLayoutAction
protected

Definition at line 173 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_OneLeft3DRightLayoutAction

QAction* QmitkRenderWindowMenu::m_OneLeft3DRightLayoutAction
protected

Definition at line 177 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_OneTop3DBottomLayoutAction

QAction* QmitkRenderWindowMenu::m_OneTop3DBottomLayoutAction
protected

Definition at line 176 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_Only2DHorizontalLayoutAction

QAction* QmitkRenderWindowMenu::m_Only2DHorizontalLayoutAction
protected

Definition at line 174 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_Only2DVerticalLayoutAction

QAction* QmitkRenderWindowMenu::m_Only2DVerticalLayoutAction
protected

Definition at line 175 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_RemoveOneLayoutAction

QAction* QmitkRenderWindowMenu::m_RemoveOneLayoutAction
protected

Definition at line 180 of file QmitkRenderWindowMenu.h.

Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().

◆ m_TSLabel

QLabel* QmitkRenderWindowMenu::m_TSLabel
protected

Definition at line 182 of file QmitkRenderWindowMenu.h.

Referenced by OnCrosshairMenuAboutToShow(), and OnTSNumChanged().


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