#include "HYDROGUI_Prs.h"
+#include <GraphicsView_ViewPort.h>
+
+#include <QCursor>
+
//=======================================================================
// name : HYDROGUI_Prs
// Purpose : Constructor
//=======================================================================
-HYDROGUI_Prs::HYDROGUI_Prs( const Handle(HYDROData_Object)& theObject )
+HYDROGUI_Prs::HYDROGUI_Prs( const Handle(HYDROData_Entity)& theObject )
: GraphicsView_Object(),
myObject( theObject ),
myIsToUpdate( false )
{
+ myHighlightCursor = new QCursor( Qt::PointingHandCursor );
}
//=======================================================================
//=======================================================================
HYDROGUI_Prs::~HYDROGUI_Prs()
{
+ if( myHighlightCursor )
+ {
+ delete myHighlightCursor;
+ myHighlightCursor = 0;
+ }
+}
+
+//================================================================
+// Function : addTo
+// Purpose :
+//================================================================
+void HYDROGUI_Prs::addTo( GraphicsView_ViewPort* theViewPort )
+{
+ GraphicsView_Object::addTo( theViewPort );
+
+ double aZValue = 0;
+ GraphicsView_ObjectListIterator anIter( theViewPort->getObjects() );
+ while( anIter.hasNext() )
+ {
+ if( HYDROGUI_Prs* aPrs = dynamic_cast<HYDROGUI_Prs*>( anIter.next() ) )
+ {
+ double aZValueRef = aPrs->zValue();
+ aZValue = qMax( aZValue, aZValueRef );
+ }
+ }
+ setZValue( aZValue + 1 );
}