BALL  1.4.79
 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* representation);
53 
58  void updateDefaultMaterialsFromStage();
59 
60  public slots:
61 
62  virtual void ambientFactorChanged();
63  virtual void specularityFactorChanged();
64  virtual void reflectivenessFactorChanged();
65  virtual void shininessFactorChanged();
66  virtual void transparencyFactorChanged();
67  virtual void updateDirectlyBoxChanged();
68  virtual void editAmbientColor();
69  virtual void editSpecularityColor();
70  virtual void editReflectivenessColor();
71  private:
72 
73  void setLabel_(QLabel& label, float value);
74  void setValues_(const QSlider& slider, QLabel& label, int divisor);
75  void setQuadraticValues_(const QSlider& slider, QLabel& label, int divisor);
76 
77  Representation* current_representation_;
78  };
79 
80  }
81 }
82 
83 #endif
#define BALL_VIEW_EXPORT
Definition: COMMON/global.h:52