Widget controlling hypothesis parameter that is an object reference. More...
#include <StdMeshersGUI_ObjectReferenceParamWdg.h>
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_SelectionFilter * | myFilter |
bool | mySelectionActivated |
bool | myStretchActivated |
SMESHGUI * | mySMESHGUI |
LightApp_SelectionMgr * | mySelectionMgr |
QLineEdit * | myObjNameLineEdit |
QPushButton * | mySelButton |
QString | myParamValue |
QString | myEmptyText |
QString | myEmptyStyleSheet |
Widget controlling hypothesis parameter that is an object reference.
StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg | ( | SUIT_SelectionFilter * | f, |
QWidget * | parent, | ||
bool | multiSelection = false |
||
) |
Constructor initialized by filter.
f | - object filter |
StdMeshersGUI_ObjectReferenceParamWdg::StdMeshersGUI_ObjectReferenceParamWdg | ( | SMESH::MeshObjectType | objType, |
QWidget * | parent, | ||
bool | multiSelection = false |
||
) |
Constructor initialized by object type.
MeshObjectType | - type of object to select |
StdMeshersGUI_ObjectReferenceParamWdg::~StdMeshersGUI_ObjectReferenceParamWdg | ( | ) |
Destructor.
References myFilter, and mySelectionMgr.
|
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.
other | - another StdMeshersGUI_ObjectReferenceParamWdg |
Referenced by StdMeshersGUI_StdHypothesisCreator::retrieveParams().
|
signal |
Referenced by SetObject(), and SetObjects().
|
slot |
SLOT: stop treating selection changes.
References myFilter, mySelButton, mySelectionActivated, and mySelectionMgr.
TInterface::_var_type StdMeshersGUI_ObjectReferenceParamWdg::GetObject | ( | unsigned | i = 0 | ) | const |
Referenced by StdMeshersGUI_StdHypothesisCreator::checkParams().
QString StdMeshersGUI_ObjectReferenceParamWdg::GetValue | ( | ) | const |
|
private |
Create a leayout, initialize fields.
References activateSelection(), SMESH::GetResourceMgr(), SMESH::GetSelectionMgr(), SMESHGUI::GetSMESHGUI(), myEmptyStyleSheet, myEmptyText, myObjNameLineEdit, myParamValue, mySelButton, mySelectionActivated, mySelectionMgr, mySMESHGUI, and SPACING.
bool StdMeshersGUI_ObjectReferenceParamWdg::IsObjectSelected | ( | unsigned | i = 0 | ) | const |
Referenced by StdMeshersGUI_StdHypothesisCreator::checkParams().
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 |
|
privateslot |
Takes selected object.
References Handle(), SMESH::IObjectToObject(), myMultiSelection, mySelectionActivated, mySelectionMgr, SetObject(), and SetObjects().
Referenced by activateSelection().
|
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 = "" |
||
) |
References myEmptyStyleSheet, myEmptyText, and myObjNameLineEdit.
void StdMeshersGUI_ObjectReferenceParamWdg::SetObject | ( | CORBA::Object_ptr | obj | ) |
Initialize selected object name.
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.
objects | - entries of objects |
References _PTR(), contentModified(), myEmptyStyleSheet, myEmptyText, myObjects, myObjNameLineEdit, myParamValue, SObject(), and SMESH::SObjectToObject().
Referenced by onSelectionDone().
|
private |
Referenced by init(), SetDefaultText(), SetObject(), and SetObjects().
|
private |
Referenced by init(), SetDefaultText(), SetObject(), and SetObjects().
|
private |
Referenced by activateSelection(), deactivateSelection(), and ~StdMeshersGUI_ObjectReferenceParamWdg().
|
private |
Referenced by onSelectionDone().
|
private |
Referenced by SetObject(), and SetObjects().
|
private |
Referenced by init(), SetDefaultText(), SetObject(), and SetObjects().
|
private |
Referenced by init(), SetObject(), and SetObjects().
|
private |
Referenced by activateSelection(), deactivateSelection(), and init().
|
private |
Referenced by activateSelection(), deactivateSelection(), init(), and onSelectionDone().
|
private |
Referenced by activateSelection(), deactivateSelection(), init(), onSelectionDone(), and ~StdMeshersGUI_ObjectReferenceParamWdg().
|
private |
Referenced by activateSelection(), and init().
|
private |