ctkVTKSurfaceMaterialPropertyWidget.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 __ctkVTKSurfaceMaterialPropertyWidget_h
  15. #define __ctkVTKSurfaceMaterialPropertyWidget_h
  16. // CTK includes
  17. #include <ctkMaterialPropertyWidget.h>
  18. #include "ctkVTKObject.h"
  19. #include "ctkVisualizationVTKWidgetsExport.h"
  20. class ctkVTKSurfaceMaterialPropertyWidgetPrivate;
  21. class vtkProperty;
  22. /// \ingroup Visualization_VTK_Widgets
  23. class CTK_VISUALIZATION_VTK_WIDGETS_EXPORT ctkVTKSurfaceMaterialPropertyWidget
  24. : public ctkMaterialPropertyWidget
  25. {
  26. Q_OBJECT;
  27. QVTK_OBJECT;
  28. typedef ctkMaterialPropertyWidget Superclass;
  29. public:
  30. /// Constructors
  31. ctkVTKSurfaceMaterialPropertyWidget(QWidget* parentWidget);
  32. ctkVTKSurfaceMaterialPropertyWidget(vtkProperty* property, QWidget* parentWidget);
  33. virtual ~ctkVTKSurfaceMaterialPropertyWidget();
  34. vtkProperty* property()const;
  35. public Q_SLOTS:
  36. void setProperty(vtkProperty* property);
  37. protected Q_SLOTS:
  38. void updateFromProperty();
  39. protected:
  40. QScopedPointer<ctkVTKSurfaceMaterialPropertyWidgetPrivate> d_ptr;
  41. virtual void onColorChanged(const QColor& newColor);
  42. virtual void onOpacityChanged(double newOpacity);
  43. virtual void onAmbientChanged(double newAmbient);
  44. virtual void onDiffuseChanged(double newDiffuse);
  45. virtual void onSpecularChanged(double newSpecular);
  46. virtual void onSpecularPowerChanged(double newSpecularPower);
  47. virtual void onBackfaceCullingChanged(bool newBackfaceCulling);
  48. private:
  49. Q_DECLARE_PRIVATE(ctkVTKSurfaceMaterialPropertyWidget);
  50. Q_DISABLE_COPY(ctkVTKSurfaceMaterialPropertyWidget);
  51. };
  52. #endif