diff --git a/Modules/USUI/Qmitk/QmitkUSDeviceListWidget.h b/Modules/USUI/Qmitk/QmitkUSDeviceListWidget.h index 9144a80f14..4cdbd671c4 100644 --- a/Modules/USUI/Qmitk/QmitkUSDeviceListWidget.h +++ b/Modules/USUI/Qmitk/QmitkUSDeviceListWidget.h @@ -1,158 +1,158 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef _QmitkUSDeviceListWidget_H_INCLUDED #define _QmitkUSDeviceListWidget_H_INCLUDED -#include "mitkUSUIExports.h" +#include "MitkUSUIExports.h" #include "ui_QmitkUSDeviceListWidgetControls.h" #include "mitkUSDevice.h" #include //QT headers #include #include //mitk header //Microservices #include "usServiceReference.h" #include "usModuleContext.h" #include "usServiceEvent.h" #include "usServiceTrackerCustomizer.h" /** * @brief TODO * * @ingroup USUI */ class MitkUSUI_EXPORT QmitkUSDeviceListWidget :public QWidget //, public mitk::ServiceTrackerCustomizer<> // this extension is necessary if one wants to use ServiceTracking instead of filtering { //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) Q_OBJECT public: static const std::string VIEW_ID; QmitkUSDeviceListWidget(QWidget* p = 0, Qt::WindowFlags f1 = 0); virtual ~QmitkUSDeviceListWidget(); /* @brief This method is part of the widget an needs not to be called seperately. */ virtual void CreateQtPartControl(QWidget *parent); /* @brief This method is part of the widget an needs not to be called seperately. (Creation of the connections of main and control widget.)*/ virtual void CreateConnections(); /* * \brief Initializes the connection to the registry. The string filter is an LDAP parsable String, compare mitk::ModuleContext for examples on filtering. */ void Initialize(std::string filter); /* * \brief Returns the currently selected device, or null if none is selected. */ mitk::USDevice::Pointer GetSelectedDevice(); /* *\brief This Function listens to ServiceRegistry changes and updates the * list of devices accordingly. */ void OnServiceEvent(const mitk::ServiceEvent event); signals: /* *\brief Emitted when a new device mathing the filter connects */ void DeviceConnected(mitk::USDevice::Pointer); /* *\brief Emitted directly before device matching the filter disconnects */ void DeviceDisconnected(mitk::USDevice::Pointer); /* *\brief Emitted when a new device mathing the filter changes it's state. This does of now only compromise changes to activity. */ void DeviceChanged(mitk::USDevice::Pointer); /* *\brief Emitted the user selects a device from the list */ void DeviceSelected(mitk::USDevice::Pointer); public slots: protected slots: /* \brief Called, when the selection in the devicelist changes */ void OnDeviceSelectionChanged(); protected: Ui::QmitkUSDeviceListWidgetControls* m_Controls; ///< member holding the UI elements of this widget /* * \brief Internal Structure used to link devices to their QListWidget Items */ struct DeviceListLink { mitk::USDevice::Pointer device; QListWidgetItem* item; }; /* * \brief Contains a list of currently active devices and their entires in the list. This is wiped with every ServiceRegistryEvent. */ std::vector m_ListContent; /* * \brief Constructs a ListItem from the given device for display in the list of active devices. */ QListWidgetItem* ConstructItemFromDevice(mitk::USDevice::Pointer device); /* * \brief Returns the device corresponding to the given ListEntry or null if none was found (which really shouldnt happen). */ mitk::USDevice::Pointer GetDeviceForListItem(QListWidgetItem* item); //mitk::ServiceTracker ConstructServiceTracker(); /* * \brief Returns a List of US Devices that are currently connected by querying the service registry. */ std::vector GetAllRegisteredDevices(); private: mitk::ModuleContext* m_MitkUSContext; std::string m_Filter; }; #endif // _QmitkUSDeviceListWidget_H_INCLUDED diff --git a/Modules/USUI/Qmitk/QmitkUSDeviceManagerWidget.h b/Modules/USUI/Qmitk/QmitkUSDeviceManagerWidget.h index 431961b799..2e8f70d03c 100644 --- a/Modules/USUI/Qmitk/QmitkUSDeviceManagerWidget.h +++ b/Modules/USUI/Qmitk/QmitkUSDeviceManagerWidget.h @@ -1,135 +1,135 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef _QmitkUSDeviceManagerWidget_H_INCLUDED #define _QmitkUSDeviceManagerWidget_H_INCLUDED -#include "mitkUSUIExports.h" +#include "MitkUSUIExports.h" #include "ui_QmitkUSDeviceManagerWidgetControls.h" #include "mitkUSDevice.h" #include //QT headers #include #include //mitk header //Microservices #include "usServiceReference.h" #include "usModuleContext.h" #include "usServiceEvent.h" /** * @brief TODO * * @ingroup USUI */ class MitkUSUI_EXPORT QmitkUSDeviceManagerWidget :public QWidget //, public mitk::ServiceTrackerCustomizer<> // this extension is necessary if one wants to use ServiceTracking instead of filtering { //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) Q_OBJECT public: static const std::string VIEW_ID; QmitkUSDeviceManagerWidget(QWidget* p = 0, Qt::WindowFlags f1 = 0); virtual ~QmitkUSDeviceManagerWidget(); /* @brief This method is part of the widget an needs not to be called seperately. */ virtual void CreateQtPartControl(QWidget *parent); /* @brief This method is part of the widget an needs not to be called seperately. (Creation of the connections of main and control widget.)*/ virtual void CreateConnections(); /* *\brief This Function listens to ServiceRegistry changes and updates the * list of devices accordingly. */ void OnServiceEvent(const mitk::ServiceEvent event); signals: /* \brief Sent, when the user clicks "Activate Device" */ void USDeviceActivated(); public slots: protected slots: /* \brief Called, when the button "Activate Device" was clicked */ void OnClickedActivateDevice(); /* \brief Called, when the button "Disconnect Device" was clicked */ void OnClickedDisconnectDevice(); /* \brief Called, when the selection in the devicelist changes */ void OnDeviceSelectionChanged(); protected: Ui::QmitkUSDeviceManagerWidgetControls* m_Controls; ///< member holding the UI elements of this widget /* * \brief Internal Structure used to link devices to their QListWidget Items */ struct DeviceListLink { mitk::USDevice::Pointer device; QListWidgetItem* item; }; /* * \brief Contains a list of currently active devices and their entires in the list. This is wiped with every ServiceRegistryEvent. */ std::vector m_ListContent; /* * \brief Constructs a ListItem from the given device for display in the list of active devices. */ QListWidgetItem* ConstructItemFromDevice(mitk::USDevice::Pointer device); /* * \brief Returns the device corresponding to the given ListEntry or null if none was found (which really shouldnt happen). */ mitk::USDevice::Pointer GetDeviceForListItem(QListWidgetItem* item); //mitk::ServiceTracker ConstructServiceTracker(); /* * \brief Returns a List of US Devices that are currently connected by querying the service registry. */ std::vector GetAllRegisteredDevices(); private: mitk::ModuleContext* m_MitkUSContext; }; #endif // _QmitkUSDeviceManagerWidget_H_INCLUDED diff --git a/Modules/USUI/Qmitk/QmitkUSNewVideoDeviceWidget.H b/Modules/USUI/Qmitk/QmitkUSNewVideoDeviceWidget.h similarity index 99% rename from Modules/USUI/Qmitk/QmitkUSNewVideoDeviceWidget.H rename to Modules/USUI/Qmitk/QmitkUSNewVideoDeviceWidget.h index e5bbd923c9..233129d4c3 100644 --- a/Modules/USUI/Qmitk/QmitkUSNewVideoDeviceWidget.H +++ b/Modules/USUI/Qmitk/QmitkUSNewVideoDeviceWidget.h @@ -1,122 +1,122 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef _QmitkUSNewVideoDeviceWidget_H_INCLUDED #define _QmitkUSNewVideoDeviceWidget_H_INCLUDED -#include "mitkUSUIExports.h" +#include "MitkUSUIExports.h" #include "ui_QmitkUSNewVideoDeviceWidgetControls.h" #include "mitkUSVideoDevice.h" #include "mitkUSImageMetadata.h" //QT headers #include #include //mitk header /** * @brief TODO * * @ingroup USUI */ class MitkUSUI_EXPORT QmitkUSNewVideoDeviceWidget :public QWidget { //this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) Q_OBJECT public: static const std::string VIEW_ID; QmitkUSNewVideoDeviceWidget(QWidget* p = 0, Qt::WindowFlags f1 = 0); virtual ~QmitkUSNewVideoDeviceWidget(); /* @brief This method is part of the widget an needs not to be called seperately. */ virtual void CreateQtPartControl(QWidget *parent); /* @brief This method is part of the widget an needs not to be called seperately. (Creation of the connections of main and control widget.)*/ virtual void CreateConnections(); signals: void Finished(); public slots: /* \brief Activates the widget and displays the given device's Data to edit. */ void EditDevice(mitk::USDevice::Pointer device); /* \brief Activates the widget with fields empty. */ void CreateNewDevice(); protected slots: /* \brief Called, when the the user clicks the "Done" button (Labeled either "Add Device" or "Edit Device", depending on the situation. */ void OnClickedDone(); /* \brief Called, when the button "Cancel" was clicked */ void OnClickedCancel(); /* \brief Called, when the Use selects one of the Radiobuttons */ void OnDeviceTypeSelection(); protected: Ui::QmitkUSNewVideoDeviceWidgetControls* m_Controls; ///< member holding the UI elements of this widget /* \brief Constructs a ListItem from the given devie for display in the list of active devices */ QListWidgetItem* ConstructItemFromDevice(mitk::USDevice::Pointer device); /* \brief Initializes the Widget's ListItems with the given Metadata Object. */ void InitFields(mitk::USImageMetadata::Pointer); /* \brief Displays whether this widget is active or not. It gets activated by either sending a Signal to * the "CreateNewDevice" Slot or to the "EditDevice" Slot. If the user finishes editing the device, a * "EditingComplete" Signal is sent, and the widget is set to inactive again. Clicking Cancel also * deactivates it. */ bool m_Active; /** * \brief This is the device to edit. It is either the device transmitted in the "EditDevice" signal, or a new one * if the "CreateNewDevice slot was called. */ mitk::USVideoDevice::Pointer m_TargetDevice; }; #endif // _QmitkUSNewVideoDeviceWidget_H_INCLUDED