Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkUSDeviceManagerWidget.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 _QmitkUSDeviceManagerWidget_H_INCLUDED
18 #define _QmitkUSDeviceManagerWidget_H_INCLUDED
19 
20 #include "MitkUSUIExports.h"
21 #include "ui_QmitkUSDeviceManagerWidgetControls.h"
22 #include "mitkUSDevice.h"
23 #include <vector>
24 
25 //QT headers
26 #include <QWidget>
27 #include <QListWidgetItem>
28 
36 class MITKUSUI_EXPORT QmitkUSDeviceManagerWidget :public QWidget
37 {
38  //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
39  Q_OBJECT
40 
41 public:
42 
43  static const std::string VIEW_ID;
44 
45  QmitkUSDeviceManagerWidget(QWidget* p = 0, Qt::WindowFlags f1 = 0);
46  virtual ~QmitkUSDeviceManagerWidget();
47 
48  /* @brief This method is part of the widget an needs not to be called seperately. */
49  virtual void CreateQtPartControl(QWidget *parent);
50  /* @brief This method is part of the widget an needs not to be called seperately. (Creation of the connections of main and control widget.)*/
51  virtual void CreateConnections();
52  /* @brief Disconnects all devices immediately. */
53  virtual void DisconnectAllDevices();
54 
55 signals:
56  void NewDeviceButtonClicked();
57  void EditDeviceButtonClicked(mitk::USDevice::Pointer);
58 
59  /* This signal is emitted if a device is activated. */
60  void DeviceActivated();
61 
62  public slots:
63 
64  protected slots :
65 
66  /*
67  \brief Called, when the button "Activate Device" was clicked.
68  */
69  void OnClickedActivateDevice();
70 
71  /*
72  \brief Called, when the button "Disconnect Device" was clicked.
73  */
74  void OnClickedDisconnectDevice();
75 
76  void OnClickedRemoveDevice();
77  void OnClickedNewDevice();
78 
79  void OnClickedEditDevice();
80 
81  /*
82  \brief Called, when the selection in the devicelist changes.
83  */
84  void OnDeviceSelectionChanged(us::ServiceReferenceU reference);
85 
86 protected:
87 
88  Ui::QmitkUSDeviceManagerWidgetControls* m_Controls;
89 
90 private:
91 };
92 
93 #endif // _QmitkUSDeviceManagerWidget_H_INCLUDED
Ui::QmitkUSDeviceManagerWidgetControls * m_Controls
member holding the UI elements of this widget
static const std::string VIEW_ID
This Widget is used to manage available Ultrasound Devices.