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

Method SetupCustomLink

Examples/Infovis/Cxx/CustomLinkView/CustomLinkView.cxx:85–117  ·  view source on GitHub ↗

Set up the annotation between the vtk and qt views

Source from the content-addressed store, hash-verified

83
84// Set up the annotation between the vtk and qt views
85void 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
119CustomLinkView::~CustomLinkView() {}
120

Callers 1

slotOpenXMLFileMethod · 0.95

Calls 7

SetSelectionTypeMethod · 0.80
GetRepresentationMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
ApplyViewThemeMethod · 0.45
UpdateMethod · 0.45
ConnectMethod · 0.45

Tested by

no test coverage detected