Version: 8.3.0
StdMeshersGUI_ObjectReferenceParamWdg Class Reference

Widget controlling hypothesis parameter that is an object reference. More...

#include <StdMeshersGUI_ObjectReferenceParamWdg.h>

Inheritance diagram for StdMeshersGUI_ObjectReferenceParamWdg:

Public Slots

void activateSelection ()
 Activates selection (if not yet done), emits selectionActivated() More...
 
void deactivateSelection ()
 SLOT: stop treating selection changes. More...
 

Signals

void selectionActivated ()
 Emitted when selection is activated. More...
 
void contentModified ()
 

Public Member Functions

 StdMeshersGUI_ObjectReferenceParamWdg (SUIT_SelectionFilter *filter, QWidget *parent, bool multiSelection=false)
 Constructor initialized by filter. More...
 
 StdMeshersGUI_ObjectReferenceParamWdg (SMESH::MeshObjectType objType, QWidget *parent, bool multiSelection=false)
 Constructor initialized by object type. More...
 
 ~StdMeshersGUI_ObjectReferenceParamWdg ()
 Destructor. More...
 
void SetObject (CORBA::Object_ptr obj)
 Initialize selected object name. More...
 
void SetObjects (SMESH::string_array_var &objEntries)
 Initialize selected objects. More...
 
template<class TInterface >
TInterface::_var_type GetObject (unsigned i=0) const
 
int NbObjects () const
 
QString GetValue () const
 
bool IsObjectSelected (unsigned i=0) const
 
bool IsSelectionActivated () const
 Get the selection status. More...
 
void AvoidSimultaneousSelection (StdMeshersGUI_ObjectReferenceParamWdg *other)
 Connect selection slots. More...
 
void SetDefaultText (QString defaultText="", QString styleSheet="")
 

Private Slots

void onSelectionDone ()
 Takes selected object. More...
 

Private Member Functions

void init ()
 Create a leayout, initialize fields. More...
 

Private Attributes

bool myMultiSelection
 
std::vector< CORBA::Object_var > myObjects
 
SUIT_SelectionFiltermyFilter
 
bool mySelectionActivated
 
bool myStretchActivated
 
SMESHGUImySMESHGUI
 
LightApp_SelectionMgr * mySelectionMgr
 
QLineEdit * myObjNameLineEdit
 
QPushButton * mySelButton
 
QString myParamValue
 
QString myEmptyText
 
QString myEmptyStyleSheet
 

Detailed Description

Widget controlling hypothesis parameter that is an object reference.

Constructor & Destructor Documentation

StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg ( SUIT_SelectionFilter f,
QWidget parent,
bool  multiSelection = false 
)

Constructor initialized by filter.

Parameters
f- object filter
StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg ( SMESH::MeshObjectType  objType,
QWidget parent,
bool  multiSelection = false 
)

Constructor initialized by object type.

Parameters
MeshObjectType- type of object to select
StdMeshersGUI_ObjectReferenceParamWdg::~StdMeshersGUI_ObjectReferenceParamWdg ( )

Destructor.

References myFilter, and mySelectionMgr.

Member Function Documentation

void StdMeshersGUI_ObjectReferenceParamWdg::activateSelection ( )
slot

Activates selection (if not yet done), emits selectionActivated()

SLOT: Installs selection filter that is not done automatically.

Useful to deactivate one Object Reference param widget when an other one is activated

References SMESH::GetViewWindow(), myFilter, mySelButton, mySelectionActivated, mySelectionMgr, mySMESHGUI, onSelectionDone(), and selectionActivated().

Referenced by init(), and StdMeshersGUI_StdHypothesisCreator::retrieveParams().

void StdMeshersGUI_ObjectReferenceParamWdg::AvoidSimultaneousSelection ( StdMeshersGUI_ObjectReferenceParamWdg other)

Connect selection slots.

Parameters
other- another StdMeshersGUI_ObjectReferenceParamWdg

Referenced by StdMeshersGUI_StdHypothesisCreator::retrieveParams().

void StdMeshersGUI_ObjectReferenceParamWdg::contentModified ( )
signal

Referenced by SetObject(), and SetObjects().

void StdMeshersGUI_ObjectReferenceParamWdg::deactivateSelection ( )
slot

SLOT: stop treating selection changes.

References myFilter, mySelButton, mySelectionActivated, and mySelectionMgr.

template<class TInterface >
TInterface::_var_type StdMeshersGUI_ObjectReferenceParamWdg::GetObject ( unsigned  i = 0) const
QString StdMeshersGUI_ObjectReferenceParamWdg::GetValue ( ) const
void StdMeshersGUI_ObjectReferenceParamWdg::init ( )
private
bool StdMeshersGUI_ObjectReferenceParamWdg::IsObjectSelected ( unsigned  i = 0) const
bool StdMeshersGUI_ObjectReferenceParamWdg::IsSelectionActivated ( ) const

Get the selection status.

Useful to know which Object Reference param widget is activated to be able to activate the next one when the content of this one has been modified

int StdMeshersGUI_ObjectReferenceParamWdg::NbObjects ( ) const
void StdMeshersGUI_ObjectReferenceParamWdg::onSelectionDone ( )
privateslot
void StdMeshersGUI_ObjectReferenceParamWdg::selectionActivated ( )
signal

Emitted when selection is activated.

Useful to deactivate one Object Reference param widget when an other one is activated

Referenced by activateSelection().

void StdMeshersGUI_ObjectReferenceParamWdg::SetDefaultText ( QString  defaultText = "",
QString  styleSheet = "" 
)
void StdMeshersGUI_ObjectReferenceParamWdg::SetObject ( CORBA::Object_ptr  obj)

Initialize selected object name.

Parameters
obj- the current object

References _PTR(), contentModified(), myEmptyStyleSheet, myEmptyText, myObjects, myObjNameLineEdit, myParamValue, and SObject().

Referenced by StdMeshersGUI_StdHypothesisCreator::checkParams(), and onSelectionDone().

void StdMeshersGUI_ObjectReferenceParamWdg::SetObjects ( SMESH::string_array_var &  objects)

Initialize selected objects.

Parameters
objects- entries of objects

References _PTR(), contentModified(), myEmptyStyleSheet, myEmptyText, myObjects, myObjNameLineEdit, myParamValue, SObject(), and SMESH::SObjectToObject().

Referenced by onSelectionDone().

Field Documentation

QString StdMeshersGUI_ObjectReferenceParamWdg::myEmptyStyleSheet
private
QString StdMeshersGUI_ObjectReferenceParamWdg::myEmptyText
private
SUIT_SelectionFilter* StdMeshersGUI_ObjectReferenceParamWdg::myFilter
private
bool StdMeshersGUI_ObjectReferenceParamWdg::myMultiSelection
private

Referenced by onSelectionDone().

std::vector<CORBA::Object_var> StdMeshersGUI_ObjectReferenceParamWdg::myObjects
private

Referenced by SetObject(), and SetObjects().

QLineEdit* StdMeshersGUI_ObjectReferenceParamWdg::myObjNameLineEdit
private
QString StdMeshersGUI_ObjectReferenceParamWdg::myParamValue
private

Referenced by init(), SetObject(), and SetObjects().

QPushButton* StdMeshersGUI_ObjectReferenceParamWdg::mySelButton
private
bool StdMeshersGUI_ObjectReferenceParamWdg::mySelectionActivated
private
LightApp_SelectionMgr* StdMeshersGUI_ObjectReferenceParamWdg::mySelectionMgr
private
SMESHGUI* StdMeshersGUI_ObjectReferenceParamWdg::mySMESHGUI
private

Referenced by activateSelection(), and init().

bool StdMeshersGUI_ObjectReferenceParamWdg::myStretchActivated
private