BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
materialSettings.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_VIEW_DIALOGS_MATERIALSETTINGS_H
6 #define BALL_VIEW_DIALOGS_MATERIALSETTINGS_H
7 
8 #ifndef BALL_COMMON_GLOBAL_H
9 # include <BALL/COMMON/global.h>
10 #endif
11 
12 #ifndef BALL_VIEW_KERNEL_PREFERENCESENTRY
14 #endif
15 
16 #include <BALL/VIEW/UIC/ui_materialSettings.h>
17 
18 #include <QtGui/QWidget>
19 #include <QtGui/QLabel>
20 
21 namespace BALL
22 {
23  namespace VIEW
24  {
25  class Scene;
26  class Representation;
27 
34  : public QWidget,
35  public Ui_MaterialSettingsData,
36  public PreferencesEntry
37  {
38  Q_OBJECT
39 
40  public:
41 
43  MaterialSettings( QWidget* parent = 0, const char* name = "MaterialSettings", Qt::WFlags fl = 0 );
44 
47 
49  void apply();
50 
52  void setCurrentRepresentation(Representation const* representation)
53  {
54  current_representation_ = representation;
55  }
56 
57  public slots:
58 
59  virtual void ambientFactorChanged();
60  virtual void specularityFactorChanged();
61  virtual void reflectivenessFactorChanged();
62  virtual void shininessFactorChanged();
63  virtual void transparencyFactorChanged();
64  virtual void updateDirectlyBoxChanged();
65  virtual void editAmbientColor();
66  virtual void editSpecularityColor();
67  virtual void editReflectivenessColor();
68  virtual void rendererChanged();
69  private:
70 
71  void setValues_(const QSlider& slider, QLabel& label, int divisor);
72  void setQuadraticValues_(const QSlider& slider, QLabel& label, int divisor);
73 
75  };
76 
77  }
78 }
79 
80 #endif