Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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_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_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_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 ( )

Default constructor

LightApp_Displayer::~LightApp_Displayer ( )
virtual

Destructor

Member Function Documentation

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

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(), app, canBeDisplayed(), and SUIT_Session::session().

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

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

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 
)
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(), app, SALOME_View::EraseAll(), GetActiveView(), Qtx::HiddenState, SALOME_View::Repaint(), SUIT_Session::session(), and LightApp_Study::setVisibilityStateForAll().

LightApp_Displayer * LightApp_Displayer::FindDisplayer ( const QString &  mod_name,
const bool  load 
)
static
SALOME_View * LightApp_Displayer::GetActiveView ( )
static
Returns
active view

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

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(), SALOME_View::isVisible(), and SALOME_InteractiveObject().

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(), app, SUIT_Application::desktop(), Display(), Erase(), GetActiveView(), SUIT_ViewManager::getViewModel(), IsDisplayed(), SUIT_Session::session(), and SUIT_Desktop::windows().

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(), app, SUIT_Session::session(), and LightApp_Study::setVisibilityState().

void LightApp_Displayer::UpdateViewer ( ) const

Updates active view

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

Member Data Documentation

QString LightApp_Displayer::myLastEntry
protected

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