case GEOMOp::OpFeatureDetect: // MENU ENTITY - FEATURE DETECTION
#endif
case GEOMOp::OpPictureImport: // MENU ENTITY - IMPORT PICTURE IN VIEWER
+ case GEOMOp::OpCreateField: // MENU FIELD - CREATE FIELD
+ case GEOMOp::OpEditField: // MENU FIELD - EDIT FIELD
+ case GEOMOp::OpEditFieldPopup: // POPUP MENU - EDIT FIELD
libName = "EntityGUI";
break;
case GEOMOp::OpEdge: // MENU BUILD - EDGE
createGeomAction( GEOMOp::OpGroupIntersect, "GROUP_INTERSECT" );
createGeomAction( GEOMOp::OpGroupCut, "GROUP_CUT" );
+ createGeomAction( GEOMOp::OpCreateField, "FIELD_CREATE" );
+ createGeomAction( GEOMOp::OpEditField, "FIELD_EDIT" );
+
createGeomAction( GEOMOp::OpReimport, "RELOAD_IMPORTED" );
createGeomAction( GEOMOp::OpQuadFace, "Q_FACE" );
createGeomAction( GEOMOp::OpAutoColor, "POP_AUTO_COLOR" );
createGeomAction( GEOMOp::OpNoAutoColor, "POP_DISABLE_AUTO_COLOR" );
createGeomAction( GEOMOp::OpGroupCreatePopup, "POP_CREATE_GROUP" );
+ createGeomAction( GEOMOp::OpEditFieldPopup, "POP_EDIT_FIELD" );
createGeomAction( GEOMOp::OpDiscloseChildren, "POP_DISCLOSE_CHILDREN" );
createGeomAction( GEOMOp::OpConcealChildren, "POP_CONCEAL_CHILDREN" );
createGeomAction( GEOMOp::OpUnpublishObject, "POP_UNPUBLISH_OBJ" );
createMenu( separator(), newEntId, -1 );
+ int fieldId = createMenu( tr( "MEN_FIELD" ), newEntId, -1 );
+ createMenu( GEOMOp::OpCreateField, fieldId, -1 );
+ createMenu( GEOMOp::OpEditField, fieldId, -1 );
+
+ createMenu( separator(), newEntId, -1 );
+
int blocksId = createMenu( tr( "MEN_BLOCKS" ), newEntId, -1 );
createMenu( GEOMOp::OpQuadFace, blocksId, -1 );
createMenu( GEOMOp::OpHexaSolid, blocksId, -1 );
QtxPopupMgr* mgr = popupMgr();
mgr->insert( action( GEOMOp::OpDelete ), -1, -1 ); // delete
- mgr->setRule( action( GEOMOp::OpDelete ), QString("$type in {'Shape' 'Group' 'Folder'} and selcount>0"), QtxPopupMgr::VisibleRule );
+ mgr->setRule( action( GEOMOp::OpDelete ), QString("$type in {'Shape' 'Group' 'Folder' 'Field' 'FieldStep'} and selcount>0"), QtxPopupMgr::VisibleRule );
mgr->insert( action( GEOMOp::OpGroupCreatePopup ), -1, -1 ); // create group
mgr->setRule( action( GEOMOp::OpGroupCreatePopup ), QString("type='Shape' and selcount=1 and isOCC=true"), QtxPopupMgr::VisibleRule );
+ mgr->insert( action( GEOMOp::OpEditFieldPopup ), -1, -1 ); // edit field
+ mgr->setRule( action( GEOMOp::OpEditFieldPopup ), QString("(type='Field' or type='FieldStep') and isOCC=true"), QtxPopupMgr::VisibleRule );
mgr->insert( action( GEOMOp::OpDiscloseChildren ), -1, -1 ); // disclose child items
mgr->setRule( action( GEOMOp::OpDiscloseChildren ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and hasConcealedChildren=true"), QtxPopupMgr::VisibleRule );
- mgr->insert( action( GEOMOp::OpConcealChildren ), -1, -1 ); // conceal shild items
+ mgr->insert( action( GEOMOp::OpConcealChildren ), -1, -1 ); // conceal child items
mgr->setRule( action( GEOMOp::OpConcealChildren ), QString("client='ObjectBrowser' and type='Shape' and selcount=1 and hasDisclosedChildren=true"), QtxPopupMgr::VisibleRule );
mgr->insert( action( GEOMOp::OpGroupEdit ), -1, -1 ); // edit group
mgr->setRule( action( GEOMOp::OpGroupEdit ), QString("client='ObjectBrowser' and type='Group' and selcount=1 and isOCC=true"), QtxPopupMgr::VisibleRule );
QString canDisplay = "($component={'GEOM'}) and (selcount>0) and ({true} in $canBeDisplayed) ",
onlyComponent = "((type='Component') and selcount=1)",
rule = canDisplay + "and ((($type in {%1}) and( %2 )) or " + onlyComponent + ")",
- types = "'Shape' 'Group'";
+ types = "'Shape' 'Group' 'FieldStep'";
mgr->insert( action( GEOMOp::OpShow ), -1, -1 ); // display
mgr->setRule( action( GEOMOp::OpShow ), rule.arg( types ).arg( "not isVisible" ), QtxPopupMgr::VisibleRule );
mgr->insert( separator(), -1, -1 ); // -----------
mgr->insert( action( GEOMOp::OpUnpublishObject ), -1, -1 ); // Unpublish object
- mgr->setRule( action( GEOMOp::OpUnpublishObject ), QString("client='ObjectBrowser' and $type in {'Shape' 'Group'} and selcount>0"), QtxPopupMgr::VisibleRule );
+ mgr->setRule( action( GEOMOp::OpUnpublishObject ), QString("client='ObjectBrowser' and $type in {'Shape' 'Group' 'Field' 'FieldStep'} and selcount>0"), QtxPopupMgr::VisibleRule );
mgr->insert( action( GEOMOp::OpPublishObject ), -1, -1 ); // Publish object
mgr->setRule( action( GEOMOp::OpPublishObject ), QString("client='ObjectBrowser' and isComponent=true"), QtxPopupMgr::VisibleRule );
action( GEOMOp::OpGroupCreate )->setEnabled( ViewOCC ); // Create Group
action( GEOMOp::OpGroupEdit )->setEnabled( ViewOCC ); // Edit Group
+ action( GEOMOp::OpCreateField )->setEnabled( ViewOCC ); // Create Field
+ action( GEOMOp::OpEditField )->setEnabled( ViewOCC ); // Edit Field
action( GEOMOp::OpMultiTransform )->setEnabled( ViewOCC ); // MENU BLOCKS - MULTI-TRANSFORMATION
}
SUIT_ViewWindow* SUIT_window = application()->desktop()->activeWindow();
if ( !SUIT_window || SUIT_window->getViewManager()->getType() != OCCViewer_Viewer::Type() )
- return;
+ return;
SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( getApp()->activeStudy() );
if (!appStudy) return;
if ( dataObj ) {
_PTR(SObject) aSO = dataObj->object();
if ( aSO ) {
- _PTR(GenericAttribute) anAttr;
- _PTR(SObject) aFatherSO = aSO->GetStudy()->GetUseCaseBuilder()->GetFather( aSO );
- if ( aFatherSO && aFatherSO->FindAttribute(anAttr, "AttributeLocalID") ) {
- _PTR(AttributeLocalID) aLocalID( anAttr );
- anObjectInFolder = aLocalID->Value() == 999;
- }
+ _PTR(GenericAttribute) anAttr;
+ _PTR(SObject) aFatherSO = aSO->GetStudy()->GetUseCaseBuilder()->GetFather( aSO );
+ if ( aFatherSO && aFatherSO->FindAttribute(anAttr, "AttributeLocalID") ) {
+ _PTR(AttributeLocalID) aLocalID( anAttr );
+ anObjectInFolder = aLocalID->Value() == 999;
+ }
}
}
}
if ( dataObj ) {
_PTR(SObject) aSO = dataObj->object();
if ( aSO ) {
- _PTR(GenericAttribute) anAttr;
- if ( aSO->FindAttribute(anAttr, "AttributeLocalID") ) {
- _PTR(AttributeLocalID) aLocalID( anAttr );
- isFolder = aLocalID->Value() == 999;
- }
+ _PTR(GenericAttribute) anAttr;
+ if ( aSO->FindAttribute(anAttr, "AttributeLocalID") ) {
+ _PTR(AttributeLocalID) aLocalID( anAttr );
+ isFolder = aLocalID->Value() == 999;
+ }
}
}
}
\sa isDraggable(), isDropAccepted()
*/
void GeometryGUI::dropObjects( const DataObjectList& what, SUIT_DataObject* where,
- const int row, Qt::DropAction action )
+ const int row, Qt::DropAction action )
{
if (action != Qt::CopyAction && action != Qt::MoveAction)
return; // unsupported action
// call engine function
GetGeomGen()->Move( objects.in(), // what
- _CAST(SObject, parentObj)->GetSObject(), // where
- row ); // row
+ _CAST(SObject, parentObj)->GetSObject(), // where
+ row ); // row
// update Object browser
getApp()->updateObjectBrowser( false );