Version: 9.12.0
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)
 
virtual void Display (const QStringList &, const bool=true, SALOME_View *=0)
 
virtual void Redisplay (const QString &, const bool=true)
 
virtual 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)
 
virtual void EraseAll (const bool forced=false, const bool updateViewer=true, SALOME_View *=0)
 
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
 
- Public Member Functions inherited from SALOME_Displayer
virtual ~SALOME_Displayer ()
 Destructor. More...
 
void UpdatePrs (SALOME_Prs *)
 This Update() method should be called to update given presentation created anywhere by anybody. More...
 
virtual void Update (SALOME_OCCPrs *)
 Update SALOME_OCCPrs presentation. More...
 
virtual void Update (SALOME_VTKPrs *)
 Update SALOME_VTKPrs presentation. More...
 
virtual void Update (SALOME_PV3DPrs *)
 Update SALOME_PV3DPrs presentation. More...
 
virtual void Update (SALOME_Prs2d *)
 Update SALOME_Prs2d presentation. More...
 
virtual void BeforeDisplay (SALOME_View *, const SALOME_OCCPrs *)
 
virtual void AfterDisplay (SALOME_View *, const SALOME_OCCPrs *)
 Null body here. More...
 
virtual void BeforeDisplay (SALOME_View *, const SALOME_VTKPrs *)
 Null body here. More...
 
virtual void AfterDisplay (SALOME_View *, const SALOME_VTKPrs *)
 Null body here. More...
 
virtual void BeforeDisplay (SALOME_View *, const SALOME_PV3DPrs *)
 Null body here. More...
 
virtual void AfterDisplay (SALOME_View *, const SALOME_PV3DPrs *)
 Null body here. More...
 
virtual void BeforeDisplay (SALOME_View *, const SALOME_Prs2d *)
 Null body here. More...
 
virtual void AfterDisplay (SALOME_View *, const SALOME_Prs2d *)
 Null body here. More...
 
virtual void BeforeErase (SALOME_View *, const SALOME_OCCPrs *)
 Null body here. More...
 
virtual void AfterErase (SALOME_View *, const SALOME_OCCPrs *)
 Null body here. More...
 
virtual void BeforeErase (SALOME_View *, const SALOME_VTKPrs *)
 Null body here. More...
 
virtual void AfterErase (SALOME_View *, const SALOME_VTKPrs *)
 Null body here. More...
 
virtual void BeforeErase (SALOME_View *, const SALOME_PV3DPrs *)
 Null body here. More...
 
virtual void AfterErase (SALOME_View *, const SALOME_PV3DPrs *)
 Null body here. More...
 
virtual void BeforeErase (SALOME_View *, const SALOME_Prs2d *)
 Null body here. More...
 
virtual void AfterErase (SALOME_View *, const SALOME_Prs2d *)
 Null body here. More...
 
virtual void UpdateVisibility (SALOME_View *, const SALOME_Prs *, bool)
 Null body here. More...
 

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::LightApp_Displayer ( )

Default constructor

◆ ~LightApp_Displayer()

LightApp_Displayer::~LightApp_Displayer ( )
virtual

Destructor

Member Function Documentation

◆ buildPresentation()

SALOME_Prs * LightApp_Displayer::buildPresentation ( const QString &  entry,
SALOME_View theViewFrame = 0 
)
protectedvirtual
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().

◆ canBeDisplayed() [1/2]

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().

◆ canBeDisplayed() [2/2]

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

◆ Display() [1/2]

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

◆ Display() [2/2]

void LightApp_Displayer::Display ( const QStringList &  list,
const bool  updateViewer = true,
SALOME_View theViewFrame = 0 
)
virtual

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.

◆ Erase() [1/2]

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().

◆ Erase() [2/2]

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

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().

◆ EraseAll()

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

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().

◆ FindDisplayer()

LightApp_Displayer * LightApp_Displayer::FindDisplayer ( const QString &  mod_name,
const bool  load 
)
static
Returns
displayer, corresponding to module
Parameters
mod_name- name or title of module.
Note
It is better to use name (component data type) in any case when you are not sure the title is not empty.
Parameters
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(), CAM_Application::moduleDisplayer(), SUIT_Session::session(), and LightApp_Module::updateModuleVisibilityState().

◆ GetActiveView()

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

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

◆ IsDisplayed()

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().

◆ Redisplay()

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

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().

◆ setVisibilityState()

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().

◆ UpdateViewer()

void LightApp_Displayer::UpdateViewer ( ) const

Updates active view

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

Member Data Documentation

◆ myLastEntry

QString LightApp_Displayer::myLastEntry
protected

The documentation for this class was generated from the following files: