ctkVTKRenderView.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) 2010 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
  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 __ctkVTKRenderView_h
  15. #define __ctkVTKRenderView_h
  16. // Qt includes
  17. #include <QWidget>
  18. // CTK includes
  19. #include <ctkPimpl.h>
  20. #include "CTKVisualizationVTKWidgetsExport.h"
  21. class ctkVTKRenderViewPrivate;
  22. class vtkRenderWindowInteractor;
  23. class CTK_VISUALIZATION_VTK_WIDGETS_EXPORT ctkVTKRenderView : public QWidget
  24. {
  25. Q_OBJECT
  26. public:
  27. /// Constructors
  28. typedef QWidget Superclass;
  29. explicit ctkVTKRenderView(QWidget* parent = 0);
  30. virtual ~ctkVTKRenderView();
  31. /// If a render has already been scheduled, this called is a no-op
  32. void scheduleRender();
  33. /// Force a render even if a render is already ocurring
  34. void forceRender();
  35. /// Set/Get window interactor
  36. vtkRenderWindowInteractor* interactor()const;
  37. void setInteractor(vtkRenderWindowInteractor* newInteractor);
  38. /// Set corner annotation text
  39. void setCornerAnnotationText(const QString& text);
  40. /// Set background color
  41. void setBackgroundColor(double r, double g, double b);
  42. void resetCamera();
  43. //virtual void setCornerText(const QString& text);
  44. private:
  45. CTK_DECLARE_PRIVATE(ctkVTKRenderView);
  46. };
  47. #endif