myViewPort = new OCCViewer_ViewPort3d( this, myModel->getViewer3d(), V3d_ORTHOGRAPHIC );
myViewPort->installEventFilter(this);
setCentralWidget(myViewPort);
- myOperation = NOTHING;
+ myOperation = NOVIEWOP;
myCurrPointType = BBCENTER;
myPrevPointType = BBCENTER;
mySelectedPoint = gp_Pnt(0.,0.,0.);
myRotationPointSelection = false;
- setTransformRequested ( NOTHING );
+ setTransformRequested ( NOVIEWOP );
setTransformInProcess ( false );
createActions();
OCCViewer_ViewWindow::OperationType
OCCViewer_ViewWindow::getButtonState( QMouseEvent* theEvent, int theInteractionStyle )
{
- OperationType aOp = NOTHING;
+ OperationType aOp = NOVIEWOP;
SUIT_ViewModel::InteractionStyle aStyle = (SUIT_ViewModel::InteractionStyle)theInteractionStyle;
if( (theEvent->modifiers() == SUIT_ViewModel::myStateMap[aStyle][SUIT_ViewModel::ZOOM]) &&
(theEvent->buttons() == SUIT_ViewModel::myButtonMap[aStyle][SUIT_ViewModel::ZOOM]) )
if ( interactionStyle() == SUIT_ViewModel::STANDARD )
aState = getButtonState(theEvent, anInteractionStyle);
else {
- aState = OCCViewer_ViewWindow::NOTHING;
+ aState = OCCViewer_ViewWindow::NOVIEWOP;
myIsKeyFree = true;
}
switch ( aState ) {
ic->Deactivate();
ic->Activate(0);
#endif
- myOperation = NOTHING;
+ myOperation = NOVIEWOP;
myViewPort->setCursor( myCursor );
myCursorIsHand = false;
myRotationPointSelection = false;
ic->Deactivate();
ic->Activate(0);
#endif
- myOperation = NOTHING;
+ myOperation = NOVIEWOP;
myViewPort->setCursor( myCursor );
myCursorIsHand = false;
myRotationPointSelection = false;
ic->Deactivate();
ic->Activate(0);
#endif
- myOperation = NOTHING;
+ myOperation = NOVIEWOP;
myViewPort->setCursor( myCursor );
myCursorIsHand = false;
myRotationPointSelection = false;
bool OCCViewer_ViewWindow::setTransformRequested( OperationType op )
{
bool ok = transformEnabled( op );
- myOperation = ok ? op : NOTHING;
- myViewPort->setMouseTracking( myOperation == NOTHING );
+ myOperation = ok ? op : NOVIEWOP;
+ myViewPort->setMouseTracking( myOperation == NOVIEWOP );
return ok;
}
void OCCViewer_ViewWindow::vpMouseReleaseEvent(QMouseEvent* theEvent)
{
switch ( myOperation ) {
- case NOTHING:
+ case NOVIEWOP:
{
int prevState = myCurSketch;
if(theEvent->button() == Qt::RightButton)
emit vpTransformationFinished (myOperation);
setTransformInProcess( false );
- setTransformRequested( NOTHING );
+ setTransformRequested( NOVIEWOP );
myPanningByBtn = false;
}
bool OCCViewer_ViewWindow::transformRequested() const
{
- return ( myOperation != NOTHING );
+ return ( myOperation != NOVIEWOP );
}
bool OCCViewer_ViewWindow::transformInProcess() const
*/
void OCCViewer_ViewWindow::setTransformEnabled( const OperationType id, const bool on )
{
- if ( id != NOTHING ) myStatus.insert( id, on );
+ if ( id != NOVIEWOP ) myStatus.insert( id, on );
}
/*!
RectangleSelectionStyleId, PolygonSelectionStyleId, CircleSelectionStyleId,
UserId };
- enum OperationType{ NOTHING, PANVIEW, ZOOMVIEW, ROTATE,
+ enum OperationType{ NOVIEWOP, PANVIEW, ZOOMVIEW, ROTATE,
PANGLOBAL, WINDOWFIT, FITALLVIEW, FITSELECTION, RESETVIEW,
FRONTVIEW, BACKVIEW, TOPVIEW, BOTTOMVIEW, LEFTVIEW, RIGHTVIEW,
CLOCKWISEVIEW, ANTICLOCKWISEVIEW, PROJECTION };