MCPcopy Create free account
hub / github.com/Kitware/VTK / selectionChanged

Method selectionChanged

Examples/Infovis/Cxx/CustomLinkView/CustomLinkView.cxx:202–219  ·  view source on GitHub ↗

This defines the QT slot. They way it works is first get the vtkSelection, push it to the default vtkAnnotationLink associated with each vtkDataRepresentation of each view type and then call Update or Render (if it is a vtkRenderView) on each view.

Source from the content-addressed store, hash-verified

200// vtkDataRepresentation of each view type and then call Update or
201// Render (if it is a vtkRenderView) on each view.
202void CustomLinkView::selectionChanged(
203 vtkObject*, unsigned long, void* vtkNotUsed(clientData), void* callData)
204{
205 vtkSelection* selection = reinterpret_cast<vtkSelection*>(callData);
206 if (selection)
207 {
208 this->GraphView->GetRepresentation()->GetAnnotationLink()->SetCurrentSelection(selection);
209 this->TreeView->GetRepresentation()->GetAnnotationLink()->SetCurrentSelection(selection);
210 this->TableView->GetRepresentation()->GetAnnotationLink()->SetCurrentSelection(selection);
211 this->ColumnView->GetRepresentation()->GetAnnotationLink()->SetCurrentSelection(selection);
212
213 this->TreeView->Update();
214 this->TableView->Update();
215 this->ColumnView->Update();
216
217 this->GraphView->Render();
218 }
219}

Callers

nothing calls this directly

Calls 5

GetAnnotationLinkMethod · 0.80
GetRepresentationMethod · 0.80
RenderMethod · 0.65
SetCurrentSelectionMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected