myOCCDisplayer = new HYDROGUI_OCCDisplayer( this );
myVTKDisplayer = new HYDROGUI_VTKPrsDisplayer( this );
- HYDROData_Tool::SetSIProgress( new HYDROGUI_SIProgressIndicator( theApp->desktop() ) );
- HYDROData_Tool::SetZIProgress( new HYDROGUI_ZIProgressIndicator( theApp->desktop() ) );
+ //HYDROData_Tool::SetSIProgress( new HYDROGUI_SIProgressIndicator( theApp->desktop() ) );
+ //HYDROData_Tool::SetZIProgress( new HYDROGUI_ZIProgressIndicator( theApp->desktop() ) );
}
bool HYDROGUI_Module::activateModule( SUIT_Study* theStudy )
// end of GEOM plugins loading
#ifndef DISABLE_PYCONSOLE
- aDesktop->tabifyDockWidget( HYDROGUI_Tool::WindowDock( anApp->getWindow( LightApp_Application::WT_PyConsole ) ),
+ aDesktop->tabifyDockWidget( HYDROGUI_Tool::WindowDock( anApp->getWindow( LightApp_Application::WT_PyConsole ) ),
HYDROGUI_Tool::WindowDock( anApp->getWindow( LightApp_Application::WT_LogWindow ) ) );
#endif
while( anIter.hasNext() ) {
size_t anId = anIter.next().key();
const ViewManagerInfo& anInfo = anIter.value();
-
+
aHydroViewManagers << anInfo.first;
if ( !anAllViewManagers.contains( anInfo.first ) ) {
{
connect( aViewManager, SIGNAL( mouseMove( SUIT_ViewWindow*, QMouseEvent* ) ),
this, SLOT( onMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) );
- connect( aViewManager, SIGNAL( activated( SUIT_ViewManager* ) ),
+ connect( aViewManager, SIGNAL( activated( SUIT_ViewManager* ) ),
this, SLOT( onViewActivated( SUIT_ViewManager* ) ) );
OCCViewer_ViewManager* occ_mgr = dynamic_cast<OCCViewer_ViewManager*>( aViewManager );
preferencesChanged( "HYDRO", "chained_panning" );
// Load GEOM data
- SalomeApp_Study* aStudy =
+ SalomeApp_Study* aStudy =
dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() );
if ( aStudy ) {
SALOMEDS::Study_var aDSStudy = GeometryGUI::getStudyServant();
{
disconnect( aViewManager, SIGNAL( mouseMove( SUIT_ViewWindow*, QMouseEvent* ) ),
this, SLOT( onMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) );
- disconnect( aViewManager, SIGNAL( activated( SUIT_ViewManager* ) ),
+ disconnect( aViewManager, SIGNAL( activated( SUIT_ViewManager* ) ),
this, SLOT( onViewActivated( SUIT_ViewManager* ) ) );
OCCViewer_ViewManager* occ_mgr = dynamic_cast<OCCViewer_ViewManager*>( aViewManager );
LightApp_Application* app = getApp();
if( app && app->getWindow( OverviewWindow )==0 )
{
- const_cast<HYDROGUI_Module*>( this )->myOverview =
+ const_cast<HYDROGUI_Module*>( this )->myOverview =
new HYDROGUI_Overview( tr( "OVERVIEW" ), 0, app->desktop() );
app->insertDockWindow( OverviewWindow, myOverview );
app->placeDockWindow( OverviewWindow, Qt::LeftDockWidgetArea );
// Check the selected GEOM objects (take into account the Object Browser only)
if ( anIsObjectBrowser ) {
- QList<GEOM::shape_type> anObstacleTypes =
+ QList<GEOM::shape_type> anObstacleTypes =
HYDROGUI_ImportGeomObjectOp::getObstacleTypes();
- QList<GEOM::shape_type> aPolylineTypes =
+ QList<GEOM::shape_type> aPolylineTypes =
HYDROGUI_ImportGeomObjectOp::getPolylineTypes();
- bool isCanBeImportedAsObstacle =
+ bool isCanBeImportedAsObstacle =
!HYDROGUI_Tool::GetSelectedGeomObjects( this, anObstacleTypes ).isEmpty();
- bool isCanBeImportedAsPolyline =
+ bool isCanBeImportedAsPolyline =
!HYDROGUI_Tool::GetSelectedGeomObjects( this, aPolylineTypes ).isEmpty();
// Add import as obstacle action
anIsProfile = true;
aNbOfSelectedProfiles++;
- Handle(HYDROData_Profile) aProfile =
+ Handle(HYDROData_Profile) aProfile =
Handle(HYDROData_Profile)::DownCast( anObject );
if( !aProfile.IsNull() && aProfile->IsValid() ) {
anIsValidProfile = true;
else if( anObjectKind == KIND_STREAM )
{
anIsStream = true;
- Handle(HYDROData_Stream) aStream =
+ Handle(HYDROData_Stream) aStream =
Handle(HYDROData_Stream)::DownCast( anObject );
if ( !aStream.IsNull() )
isStreamHasBottom = !aStream->GetBottomPolyline().IsNull();
theMenu->addAction( action( CreateCylinderId ) );
break;
case KIND_STRICKLER_TABLE:
- theMenu->addAction( action( ImportStricklerTableFromFileId ) );
+ theMenu->addAction( action( ImportStricklerTableFromFileId ) );
break;
case KIND_LAND_COVER_MAP:
- theMenu->addAction( action( CreateLandCoverMapId ) );
- theMenu->addAction( action( ImportLandCoverMapId ) );
+ theMenu->addAction( action( CreateLandCoverMapId ) );
+ theMenu->addAction( action( ImportLandCoverMapId ) );
break;
case KIND_CALCULATION:
theMenu->addAction( action( CreateCalculationId ) );
theMenu->addAction( action( DuplicateStricklerTableId ) );
theMenu->addSeparator();
- Handle(HYDROData_StricklerTable) aTable =
+ Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( aSeq.First() );
- QString aCurrentTable =
+ QString aCurrentTable =
HYDROGUI_DataObject::dataObjectEntry( getLandCoverColoringTable( anActiveViewId ) );
bool isUsed = aCurrentTable == HYDROGUI_DataObject::dataObjectEntry( aTable );
//
theMenu->addAction( action( ExportToShapeFileID ) );
theMenu->addSeparator();
- }
+ }
else if( anIsVisualState && anIsObjectBrowser )
{
theMenu->addAction( action( SaveVisualStateId ) );
theMenu->addAction( action( SetTransparencyId ) );
theMenu->addSeparator();
}
- }
+ }
else if ( anAllAreProfiles )
{
theMenu->addAction( action( EditProfileId ) );
theMenu->addSeparator();
- if( anIsImage || anIsPolyline || anIsPolyline3D ||
+ if( anIsImage || anIsPolyline || anIsPolyline3D ||
anIsImmersibleZone || anIsZone || anIsRegion ||
anIsBathymetry || anIsObstacle || anIsStream ||
anIsChannel || anIsDigue || anIsDummyObject3D ||
SUIT_ResourceMgr* resMgr = application()->resourceMgr();
if ( theSection == "preferences" && thePref == "default_strickler_coefficient" )
{
-
+
Handle(HYDROData_Document) aDoc = HYDROData_Document::Document();
if ( resMgr && !aDoc.IsNull() )
aDoc->SetDefaultStricklerCoefficient( resMgr->doubleValue( theSection, thePref, 0 ) );
if (anOCCViewMgr)
anOCCViewMgr->setChainedOperations( aChainedPan );
}
-
+
QList<QDockWidget*> docW = getApp()->desktop()->findChildren<QDockWidget*>();
foreach (QDockWidget* qw, docW)
{
}
if( ( flags & UF_Viewer ) )
- updateViewer( getDisplayer(), flags & UF_GV_Init, flags & UF_GV_Forced, aDoFitAll );
+ updateViewer( getDisplayer(), flags & UF_GV_Init, flags & UF_GV_Forced, aDoFitAll );
if( ( flags & UF_OCCViewer ) )
- updateViewer( getOCCDisplayer(), flags & UF_OCC_Init, flags & UF_OCC_Forced, aDoFitAll );
+ updateViewer( getOCCDisplayer(), flags & UF_OCC_Init, flags & UF_OCC_Forced, aDoFitAll );
if( ( flags & UF_VTKViewer ) )
- updateViewer( getVTKDisplayer(), flags & UF_VTK_Init, flags & UF_VTK_Forced, aDoFitAll );
+ updateViewer( getVTKDisplayer(), flags & UF_VTK_Init, flags & UF_VTK_Forced, aDoFitAll );
if( ( flags & UF_Model ) && getDataModel() && getApp() )
{
bool isResizeOnExpandItem = aResMgr->booleanValue( "ObjectBrowser", "resize_on_expand_item", false );
SUIT_DataBrowser* anObjectBrowser = getApp()->objectBrowser();
if ( isResizeOnExpandItem && anObjectBrowser ) {
- anObjectBrowser->setResizeOnExpandItem( false ); // MZN: ISSUE #280
+ anObjectBrowser->setResizeOnExpandItem( false ); // MZN: ISSUE #280
}
getApp()->updateObjectBrowser( true );
if ( isResizeOnExpandItem && anObjectBrowser ) {
- anObjectBrowser->setResizeOnExpandItem( true ); // MZN: ISSUE #280
+ anObjectBrowser->setResizeOnExpandItem( true ); // MZN: ISSUE #280
}
}
LightApp_Module::onViewManagerAdded( theViewManager );
if( theViewManager->getType() == GraphicsView_Viewer::Type() )
- {
+ {
connect( theViewManager, SIGNAL( viewCreated( SUIT_ViewWindow* ) ),
this, SLOT( onViewCreated( SUIT_ViewWindow* ) ) );
}
this, SLOT( onViewCreated( SUIT_ViewWindow* ) ) );
connect( theViewManager, SIGNAL( mouseMove( SUIT_ViewWindow*, QMouseEvent* ) ),
this, SLOT( onMouseMove( SUIT_ViewWindow*, QMouseEvent* ) ) );
- connect( theViewManager, SIGNAL( activated( SUIT_ViewManager* ) ),
+ connect( theViewManager, SIGNAL( activated( SUIT_ViewManager* ) ),
this, SLOT( onViewActivated( SUIT_ViewManager* ) ) );
}
else if( theViewManager->getType() == SVTK_Viewer::Type() )
*/
}
-void HYDROGUI_Module::updateViewer( HYDROGUI_AbstractDisplayer* theDisplayer,
- const bool theIsInit,
- const bool theIsForced,
+void HYDROGUI_Module::updateViewer( HYDROGUI_AbstractDisplayer* theDisplayer,
+ const bool theIsInit,
+ const bool theIsForced,
const bool theDoFitAll )
{
DEBTRACE("HYDROGUI_Module::updateViewer");
// currently, all views are updated
ViewManagerMapIterator anIter( myViewManagerMap );
while( anIter.hasNext() )
- {
+ {
SUIT_ViewManager* aViewManager = anIter.next().value().first;
if ( theDisplayer->IsApplicable( aViewManager ) )
SUIT_DataOwnerPtrList::iterator anIter;
for( anIter = aList.begin(); anIter != aList.end(); anIter++ )
{
- const LightApp_DataOwner* anOwner =
+ const LightApp_DataOwner* anOwner =
dynamic_cast<const LightApp_DataOwner*>( (*anIter).operator->() );
if( anOwner )
anEntryList.append( anOwner->entry() );
const int row, Qt::DropAction action )
{
if ( action != Qt::CopyAction && action != Qt::MoveAction )
- return;
+ return;
if (row == -1)
return;
if (where->level() < 2 )
- return;
+ return;
DataObjectList::ConstIterator it = what.constBegin();
- for (;it != what.constEnd();++it)
+ for (;it != what.constEnd();++it)
{
if ((*it)->parent() != where)
return;
it = what.constBegin();
int i=0;
- for (;it != what.constEnd();++it)
+ for (;it != what.constEnd();++it)
{
SUIT_DataObject* objWhat = *it;
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 size_t theViewId ) const
}
if ( theObject->GetKind() == KIND_STRICKLER_TABLE ) {
- Handle(HYDROData_StricklerTable) aTable =
+ Handle(HYDROData_StricklerTable) aTable =
Handle(HYDROData_StricklerTable)::DownCast( theObject );
QMutableMapIterator<size_t, Handle(HYDROData_StricklerTable)> anIter( myLandCoverColoringMap );
while ( anIter.hasNext() ) {
- if ( HYDROGUI_DataObject::dataObjectEntry( anIter.next().value() ) ==
+ if ( HYDROGUI_DataObject::dataObjectEntry( anIter.next().value() ) ==
HYDROGUI_DataObject::dataObjectEntry( aTable ) ) {
anIter.remove();
}