Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
QmitkNDIAbstractDeviceWidget.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 QmitkNDIAbstractDeviceWidget_h
14 #define QmitkNDIAbstractDeviceWidget_h
15 
16 #include "MitkIGTUIExports.h"
19 
27 {
28  Q_OBJECT // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
29 
30 public:
31  static const std::string VIEW_ID;
32 
33  QmitkNDIAbstractDeviceWidget(QWidget* parent = nullptr, Qt::WindowFlags f = nullptr);
34  ~QmitkNDIAbstractDeviceWidget() override;
35 
36  void Initialize() override = 0;
37 
38  void AddOutput(std::string s) override = 0;
39 
40 signals:
41  void PortsScanned(int Port, QString result, int PortType);
42 
43  protected slots:
44 
45  /* @brief Scans the serial ports automatically for a connected tracking device. If the method finds a device
46  * it selects the right type and sets the corresponding port in the widget.
47  */
48  void AutoScanPorts();
49 
51  void AutoScanPortsFinished(int Port, QString result, int PortType);
52 
53 private:
55  void CreateConnections();
56 protected:
57  void InitializeNDIWidget();
58 
61 
62  virtual void SetPortValueToGUI(int portValue) = 0;
63  virtual void SetPortTypeToGUI(int portType) = 0;
64 };
65 
66 #endif
QmitkAbstractTrackingDeviceWidget::AddOutput
virtual void AddOutput(std::string)
Optional method to add output to a small screen in the trackingToolbox (see QmitkNDIPolarisWidget)
Definition: QmitkAbstractTrackingDeviceWidget.h:114
QmitkAbstractTrackingDeviceWidget.h
QmitkNDIAbstractDeviceWidget::VIEW_ID
static const std::string VIEW_ID
Definition: QmitkNDIAbstractDeviceWidget.h:31
QmitkAbstractTrackingDeviceWidget::Initialize
virtual void Initialize()=0
Subclass must implement this method to return a pointer to a copy of the object. Please don't forget ...
QmitkTrackingDeviceConfigurationWidgetScanPortsWorker
Definition: QmitkTrackingDeviceConfigurationWidgetScanPortsWorker.h:24
QmitkNDIAbstractDeviceWidget::m_ScanPortsWorkerThread
QThread * m_ScanPortsWorkerThread
Definition: QmitkNDIAbstractDeviceWidget.h:60
QmitkNDIAbstractDeviceWidget
Abstract class of a configuration widget for NDI Devices. For implementations see NDIAuroraWidget or ...
Definition: QmitkNDIAbstractDeviceWidget.h:26
QmitkNDIAbstractDeviceWidget::m_ScanPortsWorker
QmitkTrackingDeviceConfigurationWidgetScanPortsWorker * m_ScanPortsWorker
Definition: QmitkNDIAbstractDeviceWidget.h:59
QmitkTrackingDeviceConfigurationWidgetScanPortsWorker.h
QmitkAbstractTrackingDeviceWidget
Abstract class to configure a tracking device. Inherited widgets should be registered in the Microser...
Definition: QmitkAbstractTrackingDeviceWidget.h:52