#include "VISUConfig.hh"
-#include "SalomeApp_Module.h"
-#include "SalomeApp_Application.h"
-
#include "SALOMEDSClient_Study.hxx"
#include "SALOMEconfig.h"
#include CORBA_SERVER_HEADER(MED_Gen)
+class QWidget;
+
class SUIT_Desktop;
class SUIT_ViewWindow;
class VISU_Actor;
class Plot2d_ViewFrame;
class CAM_Module;
class LightApp_SelectionMgr;
+class SalomeApp_Module;
class SalomeApp_Study;
+class VisuGUI;
namespace VISU {
class Prs3d_i;
_PTR(Study) GetCStudy(const SalomeApp_Study* theStudy);
bool IsStudyLocked( _PTR(Study) theStudy );
- bool CheckLock( _PTR(Study) theStudy );
+ bool CheckLock( _PTR(Study) theStudy,
+ QWidget* theWidget );
- inline void UpdateObjBrowser(SalomeApp_Module* theModule,
- bool updateDataModel = true);
+ void UpdateObjBrowser(SalomeApp_Module* theModule,
+ bool theIsUpdateDataModel = true,
+ _PTR(SObject) theSObject = _PTR(SObject)());
VISU_Gen_i* GetVisuGen(const CAM_Module* theModule);
SALOME_MED::MED_Gen_var GetMEDEngine();
bool IsRemovableSelected(const SalomeApp_Module* theModule);
- // Display/Erase
- void ErasePrs(const SalomeApp_Module* theModule,
- CORBA::Object_ptr theObject,
- bool theUpdate = true);
- void DeleteSObject(SalomeApp_Module* theModule,
+ void DeleteSObject(VisuGUI* theModule,
_PTR(Study) theStudy,
_PTR(SObject) theSObject);
- void DeletePrs3d(SalomeApp_Module* theModule,
+ void DeletePrs3d(VisuGUI* theModule,
VISU::Prs3d_i* thePrs,
const Handle(SALOME_InteractiveObject)& theIO);
- void ErasePrs3d(const SalomeApp_Module* theModule,
- VISU::Prs3d_i* thePrs);
// Presentation management
void ChangeRepresentation (const SalomeApp_Module* theModule,
VISU::Result_i* CheckResult(const SalomeApp_Module* theModule,
_PTR(SObject) theSource,
VISU::Result_var& theResult);
- inline bool IsSObjectTable(_PTR(SObject) theSObject);
-
- // Views
- SUIT_ViewWindow* GetActiveView(const SalomeApp_Module* theModule,
- QString theType = QString::null);
-
- // VTK View
- TViewWindows GetViews(const SalomeApp_Module* theModule);
- SVTK_ViewWindow* GetViewWindow(const SalomeApp_Module* theModule,
- const bool theCreate = false );
- SVTK_ViewWindow* GetViewWindow();
+ bool IsSObjectTable(_PTR(SObject) theSObject);
- VISU_Actor* PublishInView(const SalomeApp_Module* theModule,
- VISU::Prs3d_i* thePrs);
- VISU_Actor* UpdateViewer(const SalomeApp_Module* theModule,
- VISU::Prs3d_i* thePrs,
- bool theDispOnly = false);
+ /*! Display mesh presentation in given VTK view window
+ */
+ VISU_Actor* PublishMeshInView(const SalomeApp_Module* theModule,
+ VISU::Prs3d_i* thePrs,
+ SVTK_ViewWindow* theViewWindow);
/*!
* \brief Repaint all SVTK view windows, where the given object is displayed.
void CreatePlot( SalomeApp_Module* theModule,
_PTR(SObject) theSobj );
+ /*! Display/Erase/Update a curve presentation.
+ * Parameter \a frame may be NULL, in this case there is only update without display/erase
+ */
void UpdateCurve( VISU::Curve_i*,
Plot2d_ViewFrame* frame,
SPlot2d_Curve*,
int theDisplaying );
- //parameter frame may be 0, in this case there is only update without display/erase
- // Others
+ /*! Create mesh presentation and display it in \a theViewWindow.
+ * If \a theViewWindow is NULL, no displaying will be done.
+ */
void CreateMesh (const SalomeApp_Module* theModule,
- const Handle(SALOME_InteractiveObject)& theIO);
+ const Handle(SALOME_InteractiveObject)& theIO,
+ SVTK_ViewWindow* theViewWindow = NULL);
+ // Others
std::vector<VISU::Prs3d_i*> GetPrs3dList (const SalomeApp_Module* theModule,
const Handle(SALOME_InteractiveObject)& theIO);
std::vector<VISU::Prs3d_i*> GetPrs3dList (const SalomeApp_Module* theModule,
_PTR(SObject) theObject);
-}
-
-bool VISU::IsSObjectTable( _PTR(SObject) theSObject )
-{
- if ( theSObject ) {
- _PTR(GenericAttribute) anAttr;
- if (theSObject->FindAttribute( anAttr, "AttributeTableOfInteger" ))
- return true;
- if (theSObject->FindAttribute( anAttr, "AttributeTableOfReal" ))
- return true;
- }
- return false;
-}
-
-void VISU::UpdateObjBrowser(SalomeApp_Module* theModule,
- bool updateDataModel)
-{
- theModule->updateObjBrowser(updateDataModel);
- theModule->getApp()->updateActions();
+
+ int GetFreePositionOfDefaultScalarBar(VisuGUI* theModule, SVTK_ViewWindow* theViewWindow);
+ void AddScalarBarPosition(VisuGUI* theModule, SVTK_ViewWindow* theViewWindow,
+ VISU::Prs3d_i* thePrs3d, int pos);
+ void RemoveScalarBarPosition(VisuGUI* theModule, SVTK_ViewWindow* theViewWindow,
+ VISU::Prs3d_i* thePrs3d);
}
#endif