MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkUSNavigationCalibrationUpdateDepthDelegate.cpp
Go to the documentation of this file.
1
/*============================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center (DKFZ)
6
All rights reserved.
7
8
Use of this source code is governed by a 3-clause BSD license that can be
9
found in the LICENSE file.
10
11
============================================================================*/
12
#include "
QmitkUSNavigationCalibrationUpdateDepthDelegate.h
"
13
14
#include <QEvent>
15
16
QmitkUSNavigationCalibrationUpdateDepthDelegate::QmitkUSNavigationCalibrationUpdateDepthDelegate
(QObject* parent)
17
: QStyledItemDelegate(parent)
18
{
19
}
20
21
QmitkUSNavigationCalibrationUpdateDepthDelegate::~QmitkUSNavigationCalibrationUpdateDepthDelegate
()
22
{
23
}
24
25
void
QmitkUSNavigationCalibrationUpdateDepthDelegate::SetControlInterfaceBMode
(mitk::USControlInterfaceBMode::Pointer controlInterfaceBMode)
26
{
27
m_ControlInterfaceBMode = controlInterfaceBMode;
28
}
29
30
bool
QmitkUSNavigationCalibrationUpdateDepthDelegate::editorEvent
(QEvent *event, QAbstractItemModel *model,
const
QStyleOptionViewItem& option,
const
QModelIndex &index)
31
{
32
if
( event->type() == QEvent::MouseButtonDblClick && m_ControlInterfaceBMode.IsNotNull() )
33
{
34
// change the b mode ultrasound image to the selected depth of the data model
35
m_ControlInterfaceBMode->SetScanningDepth(model->data(index).toDouble());
36
return
true
;
37
}
38
else
39
{
40
return
QStyledItemDelegate::editorEvent(event, model, option, index);
41
}
42
}
QmitkUSNavigationCalibrationUpdateDepthDelegate.h
QmitkUSNavigationCalibrationUpdateDepthDelegate::SetControlInterfaceBMode
void SetControlInterfaceBMode(mitk::USControlInterfaceBMode::Pointer controlInterfaceBMode)
Definition
QmitkUSNavigationCalibrationUpdateDepthDelegate.cpp:25
QmitkUSNavigationCalibrationUpdateDepthDelegate::editorEvent
bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override
The depth of the b mode ultrasound is changed on double click. A mitk::USControlInterfaceBMode has to...
Definition
QmitkUSNavigationCalibrationUpdateDepthDelegate.cpp:30
QmitkUSNavigationCalibrationUpdateDepthDelegate::~QmitkUSNavigationCalibrationUpdateDepthDelegate
~QmitkUSNavigationCalibrationUpdateDepthDelegate() override
Definition
QmitkUSNavigationCalibrationUpdateDepthDelegate.cpp:21
QmitkUSNavigationCalibrationUpdateDepthDelegate::QmitkUSNavigationCalibrationUpdateDepthDelegate
QmitkUSNavigationCalibrationUpdateDepthDelegate(QObject *parent=nullptr)
Definition
QmitkUSNavigationCalibrationUpdateDepthDelegate.cpp:16
Plugins
org.mitk.gui.qt.igt.app.ultrasoundtrackingnavigation
src
internal
QmitkUSNavigationCalibrationUpdateDepthDelegate.cpp
Generated by
1.12.0