Loading...
Searching...
No Matches
BALL::VIEW::LightSettings Class Reference
Visualisation » QT Dialogs

`#include <BALL/VIEW/DIALOGS/lightSettings.h>`

Inheritance diagram for BALL::VIEW::LightSettings:

## Public Slots

virtual void | addLightPressed ()
| Slot for the AddLight button.
virtual void | colorPressed ()
| Slot for the EditColor button, opens a color dialog.
virtual void | defaultsPressed ()
| Resets the lighting.
virtual void | lightSelected (QListWidgetItem *current_item, QListWidgetItem *previous_item)
| Slot for selection in the listbox with lights.
virtual void | removeLightPressed ()
| Slot for the RemoveLight button.
virtual void | typeSelected ()
| Slot for type selection changed.
virtual void | intensityChanged ()
| Slot for changes of the intensity slider.
virtual void | intensityMaxChanged (const QString &text)
| Slot for changes of the intensity max factor.
virtual void | positionTypeChanged ()
virtual void | updateDirectlyBoxChanged ()

## Public Member Functions

| LightSettings (QWidget *parent=0, const char *name="LightSettings", Qt::WindowFlags fl=0)
| Constructor.
| ~LightSettings ()
| Destructor.
void | update ()
| Update the display of all fields.
void | updateFromStage ()
| Get the values for lighting from the stage.
void | apply ()
| Apply the new values to the stage.
virtual void | restoreDefaultValues (bool=false)
| Called when defaults is pressed in Preferences, calls setDefaults.
void | restoreValues (bool all)
Public Member Functions inherited from BALL::VIEW::PreferencesEntry
| PreferencesEntry ()
virtual | ~PreferencesEntry ()
virtual void | writePreferenceEntries (INIFile &inifile)
| Store the settings of all registered objects.
virtual void | readPreferenceEntries (const INIFile &inifile)
| Restore the settings of all registered objects.
void | setINIFileSectionName (const String &name)
| Set the name for the section in the INIFile.
const String & | getINIFileSectionName () const
| Get the name for the section in the INIFile.
void | setWidgetStackName (const String &name)
StackPages & | getStackPages ()
| Return all pages, that are to be shown in a parent QStackedWidget.
void | setWidgetStack (QStackedWidget *stack)
virtual void | showStackPage (Position nr)
| Show the specified page in the QStackedWidget.
virtual void | showStackPage (QWidget *widget)
| Show the specified page in the QStackedWidget.
virtual Position | currentStackPage () const
| Get the currently shown page in the QStackedWidget.
virtual void | storeValues ()
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const
virtual bool | setValueAllowed (QObject *)
| Allows to prevent restoring of widgets.
Public Member Functions inherited from BALL::Embeddable
| Embeddable (const String &identifier="<Embeddable>")
| Embeddable (const Embeddable &embeddable)
virtual | ~Embeddable ()
void | setIdentifier (const String &identifier)
const String & | getIdentifier () const
void | unregisterThis ()
virtual void | registerThis ()
virtual void | dump (std::ostream &s=std::cout, Size depth=0) const

## Protected Member Functions

void | setPosition_ (const Vector3 &v)
void | setDirection_ (const Vector3 &v)
void | setAttenuation_ (const Vector3 &a)
Vector3 | getDirection_ ()
Vector3 | getPosition_ ()
Vector3 | getAttenuation_ ()
void | setControlsEnabled_ (bool state)
Index | getCurrentLightNumber_ () const
void | typeSelected_ (Position type)
void | saveSettingsToLight_ ()
void | getValues_ (Index light=-1)
void | clearFields_ ()
Protected Member Functions inherited from BALL::VIEW::PreferencesEntry
void | registerWidgets_ ()
void | registerObject_ (QObject *widget)
void | unregisterObject_ (QObject *widget)
BALL_DEPRECATED void | registerWidgetForHelpSystem_ (const QWidget *, const String &)
void | restoreValues_ (bool all, const ValueMap &map)
void | insertStackEntry_ (QWidget *, const String &name)
bool | isSupported_ (QObject &widget)
bool | getValue_ (const QObject *widget, String &value)
bool | setValue_ (QObject *widget, const String &value)

## Protected Attributes

Stage * | stage_
vector< LightSource > | lights_
vector< LightSource > | default_lights_
bool | ignore_
Index | current_light_
Scene * | scene_
Protected Attributes inherited from BALL::VIEW::PreferencesEntry
String | inifile_section_name_
HashSet< QObject * > | registered_objects_
ValueMap | default_values_
ValueMap | last_values_
QStackedWidget * | widget_stack_
StackPages | stack_pages_

## Additional Inherited Members

Public Types inherited from BALL::VIEW::PreferencesEntry
typedef std::list< std::pair< QWidget *, String > > | StackPages
Public Types inherited from BALL::Embeddable
typedef std::vector< Embeddable * > | EmbeddableVector
Protected Types inherited from BALL::VIEW::PreferencesEntry
typedef HashMap< const QObject *, String > | ValueMap
static void | registerInstance_ (const std::type_info &type, const Embeddable *instance)
static void | unregisterInstance_ (const Embeddable *instance)
static Size | countInstances_ (const std::type_info &type)
static Embeddable * | getInstance_ (const std::type_info &type, Position index)
static Embeddable * | getInstance_ (const std::type_info &type, const String &identifier)

## Detailed Description

Dialog for setting the lighting, which is added to the Preferences. This dialog allows the control of the lighting of a scene. Lights can be added, removed and adjusted. Also a standard value to reset the lighting can be stored.

Definition at line 38 of file lightSettings.h.

## Constructor & Destructor Documentation

## LightSettings()

BALL::VIEW::LightSettings::LightSettings | ( | QWidget * | parent = 0,
|  | const char * | name = "LightSettings",
|  | Qt::WindowFlags | fl = 0 )

Constructor.

## ~LightSettings()

BALL::VIEW::LightSettings::~LightSettings | ( |  | ) |

inline

Destructor.

Definition at line 55 of file lightSettings.h.

## Member Function Documentation

## addLightPressed

virtual void BALL::VIEW::LightSettings::addLightPressed | ( |  | ) |

virtual slot

Slot for the AddLight button.

## apply()

void BALL::VIEW::LightSettings::apply | ( |  | ) |

Apply the new values to the stage.

## clearFields_()

void BALL::VIEW::LightSettings::clearFields_ | ( |  | ) |

protected

## colorPressed

virtual void BALL::VIEW::LightSettings::colorPressed | ( |  | ) |

virtual slot

Slot for the EditColor button, opens a color dialog.

## defaultsPressed

virtual void BALL::VIEW::LightSettings::defaultsPressed | ( |  | ) |

virtual slot

Resets the lighting.

## getAttenuation_()

Vector3 BALL::VIEW::LightSettings::getAttenuation_ | ( |  | ) |

protected

Exceptions

  BALL::Exception::InvalidFormat |

## getCurrentLightNumber_()

Index BALL::VIEW::LightSettings::getCurrentLightNumber_ | ( |  | ) | const

protected

## getDirection_()

Vector3 BALL::VIEW::LightSettings::getDirection_ | ( |  | ) |

protected

Exceptions

  BALL::Exception::InvalidFormat |

## getPosition_()

Vector3 BALL::VIEW::LightSettings::getPosition_ | ( |  | ) |

protected

Exceptions

  BALL::Exception::InvalidFormat |

## getValues_()

void BALL::VIEW::LightSettings::getValues_ | ( | Index | light = -1 | ) |

protected

## intensityChanged

virtual void BALL::VIEW::LightSettings::intensityChanged | ( |  | ) |

virtual slot

Slot for changes of the intensity slider.

## intensityMaxChanged

virtual void BALL::VIEW::LightSettings::intensityMaxChanged | ( | const QString & | text | ) |

virtual slot

Slot for changes of the intensity max factor.

## lightSelected

virtual void BALL::VIEW::LightSettings::lightSelected | ( | QListWidgetItem * | current_item,
|  | QListWidgetItem * | previous_item )

virtual slot

Slot for selection in the listbox with lights.

## positionTypeChanged

virtual void BALL::VIEW::LightSettings::positionTypeChanged | ( |  | ) |

virtual slot

## removeLightPressed

virtual void BALL::VIEW::LightSettings::removeLightPressed | ( |  | ) |

virtual slot

Slot for the RemoveLight button.

## restoreDefaultValues()

virtual void BALL::VIEW::LightSettings::restoreDefaultValues | ( | bool | = false | ) |

virtual

Called when defaults is pressed in Preferences, calls setDefaults.

Reimplemented from BALL::VIEW::PreferencesEntry.

## restoreValues()

void BALL::VIEW::LightSettings::restoreValues | ( | bool | all | ) |

virtual

Restore the values of the child widgets. Called e.g. when a user presses a Cancel button.

Reimplemented from BALL::VIEW::PreferencesEntry.

## saveSettingsToLight_()

void BALL::VIEW::LightSettings::saveSettingsToLight_ | ( |  | ) |

protected

## setAttenuation_()

void BALL::VIEW::LightSettings::setAttenuation_ | ( | const Vector3 & | a | ) |

protected

## setControlsEnabled_()

void BALL::VIEW::LightSettings::setControlsEnabled_ | ( | bool | state | ) |

protected

## setDirection_()

void BALL::VIEW::LightSettings::setDirection_ | ( | const Vector3 & | v | ) |

protected

## setPosition_()

void BALL::VIEW::LightSettings::setPosition_ | ( | const Vector3 & | v | ) |

protected

## typeSelected

virtual void BALL::VIEW::LightSettings::typeSelected | ( |  | ) |

virtual slot

Slot for type selection changed.

## typeSelected_()

void BALL::VIEW::LightSettings::typeSelected_ | ( | Position | type | ) |

protected

## update()

void BALL::VIEW::LightSettings::update | ( |  | ) |

Update the display of all fields.

## updateDirectlyBoxChanged

virtual void BALL::VIEW::LightSettings::updateDirectlyBoxChanged | ( |  | ) |

virtual slot

## updateFromStage()

void BALL::VIEW::LightSettings::updateFromStage | ( |  | ) |

Get the values for lighting from the stage.

## Member Data Documentation

## current_light_

Index BALL::VIEW::LightSettings::current_light_

protected

Definition at line 142 of file lightSettings.h.

## default_lights_

vector<LightSource> BALL::VIEW::LightSettings::default_lights_

protected

Definition at line 139 of file lightSettings.h.

## ignore_

bool BALL::VIEW::LightSettings::ignore_

protected

Definition at line 141 of file lightSettings.h.

## lights_

vector<LightSource> BALL::VIEW::LightSettings::lights_

protected

Definition at line 136 of file lightSettings.h.

## scene_

Scene* BALL::VIEW::LightSettings::scene_

protected

Definition at line 144 of file lightSettings.h.

## stage_

Stage* BALL::VIEW::LightSettings::stage_

protected

Definition at line 133 of file lightSettings.h.