ctkVTKAbstractView_p.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0.txt
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =========================================================================*/
  14. #ifndef __ctkVTKAbstractView_p_h
  15. #define __ctkVTKAbstractView_p_h
  16. // Qt includes
  17. #include <QObject>
  18. #include <QTime>
  19. class QTimer;
  20. // CTK includes
  21. #include "ctkVTKAbstractView.h"
  22. // VTK includes
  23. #include <vtkCornerAnnotation.h>
  24. #include <vtkGenericOpenGLRenderWindow.h>
  25. #include <vtkRenderWindow.h>
  26. #include <vtkSmartPointer.h>
  27. #include <vtkWeakPointer.h>
  28. //-----------------------------------------------------------------------------
  29. /// \ingroup Visualization_VTK_Widgets
  30. class ctkVTKAbstractViewPrivate : public QObject
  31. {
  32. Q_OBJECT
  33. Q_DECLARE_PUBLIC(ctkVTKAbstractView);
  34. protected:
  35. ctkVTKAbstractView* const q_ptr;
  36. public:
  37. ctkVTKAbstractViewPrivate(ctkVTKAbstractView& object);
  38. /// Convenient setup methods
  39. virtual void init();
  40. virtual void setupCornerAnnotation();
  41. virtual void setupRendering();
  42. QList<vtkRenderer*> renderers()const;
  43. vtkRenderer* firstRenderer()const;
  44. ctkVTKOpenGLNativeWidget* VTKWidget;
  45. #ifdef CTK_USE_QVTKOPENGLWIDGET
  46. vtkSmartPointer<vtkGenericOpenGLRenderWindow> RenderWindow;
  47. #else
  48. vtkSmartPointer<vtkRenderWindow> RenderWindow;
  49. #endif
  50. QTimer* RequestTimer;
  51. QTime RequestTime;
  52. bool RenderEnabled;
  53. double MaximumUpdateRate;
  54. bool FPSVisible;
  55. QTimer* FPSTimer;
  56. int FPS;
  57. static int MultiSamples;
  58. vtkSmartPointer<vtkCornerAnnotation> CornerAnnotation;
  59. };
  60. #endif