Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef QmitkNDIAbstractDeviceWidget_H
18 #define QmitkNDIAbstractDeviceWidget_H
19 
20 #include "MitkIGTUIExports.h"
23 
31 {
32  Q_OBJECT // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
33 
34 public:
35  static const std::string VIEW_ID;
36 
37  QmitkNDIAbstractDeviceWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
39 
40  virtual void Initialize() = 0;
41 
42  virtual void AddOutput(std::string s) = 0;
43 
44 signals:
45  void PortsScanned(int Port, QString result, int PortType);
46 
47  protected slots:
48 
49  /* @brief Scans the serial ports automatically for a connected tracking device. If the method finds a device
50  * it selects the right type and sets the corresponding port in the widget.
51  */
52  void AutoScanPorts();
53 
55  void AutoScanPortsFinished(int Port, QString result, int PortType);
56 
57 private:
59  void CreateConnections();
60 protected:
61  void InitializeNDIWidget();
62 
65 
66  virtual void SetPortValueToGUI(int portValue) = 0;
67  virtual void SetPortTypeToGUI(int portType) = 0;
68 };
69 
70 #endif
QmitkTrackingDeviceConfigurationWidgetScanPortsWorker * m_ScanPortsWorker
virtual void AddOutput(std::string)
Optional method to add output to a small screen in the trackingToolbox (see QmitkNDIPolarisWidget) ...
virtual void Initialize()=0
Subclass must implement this method to return a pointer to a copy of the object. Please don't forget ...
Abstract class of a configuration widget for NDI Devices. For implementations see NDIAuroraWidget or ...
Abstract class to configure a tracking device. Inherited widgets should be registered in the Microser...