Medical Imaging Interaction Toolkit  2018.4.99-93926fb8
Medical Imaging Interaction Toolkit
QmitkPatientTableInspector.h
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 
13 #ifndef QMITKPATIENTTABLEINSPECTOR_H
14 #define QMITKPATIENTTABLEINSPECTOR_H
15 
16 // semantic relations UI module
19 #include "QmitkPatientTableModel.h"
21 
22 #include "ui_QmitkPatientTableInspector.h"
23 
24 // qt widgets module
25 #include <QmitkEnums.h>
26 
27 // qt
28 #include <QMenu>
29 
30 /*
31 * @brief The QmitkPatientTableInspector is a QmitkAbstractSemanticRelationsStorageInspector that shows the currently
32 * available data of the semantic relations storage model in a control-point - information type matrix.
33 *
34 * The QmitkPatientTableInspector uses the QmitkSemanticRelationsStorageModel, a QmitkAbstractDataStorageModel that
35 * presents the semantic relations data as a table, showing a QPixmap as thumbnail for the data nodes.
36 */
38 {
39  Q_OBJECT
40 
41 public:
42 
43  QmitkPatientTableInspector(QWidget* parent = nullptr);
44 
45  QAbstractItemView* GetView() override;
46  const QAbstractItemView* GetView() const override;
47 
48  void SetSelectionMode(SelectionMode mode) override;
49  SelectionMode GetSelectionMode() const override;
50 
51  void SetCaseID(const mitk::SemanticTypes::CaseID& caseID) override;
52  void SetLesion(const mitk::SemanticTypes::Lesion& lesion) override;
53 
54  QItemSelectionModel* GetSelectionModel();
55 
56 Q_SIGNALS:
57 
58  void DataNodeDoubleClicked(const mitk::DataNode*);
59  void OnContextMenuRequested(const QPoint&);
60  void OnNodeRemoved(const mitk::DataNode*);
61 
62 private Q_SLOTS:
63 
64  void OnModelUpdated();
65  void OnNodeButtonClicked(const QString&);
66  void OnDataNodeSelectionChanged(const QList<mitk::DataNode::Pointer>&);
67  void OnItemDoubleClicked(const QModelIndex&);
68 
69 protected:
70 
71  void Initialize() override;
72 
73 private:
74 
75  void SetUpConnections();
76 
77  void keyPressEvent(QKeyEvent* e) override;
78 
79  Ui::QmitkPatientTableInspector m_Controls;
80  QmitkPatientTableModel* m_StorageModel;
81  QmitkTableItemThumbnailDelegate* m_ItemDelegate;
82 
83 };
84 
85 #endif // QMITKPATIENTTABLEINSPECTOR_H
virtual QAbstractItemView * GetView()=0
virtual SelectionMode GetSelectionMode() const =0
virtual void SetLesion(const mitk::SemanticTypes::Lesion &lesion)=0
Extends the abstract base class to allow setting the current lesion. The function sets the lesion in ...
#define MITKSEMANTICRELATIONSUI_EXPORT
virtual void SetCaseID(const mitk::SemanticTypes::CaseID &caseID)=0
Extends the abstract base class to allow setting the current case ID which is needed to access the se...
virtual void SetSelectionMode(SelectionMode mode)=0
QAbstractItemView::SelectionMode SelectionMode
The QmitkPatientTableModel is a subclass of the QmitkAbstractSemanticRelationsStorageModel and holds ...
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57