<commit_before>/*===================================================================

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.

===================================================================*/

#include "QmitkTubeGraphView.h"

#include "mitkDataStorage.h"
#include "mitkRenderingManager.h"
#include "mitkGlobalInteraction.h"
#include "mitkNodePredicateDataType.h"
#include "usModuleRegistry.h"
#include "QmitkTubeGraphLabelGroupWidget.h"
#include "QmitkTubeGraphDeleteLabelGroupDialog.h"
#include "QmitkTubeGraphNewLabelGroupDialog.h"
#include "QmitkTubeGraphNewAnnotationDialog.h"

const std::string QmitkTubeGraphView::VIEW_ID = "org.mitk.views.tubegraph";

QmitkTubeGraphView::QmitkTubeGraphView()
  :QmitkAbstractView(),
  m_ActiveTubeGraph(),
  m_ActiveProperty(),
  m_ActivationMode(mitk::TubeGraphDataInteractor::None)
{
}

QmitkTubeGraphView::~QmitkTubeGraphView()
{
  delete m_Parent;
  m_ActivationMode.mitk::TubeGraphDataInteractor::ActivationMode::~ActivationMode();

  //remove observer
  //if (m_ActiveInteractor.IsNotNull())
  //m_ActiveInteractor->RemoveObserver(m_InformationChangedObserverTag);

}

void QmitkTubeGraphView::SetFocus()
{
  m_Controls.activeNodeGroupBox->setFocus();
}

void QmitkTubeGraphView::CreateQtPartControl(QWidget *parent)
{
  // create GUI widgets
  m_Parent = parent;
  m_Controls.setupUi(parent);
  this->CreateConnections();
}

void QmitkTubeGraphView::NodeRemoved(const mitk::DataNode* node)
{
  if (dynamic_cast<mitk::TubeGraph*> (node->GetData()))
  {
    //node->GetDataInteractor()->RemoveAllObservers();
<commit_msg>COMP: Commented out what look like a copy & paste error.<commit_after>/*===================================================================

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.

===================================================================*/

#include "QmitkTubeGraphView.h"

#include "mitkDataStorage.h"
#include "mitkRenderingManager.h"
#include "mitkGlobalInteraction.h"
#include "mitkNodePredicateDataType.h"
#include "usModuleRegistry.h"
#include "QmitkTubeGraphLabelGroupWidget.h"
#include "QmitkTubeGraphDeleteLabelGroupDialog.h"
#include "QmitkTubeGraphNewLabelGroupDialog.h"
#include "QmitkTubeGraphNewAnnotationDialog.h"

const std::string QmitkTubeGraphView::VIEW_ID = "org.mitk.views.tubegraph";

QmitkTubeGraphView::QmitkTubeGraphView()
  :QmitkAbstractView(),
  m_ActiveTubeGraph(),
  m_ActiveProperty(),
  m_ActivationMode(mitk::TubeGraphDataInteractor::None)
{
}

QmitkTubeGraphView::~QmitkTubeGraphView()
{
  delete m_Parent;
  //m_ActivationMode.mitk::TubeGraphDataInteractor::ActivationMode::~ActivationMode();

  //remove observer
  //if (m_ActiveInteractor.IsNotNull())
  //m_ActiveInteractor->RemoveObserver(m_InformationChangedObserverTag);

}

void QmitkTubeGraphView::SetFocus()
{
  m_Controls.activeNodeGroupBox->setFocus();
}

void QmitkTubeGraphView::CreateQtPartControl(QWidget *parent)
{
  // create GUI widgets
  m_Parent = parent;
  m_Controls.setupUi(parent);
  this->CreateConnections();
}

void QmitkTubeGraphView::NodeRemoved(const mitk::DataNode* node)
{
  if (dynamic_cast<mitk::TubeGraph*> (node->GetData()))
  {
    //node->GetDataInteractor()->RemoveAllObservers();

{'fraction_non_alphanumeric': 0.17403820989269825, 'fraction_numerical': 0.0, 'mean_word_length': 7.608108108108108, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6648299', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1157, 'n_words': 223}