Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
QmitkToolTrackingStatusWidget.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 QmitkToolTrackingStatusWidget_h
14 #define QmitkToolTrackingStatusWidget_h
15 
16 #include "ui_QmitkToolTrackingStatusWidgetControls.h"
17 #include "MitkIGTUIExports.h"
18 
21 #include <QVector>
22 #include <QLabel>
23 #include <usModuleContext.h>
24 
31 class MITKIGTUI_EXPORT QmitkToolTrackingStatusWidget : public QWidget
32 {
33  Q_OBJECT // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
34 public:
35 
36  typedef std::vector< mitk::NavigationData::Pointer > NavigationDataPointerArray;
37 
38  enum Style
39  {
41  VerticalUpperStyle
42  };
43 
47  QmitkToolTrackingStatusWidget( QWidget* parent );
48 
53 
57  void ShowStatusLabels();
58 
62  void SetNavigationDatas(std::vector<mitk::NavigationData::Pointer>* navDatas);
63 
67  void AddNavigationData(mitk::NavigationData::Pointer nd);
68 
74  void Refresh(int posPrecision = 2, int quatPrecision = 2);
75 
79  void RemoveStatusLabels();
80 
82  void SetShowPositions(bool enable);
83 
85  void SetShowQuaternions(bool enable);
86 
88  void SetTextAlignment(Qt::AlignmentFlag alignment);
89 
94  void SetStyle(QmitkToolTrackingStatusWidget::Style newStyle);
95 
99  void PreShowTools(mitk::NavigationToolStorage::Pointer toolStorage);
100 
101 
102  void OnServiceEvent(const us::ServiceEvent event);
103 
104 protected:
105  void CreateConnections();
106  void CreateQtPartControl( QWidget *parent );
107  Ui::QmitkToolTrackingStatusWidgetControls* m_Controls;
108 
109 private:
110 
114  QVector< QLabel* >* m_StatusLabels;
115 
116  std::vector<mitk::NavigationData::Pointer>* m_NavigationDatas;
117  bool m_NavDatasNewFlag;
118 
119  bool m_ShowPositions;
120 
121  bool m_ShowQuaternions;
122 
123  Qt::AlignmentFlag m_Alignment;
124 
126 
127  mitk::NavigationToolStorage::Pointer m_previewToolStorage;
128 
129  void RemoveGuiLabels();
130 
132  void AddEmptyLabel();
133 
134  us::ModuleContext* m_Context;
135 
136 };
137 #endif
QmitkToolTrackingStatusWidget
QmitkToolTrackingStatusWidget.
Definition: QmitkToolTrackingStatusWidget.h:31
mitkNavigationDataSource.h
QmitkToolTrackingStatusWidget::GridLowerStyle
@ GridLowerStyle
Definition: QmitkToolTrackingStatusWidget.h:40
us::ServiceEvent
Definition: usServiceEvent.h:55
QmitkToolTrackingStatusWidget::NavigationDataPointerArray
std::vector< mitk::NavigationData::Pointer > NavigationDataPointerArray
Definition: QmitkToolTrackingStatusWidget.h:36
usModuleContext.h
mitkNavigationToolStorage.h
QmitkToolTrackingStatusWidget::m_Controls
Ui::QmitkToolTrackingStatusWidgetControls * m_Controls
gui widgets
Definition: QmitkToolTrackingStatusWidget.h:107
QmitkToolTrackingStatusWidget::Style
Style
Definition: QmitkToolTrackingStatusWidget.h:38