Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkUSControlsCustomVideoDeviceWidget Class Reference

Widget for custom controls of mitk::USVideoDevice. This class handles the itk::USVideoDeviceCustomControls of video device objects. More...

#include <QmitkUSControlsCustomVideoDeviceWidget.h>

Inheritance diagram for QmitkUSControlsCustomVideoDeviceWidget:
Collaboration diagram for QmitkUSControlsCustomVideoDeviceWidget:

Public Member Functions

 QmitkUSControlsCustomVideoDeviceWidget (QWidget *parent=0)
 
 ~QmitkUSControlsCustomVideoDeviceWidget ()
 
virtual std::string GetDeviceClass () const override
 
virtual QmitkUSAbstractCustomWidgetClone (QWidget *parent=0) const override
 
virtual void OnDeviceSet () override
 
virtual void Initialize () override
 Method for initializing the Qt stuff of the widget (setupUI, connect). This method will be called in CloneForQt() and has to be implemented by concrete subclasses. More...
 
- Public Member Functions inherited from QmitkUSAbstractCustomWidget
 QmitkUSAbstractCustomWidget (QWidget *parent=0)
 
virtual ~QmitkUSAbstractCustomWidget ()
 
void SetDevice (mitk::USDevice::Pointer device)
 
mitk::USDevice::Pointer GetDevice () const
 
QmitkUSAbstractCustomWidgetCloneForQt (QWidget *parent=0) const
 Return pointer to copy of the object. Internally use of QmitkUSAbstractCustomWidget::Clone() with additionaly setting an internal flag that the object was really cloned. More...
 
us::ServiceProperties GetServiceProperties () const
 Returns the properties of the micro service. Properties consist of just the device class of the corresponding mitk::USDevice. More...
 
void showEvent (QShowEvent *event) override
 Overwritten Qt even method. It is checked if the object was cloned with QmitkUSAbstractCustomWidget::CloneForQt() before. An exception is thrown if not. This is done, because using the object from micro service directly in Qt without cloning it first can cause problems after Qt deleted the object. More...
 

Protected Member Functions

void BlockSignalAndSetValue (QSpinBox *target, int value)
 

Protected Attributes

mitk::USImageVideoSource::USImageCropping m_Cropping
 

Additional Inherited Members

- Static Public Member Functions inherited from QmitkUSAbstractCustomWidget
static std::string US_DEVICE_PROPKEY_CLASS ()
 Property key for the class name of corresponding us device object. More...
 

Detailed Description

Widget for custom controls of mitk::USVideoDevice. This class handles the itk::USVideoDeviceCustomControls of video device objects.

Definition at line 35 of file QmitkUSControlsCustomVideoDeviceWidget.h.

Constructor & Destructor Documentation

QmitkUSControlsCustomVideoDeviceWidget::QmitkUSControlsCustomVideoDeviceWidget ( QWidget *  parent = 0)
explicit
QmitkUSControlsCustomVideoDeviceWidget::~QmitkUSControlsCustomVideoDeviceWidget ( )

Definition at line 32 of file QmitkUSControlsCustomVideoDeviceWidget.cpp.

Member Function Documentation

void QmitkUSControlsCustomVideoDeviceWidget::BlockSignalAndSetValue ( QSpinBox *  target,
int  value 
)
protected

Definition at line 143 of file QmitkUSControlsCustomVideoDeviceWidget.cpp.

QmitkUSAbstractCustomWidget * QmitkUSControlsCustomVideoDeviceWidget::Clone ( QWidget *  parent = 0) const
overridevirtual

Creates new QmitkUSAbstractCustomWidget with the same mitk::USVideoDevice and the same mitk::USVideoDeviceCustomControls which were set on the original object.

This method is just for being calles by the factory. Use QmitkUSAbstractCustomWidget::CloneForQt() instead, if you want a clone of an object.

Implements QmitkUSAbstractCustomWidget.

Definition at line 42 of file QmitkUSControlsCustomVideoDeviceWidget.cpp.

References QmitkUSAbstractCustomWidget::GetDevice(), QmitkUSControlsCustomVideoDeviceWidget(), and QmitkUSAbstractCustomWidget::SetDevice().

std::string QmitkUSControlsCustomVideoDeviceWidget::GetDeviceClass ( ) const
overridevirtual

Getter for the device class of mitk:USVideoDevice.

Implements QmitkUSAbstractCustomWidget.

Definition at line 37 of file QmitkUSControlsCustomVideoDeviceWidget.cpp.

References mitk::USVideoDevice::GetDeviceClassStatic().

void QmitkUSControlsCustomVideoDeviceWidget::Initialize ( )
overridevirtual

Method for initializing the Qt stuff of the widget (setupUI, connect). This method will be called in CloneForQt() and has to be implemented by concrete subclasses.

Warning
All Qt initialization stuff belongs into this method rather than in the constructor.

Implements QmitkUSAbstractCustomWidget.

Definition at line 85 of file QmitkUSControlsCustomVideoDeviceWidget.cpp.

void QmitkUSControlsCustomVideoDeviceWidget::OnDeviceSet ( )
overridevirtual

Gets control interface from the device which was currently set. Control elements are according to current crop area of the device. If custom control interface is null, the control elements stay disabled.

Implements QmitkUSAbstractCustomWidget.

Definition at line 49 of file QmitkUSControlsCustomVideoDeviceWidget.cpp.

References mitk::USImageVideoSource::USImageCropping::bottom, QmitkUSAbstractCustomWidget::GetDevice(), mitk::USImageVideoSource::USImageCropping::left, MITK_WARN, mitk::USImageVideoSource::USImageCropping::right, and mitk::USImageVideoSource::USImageCropping::top.

Member Data Documentation

mitk::USImageVideoSource::USImageCropping QmitkUSControlsCustomVideoDeviceWidget::m_Cropping
protected

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