Constructor
| 36 | |
| 37 | // Constructor |
| 38 | CustomLinkView::CustomLinkView() |
| 39 | { |
| 40 | this->ui = new Ui_CustomLinkView; |
| 41 | this->ui->setupUi(this); |
| 42 | vtkNew<vtkGenericOpenGLRenderWindow> renderWindow; |
| 43 | this->ui->vtkGraphViewWidget->setRenderWindow(renderWindow); |
| 44 | |
| 45 | this->XMLReader = vtkSmartPointer<vtkXMLTreeReader>::New(); |
| 46 | this->GraphView = vtkSmartPointer<vtkGraphLayoutView>::New(); |
| 47 | this->TreeView = vtkSmartPointer<vtkQtTreeView>::New(); |
| 48 | this->TableView = vtkSmartPointer<vtkQtTableView>::New(); |
| 49 | this->ColumnView = vtkSmartPointer<vtkQtTreeView>::New(); |
| 50 | this->ColumnView->SetUseColumnView(1); |
| 51 | |
| 52 | // Tell the table view to sort selections that it receives (but does |
| 53 | // not initiate) to the top |
| 54 | this->TableView->SetSortSelectionToTop(true); |
| 55 | |
| 56 | // Set widgets for the tree and table views |
| 57 | this->ui->treeFrame->layout()->addWidget(this->TreeView->GetWidget()); |
| 58 | this->ui->tableFrame->layout()->addWidget(this->TableView->GetWidget()); |
| 59 | this->ui->columnFrame->layout()->addWidget(this->ColumnView->GetWidget()); |
| 60 | |
| 61 | // Graph View needs to get my render window |
| 62 | this->GraphView->SetInteractor(this->ui->vtkGraphViewWidget->interactor()); |
| 63 | |
| 64 | this->GraphView->SetRenderWindow(this->ui->vtkGraphViewWidget->renderWindow()); |
| 65 | |
| 66 | // Set up the theme on the graph view :) |
| 67 | vtkViewTheme* theme = vtkViewTheme::CreateNeonTheme(); |
| 68 | this->GraphView->ApplyViewTheme(theme); |
| 69 | theme->Delete(); |
| 70 | |
| 71 | // Set up action signals and slots |
| 72 | connect(this->ui->actionOpenXMLFile, SIGNAL(triggered()), this, SLOT(slotOpenXMLFile())); |
| 73 | connect(this->ui->actionExit, SIGNAL(triggered()), this, SLOT(slotExit())); |
| 74 | |
| 75 | // Apply application stylesheet |
| 76 | QString css = "* { font: bold italic 18px \"Calibri\"; color: midnightblue }"; |
| 77 | css += "QTreeView { font: bold italic 16px \"Calibri\"; color: midnightblue }"; |
| 78 | // qApp->setStyleSheet(css); // Seems to cause a bug on some systems |
| 79 | // But at least it's here as an example |
| 80 | |
| 81 | this->GraphView->Render(); |
| 82 | }; |
| 83 | |
| 84 | // Set up the annotation between the vtk and qt views |
| 85 | void CustomLinkView::SetupCustomLink() |
nothing calls this directly
no test coverage detected