Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkMouseModeSwitcher Class Reference

Qt toolbar representing mitk::MouseModeSwitcher. More...

#include <QmitkMouseModeSwitcher.h>

Inheritance diagram for QmitkMouseModeSwitcher:
Collaboration diagram for QmitkMouseModeSwitcher:

Public Types

typedef mitk::MouseModeSwitcher::MouseMode MouseMode
 

Public Slots

void setMouseModeSwitcher (mitk::MouseModeSwitcher *)
 Connect to non-GUI class. More...
 

Signals

void MouseModeSelected (mitk::MouseModeSwitcher::MouseMode id)
 Mode activated. More...
 

Public Member Functions

 QmitkMouseModeSwitcher (QWidget *parent=0)
 
virtual ~QmitkMouseModeSwitcher ()
 

Protected Slots

void modeSelectedByUser ()
 
void addButton (MouseMode id, const QString &toolName, const QIcon &icon, bool on=false)
 

Protected Member Functions

void OnMouseModeChanged (const itk::EventObject &)
 

Protected Attributes

QActionGroup * m_ActionGroup
 
mitk::MouseModeSwitcherm_MouseModeSwitcher
 
unsigned long m_ObserverTag
 
bool m_InObservationReaction
 

Detailed Description

Qt toolbar representing mitk::MouseModeSwitcher.

Provides buttons for the interaction modes defined in mitk::MouseModeSwitcher and communicates with this non-graphical class.

Can be used in a GUI to provide a mouse mode selector to the user.

Definition at line 36 of file QmitkMouseModeSwitcher.h.

Member Typedef Documentation

Constructor & Destructor Documentation

QmitkMouseModeSwitcher::~QmitkMouseModeSwitcher ( )
virtual

Definition at line 49 of file QmitkMouseModeSwitcher.cpp.

References m_MouseModeSwitcher, and m_ObserverTag.

Member Function Documentation

void QmitkMouseModeSwitcher::addButton ( MouseMode  id,
const QString &  toolName,
const QIcon &  icon,
bool  on = false 
)
protectedslot

Definition at line 38 of file QmitkMouseModeSwitcher.cpp.

References m_ActionGroup, and modeSelectedByUser().

Referenced by QmitkMouseModeSwitcher().

void QmitkMouseModeSwitcher::modeSelectedByUser ( )
protectedslot
void QmitkMouseModeSwitcher::MouseModeSelected ( mitk::MouseModeSwitcher::MouseMode  id)
signal

Mode activated.

This signal is needed for other GUI element to react appropriately. Sadly this is needed to provide "normal" functionality of QmitkStdMultiWidget, because this must enable/disable automatic reaction of SliceNavigationControllers to mouse clicks - depending on which mode is active.

Referenced by modeSelectedByUser().

void QmitkMouseModeSwitcher::OnMouseModeChanged ( const itk::EventObject &  )
protected
void QmitkMouseModeSwitcher::setMouseModeSwitcher ( mitk::MouseModeSwitcher mms)
slot

Connect to non-GUI class.

When a button is pressed, given mitk::MouseModeSwitcher is informed to adapt interactors.

Definition at line 57 of file QmitkMouseModeSwitcher.cpp.

References m_MouseModeSwitcher, m_ObserverTag, mitk::New(), and OnMouseModeChanged().

Member Data Documentation

QActionGroup* QmitkMouseModeSwitcher::m_ActionGroup
protected

Definition at line 81 of file QmitkMouseModeSwitcher.h.

Referenced by addButton(), OnMouseModeChanged(), and QmitkMouseModeSwitcher().

bool QmitkMouseModeSwitcher::m_InObservationReaction
protected

Definition at line 86 of file QmitkMouseModeSwitcher.h.

Referenced by modeSelectedByUser(), and OnMouseModeChanged().

mitk::MouseModeSwitcher* QmitkMouseModeSwitcher::m_MouseModeSwitcher
protected
unsigned long QmitkMouseModeSwitcher::m_ObserverTag
protected

Definition at line 84 of file QmitkMouseModeSwitcher.h.

Referenced by setMouseModeSwitcher(), and ~QmitkMouseModeSwitcher().


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