ctkTestWrappedVTKSlot.h 721 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef __ctkTestWrappedVTKSlot_h
  2. #define __ctkTestWrappedVTKSlot_h
  3. // Qt includes
  4. #include <QObject>
  5. // VTK includes
  6. #include <vtkTable.h>
  7. class ctkTestWrappedVTKSlot : public QObject
  8. {
  9. Q_OBJECT
  10. public:
  11. ctkTestWrappedVTKSlot(QObject * newParent = 0) : QObject(newParent)
  12. {
  13. this->MyTable = vtkTable::New();
  14. }
  15. virtual ~ctkTestWrappedVTKSlot()
  16. {
  17. this->MyTable->Delete();
  18. }
  19. public slots:
  20. /// Example of slot returning a VTK object
  21. vtkTable* getTable() const
  22. {
  23. return this->MyTable;
  24. }
  25. /// Example ot slot accepting a VTK object as parameter
  26. void setTable(vtkTable * newTable)
  27. {
  28. this->MyTable = newTable;
  29. }
  30. private:
  31. vtkTable * MyTable;
  32. };
  33. #endif