void QmitkInputDevicesPrefPage::CreateQtControl(QWidget* parent)
{
  m_MainControl = new QWidget(parent);
  QVBoxLayout *layout = new QVBoxLayout;

  mitk::IInputDeviceRegistry::Pointer inputDeviceRegistry =
    berry::Platform::GetServiceRegistry().GetServiceById<mitk::IInputDeviceRegistry>(mitk::CoreExtConstants::INPUTDEVICE_SERVICE);
  std::vector<mitk::IInputDeviceDescriptor::Pointer> temp(inputDeviceRegistry->GetInputDevices());

  for(std::vector<mitk::IInputDeviceDescriptor::Pointer>::const_iterator it = temp.begin(); it != temp.end();++it)
  {
    QString inputDeviceName(QString::fromStdString((*it)->GetName()));
    QCheckBox* checkBox = new QCheckBox((inputDeviceName),m_MainControl);
    layout->addWidget(checkBox);
    m_InputDevices.insert(checkBox,(*it)->GetID());

    if(inputDeviceName == "WiiMote")
    {
      m_WiiMoteModes = new QGroupBox("WiiMote Modus");

      m_WiiMoteHeadTracking = new QRadioButton
        (QString::fromStdString(mitk::CoreExtConstants::WIIMOTE_HEADTRACKING));
      m_WiiMoteSurfaceInteraction = new QRadioButton
        (QString::fromStdString(mitk::CoreExtConstants::WIIMOTE_SURFACEINTERACTION));
      m_WiiMoteHeadTracking->setChecked(true);

      QVBoxLayout* vBoxLayout = new QVBoxLayout;

      vBoxLayout->addWidget(m_WiiMoteHeadTracking);
      vBoxLayout->addWidget(m_WiiMoteSurfaceInteraction);

      m_WiiMoteModes->setLayout(vBoxLayout);

      layout->addWidget(m_WiiMoteModes);
    }

  }

  layout->addStretch();
  m_MainControl->setLayout(layout);
  this->Update();
}
void QmitkInputDevicesPrefPage::CreateQtControl(QWidget* parent)
{
  m_MainControl = new QWidget(parent);
  auto  layout = new QVBoxLayout;

  QList<mitk::IInputDeviceDescriptor::Pointer> temp(GetInputDeviceRegistry()->GetInputDevices());

  for(QList<mitk::IInputDeviceDescriptor::Pointer>::const_iterator it = temp.begin(); it != temp.end();++it)
  {
    QString inputDeviceName((*it)->GetName());
    auto   checkBox = new QCheckBox((inputDeviceName),m_MainControl);
    layout->addWidget(checkBox);
    m_InputDevices.insert(checkBox,(*it)->GetID());

    if(inputDeviceName == "WiiMote")
    {
      m_WiiMoteModes = new QGroupBox("WiiMote Modus");

      m_WiiMoteHeadTracking = new QRadioButton(mitk::CoreExtConstants::WIIMOTE_HEADTRACKING);
      m_WiiMoteSurfaceInteraction = new QRadioButton(mitk::CoreExtConstants::WIIMOTE_SURFACEINTERACTION);
      m_WiiMoteHeadTracking->setChecked(true);

      auto   vBoxLayout = new QVBoxLayout;

      vBoxLayout->addWidget(m_WiiMoteHeadTracking);
      vBoxLayout->addWidget(m_WiiMoteSurfaceInteraction);

      m_WiiMoteModes->setLayout(vBoxLayout);

      layout->addWidget(m_WiiMoteModes);
    }

  }

  layout->addStretch();
  m_MainControl->setLayout(layout);
  this->Update();
}