CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkVTKSurfaceMaterialPropertyWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Library: CTK
4 
5  Copyright (c) Kitware Inc.
6 
7  Licensed under the Apache License, Version 2.0 (the "License");
8  you may not use this file except in compliance with the License.
9  You may obtain a copy of the License at
10 
11  http://www.apache.org/licenses/LICENSE-2.0.txt
12 
13  Unless required by applicable law or agreed to in writing, software
14  distributed under the License is distributed on an "AS IS" BASIS,
15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  See the License for the specific language governing permissions and
17  limitations under the License.
18 
19 =========================================================================*/
20 
21 #ifndef __ctkVTKSurfaceMaterialPropertyWidget_h
22 #define __ctkVTKSurfaceMaterialPropertyWidget_h
23 
24 // CTK includes
26 #include "ctkVTKObject.h"
27 #include "ctkVisualizationVTKWidgetsExport.h"
28 
29 class ctkVTKSurfaceMaterialPropertyWidgetPrivate;
30 class vtkProperty;
31 
33 class CTK_VISUALIZATION_VTK_WIDGETS_EXPORT ctkVTKSurfaceMaterialPropertyWidget
35 {
36  Q_OBJECT;
39 
40 public:
42  ctkVTKSurfaceMaterialPropertyWidget(QWidget* parentWidget);
43  ctkVTKSurfaceMaterialPropertyWidget(vtkProperty* property, QWidget* parentWidget);
45 
46  vtkProperty* property()const;
47 
48 public Q_SLOTS:
49  void setProperty(vtkProperty* property);
50 
51 protected Q_SLOTS:
53 
54 protected:
55  QScopedPointer<ctkVTKSurfaceMaterialPropertyWidgetPrivate> d_ptr;
56 
57  virtual void onColorChanged(const QColor& newColor);
58  virtual void onOpacityChanged(double newOpacity);
59  virtual void onAmbientChanged(double newAmbient);
60  virtual void onDiffuseChanged(double newDiffuse);
61  virtual void onSpecularChanged(double newSpecular);
62  virtual void onSpecularPowerChanged(double newSpecularPower);
63  virtual void onBackfaceCullingChanged(bool newBackfaceCulling);
64 
65 private:
66  Q_DECLARE_PRIVATE(ctkVTKSurfaceMaterialPropertyWidget);
68 };
69 
70 #endif
QWidget Superclass
Superclass typedef.
virtual void onSpecularPowerChanged(double newSpecularPower)
QScopedPointer< ctkVTKSurfaceMaterialPropertyWidgetPrivate > d_ptr
virtual void onColorChanged(const QColor &newColor)
virtual void onOpacityChanged(double newOpacity)
virtual void onAmbientChanged(double newAmbient)
vtkProperty * property() const
void setProperty(vtkProperty *property)
ctkVTKSurfaceMaterialPropertyWidget(vtkProperty *property, QWidget *parentWidget)
ctkVTKSurfaceMaterialPropertyWidget(QWidget *parentWidget)
Constructors.
virtual void onBackfaceCullingChanged(bool newBackfaceCulling)
virtual void onDiffuseChanged(double newDiffuse)
virtual void onSpecularChanged(double newSpecular)
#define QVTK_OBJECT
Define VTK/Qt event/slot connection utility methods. It is a convenient macro that declares and defin...
Definition: ctkVTKObject.h:222