Commit aecf0790 authored by Tobias Neeb's avatar Tobias Neeb
Browse files

[ADD #736] make box-widgets work with shape-independent enum

parent 41a687ef
......@@ -57,14 +57,14 @@ WTransferFunction2DBoxWidget::WTransferFunction2DBoxWidget( WTransferFunction2DG
m_controlPoints.push_back( new WTransferFunction2DControlPoint( this, m_box.bottomLeft(), BOTTOMLEFT ) );
m_controlPoints.push_back( new WTransferFunction2DControlPoint( this, m_box.topLeft(), TOPLEFT ) );
connect( m_controlPoints[0], SIGNAL( resizeHandleChanged( ResizePointsRect, QPointF ) ),
this, SLOT( setResizeHandle( ResizePointsRect, QPointF ) ) );
connect( m_controlPoints[1], SIGNAL( resizeHandleChanged( ResizePointsRect, QPointF ) ),
this, SLOT( setResizeHandle( ResizePointsRect, QPointF ) ) );
connect( m_controlPoints[2], SIGNAL( resizeHandleChanged( ResizePointsRect, QPointF ) ),
this, SLOT( setResizeHandle( ResizePointsRect, QPointF ) ) );
connect( m_controlPoints[3], SIGNAL( resizeHandleChanged( ResizePointsRect, QPointF ) ),
this, SLOT( setResizeHandle( ResizePointsRect, QPointF ) ) );
connect( m_controlPoints[0], SIGNAL( resizeHandleChanged( ResizePoints, QPointF ) ),
this, SLOT( setResizeHandle( ResizePoints, QPointF ) ) );
connect( m_controlPoints[1], SIGNAL( resizeHandleChanged( ResizePoints, QPointF ) ),
this, SLOT( setResizeHandle( ResizePoints, QPointF ) ) );
connect( m_controlPoints[2], SIGNAL( resizeHandleChanged( ResizePoints, QPointF ) ),
this, SLOT( setResizeHandle( ResizePoints, QPointF ) ) );
connect( m_controlPoints[3], SIGNAL( resizeHandleChanged( ResizePoints, QPointF ) ),
this, SLOT( setResizeHandle( ResizePoints, QPointF ) ) );
}
WTransferFunction2DBoxWidget::~WTransferFunction2DBoxWidget()
{
......@@ -129,7 +129,7 @@ void WTransferFunction2DBoxWidget::paint( QPainter *painter, const QStyleOptionG
painter->drawRect( m_box );
}
void WTransferFunction2DBoxWidget::setResizeHandle( ResizePointsRect handle, QPointF position )
void WTransferFunction2DBoxWidget::setResizeHandle( ResizePoints handle, QPointF position )
{
m_resizePoints = handle;
prepareGeometryChange();
......@@ -211,6 +211,6 @@ void WTransferFunction2DBoxWidget::keyPressEvent( QKeyEvent *event )
{
if( event->key() == Qt::Key_Backspace || event->key() == Qt::Key_Delete )
{
m_parent->removeWidget( this );
m_parent->removeBoxWidget( this );
}
}
......@@ -126,7 +126,7 @@ public slots:
* \param handle handle location e.g. TOPLEFT
* \param position position where it was moved to
*/
void setResizeHandle( ResizePointsRect handle, QPointF position );
void setResizeHandle( ResizePoints handle, QPointF position );
protected:
/**
......@@ -186,7 +186,7 @@ private:
* */
void setControlPointsToCorner();
ResizePointsRect m_resizePoints; /*!< Flag of current selected resize point */
ResizePoints m_resizePoints; /*!< Flag of current selected resize point */
WTransferFunction2DGUIWidget* m_parent; /*!< The parent object */
QColor m_color; /*!< The color of the box */
double m_width; /*!< The width of the box */
......
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