MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkNDIAbstractDeviceWidget.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 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
30public:
31 static const std::string VIEW_ID;
32
33 QmitkNDIAbstractDeviceWidget(QWidget* parent = nullptr, Qt::WindowFlags f = {});
35
36 void Initialize() override = 0;
37
38 void AddOutput(std::string s) override = 0;
39
40signals:
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
53private:
55 void CreateConnections();
56protected:
57 void InitializeNDIWidget();
58
61
62 virtual void SetPortValueToGUI(int portValue) = 0;
63 virtual void SetPortTypeToGUI(int portType) = 0;
64};
65
66#endif
Abstract class to configure a tracking device. Inherited widgets should be registered in the Microser...
Abstract class of a configuration widget for NDI Devices. For implementations see NDIAuroraWidget or ...
void AddOutput(std::string s) override=0
Optional method to add output to a small screen in the trackingToolbox (see QmitkNDIPolarisWidget)
void PortsScanned(int Port, QString result, int PortType)
QmitkTrackingDeviceConfigurationWidgetScanPortsWorker * m_ScanPortsWorker
void Initialize() override=0
Subclass must implement this method to return a pointer to a copy of the object. Please don't forget ...
virtual void SetPortValueToGUI(int portValue)=0
virtual void SetPortTypeToGUI(int portType)=0