Set up the annotation between the vtk and qt views
| 83 | |
| 84 | // Set up the annotation between the vtk and qt views |
| 85 | void CustomLinkView::SetupCustomLink() |
| 86 | { |
| 87 | this->TreeView->GetRepresentation()->SetSelectionType(vtkSelectionNode::PEDIGREEIDS); |
| 88 | this->TableView->GetRepresentation()->SetSelectionType(vtkSelectionNode::PEDIGREEIDS); |
| 89 | this->ColumnView->GetRepresentation()->SetSelectionType(vtkSelectionNode::PEDIGREEIDS); |
| 90 | this->GraphView->GetRepresentation()->SetSelectionType(vtkSelectionNode::PEDIGREEIDS); |
| 91 | |
| 92 | // Set up the theme on the graph view :) |
| 93 | vtkViewTheme* theme = vtkViewTheme::CreateNeonTheme(); |
| 94 | this->GraphView->ApplyViewTheme(theme); |
| 95 | this->GraphView->Update(); |
| 96 | theme->Delete(); |
| 97 | |
| 98 | // Create vtkEventQtSlotConnect and make the connections. |
| 99 | Connections = vtkEventQtSlotConnect::New(); |
| 100 | |
| 101 | // Make the connection here. |
| 102 | // Requires vtkObject which generates the event of type |
| 103 | // vtkCommand::SelectionChangedEvent, pointer to object |
| 104 | // which has the given slot. vtkEvent of type SelectionChangedEvent |
| 105 | // from reach representation should invoke selectionChanged. |
| 106 | Connections->Connect(this->GraphView->GetRepresentation(), vtkCommand::SelectionChangedEvent, |
| 107 | this, SLOT(selectionChanged(vtkObject*, unsigned long, void*, void*))); |
| 108 | |
| 109 | Connections->Connect(this->TreeView->GetRepresentation(), vtkCommand::SelectionChangedEvent, this, |
| 110 | SLOT(selectionChanged(vtkObject*, unsigned long, void*, void*))); |
| 111 | |
| 112 | Connections->Connect(this->TableView->GetRepresentation(), vtkCommand::SelectionChangedEvent, |
| 113 | this, SLOT(selectionChanged(vtkObject*, unsigned long, void*, void*))); |
| 114 | |
| 115 | Connections->Connect(this->ColumnView->GetRepresentation(), vtkCommand::SelectionChangedEvent, |
| 116 | this, SLOT(selectionChanged(vtkObject*, unsigned long, void*, void*))); |
| 117 | } |
| 118 | |
| 119 | CustomLinkView::~CustomLinkView() {} |
| 120 |
no test coverage detected