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

SIGNAL/SLOT added to GLViewer in order to control point size modifications.

parent 8ee67bea
......@@ -127,6 +127,14 @@ GLViewer::GLViewer( DisplayDoF dof,
GLViewer::~GLViewer()
{
// Avoid the destruction of UIParamSet objects.
for( auto m : m_Displayables )
if( m.first->GetDisplayOptions() )
{
m_DisplayOptionsLayout->removeWidget( m.first->GetDisplayOptions() );
m.first->GetDisplayOptions()->setParent( NULL );
}
for( std::vector<SelectionTool*>::iterator tool=m_SelectionTools.begin(); tool!=m_SelectionTools.end(); ++tool )
delete *tool;
......@@ -2413,6 +2421,7 @@ void GLViewer::setShiftSpeedFactor( const float shiftSpeedFactor )
void GLViewer::increasePointSize()
{
++ m_View.pointSize;
emit pointSizeChanged( m_View.pointSize );
update();
}
......@@ -2422,6 +2431,18 @@ void GLViewer::decreasePointSize()
if( m_View.pointSize > 1 )
{
-- m_View.pointSize;
emit pointSizeChanged( m_View.pointSize );
update();
}
}
void GLViewer::setPointSize( unsigned int size )
{
if( size >= 1 && size != m_View.pointSize )
{
m_View.pointSize = size;
emit pointSizeChanged( m_View.pointSize );
update();
}
}
......
......@@ -354,6 +354,7 @@ signals:
void lightTrackingToggled( const bool trackingEnabled );
void keyPressed( QKeyEvent *evt );
void dataSelected( GenericUIData *d, Qt::KeyboardModifiers modifiers );
void pointSizeChanged( unsigned int size );
/************\
| QT slot(s) |
......@@ -370,6 +371,7 @@ public slots:
void increasePointSize();
void decreasePointSize();
void setPointSize( unsigned int size );
void setFocusPoint( const QVector3D& p );
void setDistToFocusPoint( const float d );
......
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