#include <SALOME_Event.h>
+#include <SUIT_Desktop.h>
#include <SUIT_Study.h>
#include <SUIT_ViewManager.h>
return new HYDROGUI_Module();
}
+extern "C" HYDRO_EXPORT char* getModuleVersion()
+{
+ return (char*)HYDRO_VERSION;
+}
+
HYDROGUI_Module::HYDROGUI_Module()
: LightApp_Module( "HYDRO" ),
myDisplayer( 0 ),
{
bool aRes = LightApp_Module::activateModule( theStudy );
+ LightApp_Application* anApp = getApp();
+ SUIT_Desktop* aDesktop = anApp->desktop();
+
setMenuShown( true );
setToolShown( true );
+#ifndef DISABLE_PYCONSOLE
+ aDesktop->tabifyDockWidget( HYDROGUI_Tool::WindowDock( anApp->getWindow( LightApp_Application::WT_PyConsole ) ),
+ HYDROGUI_Tool::WindowDock( anApp->getWindow( LightApp_Application::WT_LogWindow ) ) );
+#endif
+
update( UF_All );
updateCommandsStatus();
{
theMap.clear();
theMap.insert( LightApp_Application::WT_LogWindow, Qt::BottomDockWidgetArea );
+#ifndef DISABLE_PYCONSOLE
+ theMap.insert( LightApp_Application::WT_PyConsole, Qt::BottomDockWidgetArea );
+#endif
theMap.insert( LightApp_Application::WT_ObjectBrowser, Qt::LeftDockWidgetArea );
}
bool anIsSplittedImage = false;
bool anIsMustBeUpdatedImage = false;
bool anIsPolyline = false;
+ bool anIsCalculation = false;
bool anIsVisualState = false;
HYDROData_SequenceOfObjects aSeq = HYDROGUI_Tool::GetSelectedObjects( this );
}
else if( anObject->GetKind() == KIND_POLYLINE )
anIsPolyline = true;
+ else if( anObject->GetKind() == KIND_CALCULATION )
+ anIsCalculation = true;
else if( anObject->GetKind() == KIND_VISUAL_STATE )
anIsVisualState = true;
}
theMenu->addAction( action( EditPolylineId ) );
theMenu->addSeparator();
}
+ else if( anIsCalculation )
+ {
+ theMenu->addAction( action( EditCalculationId ) );
+ theMenu->addSeparator();
+ }
else if( anIsVisualState )
{
theMenu->addAction( action( SaveVisualStateId ) );