Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
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>
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 |
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.
Definition at line 52 of file QmitkRenderWindowMenu.h.
Definition at line 59 of file QmitkRenderWindowMenu.h.
Definition at line 58 of file QmitkRenderWindowMenu.h.
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().
|
override |
Definition at line 94 of file QmitkRenderWindowMenu.cpp.
|
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().
|
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().
|
protected |
Definition at line 239 of file QmitkRenderWindowMenu.cpp.
References m_CrosshairMenu, m_CrosshairModeButton, m_FullScreenButton, m_LayoutDesignButton, OnCrosshairMenuAboutToShow(), OnFullScreenButton(), and OnLayoutDesignButton().
|
protected |
Create settings menu which contains layout direction and the different layout designs.
Definition at line 278 of file QmitkRenderWindowMenu.cpp.
References QmitkMultiWidgetLayoutManager::ALL_2D_LEFT_3D_RIGHT, QmitkMultiWidgetLayoutManager::ALL_2D_TOP_3D_BOTTOM, QmitkMultiWidgetLayoutManager::ALL_HORIZONTAL, QmitkMultiWidgetLayoutManager::ALL_VERTICAL, QmitkMultiWidgetLayoutManager::DEFAULT, m_All2DLeft3DRightLayoutAction, m_All2DTop3DBottomLayoutAction, m_AllHorizontalLayoutAction, m_AllVerticalLayoutAction, m_DefaultLayoutAction, m_LayoutActionsMenu, m_OneBigLayoutAction, m_OneLeft3DRightLayoutAction, m_OneTop3DBottomLayoutAction, m_Only2DHorizontalLayoutAction, m_Only2DVerticalLayoutAction, m_RemoveOneLayoutAction, QmitkMultiWidgetLayoutManager::ONE_BIG, QmitkMultiWidgetLayoutManager::ONE_LEFT_3D_RIGHT, QmitkMultiWidgetLayoutManager::ONE_TOP_3D_BOTTOM, QmitkMultiWidgetLayoutManager::ONLY_2D_HORIZONTAL, QmitkMultiWidgetLayoutManager::ONLY_2D_VERTICAL, OnSetLayout(), and QmitkMultiWidgetLayoutManager::REMOVE_ONE.
Referenced by OnLayoutDesignButton(), and UpdateLayoutDesignList().
|
signal |
Referenced by QmitkRenderWindow::ActivateMenuWidget(), and OnCrosshairRotationModeSelected().
|
signal |
Referenced by QmitkRenderWindow::ActivateMenuWidget(), and OnCrosshairVisibilityChanged().
|
slot |
Definition at line 364 of file QmitkRenderWindowMenu.cpp.
References MITK_DEBUG.
Referenced by HideMenu(), and QmitkRenderWindowMenu().
|
slot |
Definition at line 347 of file QmitkRenderWindowMenu.cpp.
References MITK_DEBUG.
Referenced by enterEvent(), OnFullScreenButton(), OnSetLayout(), and ShowMenu().
|
overrideprotectedslot |
Definition at line 384 of file QmitkRenderWindowMenu.cpp.
References DeferredShowMenu(), and MITK_DEBUG.
|
inline |
Return layout direction of parent (axial, coronal, sagital or threeD)
Definition at line 81 of file QmitkRenderWindowMenu.h.
Referenced by QmitkRenderWindow::GetLayoutIndex().
|
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.
void QmitkRenderWindowMenu::HideMenu | ( | ) |
Definition at line 225 of file QmitkRenderWindowMenu.cpp.
References DeferredHideMenu(), and MITK_DEBUG.
Referenced by QmitkRenderWindow::AdjustRenderWindowMenuVisibility().
|
signal |
emit signal, when layout design changed by the setting menu.
Referenced by QmitkRenderWindow::ActivateMenuWidget(), OnFullScreenButton(), and OnSetLayout().
|
overrideprotectedslot |
Definition at line 390 of file QmitkRenderWindowMenu.cpp.
References MITK_DEBUG, and smoothHide().
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().
|
protectedslot |
this function is invoked when the auto-rotate action is clicked
Definition at line 404 of file QmitkRenderWindowMenu.cpp.
Referenced by OnCrosshairMenuAboutToShow().
|
protectedslot |
Definition at line 459 of file QmitkRenderWindowMenu.cpp.
References m_CrosshairMenu, m_TSLabel, OnAutoRotationActionTriggered(), OnCrosshairRotationModeSelected(), OnCrosshairVisibilityChanged(), OnTSNumChanged(), ResetView(), mitk::BaseRenderer::Standard2D, and mitk::BaseRenderer::Standard3D.
Referenced by CreateMenuWidget().
|
protectedslot |
Definition at line 600 of file QmitkRenderWindowMenu.cpp.
References CrosshairRotationModeChanged().
Referenced by OnCrosshairMenuAboutToShow().
|
protectedslot |
Definition at line 594 of file QmitkRenderWindowMenu.cpp.
References CrosshairVisibilityChanged().
Referenced by OnCrosshairMenuAboutToShow().
|
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().
|
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().
|
protectedslot |
Definition at line 639 of file QmitkRenderWindowMenu.cpp.
References ChangeFullScreenIcon(), DeferredShowMenu(), LayoutDesignChanged(), and m_FullScreenMode.
Referenced by CreateSettingsWidget().
|
protectedslot |
Definition at line 418 of file QmitkRenderWindowMenu.cpp.
References mitk::RenderingManager::GetInstance(), mitk::EnumerationProperty::GetValueAsId(), m_TSLabel, MITK_DEBUG, mitk::BoolProperty::New(), mitk::IntProperty::New(), mitk::ResliceMethodProperty::New(), and mitk::RenderingManager::RequestUpdateAll().
Referenced by OnCrosshairMenuAboutToShow().
|
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.
|
signal |
Referenced by QmitkRenderWindow::ActivateMenuWidget(), and OnCrosshairMenuAboutToShow().
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().
void QmitkRenderWindowMenu::ShowMenu | ( | ) |
Definition at line 219 of file QmitkRenderWindowMenu.cpp.
References DeferredShowMenu(), and MITK_DEBUG.
Referenced by QmitkRenderWindow::AdjustRenderWindowMenuVisibility().
|
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().
void QmitkRenderWindowMenu::UpdateLayoutDesignList | ( | LayoutDesign | layoutDesign | ) |
Update list of layout design (standard layout, 2D images top, 3D bottom ..). Set action of current layout design to disable and all other to enable.
Definition at line 107 of file QmitkRenderWindowMenu.cpp.
References QmitkMultiWidgetLayoutManager::ALL_2D_LEFT_3D_RIGHT, QmitkMultiWidgetLayoutManager::ALL_2D_TOP_3D_BOTTOM, QmitkMultiWidgetLayoutManager::ALL_HORIZONTAL, QmitkMultiWidgetLayoutManager::ALL_VERTICAL, CreateSettingsWidget(), QmitkMultiWidgetLayoutManager::DEFAULT, m_All2DLeft3DRightLayoutAction, m_All2DTop3DBottomLayoutAction, m_AllHorizontalLayoutAction, m_AllVerticalLayoutAction, m_DefaultLayoutAction, m_LayoutActionsMenu, m_OneBigLayoutAction, m_OneLeft3DRightLayoutAction, m_OneTop3DBottomLayoutAction, m_Only2DHorizontalLayoutAction, m_Only2DVerticalLayoutAction, m_RemoveOneLayoutAction, MoveWidgetToCorrectPos(), QmitkMultiWidgetLayoutManager::NONE, QmitkMultiWidgetLayoutManager::ONE_BIG, QmitkMultiWidgetLayoutManager::ONE_LEFT_3D_RIGHT, QmitkMultiWidgetLayoutManager::ONE_TOP_3D_BOTTOM, QmitkMultiWidgetLayoutManager::ONLY_2D_HORIZONTAL, QmitkMultiWidgetLayoutManager::ONLY_2D_VERTICAL, and QmitkMultiWidgetLayoutManager::REMOVE_ONE.
Referenced by QmitkRenderWindow::LayoutDesignListChanged().
|
protected |
Definition at line 172 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 171 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 178 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 179 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 184 of file QmitkRenderWindowMenu.h.
Referenced by CreateMenuWidget(), and OnCrosshairMenuAboutToShow().
|
protected |
Definition at line 164 of file QmitkRenderWindowMenu.h.
Referenced by CreateMenuWidget().
|
protected |
Definition at line 170 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 166 of file QmitkRenderWindowMenu.h.
Referenced by ChangeFullScreenIcon(), and CreateMenuWidget().
|
protected |
Flag if full-screen mode is activated or deactivated.
Definition at line 187 of file QmitkRenderWindowMenu.h.
Referenced by ChangeFullScreenIcon(), OnFullScreenButton(), and OnSetLayout().
|
protected |
Definition at line 169 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), OnLayoutDesignButton(), and UpdateLayoutDesignList().
|
protected |
Definition at line 168 of file QmitkRenderWindowMenu.h.
Referenced by CreateMenuWidget(), and OnLayoutDesignButton().
|
protected |
Definition at line 173 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 177 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 176 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 174 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 175 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 180 of file QmitkRenderWindowMenu.h.
Referenced by CreateSettingsWidget(), and UpdateLayoutDesignList().
|
protected |
Definition at line 182 of file QmitkRenderWindowMenu.h.
Referenced by OnCrosshairMenuAboutToShow(), and OnTSNumChanged().