bool anIsObjectCanBeColored = false;
bool isRoot = false;
bool isStreamHasBottom = false;
+ bool anIsBCPolygon = false;
SUIT_SelectionMgr* aSelectionMgr = getApp()->selectionMgr();
SUIT_DataOwnerPtrList anOwners;
anIsStricklerTable = true;
else if( anObjectKind == KIND_LAND_COVER_MAP )
anIsLandCoverMap = true;
+ else if (anObjectKind == KIND_BC_POLYGON)
+ anIsBCPolygon = true;
else if( anObjectKind == KIND_STREAM )
{
anIsStream = true;
case KIND_VISUAL_STATE:
theMenu->addAction( action( SaveVisualStateId ) );
break;
+ case KIND_BC_POLYGON:
+ theMenu->addAction( action( ImportBCPolygonId ) );
+ break;
}
theMenu->addSeparator();
}
}
else if (anIsZone)
theMenu->addAction( action( ZoneSetColorId ) );
+ else if (anIsBCPolygon)
+ theMenu->addAction( action( SetBoundaryTypePolygonId ) );
if ( anIsStream || anIsChannel || anIsDigue || anIsObstacle )
{
anIsImmersibleZone || anIsZone || anIsRegion ||
anIsBathymetry || anIsObstacle || anIsStream ||
anIsChannel || anIsDigue || anIsDummyObject3D ||
- anIsValidProfile || anIsGroup || anIsLandCoverMap )
+ anIsValidProfile || anIsGroup || anIsLandCoverMap ||
+ anIsBCPolygon)
{
if( anIsHiddenInSelection )
theMenu->addAction( action( ShowId ) );
update( UF_OCCViewer | UF_VTKViewer | ( visState == Qtx::ShownState ? UF_FitAll : 0 ) );
}
+bool HYDROGUI_Module::isDraggable( const SUIT_DataObject* what ) const
+{
+ return true;
+}
+
+bool HYDROGUI_Module::isDropAccepted( const SUIT_DataObject* where ) const
+{
+
+ return true;
+}
+
+void HYDROGUI_Module::dropObjects( const DataObjectList& what, SUIT_DataObject* where,
+ const int row, Qt::DropAction action )
+{
+ if ( action != Qt::CopyAction && action != Qt::MoveAction )
+ return;
+
+ if (row == -1)
+ return;
+
+ if (where->level() < 2 )
+ return;
+
+ DataObjectList::ConstIterator it = what.constBegin();
+ for (;it != what.constEnd();++it)
+ {
+ if ((*it)->parent() != where)
+ return;
+ }
+
+ it = what.constBegin();
+
+ int i=0;
+ for (;it != what.constEnd();++it)
+ {
+ SUIT_DataObject* objWhat = *it;
+
+ DataObjectList objInSect = where->children();
+
+ //std::list<SUIT_DataObject*> t1 = where->children().toStdList(); //debug
+ int ind = objInSect.indexOf(objWhat);
+ if (ind != -1)
+ {
+ HYDROGUI_DataModel* aModel = getDataModel();
+ int pos = -1;
+ if (ind >= row)
+ {
+ pos = row + i;
+ i++;
+ }
+ else
+ pos = row - 1;
+ where->moveChildPos(objWhat, pos);
+ //std::list<SUIT_DataObject*> t2 = where->children().toStdList(); //debug
+ }
+ }
+
+ getApp()->updateObjectBrowser(true);
+
+}
+
Handle(HYDROData_StricklerTable) HYDROGUI_Module::getLandCoverColoringTable( const int theViewId ) const
{
Handle(HYDROData_StricklerTable) aTable;