Version: 6.3.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes

LightApp_Displayer Class Reference

#include <LightApp_Displayer.h>

Inheritance diagram for LightApp_Displayer:
Inheritance graph

Public Member Functions

 LightApp_Displayer ()
virtual ~LightApp_Displayer ()
void Display (const QString &, const bool=true, SALOME_View *=0)
void Display (const QStringList &, const bool=true, SALOME_View *=0)
void Redisplay (const QString &, const bool=true)
void Erase (const QStringList &, const bool forced=false, const bool updateViewer=true, SALOME_View *=0)
void Erase (const QString &, const bool forced=false, const bool updateViewer=true, SALOME_View *=0)
void EraseAll (const bool forced=false, const bool updateViewer=true, SALOME_View *=0) const
virtual bool IsDisplayed (const QString &, SALOME_View *=0) const
void UpdateViewer () const
virtual bool canBeDisplayed (const QString &, const QString &) const
bool canBeDisplayed (const QString &) const
void setVisibilityState (const QString &entry, Qtx::VisibilityState) const
void UpdatePrs (SALOME_Prs *)
 This Update() method should be called to update given presentation created anywhere by anybody.
virtual void Update (SALOME_OCCPrs *)
 Update SALOME_OCCPrs presentation.
virtual void Update (SALOME_VTKPrs *)
 Update SALOME_VTKPrs presentation.
virtual void Update (SALOME_Prs2d *)
 Update SALOME_Prs2d presentation.
virtual void BeforeDisplay (SALOME_View *, const SALOME_OCCPrs *)
virtual void BeforeDisplay (SALOME_View *, const SALOME_VTKPrs *)
 Null body here.
virtual void BeforeDisplay (SALOME_View *, const SALOME_Prs2d *)
 Null body here.
virtual void AfterDisplay (SALOME_View *, const SALOME_OCCPrs *)
 Null body here.
virtual void AfterDisplay (SALOME_View *, const SALOME_VTKPrs *)
 Null body here.
virtual void AfterDisplay (SALOME_View *, const SALOME_Prs2d *)
 Null body here.
virtual void BeforeErase (SALOME_View *, const SALOME_OCCPrs *)
 Null body here.
virtual void BeforeErase (SALOME_View *, const SALOME_VTKPrs *)
 Null body here.
virtual void BeforeErase (SALOME_View *, const SALOME_Prs2d *)
 Null body here.
virtual void AfterErase (SALOME_View *, const SALOME_OCCPrs *)
 Null body here.
virtual void AfterErase (SALOME_View *, const SALOME_VTKPrs *)
 Null body here.
virtual void AfterErase (SALOME_View *, const SALOME_Prs2d *)
 Null body here.

Static Public Member Functions

static SALOME_ViewGetActiveView ()
static LightApp_DisplayerFindDisplayer (const QString &, const bool)

Protected Member Functions

virtual SALOME_PrsbuildPresentation (const QString &, SALOME_View *=0)

Protected Attributes

QString myLastEntry

Detailed Description

Uniform mechanism of display/erase of objects in different views. Objects are specified by string entry


Constructor & Destructor Documentation

LightApp_Displayer::LightApp_Displayer ( )

Default constructor

LightApp_Displayer::~LightApp_Displayer ( ) [virtual]

Destructor


Member Function Documentation

void LightApp_Displayer::Display ( const QString &  entry,
const bool  updateViewer = true,
SALOME_View theViewFrame = 0 
)

Displays object in view

Parameters:
entry- object entry
updateViewer- is it necessary to update viewer
theViewFrame- view
void LightApp_Displayer::Display ( const QStringList &  list,
const bool  updateViewer = true,
SALOME_View theViewFrame = 0 
)

Displays object in view

Parameters:
list- object entries
updateViewer- is it necessary to update viewer
theViewFrame- view

References SALOME_View.AfterDisplay(), SALOME_View.BeforeDisplay(), buildPresentation(), SALOME_View.Display(), GetActiveView(), myLastEntry, SALOME_View.Repaint(), setVisibilityState(), and Qtx.ShownState.

void LightApp_Displayer::Redisplay ( const QString &  entry,
const bool  updateViewer = true 
)

Redisplays object in view

Parameters:
entry- object entry
updateViewer- is it necessary to update viewer

References SUIT_Session.activeApplication(), SUIT_Application.desktop(), Display(), Erase(), GetActiveView(), SUIT_ViewManager.getViewModel(), IsDisplayed(), SUIT_Session.session(), and SUIT_Desktop.windows().

void LightApp_Displayer::Erase ( const QStringList &  list,
const bool  forced = false,
const bool  updateViewer = true,
SALOME_View theViewFrame = 0 
)

Erases object in view

Parameters:
list- object entries
forced- deletes object from viewer (otherwise it will be erased, but cached)
updateViewer- is it necessary to update viewer
theViewFrame- view

References SALOME_View.AfterErase(), SALOME_View.BeforeErase(), SALOME_View.CreatePrs(), SALOME_View.Erase(), GetActiveView(), Qtx.HiddenState, myLastEntry, SALOME_View.Repaint(), and setVisibilityState().

void LightApp_Displayer::Erase ( const QString &  entry,
const bool  forced = false,
const bool  updateViewer = true,
SALOME_View theViewFrame = 0 
)

Erases object in view

Parameters:
entry- object entry
forced- deletes object from viewer (otherwise it will be erased, but cached)
updateViewer- is it necessary to update viewer
theViewFrame- view

References Erase().

void LightApp_Displayer::EraseAll ( const bool  forced = false,
const bool  updateViewer = true,
SALOME_View theViewFrame = 0 
) const

Erases all objects in view

Parameters:
forced- deletes objects from viewer
updateViewer- is it necessary to update viewer
theViewFrame- view

References SUIT_Session.activeApplication(), SUIT_Application.activeStudy(), SALOME_View.EraseAll(), GetActiveView(), Qtx.HiddenState, SALOME_View.Repaint(), SUIT_Session.session(), and LightApp_Study.setVisibilityStateForAll().

bool LightApp_Displayer::IsDisplayed ( const QString &  entry,
SALOME_View theViewFrame = 0 
) const [virtual]
Returns:
true if object is displayed in viewer
Parameters:
entry- object entry
theViewFrame- view

References GetActiveView(), Handle(), and SALOME_View.isVisible().

void LightApp_Displayer::UpdateViewer ( ) const

Updates active view

References GetActiveView(), and SALOME_View.Repaint().

SALOME_View * LightApp_Displayer::GetActiveView ( ) [static]
Returns:
active view

References SUIT_Session.activeApplication(), and SUIT_Session.session().

LightApp_Displayer * LightApp_Displayer::FindDisplayer ( const QString &  mod_name,
const bool  load 
) [static]
Returns:
displayer, corresponding to module
Parameters:
mod_name- name of module
load- is module has to be forced loaded

References SUIT_Session.activeApplication(), SUIT_Application.activeStudy(), CAM_Application.addModule(), CAM_Module.connectToStudy(), LightApp_Module.displayer(), LightApp_Application.loadModule(), CAM_Application.module(), and SUIT_Session.session().

bool LightApp_Displayer::canBeDisplayed ( const QString &  ,
const QString &   
) const [virtual]
Returns:
true, if object can be displayed in this type of viewer
Parameters:
entry- object entry
viewer_type- type of viewer
bool LightApp_Displayer::canBeDisplayed ( const QString &  entry) const
Returns:
true, if object can be displayed in any type of viewer
Parameters:
entry- object entry

References SUIT_Session.activeApplication(), canBeDisplayed(), and SUIT_Session.session().

void LightApp_Displayer::setVisibilityState ( const QString &  theEntry,
Qtx::VisibilityState  theState 
) const

Find the active study and set the 'visibility state' property of the object

Parameters:
mod_name- name of module
load- is module has to be forced loaded

References SUIT_Session.activeApplication(), SUIT_Application.activeStudy(), SUIT_Session.session(), and LightApp_Study.setVisibilityState().

SALOME_Prs * LightApp_Displayer::buildPresentation ( const QString &  entry,
SALOME_View theViewFrame = 0 
) [protected, virtual]
Returns:
presentation of object, built with help of CreatePrs method
Parameters:
entry- object entry
theViewFrame- view
See also:
CreatePrs()

References SALOME_View.CreatePrs(), and GetActiveView().

void SALOME_Displayer::UpdatePrs ( SALOME_Prs prs) [inherited]

It simply passes control to SALOME_Prs object so that it could perform double dispatch.

Gives control to SALOME_Prs object, so that it could perform double dispatch

References SALOME_Prs.Update().

void SALOME_Displayer::Update ( SALOME_OCCPrs ) [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

void SALOME_Displayer::Update ( SALOME_VTKPrs ) [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

void SALOME_Displayer::Update ( SALOME_Prs2d ) [virtual, inherited]

Virtual method, should be reimplemented in successors, by default issues a warning and does nothing.

virtual void SALOME_Displayer.BeforeDisplay ( SALOME_View ,
const SALOME_OCCPrs  
) [virtual, inherited]
virtual void SALOME_Displayer.BeforeDisplay ( SALOME_View ,
const SALOME_VTKPrs  
) [virtual, inherited]
virtual void SALOME_Displayer.BeforeDisplay ( SALOME_View ,
const SALOME_Prs2d  
) [virtual, inherited]
virtual void SALOME_Displayer.AfterDisplay ( SALOME_View ,
const SALOME_OCCPrs  
) [virtual, inherited]
virtual void SALOME_Displayer.AfterDisplay ( SALOME_View ,
const SALOME_VTKPrs  
) [virtual, inherited]
virtual void SALOME_Displayer.AfterDisplay ( SALOME_View ,
const SALOME_Prs2d  
) [virtual, inherited]
virtual void SALOME_Displayer.BeforeErase ( SALOME_View ,
const SALOME_OCCPrs  
) [virtual, inherited]
virtual void SALOME_Displayer.BeforeErase ( SALOME_View ,
const SALOME_VTKPrs  
) [virtual, inherited]
virtual void SALOME_Displayer.BeforeErase ( SALOME_View ,
const SALOME_Prs2d  
) [virtual, inherited]
virtual void SALOME_Displayer.AfterErase ( SALOME_View ,
const SALOME_OCCPrs  
) [virtual, inherited]
virtual void SALOME_Displayer.AfterErase ( SALOME_View ,
const SALOME_VTKPrs  
) [virtual, inherited]
virtual void SALOME_Displayer.AfterErase ( SALOME_View ,
const SALOME_Prs2d  
) [virtual, inherited]

Field Documentation

QString LightApp_Displayer.myLastEntry [protected]
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS