22 #ifndef __ctkMaterialPropertyPreviewLabel_h 23 #define __ctkMaterialPropertyPreviewLabel_h 29 #include "ctkWidgetsExport.h" 31 class ctkMaterialPropertyPreviewLabelPrivate;
37 Q_PROPERTY(
double ambient READ ambient WRITE setAmbient)
38 Q_PROPERTY(
double diffuse READ diffuse WRITE setDiffuse)
39 Q_PROPERTY(
double specular READ specular WRITE setSpecular)
40 Q_PROPERTY(
double specularPower READ specularPower WRITE setSpecularPower)
42 Q_PROPERTY(QColor color READ color WRITE setColor)
43 Q_PROPERTY(
double opacity READ opacity WRITE setOpacity)
44 Q_PROPERTY(
double gridOpacity READ gridOpacity WRITE setGridOpacity)
49 double ambient,
double diffuse,
double specular,
double specularPower,
53 double ambient()const;
54 double diffuse()const;
55 double specular()const;
56 double specularPower()const;
59 double opacity()const;
60 double gridOpacity()const;
63 virtual
int heightForWidth(
int w)const;
65 virtual QSize sizeHint()const;
68 void setAmbient(
double newAbient);
70 void setDiffuse(
double newDiffuse);
72 void setSpecular(
double newSpecular);
74 void setSpecularPower(
double newSpecularPower);
76 void setColor(const QColor& newColor);
78 void setOpacity(
double newOpacity);
79 void setGridOpacity(
double newGridOpacity);
82 void paintEvent(QPaintEvent *);
83 void draw(QImage& image);
85 QScopedPointer<ctkMaterialPropertyPreviewLabelPrivate> d_ptr;
87 Q_DECLARE_PRIVATE(ctkMaterialPropertyPreviewLabel);
88 Q_DISABLE_COPY(ctkMaterialPropertyPreviewLabel);