Commit f9530bcf authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Modifications in LightDirectionWidget.

- bug fixed: directionChanged signal emitted only if the value effectively changed.
- some functions renaming.
parent bff8e883
......@@ -130,3 +130,14 @@ void LightDirectionWidget::changeEvent( QEvent *evt )
if( evt->type() == QEvent::EnabledChange )
updateSphereImageContent();
}
void LightDirectionWidget::setDirection( const QVector3D &dir )
{
if( dir != m_LightDir )
{
m_LightDir = dir;
updateSphereImageContent();
emit directionChanged( m_LightDir );
}
}
......@@ -36,11 +36,11 @@ class LightDirectionWidget : public QWidget
public:
LightDirectionWidget( const QString& label, QWidget *parent = NULL );
inline QVector3D getDirection() const { return m_LightDir; }
inline void setDirection( const QVector3D &dir ) { m_LightDir = dir; updateSphereImageContent(); emit directionModified(); }
inline QVector3D direction() const { return m_LightDir; }
void setDirection( const QVector3D &dir );
signals:
void directionModified();
void directionChanged( QVector3D );
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment