MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkUSNavigationCalibrationsDataModel.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef QmitkUSNavigationCalibrationsDataModel_h
14#define QmitkUSNavigationCalibrationsDataModel_h
15
16#include <QAbstractTableModel>
17
18#include <mitkMessage.h>
19#include <itkSmartPointer.h>
20
21namespace mitk {
22 class AbstractUltrasoundTrackerDevice;
23 class USControlInterfaceBMode;
24 class USControlInterfaceProbes;
25}
26
27class QmitkUSNavigationCalibrationsDataModel : public QAbstractTableModel
28{
29 Q_OBJECT
30
31public:
32 explicit QmitkUSNavigationCalibrationsDataModel(QObject *parent = nullptr);
34
36
37 void OnDeviceChanged(const std::string&, const std::string&);
38
40 int rowCount ( const QModelIndex & parent = QModelIndex() ) const override;
41
43 int columnCount ( const QModelIndex & parent = QModelIndex() ) const override;
44
46 QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const override;
47
49 Qt::ItemFlags flags ( const QModelIndex & index ) const override;
50
52 QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const override;
53
55 bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) override;
56
57 using QAbstractTableModel::removeRows;
61 virtual bool removeRows ( int row, int count, const QModelIndex& parent, bool removeFromDataStorage );
62
63private:
66
67 mitk::MessageDelegate2<QmitkUSNavigationCalibrationsDataModel, const std::string&, const std::string&> m_ListenerDeviceChanged;
68};
69
70#endif
void OnDeviceChanged(const std::string &, const std::string &)
Qt::ItemFlags flags(const QModelIndex &index) const override
Return selectable and enabled for column 1 (size); selectable, enabled and editable for every other c...
void SetCombinedModality(itk::SmartPointer< mitk::AbstractUltrasoundTrackerDevice > combinedModality)
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Return number of rows of the model.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Return names for the columns, numbers for the rows and invalid for DisplayRole.
virtual bool removeRows(int row, int count, const QModelIndex &parent, bool removeFromDataStorage)
Remove given rows from the model.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Return number of columns (3) of the model.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Return model data of the selected cell.
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Set model data for the selected cell.
IGT Exceptions.