You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
2.4 KiB
C++
84 lines
2.4 KiB
C++
/*=========================================================================
|
|
|
|
Program: Visualization Toolkit
|
|
Module: vtkQtAnnotationView.h
|
|
|
|
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
|
|
All rights reserved.
|
|
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
|
|
|
|
This software is distributed WITHOUT ANY WARRANTY; without even
|
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
PURPOSE. See the above copyright notice for more information.
|
|
|
|
=========================================================================*/
|
|
/*-------------------------------------------------------------------------
|
|
Copyright 2008 Sandia Corporation.
|
|
Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
|
the U.S. Government retains certain rights in this software.
|
|
-------------------------------------------------------------------------*/
|
|
/**
|
|
* @class vtkQtAnnotationView
|
|
* @brief A VTK view that displays the annotations
|
|
* on its annotation link.
|
|
*
|
|
*
|
|
* vtkQtAnnotationView is a VTK view using an underlying QTableView.
|
|
*
|
|
*/
|
|
|
|
#ifndef vtkQtAnnotationView_h
|
|
#define vtkQtAnnotationView_h
|
|
|
|
#include "vtkQtView.h"
|
|
#include "vtkViewsQtModule.h" // For export macro
|
|
#include <QObject> // Needed for the Q_OBJECT macro
|
|
|
|
#include <QPointer> // Needed to hold the view
|
|
|
|
class vtkQtAnnotationLayersModelAdapter;
|
|
|
|
class QItemSelection;
|
|
class QTableView;
|
|
|
|
class VTKVIEWSQT_EXPORT vtkQtAnnotationView : public vtkQtView
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static vtkQtAnnotationView* New();
|
|
vtkTypeMacro(vtkQtAnnotationView, vtkQtView);
|
|
void PrintSelf(ostream& os, vtkIndent indent) override;
|
|
|
|
/**
|
|
* Get the main container of this view (a QWidget).
|
|
* The application typically places the view with a call
|
|
* to GetWidget(): something like this
|
|
* this->ui->box->layout()->addWidget(this->View->GetWidget());
|
|
*/
|
|
QWidget* GetWidget() override;
|
|
|
|
/**
|
|
* Updates the view.
|
|
*/
|
|
void Update() override;
|
|
|
|
protected:
|
|
vtkQtAnnotationView();
|
|
~vtkQtAnnotationView() override;
|
|
|
|
private slots:
|
|
void slotQtSelectionChanged(const QItemSelection&, const QItemSelection&);
|
|
|
|
private:
|
|
vtkMTimeType LastInputMTime;
|
|
|
|
QPointer<QTableView> View;
|
|
vtkQtAnnotationLayersModelAdapter* Adapter;
|
|
|
|
vtkQtAnnotationView(const vtkQtAnnotationView&) = delete;
|
|
void operator=(const vtkQtAnnotationView&) = delete;
|
|
};
|
|
|
|
#endif
|