SHAPER  9.12.0
PartSet_WidgetMultiSelector Class Reference

Customosation of ModuleBase_WidgetMultiSelector in order to provide working with sketch specific objects and creation of external objects. More...

Inheritance diagram for PartSet_WidgetMultiSelector:
Inheritance graph

Public Types

enum  ValueState { Stored , ModifiedInPP , ModifiedInViewer , Reset }
 State of the widget. More...
 
enum  EnableState { On , Off , DefinedInPreferences }
 the value is reset More...
 

Public Slots

void onSelectionTypeChanged ()
 Slot is called on selection type changed. More...
 

Signals

void beforeValuesChanged ()
 The signal about widget values are to be changed. More...
 
void valuesChanged ()
 The signal about widget values changed. More...
 
void valuesModified ()
 The signal about widget values modified. More...
 
void afterValuesChanged ()
 The signal about widget values are to be changed. More...
 
void beforeValuesRestored ()
 The signal about widget values are to be restored. More...
 
void afterValuesRestored ()
 The signal about widget values are to be restored. More...
 
void keyReleased (QObject *theObject, QKeyEvent *theEvent)
 The signal about key release on the control, that corresponds to the attribute. More...
 
void enterClicked (QObject *theObject)
 The signal is emitted if the enter is clicked in the control of the widget. More...
 
void focusInWidget (ModuleBase_ModelWidget *theWidget)
 The signal about the widget is get focus. More...
 
void focusOutWidget (ModuleBase_ModelWidget *theWidget)
 The signal about the widget is lost focus. More...
 
void valueStateChanged (int theState)
 The signal about value state modification. More...
 
void objectUpdated ()
 The signal is emitted after flush of updates singal for the widget. More...
 

Public Member Functions

 PartSet_WidgetMultiSelector (QWidget *theParent, ModuleBase_IWorkshop *theWorkshop, const Config_WidgetAPI *theData)
 Constructor. More...
 
virtual bool isViewerSelector ()
 Defines if it is supposed that the widget should interact with the viewer. More...
 
void setSketcher (CompositeFeaturePtr theSketch)
 Set sketcher. More...
 
CompositeFeaturePtr sketch () const
 Retrurns installed sketcher. More...
 
virtual QList< QWidget * > getControls () const
 Returns list of widget controls. More...
 
virtual void deactivate ()
 The methiod called when widget is deactivated. More...
 
virtual void updateAfterDeactivation ()
 Update Undo/Redo actions state. More...
 
virtual void updateAfterActivation ()
 Update Undo/Redo actions state. More...
 
virtual bool setSelection (QList< std::shared_ptr< ModuleBase_ViewerPrs >> &theValues, const bool theToValidate)
 Set the given wrapped value to the current widget This value should be processed in the widget according to the needs. More...
 
virtual void getHighlighted (QList< std::shared_ptr< ModuleBase_ViewerPrs >> &theValues)
 Returns values which should be highlighted when the whidget is active. More...
 
virtual bool canProcessAction (ModuleBase_ActionType theActionType, bool &isActionEnabled)
 Returns true if the action can be processed. More...
 
virtual bool processAction (ModuleBase_ActionType theActionType, const ActionParamPtr &theParam=ActionParamPtr())
 Returns true if the event is processed. The default implementation is empty, returns false. More...
 
virtual QList< ActionInfoactionsList (ModuleBase_ActionType theActionType) const
 Returns list of accessible actions for Undo/Redo commands. More...
 
virtual void onFeatureAccepted ()
 The slot is called when user press Ok or OkPlus buttons in the parent property panel. More...
 
virtual bool isModified () const
 Returns True if data of its feature was modified during operation. More...
 
virtual void setReadOnly (bool isReadOnly)
 
virtual void selectionModes (int &theModuleSelectionModes, QIntList &theModes)
 Fills given container with selection modes if the widget has it. More...
 
virtual void updateSelectionModesAndFilters (bool toActivate)
 Activate or deactivate selection and selection filters. More...
 
virtual bool setSelectionCustom (const std::shared_ptr< ModuleBase_ViewerPrs > &thePrs)
 Fills the attribute with the value of the selected owner. More...
 
virtual bool isWholeResultAllowed () const
 
virtual bool isValidSelection (const std::shared_ptr< ModuleBase_ViewerPrs > &theValue)
 Checks all widget validator if the owner is valid. More...
 
ObjectPtr findPresentedObject (const AISObjectPtr &theAIS) const
 Returns data object by AIS. More...
 
void clearValidatedCash ()
 Clear all validated cash in the widget. More...
 
bool isFilterActivated () const
 Returns true if the workshop validator filter has been already activated. More...
 
virtual void selectionFilters (QIntList &theModuleSelectionFilters, SelectMgr_ListOfFilter &theSelectionFilters)
 Appends into container of workshop selection filters. More...
 
bool reset ()
 Fills the widget with default values. More...
 
bool isInitialized (ObjectPtr theObject) const
 Returns the state whether the attribute of the feature is initialized. More...
 
bool isComputedDefault () const
 Returns true, if default value of the widget should be computed on operation's execute, like radius for circle's constraint (can not be zero) More...
 
std::string getDefaultValue () const
 Returns true, if default value of the widget is defined in the XML and it is not the computed value. More...
 
bool isInternal () const
 Returns true, if widget is internal. More...
 
bool isObligatory () const
 Returns true, if the obligatory value of the widget is not defined in the XML or has true value. More...
 
virtual bool isValueEnabled () const
 Returns true, if the widget value is enabled and might be modified manualy. More...
 
bool isUseReset () const
 Returns this parameter value in the xml file. More...
 
std::string isModifiedInEdit () const
 Returns this parameter value in the xml file. More...
 
ValueState getValueState () const
 Returns this widget value state. More...
 
void processValueState ()
 Stores the widget value if it is modified. More...
 
Events_InfoMessage getValueStateError () const
 Returns an attribute error according to the value state It exists in all cases excepring the "Store" case. More...
 
virtual bool canAcceptFocus () const
 Defines if it is supported to set the value in this widget By default it returns true. More...
 
virtual QString getError (const bool theValueStateChecked=true) const
 Returns the widget error, get it from the attribute validator and state of the widget If the feature is correct, it returns an empty value. More...
 
ModuleBase_WidgetValidatorwidgetValidator ()
 Returns widget validator, by default it is NULL. To be created in a child if necessary. More...
 
bool restoreValue ()
 Restore value from attribute data to the widget's control. More...
 
bool storeValue ()
 Saves the internal parameters to the given feature. More...
 
virtual bool focusTo ()
 Set focus to the first control of the current widget. More...
 
virtual void selectContent ()
 Select the internal content if it can be selected. It is empty in the default realization. More...
 
void activate ()
 The method called when widget is activated. More...
 
virtual bool needToBeActivated ()
 The method called if widget should be activated always. More...
 
QWidgetgetControlAcceptingFocus (const bool isFirst)
 Returns the first or the last control that can accept the focus. More...
 
virtual bool eventFilter (QObject *theObject, QEvent *theEvent)
 FocusIn events processing. More...
 
virtual void enableFocusProcessing ()
 Enables processing of focus event on all controls by the widget if this widget is not obligatory and set no-focus policy otherwise. More...
 
virtual void setHighlighted (bool isHighlighted)
 Switch On/Off highlighting of the widget. More...
 
std::string attributeID () const
 Returns the attribute name. More...
 
FeaturePtr feature () const
 
virtual std::string context () const
 
virtual void setFeature (const FeaturePtr &theFeature, const bool theToStoreValue=false, const bool isUpdateFlushed=true)
 Set feature which is processing by active operation. More...
 
virtual void setEditingMode (bool isEditing)
 Editing mode depends on mode of current operation. This value is defined by it. More...
 
bool isEditingMode () const
 
void updateObject (ObjectPtr theObj)
 Sends Update and Redisplay for the given object. More...
 
virtual QString translate (const std::string &theStr) const
 Translate passed string with widget context() More...
 
void emitFocusInWidget ()
 Emit focus in widget to set this control as active in propety panel. More...
 
virtual bool usesAttribute () const
 Returns True if the widget uses feature attribute. More...
 
virtual bool isInformative () const
 Returns True in case if the widget contains useful information for inspection tool. More...
 
virtual void showInformativePage ()
 If widgets has several panels then this method has to show a page which contains information for current feature. More...
 
virtual bool isReadOnly () const
 
bool canUseExternalParts () const
 Returns true if the widget should have access to external parts. More...
 

Static Public Member Functions

static void blockFeatureAttribute (const AttributePtr &theAttribute, const FeaturePtr &theFeature, const bool &theToBlock, bool &isFlushesActived, bool &isAttributeSetInitializedBlocked, bool &isAttributeSendUpdatedBlocked)
 Block the model flush of update and intialization of attribute. More...
 
static bool isValidAttribute (const AttributePtr &theAttribute)
 Checks the current attibute in all attribute validators. More...
 
static ModuleBase_ModelWidgetfindModelWidget (ModuleBase_IPropertyPanel *theProp, QWidget *theWidget)
 Finds model widget parent of the given sub widget. More...
 

Protected Slots

void onDeleteItem ()
 Slot for delete command in a list pop-up menu. More...
 
void onListSelection ()
 Slot is called on selection of list of selected items. More...
 
void onListActivated ()
 
void onSameTopology (bool theOn)
 
void onShowOnly (bool)
 
void onWidgetValuesChanged ()
 Processing of values changed in model widget by store the current value to the feature. More...
 
void onWidgetValuesModified ()
 Changes widget state. More...
 

Protected Member Functions

virtual bool isValidSelectionCustom (const std::shared_ptr< ModuleBase_ViewerPrs > &thePrs)
 Checks the widget validity. More...
 
virtual void restoreAttributeValue (const AttributePtr &theAttribute, const bool theValid)
 Creates a backup of the current values of the attribute It should be realized in the specific widget because of different parameters of the current attribute. More...
 
virtual void getGeomSelection (const std::shared_ptr< ModuleBase_ViewerPrs > &thePrs, ObjectPtr &theObject, GeomShapePtr &theShape)
 Return an object and geom shape by the viewer presentation. More...
 
virtual bool processSelection ()
 Returns true if envent is processed. More...
 
virtual bool processDelete ()
 Returns true if the event is processed. The default implementation is empty, returns false. More...
 
virtual void activateCustom ()
 The methiod called when widget is activated. More...
 
virtual bool storeValueCustom ()
 Saves the internal parameters to the given feature. More...
 
virtual bool restoreValueCustom ()
 restire type of selection by feature attribute More...
 
virtual void appendFirstSelectionInHistory ()
 Creates an element of the attribute current selection if history is empty. More...
 
void appendSelectionInHistory ()
 Create an element in the history that stores the current selection, position in the history is incremented. More...
 
void clearSelectedHistory ()
 Clear list of stored selected items, reset current position into '-1'. More...
 
virtual void updateFocus ()
 Set the focus on the last item in the list. More...
 
virtual void updateSelectionName ()
 Computes and updates name of selected object in the widget. More...
 
virtual void updateOnSelectionChanged (const bool theDone)
 Emits model changed info, updates the current control by selection change. More...
 
virtual QIntList shapeTypes () const
 Retunrs a list of possible shape types. More...
 
void setCurrentShapeType (const QString &theShapeType)
 Set current shape type for selection. More...
 
virtual QList< std::shared_ptr< ModuleBase_ViewerPrs > > getAttributeSelection () const
 Return the attribute values wrapped in a list of viewer presentations. More...
 
void updateSelectionList ()
 Fills the list control by the attribute values. More...
 
std::string validatorType (const QString &theType) const
 Converts the XML defined type choice to the validator type For example, the "Edges" is converted to "edge". More...
 
void clearSelection ()
 Clear selection in the viewer. The content of the widget is cleared also. More...
 
void getSelectedAttributeIndices (std::set< int > &theIndices)
 Returns attribute indices selected in the widget selection list. More...
 
void convertIndicesToViewerSelection (std::set< int > theAttributeIds, QList< std::shared_ptr< ModuleBase_ViewerPrs >> &theValues) const
 Gets the feature attribute and fill a list of viewer presentation for the attribute indices. More...
 
virtual bool removeUnusedAttributeObjects (QList< std::shared_ptr< ModuleBase_ViewerPrs >> &theValues)
 Iterates throgh the model attribute list and remove elements which do not present in the list. More...
 
std::map< ObjectPtr, std::set< GeomShapePtr > > convertSelection (QList< std::shared_ptr< ModuleBase_ViewerPrs >> &theValues)
 Converts viewer presentation selection list to objects and shapes map. More...
 
QIntList getShapeTypes () const
 Retunrs a list of possible shape types. More...
 
bool acceptSubShape (const GeomShapePtr &theShape, const std::shared_ptr< ModelAPI_Result > &theResult) const
 Returns true if selected shape corresponds to requested shape types. More...
 
virtual bool isValidInFilters (const std::shared_ptr< ModuleBase_ViewerPrs > &thePrs)
 Checks whether all active viewer filters validate the presentation. More...
 
bool isValidSelectionForAttribute (const std::shared_ptr< ModuleBase_ViewerPrs > &theValue, const AttributePtr &theAttribute)
 Checks all attribute validators returns valid. More...
 
virtual AttributePtr attribute () const
 Retunrs attribute, which should be validated. More...
 
virtual void storeAttributeValue (const AttributePtr &theAttribute)
 Creates a backup of the current values of the attribute It should be realized in the specific widget because of different parameters of the current attribute. More...
 
QList< std::shared_ptr< ModuleBase_ViewerPrs > > getFilteredSelected ()
 Returns a list of selected presentations in the viewer and object browser The presentations from the object browser are filtered by the AIS context filters. More...
 
virtual void blockAttribute (const AttributePtr &theAttribute, const bool &theToBlock, bool &isFlushesActived, bool &isAttributeSetInitializedBlocked, bool &isAttributeSendUpdatedBlocked)
 Block the model flush of update and intialization of attribute. More...
 
bool getValidState (const std::shared_ptr< ModuleBase_ViewerPrs > &theValue, bool &theValid)
 Gets the validity state of the presentation in an internal map. More...
 
void storeValidState (const std::shared_ptr< ModuleBase_ViewerPrs > &theValue, const bool theValid)
 Store the validity state of the presentation in an internal map. More...
 
void setDefaultValue (const std::string &theValue)
 Sets default value of widget. More...
 
void setAttributeID (const std::string &theAttribute)
 Set the attribute name. More...
 
ValueState setValueState (const ValueState &theState)
 Sets the current value state. More...
 
bool blockValueState (const bool theBlocked)
 Blocks the value state change. More...
 
virtual void initializeValueByActivate ()
 Compute the feature default value and fill the controls with it or store the control value to the feature. More...
 
virtual bool resetCustom ()
 Fills the widget with default values. More...
 
virtual bool processEnter ()
 
virtual bool processEscape ()
 

Static Protected Member Functions

static bool findInSelection (const ObjectPtr &theObject, GeomShapePtr theShape, const std::map< ObjectPtr, std::set< GeomShapePtr > > &theGeomSelection, ModuleBase_IWorkshop *theWorkshop)
 Returns true if the object and shape present in the container. More...
 

Protected Attributes

PartSet_ExternalObjectsMgrmyExternalObjectMgr
 Manager of external objects. More...
 
CompositeFeaturePtr mySketch
 Pointer to a sketch. More...
 
ModuleBase_ListViewmyListView
 List control. More...
 
bool myIsUseChoice
 A flag to store use_choice parameter state. More...
 
QStringList myShapeTypes
 List of Shape types defined in XML. More...
 
ModuleBase_ChoiceCtrlmyTypeCtrl
 Control for types. More...
 
bool myIsNeutralPointClear
 A flag to clear selection by click in empty place in the viewer. More...
 
bool myIsSetSelectionBlocked
 A flag to block set selection perform if the method is in process. More...
 
QList< QList< std::shared_ptr< ModuleBase_ViewerPrs > > > mySelectedHistoryValues
 A container of selected objects. More...
 
int myCurrentHistoryIndex
 Position in a container of selected values. More...
 
bool myIsFirst
 
std::string myDefMode
 
QVBoxLayout * myMainLayout
 
QCheckBox * myGeomCheck
 
ModuleBase_FilterStartermyFiltersWgt
 
QPushButton * myShowOnlyBtn
 
QObjectPtrList myVisibleObjects
 
QStringList myAllowedObjects
 
QStringList myTmpAllowed
 
std::string myUseFilters
 
bool myIsPointsFiltering
 
ModuleBase_IWorkshopmyWorkshop
 Reference to workshop. More...
 
bool myIsInValidate
 The widget is in validation mode: store is performed, restore is not. More...
 
ModuleBase_WidgetValidatormyWidgetValidator
 own validator, by default it is zero More...
 
std::string myAttributeID
 The attribute name of the model feature. More...
 
FeaturePtr myFeature
 A feature which is processing by active operation. More...
 
std::string myFeatureId
 A feature ID. More...
 
bool myIsObligatory
 Flag which shows whether current widget is obligatory The non-obligatory widgets should not accept the focus in the property panel. More...
 
EnableState myIsValueEnabled
 Flag about value of the control is enabled (can be modified) More...
 
ValueState myState
 The widget value state. More...
 

Detailed Description

Customosation of ModuleBase_WidgetMultiSelector in order to provide working with sketch specific objects and creation of external objects.

Member Enumeration Documentation

◆ ValueState

State of the widget.

Enumerator
ModifiedInPP 

modification is finished and applyed to the model

ModifiedInViewer 

modification has not been finished and set to the model yet

Reset 

modification performed by viewer events

◆ EnableState

the value is reset

Enumerator
Off 

the widget value is always enabled

DefinedInPreferences 

the widget value is always disabled

the widget value enable state is defined in preferences

Constructor & Destructor Documentation

◆ PartSet_WidgetMultiSelector()

PartSet_WidgetMultiSelector::PartSet_WidgetMultiSelector ( QWidget theParent,
ModuleBase_IWorkshop theWorkshop,
const Config_WidgetAPI theData 
)

Constructor.

Parameters
theParentthe parent object
theWorkshopinstance of workshop interface
theDatathe widget configuation. The attribute of the model widget is obtained from

Member Function Documentation

◆ isViewerSelector()

virtual bool PartSet_WidgetMultiSelector::isViewerSelector ( )
inlinevirtual

Defines if it is supposed that the widget should interact with the viewer.

Reimplemented from ModuleBase_WidgetSelector.

◆ setSketcher()

void PartSet_WidgetMultiSelector::setSketcher ( CompositeFeaturePtr  theSketch)
inline

Set sketcher.

Parameters
theSketcha sketcher object

◆ sketch()

CompositeFeaturePtr PartSet_WidgetMultiSelector::sketch ( ) const
inline

Retrurns installed sketcher.

◆ isValidSelectionCustom()

bool PartSet_WidgetMultiSelector::isValidSelectionCustom ( const std::shared_ptr< ModuleBase_ViewerPrs > &  thePrs)
protectedvirtual

Checks the widget validity.

By default, it returns true.

Parameters
thePrsa selected presentation in the view
Returns
a boolean value

Reimplemented from ModuleBase_WidgetMultiSelector.

◆ restoreAttributeValue()

void PartSet_WidgetMultiSelector::restoreAttributeValue ( const AttributePtr &  theAttribute,
const bool  theValid 
)
protectedvirtual

Creates a backup of the current values of the attribute It should be realized in the specific widget because of different parameters of the current attribute.

Parameters
theAttributean attribute
theValida boolean flag, if restore happens for valid parameters

Reimplemented from ModuleBase_WidgetValidated.

◆ getGeomSelection()

void PartSet_WidgetMultiSelector::getGeomSelection ( const std::shared_ptr< ModuleBase_ViewerPrs > &  thePrs,
ObjectPtr &  theObject,
GeomShapePtr &  theShape 
)
protectedvirtual

Return an object and geom shape by the viewer presentation.

Parameters
thePrsa selection
theObjectan output object
theShapea shape of the selection

the object is null if the selected feature is "external"(not sketch entity feature of the current sketch) and it is not created by object manager

Reimplemented from ModuleBase_WidgetSelector.

◆ getControls()

QList< QWidget * > ModuleBase_WidgetMultiSelector::getControls ( ) const
virtualinherited

Returns list of widget controls.

Returns
a control list

Implements ModuleBase_ModelWidget.

◆ deactivate()

void ModuleBase_WidgetMultiSelector::deactivate ( )
virtualinherited

The methiod called when widget is deactivated.

Reimplemented from ModuleBase_WidgetSelector.

◆ updateAfterDeactivation()

void ModuleBase_WidgetMultiSelector::updateAfterDeactivation ( )
virtualinherited

Update Undo/Redo actions state.

Reimplemented from ModuleBase_ModelWidget.

◆ updateAfterActivation()

void ModuleBase_WidgetMultiSelector::updateAfterActivation ( )
virtualinherited

Update Undo/Redo actions state.

Reimplemented from ModuleBase_ModelWidget.

◆ setSelection()

bool ModuleBase_WidgetMultiSelector::setSelection ( QList< std::shared_ptr< ModuleBase_ViewerPrs >> &  theValues,
const bool  theToValidate 
)
virtualinherited

Set the given wrapped value to the current widget This value should be processed in the widget according to the needs.

Parameters
theValuesthe wrapped selection values
theToValidatea validation of the values flag

remove unused objects from the model attribute. It should be performed before new attributes append.

it is not optimal as hasObject() is already checked

hope that something is redisplayed by object updated

Reimplemented from ModuleBase_ModelWidget.

◆ getHighlighted()

void ModuleBase_WidgetMultiSelector::getHighlighted ( QList< std::shared_ptr< ModuleBase_ViewerPrs >> &  theValues)
virtualinherited

Returns values which should be highlighted when the whidget is active.

Parameters
theValuesa list of presentations

Reimplemented from ModuleBase_ModelWidget.

◆ canProcessAction()

bool ModuleBase_WidgetMultiSelector::canProcessAction ( ModuleBase_ActionType  theActionType,
bool &  isActionEnabled 
)
virtualinherited

Returns true if the action can be processed.

By default it is empty and returns false.

Parameters
theActionTypean action type
isActionEnabledif true, the enable state of the action

Reimplemented from ModuleBase_ModelWidget.

◆ processAction()

bool ModuleBase_WidgetMultiSelector::processAction ( ModuleBase_ActionType  theActionType,
const ActionParamPtr &  theParam = ActionParamPtr() 
)
virtualinherited

Returns true if the event is processed. The default implementation is empty, returns false.

Reimplemented from ModuleBase_ModelWidget.

◆ actionsList()

QList< ActionInfo > ModuleBase_WidgetMultiSelector::actionsList ( ModuleBase_ActionType  theActionType) const
virtualinherited

Returns list of accessible actions for Undo/Redo commands.

By default it returns empty list.

Parameters
theActionTypetype of action. It can be ActionUndo or ActionRedo.

Reimplemented from ModuleBase_ModelWidget.

◆ onFeatureAccepted()

void ModuleBase_WidgetMultiSelector::onFeatureAccepted ( )
virtualinherited

The slot is called when user press Ok or OkPlus buttons in the parent property panel.

Reimplemented from ModuleBase_ModelWidget.

◆ isModified()

bool ModuleBase_WidgetMultiSelector::isModified ( ) const
virtualinherited

Returns True if data of its feature was modified during operation.

Reimplemented from ModuleBase_ModelWidget.

◆ onSelectionTypeChanged

void ModuleBase_WidgetMultiSelector::onSelectionTypeChanged ( )
slotinherited

Slot is called on selection type changed.

store the selected type

◆ processSelection()

bool ModuleBase_WidgetMultiSelector::processSelection ( )
protectedvirtualinherited

Returns true if envent is processed.

Redefined to process XML state about clear selection in neutral point

Reimplemented from ModuleBase_WidgetSelector.

◆ onDeleteItem

void ModuleBase_WidgetMultiSelector::onDeleteItem ( )
protectedslotinherited

Slot for delete command in a list pop-up menu.

◆ onListSelection

void ModuleBase_WidgetMultiSelector::onListSelection ( )
protectedslotinherited

Slot is called on selection of list of selected items.

◆ processDelete()

bool ModuleBase_WidgetMultiSelector::processDelete ( )
protectedvirtualinherited

Returns true if the event is processed. The default implementation is empty, returns false.

hope that something is redisplayed by object updated

Reimplemented from ModuleBase_ModelWidget.

◆ activateCustom()

void ModuleBase_WidgetMultiSelector::activateCustom ( )
protectedvirtualinherited

The methiod called when widget is activated.

Reimplemented from ModuleBase_WidgetSelector.

◆ storeValueCustom()

bool ModuleBase_WidgetMultiSelector::storeValueCustom ( )
protectedvirtualinherited

Saves the internal parameters to the given feature.

Returns
True in success

Implements ModuleBase_ModelWidget.

◆ restoreValueCustom()

bool ModuleBase_WidgetMultiSelector::restoreValueCustom ( )
protectedvirtualinherited

restire type of selection by feature attribute

Implements ModuleBase_ModelWidget.

◆ appendFirstSelectionInHistory()

void ModuleBase_WidgetMultiSelector::appendFirstSelectionInHistory ( )
protectedvirtualinherited

Creates an element of the attribute current selection if history is empty.

◆ appendSelectionInHistory()

void ModuleBase_WidgetMultiSelector::appendSelectionInHistory ( )
protectedinherited

Create an element in the history that stores the current selection, position in the history is incremented.

◆ clearSelectedHistory()

void ModuleBase_WidgetMultiSelector::clearSelectedHistory ( )
protectedinherited

Clear list of stored selected items, reset current position into '-1'.

◆ updateFocus()

void ModuleBase_WidgetMultiSelector::updateFocus ( )
protectedvirtualinherited

Set the focus on the last item in the list.

Reimplemented from ModuleBase_WidgetSelector.

◆ updateSelectionName()

void ModuleBase_WidgetMultiSelector::updateSelectionName ( )
protectedvirtualinherited

Computes and updates name of selected object in the widget.

Reimplemented from ModuleBase_WidgetSelector.

◆ updateOnSelectionChanged()

void ModuleBase_WidgetMultiSelector::updateOnSelectionChanged ( const bool  theDone)
protectedvirtualinherited

Emits model changed info, updates the current control by selection change.

Parameters
theDonea state whether the selection is set

Reimplemented from ModuleBase_WidgetSelector.

◆ shapeTypes()

QIntList ModuleBase_WidgetMultiSelector::shapeTypes ( ) const
protectedvirtualinherited

Retunrs a list of possible shape types.

Returns
a list of shapes

Implements ModuleBase_WidgetSelector.

◆ setCurrentShapeType()

void ModuleBase_WidgetMultiSelector::setCurrentShapeType ( const QString &  theShapeType)
protectedinherited

Set current shape type for selection.

◆ getAttributeSelection()

QList< ModuleBase_ViewerPrsPtr > ModuleBase_WidgetMultiSelector::getAttributeSelection ( ) const
protectedvirtualinherited

Return the attribute values wrapped in a list of viewer presentations.

Returns
a list of viewer presentations, which contains an attribute result and a shape. If the attribute do not uses the shape, it is empty

Reimplemented from ModuleBase_WidgetSelector.

◆ updateSelectionList()

void ModuleBase_WidgetMultiSelector::updateSelectionList ( )
protectedinherited

Fills the list control by the attribute values.

◆ validatorType()

std::string ModuleBase_WidgetMultiSelector::validatorType ( const QString &  theType) const
protectedinherited

Converts the XML defined type choice to the validator type For example, the "Edges" is converted to "edge".

◆ clearSelection()

void ModuleBase_WidgetMultiSelector::clearSelection ( )
protectedinherited

Clear selection in the viewer. The content of the widget is cleared also.

◆ getSelectedAttributeIndices()

void ModuleBase_WidgetMultiSelector::getSelectedAttributeIndices ( std::set< int > &  theIndices)
protectedinherited

Returns attribute indices selected in the widget selection list.

Parameters
theIndicesa list of indices

◆ convertIndicesToViewerSelection()

void ModuleBase_WidgetMultiSelector::convertIndicesToViewerSelection ( std::set< int >  theAttributeIds,
QList< std::shared_ptr< ModuleBase_ViewerPrs >> &  theValues 
) const
protectedinherited

Gets the feature attribute and fill a list of viewer presentation for the attribute indices.

If the the container of indices is empty, it returns all objects.

Parameters
theAttributeIdsindices in attribute list to be returned
theValuesthe result presentations, filled with object and shape of an attribute item

◆ removeUnusedAttributeObjects()

bool ModuleBase_WidgetMultiSelector::removeUnusedAttributeObjects ( QList< std::shared_ptr< ModuleBase_ViewerPrs >> &  theValues)
protectedvirtualinherited

Iterates throgh the model attribute list and remove elements which do not present in the list.

Parameters
theValuesthe wrapped selection values
Returns
true if at least one object is removed

◆ convertSelection()

std::map< ObjectPtr, std::set< GeomShapePtr > > ModuleBase_WidgetMultiSelector::convertSelection ( QList< std::shared_ptr< ModuleBase_ViewerPrs >> &  theValues)
protectedinherited

Converts viewer presentation selection list to objects and shapes map.

Parameters
theValuesthe wrapped selection values
Returns
selection list

◆ findInSelection()

bool ModuleBase_WidgetMultiSelector::findInSelection ( const ObjectPtr &  theObject,
GeomShapePtr  theShape,
const std::map< ObjectPtr, std::set< GeomShapePtr > > &  theGeomSelection,
ModuleBase_IWorkshop theWorkshop 
)
staticprotectedinherited

Returns true if the object and shape present in the container.

Parameters
theObjecta model object, a set of shapes is searched by it
theShapea shape to be in the set of the object shapes
theGeomSelectiona map built on selection
theWorkshopa current workshop
Returns
boolean result

◆ selectionModes()

void ModuleBase_WidgetSelector::selectionModes ( int &  theModuleSelectionModes,
QIntList &  theModes 
)
virtualinherited

Fills given container with selection modes if the widget has it.

Parameters
[out]theModuleSelectionModesmodule additional modes, -1 means all default modes
[out]theModesa container of modes

Reimplemented from ModuleBase_ModelWidget.

Reimplemented in ModuleBase_WidgetPointInput.

◆ updateSelectionModesAndFilters()

void ModuleBase_WidgetSelector::updateSelectionModesAndFilters ( bool  toActivate)
virtualinherited

Activate or deactivate selection and selection filters.

◆ setSelectionCustom()

bool ModuleBase_WidgetSelector::setSelectionCustom ( const std::shared_ptr< ModuleBase_ViewerPrs > &  thePrs)
virtualinherited

Fills the attribute with the value of the selected owner.

Parameters
thePrsa selected owner

Implements ModuleBase_WidgetValidated.

Reimplemented in PartSet_WidgetFeaturePointSelector.

◆ getShapeTypes()

QIntList ModuleBase_WidgetSelector::getShapeTypes ( ) const
protectedinherited

Retunrs a list of possible shape types.

Returns
a list of shapes

◆ acceptSubShape()

bool ModuleBase_WidgetSelector::acceptSubShape ( const GeomShapePtr &  theShape,
const std::shared_ptr< ModelAPI_Result > &  theResult 
) const
protectedinherited

Returns true if selected shape corresponds to requested shape types.

If the widget type of shapes contains the faces item, the result is converted to construction result and the method returns true if there is at least one face in the construction.

Parameters
theShapea shape
theResulta selected result

◆ isValidSelection()

bool ModuleBase_WidgetValidated::isValidSelection ( const std::shared_ptr< ModuleBase_ViewerPrs > &  theValue)
virtualinherited

Checks all widget validator if the owner is valid.

Firstly it checks custom widget validating, next, the attribute's validating. It trying on the give selection to current attribute by setting the value inside and calling validators. After this, the previous attribute value is restored.The valid/invalid value is cashed.

Parameters
theValuea selected presentation in the view
Returns
a boolean value

Reimplemented in PartSet_WidgetSketchCreator, and PartSet_WidgetFeaturePointSelector.

◆ findPresentedObject()

ObjectPtr ModuleBase_WidgetValidated::findPresentedObject ( const AISObjectPtr &  theAIS) const
inherited

Returns data object by AIS.

◆ clearValidatedCash()

void ModuleBase_WidgetValidated::clearValidatedCash ( )
inherited

Clear all validated cash in the widget.

◆ isFilterActivated()

bool ModuleBase_WidgetValidated::isFilterActivated ( ) const
inherited

Returns true if the workshop validator filter has been already activated.

Returns
boolean value

◆ selectionFilters()

void ModuleBase_WidgetValidated::selectionFilters ( QIntList &  theModuleSelectionFilters,
SelectMgr_ListOfFilter &  theSelectionFilters 
)
virtualinherited

Appends into container of workshop selection filters.

Parameters
[out]theModuleSelectionFiltersmodule additional modes, -1 means all default modes
[out]selectionfilters

Reimplemented from ModuleBase_ModelWidget.

Reimplemented in PartSet_WidgetSketchLabel, and PartSet_WidgetShapeSelector.

◆ blockFeatureAttribute()

void ModuleBase_WidgetValidated::blockFeatureAttribute ( const AttributePtr &  theAttribute,
const FeaturePtr &  theFeature,
const bool &  theToBlock,
bool &  isFlushesActived,
bool &  isAttributeSetInitializedBlocked,
bool &  isAttributeSendUpdatedBlocked 
)
staticinherited

Block the model flush of update and intialization of attribute.

Parameters
theAttributean attribute of blocking
theFeaturea feature
theToBlockflag whether the model is blocked or unblocked
isFlushesActivedout value if model is blocked, in value if model is unblocked to be used to restore flush state when unblocked
isAttributeSetInitializedBlockedout value if model is blocked in value if model is unblocked to be used to restore previous state when unblocked
isAttributeSendUpdatedBlockedout value if model signal is blocked

◆ isValidAttribute()

bool ModuleBase_WidgetValidated::isValidAttribute ( const AttributePtr &  theAttribute)
staticinherited

Checks the current attibute in all attribute validators.

Parameters
theAttributean attribute to be validated
Returns
true if all validators return that the attribute is valid

◆ isValidInFilters()

bool ModuleBase_WidgetValidated::isValidInFilters ( const std::shared_ptr< ModuleBase_ViewerPrs > &  thePrs)
protectedvirtualinherited

Checks whether all active viewer filters validate the presentation.

Parameters
thePrsa selected presentation in the view
Returns
a boolean value

after validation, the selection filters should be restored

Reimplemented in ModuleBase_WidgetFeatureSelector.

◆ isValidSelectionForAttribute()

bool ModuleBase_WidgetValidated::isValidSelectionForAttribute ( const std::shared_ptr< ModuleBase_ViewerPrs > &  theValue,
const AttributePtr &  theAttribute 
)
protectedinherited

Checks all attribute validators returns valid.

It tries on the given selection to current attribute by setting the value inside and calling validators. After this, the previous attribute value is restored.The valid/invalid value is cashed.

Parameters
theValuea selected presentation in the view
theAttributethe attribute
Returns
a boolean value

NDS: The following rows are commented for issue #1452 (to be removed after debug) This is not correct to perform it here because it might cause update selection and the selection mechanizm will be circled: use the scenario of the bug with preselected point.

◆ attribute()

AttributePtr ModuleBase_WidgetValidated::attribute ( ) const
protectedvirtualinherited

Retunrs attribute, which should be validated.

In default implementation, this is an attribute of ID

Returns
an attribute

Reimplemented in PartSet_WidgetSketchCreator.

◆ storeAttributeValue()

void ModuleBase_WidgetValidated::storeAttributeValue ( const AttributePtr &  theAttribute)
protectedvirtualinherited

Creates a backup of the current values of the attribute It should be realized in the specific widget because of different parameters of the current attribute.

Parameters
theAttributean attribute to be stored

Reimplemented in PartSet_WidgetSketchLabel.

◆ getFilteredSelected()

QList< ModuleBase_ViewerPrsPtr > ModuleBase_WidgetValidated::getFilteredSelected ( )
protectedinherited

Returns a list of selected presentations in the viewer and object browser The presentations from the object browser are filtered by the AIS context filters.

Returns
a list of presentations

◆ blockAttribute()

void ModuleBase_WidgetValidated::blockAttribute ( const AttributePtr &  theAttribute,
const bool &  theToBlock,
bool &  isFlushesActived,
bool &  isAttributeSetInitializedBlocked,
bool &  isAttributeSendUpdatedBlocked 
)
protectedvirtualinherited

Block the model flush of update and intialization of attribute.

Parameters
theAttributean attribute of blocking
theToBlockflag whether the model is blocked or unblocked
isFlushesActivedout value if model is blocked, in value if model is unblocked to be used to restore flush state when unblocked
isAttributeSetInitializedBlockedout value if model is blocked in value if model is unblocked to be used to restore previous state when unblocked
isAttributeSendUpdatedBlockedout value if model signal is blocked

Reimplemented in PartSet_WidgetSketchLabel.

◆ getValidState()

bool ModuleBase_WidgetValidated::getValidState ( const std::shared_ptr< ModuleBase_ViewerPrs > &  theValue,
bool &  theValid 
)
protectedinherited

Gets the validity state of the presentation in an internal map.

Returns true if the valid state of value is stored

Parameters
theValuea viewer presentation
theValida valid state

◆ storeValidState()

void ModuleBase_WidgetValidated::storeValidState ( const std::shared_ptr< ModuleBase_ViewerPrs > &  theValue,
const bool  theValid 
)
protectedinherited

Store the validity state of the presentation in an internal map.

Parameters
theValuea viewer presentation
theValida valid state

◆ reset()

bool ModuleBase_ModelWidget::reset ( )
inherited

Fills the widget with default values.

It calls the resetCustom method and change the widget state to Reset if the reset is performed.

Returns
true if the widget current value is reset

◆ isInitialized()

bool ModuleBase_ModelWidget::isInitialized ( ObjectPtr  theObject) const
inherited

Returns the state whether the attribute of the feature is initialized.

Parameters
theObjecta model feature to be checked
Returns
the boolean result

◆ isComputedDefault()

bool ModuleBase_ModelWidget::isComputedDefault ( ) const
inlineinherited

Returns true, if default value of the widget should be computed on operation's execute, like radius for circle's constraint (can not be zero)

◆ getDefaultValue()

std::string ModuleBase_ModelWidget::getDefaultValue ( ) const
inlineinherited

Returns true, if default value of the widget is defined in the XML and it is not the computed value.

Returns
the boolean result

◆ isInternal()

bool ModuleBase_ModelWidget::isInternal ( ) const
inlineinherited

Returns true, if widget is internal.

Returns
the boolean result

◆ isObligatory()

bool ModuleBase_ModelWidget::isObligatory ( ) const
inlineinherited

Returns true, if the obligatory value of the widget is not defined in the XML or has true value.

Returns
the boolean result

◆ isValueEnabled()

bool ModuleBase_ModelWidget::isValueEnabled ( ) const
virtualinherited

Returns true, if the widget value is enabled and might be modified manualy.

It returns false if the application preferences allow having disabled value and the internal state tells to disable

Returns
the boolean result

◆ isUseReset()

bool ModuleBase_ModelWidget::isUseReset ( ) const
inlineinherited

Returns this parameter value in the xml file.

Returns
the boolean result

◆ isModifiedInEdit()

std::string ModuleBase_ModelWidget::isModifiedInEdit ( ) const
inlineinherited

Returns this parameter value in the xml file.

Returns
the boolean result

◆ getValueState()

ValueState ModuleBase_ModelWidget::getValueState ( ) const
inlineinherited

Returns this widget value state.

Returns
the enumeration result

◆ processValueState()

void ModuleBase_ModelWidget::processValueState ( )
inherited

Stores the widget value if it is modified.

◆ getValueStateError()

Events_InfoMessage ModuleBase_ModelWidget::getValueStateError ( ) const
inherited

Returns an attribute error according to the value state It exists in all cases excepring the "Store" case.

◆ canAcceptFocus()

virtual bool ModuleBase_ModelWidget::canAcceptFocus ( ) const
inlinevirtualinherited

Defines if it is supported to set the value in this widget By default it returns true.

Reimplemented in ModuleBase_WidgetToolbox, ModuleBase_WidgetSwitch, ModuleBase_WidgetOptionalBox, ModuleBase_WidgetLabel, ModuleBase_WidgetConcealedObjects, ModuleBase_WidgetChoice, and ModuleBase_WidgetBoolValue.

◆ getError()

QString ModuleBase_ModelWidget::getError ( const bool  theValueStateChecked = true) const
virtualinherited

Returns the widget error, get it from the attribute validator and state of the widget If the feature is correct, it returns an empty value.

Parameters
theValueStateCheckedthe boolean flag if the state of the widget should be checked
Returns
string value

Reimplemented in ModuleBase_WidgetSelectionFilter.

◆ widgetValidator()

ModuleBase_WidgetValidator* ModuleBase_ModelWidget::widgetValidator ( )
inlineinherited

Returns widget validator, by default it is NULL. To be created in a child if necessary.

◆ restoreValue()

bool ModuleBase_ModelWidget::restoreValue ( )
inherited

Restore value from attribute data to the widget's control.

Emits signals before and after store

Returns
True in success

◆ storeValue()

bool ModuleBase_ModelWidget::storeValue ( )
inherited

Saves the internal parameters to the given feature.

Emits signals before and after store

Returns
True in success

store value in an alternative attribute if possible(attribute has the same type)

◆ focusTo()

bool ModuleBase_ModelWidget::focusTo ( )
virtualinherited

Set focus to the first control of the current widget.

The focus policy of the control is checked. If the widget has the NonFocus focus policy, it is skipped.

Returns
the state whether the widget can accept the focus

Reimplemented in PartSet_WidgetSketchLabel, PartSet_WidgetSketchCreator, PartSet_WidgetPoint2DFlyout, PartSet_WidgetEditor, ModuleBase_WidgetNameEdit, ModuleBase_WidgetLabel, ModuleBase_WidgetEditor, ModuleBase_WidgetChoice, ModuleBase_WidgetAction, and ModuleBase_PagedContainer.

◆ selectContent()

virtual void ModuleBase_ModelWidget::selectContent ( )
inlinevirtualinherited

Select the internal content if it can be selected. It is empty in the default realization.

Reimplemented in ModuleBase_WidgetIntValue, and ModuleBase_WidgetDoubleValue.

◆ activate()

void ModuleBase_ModelWidget::activate ( )
inherited

The method called when widget is activated.

◆ needToBeActivated()

virtual bool ModuleBase_ModelWidget::needToBeActivated ( )
inlinevirtualinherited

The method called if widget should be activated always.

Reimplemented in PartSet_WidgetSketchLabel.

◆ getControlAcceptingFocus()

QWidget * ModuleBase_ModelWidget::getControlAcceptingFocus ( const bool  isFirst)
inherited

Returns the first or the last control that can accept the focus.

Parameters
isFirstif true, the first controls is returned or the last one
Returns
a control from a list of controls

◆ eventFilter()

bool ModuleBase_ModelWidget::eventFilter ( QObject theObject,
QEvent theEvent 
)
virtualinherited

FocusIn events processing.

Reimplemented in CollectionPlugin_WidgetField, and PartSet_WidgetSketchLabel.

◆ enableFocusProcessing()

void ModuleBase_ModelWidget::enableFocusProcessing ( )
virtualinherited

Enables processing of focus event on all controls by the widget if this widget is not obligatory and set no-focus policy otherwise.

Reimplemented in PartSet_WidgetSketchLabel, and ModuleBase_PagedContainer.

◆ setHighlighted()

void ModuleBase_ModelWidget::setHighlighted ( bool  isHighlighted)
virtualinherited

◆ attributeID()

std::string ModuleBase_ModelWidget::attributeID ( ) const
inlineinherited

Returns the attribute name.

Returns
the string value

◆ feature()

FeaturePtr ModuleBase_ModelWidget::feature ( ) const
inlineinherited
Returns
Current feature

◆ context()

virtual std::string ModuleBase_ModelWidget::context ( ) const
inlinevirtualinherited
Returns
Context for translation

Reimplemented in ModuleBase_WidgetAction.

◆ setFeature()

void ModuleBase_ModelWidget::setFeature ( const FeaturePtr &  theFeature,
const bool  theToStoreValue = false,
const bool  isUpdateFlushed = true 
)
virtualinherited

Set feature which is processing by active operation.

Parameters
theFeaturea feature object
theToStoreValuea value about necessity to store the widget value to the feature
isUpdateFlusheda flag if update should be flushed on store value

it is possible to give this flag as parameter in storeValue/storeCustomValue after debug, it may be corrected

it is possible that the attribute is filled before the operation is started, e.g. by reentrant operation case some attributes are filled by values of feature of previous operation, we should not lost them here

Reimplemented in PartSet_BSplineWidget.

◆ setEditingMode()

virtual void ModuleBase_ModelWidget::setEditingMode ( bool  isEditing)
inlinevirtualinherited

Editing mode depends on mode of current operation. This value is defined by it.

Reimplemented in PartSet_WidgetSketchCreator.

◆ isEditingMode()

bool ModuleBase_ModelWidget::isEditingMode ( ) const
inlineinherited
Returns
Current Editing mode

◆ updateObject()

void ModuleBase_ModelWidget::updateObject ( ObjectPtr  theObj)
inherited

Sends Update and Redisplay for the given object.

Parameters
theObjis updating object

◆ translate()

QString ModuleBase_ModelWidget::translate ( const std::string &  theStr) const
virtualinherited

Translate passed string with widget context()

◆ emitFocusInWidget()

void ModuleBase_ModelWidget::emitFocusInWidget ( )
inlineinherited

Emit focus in widget to set this control as active in propety panel.

◆ findModelWidget()

ModuleBase_ModelWidget * ModuleBase_ModelWidget::findModelWidget ( ModuleBase_IPropertyPanel theProp,
QWidget theWidget 
)
staticinherited

Finds model widget parent of the given sub widget.

Parameters
theWidgeta candidate to be a child of the model widget
thePropa property panel instance
Returns
a model widget or NULL

◆ usesAttribute()

virtual bool ModuleBase_ModelWidget::usesAttribute ( ) const
inlinevirtualinherited

Returns True if the widget uses feature attribute.

If not then it means that the widget do not need attribute at all.

Reimplemented in ModuleBase_WidgetNameEdit.

◆ isInformative()

virtual bool ModuleBase_ModelWidget::isInformative ( ) const
inlinevirtualinherited

Returns True in case if the widget contains useful information for inspection tool.

Reimplemented in PartSet_WidgetSketchCreator.

◆ showInformativePage()

virtual void ModuleBase_ModelWidget::showInformativePage ( )
inlinevirtualinherited

If widgets has several panels then this method has to show a page which contains information for current feature.

By default does nothing

Reimplemented in PartSet_WidgetSketchLabel.

◆ canUseExternalParts()

bool ModuleBase_ModelWidget::canUseExternalParts ( ) const
inlineinherited

Returns true if the widget should have access to external parts.

◆ beforeValuesChanged

void ModuleBase_ModelWidget::beforeValuesChanged ( )
signalinherited

The signal about widget values are to be changed.

◆ valuesChanged

void ModuleBase_ModelWidget::valuesChanged ( )
signalinherited

The signal about widget values changed.

◆ valuesModified

void ModuleBase_ModelWidget::valuesModified ( )
signalinherited

The signal about widget values modified.

◆ afterValuesChanged

void ModuleBase_ModelWidget::afterValuesChanged ( )
signalinherited

The signal about widget values are to be changed.

◆ beforeValuesRestored

void ModuleBase_ModelWidget::beforeValuesRestored ( )
signalinherited

The signal about widget values are to be restored.

◆ afterValuesRestored

void ModuleBase_ModelWidget::afterValuesRestored ( )
signalinherited

The signal about widget values are to be restored.

◆ keyReleased

void ModuleBase_ModelWidget::keyReleased ( QObject theObject,
QKeyEvent *  theEvent 
)
signalinherited

The signal about key release on the control, that corresponds to the attribute.

Parameters
theObjecta sender of the event
theEventkey release event

◆ enterClicked

void ModuleBase_ModelWidget::enterClicked ( QObject theObject)
signalinherited

The signal is emitted if the enter is clicked in the control of the widget.

Parameters
theObjecta sender of the event

◆ focusInWidget

void ModuleBase_ModelWidget::focusInWidget ( ModuleBase_ModelWidget theWidget)
signalinherited

The signal about the widget is get focus.

Parameters
theWidgetthe model base widget

◆ focusOutWidget

void ModuleBase_ModelWidget::focusOutWidget ( ModuleBase_ModelWidget theWidget)
signalinherited

The signal about the widget is lost focus.

Parameters
theWidgetthe model base widget

◆ valueStateChanged

void ModuleBase_ModelWidget::valueStateChanged ( int  theState)
signalinherited

The signal about value state modification.

◆ objectUpdated

void ModuleBase_ModelWidget::objectUpdated ( )
signalinherited

The signal is emitted after flush of updates singal for the widget.

◆ setDefaultValue()

void ModuleBase_ModelWidget::setDefaultValue ( const std::string &  theValue)
protectedinherited

Sets default value of widget.

Normally, widget should fetch this value from the xml. However, some widgets derived widgets could define it

◆ setAttributeID()

void ModuleBase_ModelWidget::setAttributeID ( const std::string &  theAttribute)
inlineprotectedinherited

Set the attribute name.

Parameters
theAttributethe string value with attribute name

◆ setValueState()

ModuleBase_ModelWidget::ValueState ModuleBase_ModelWidget::setValueState ( const ValueState theState)
protectedinherited

Sets the current value state.

If the value is changed, the signal is emitted If the current value state is Blocked, this method do nothing

Parameters
theStatea new state
Returns
the previous value state

◆ blockValueState()

bool ModuleBase_ModelWidget::blockValueState ( const bool  theBlocked)
protectedinherited

Blocks the value state change.

Parameters
theBlockeda block state
Returns
the previous value

◆ initializeValueByActivate()

void ModuleBase_ModelWidget::initializeValueByActivate ( )
protectedvirtualinherited

Compute the feature default value and fill the controls with it or store the control value to the feature.

Reimplemented in PartSet_WidgetPoint2D, and ModuleBase_WidgetExprEditor.

◆ resetCustom()

virtual bool ModuleBase_ModelWidget::resetCustom ( )
inlineprotectedvirtualinherited

Fills the widget with default values.

Returns
true if the widget current value is reset

Reimplemented in PartSet_WidgetPoint2D, PartSet_WidgetBSplinePoints, ModuleBase_WidgetIntValue, and ModuleBase_WidgetDoubleValue.

◆ onWidgetValuesChanged

void ModuleBase_ModelWidget::onWidgetValuesChanged ( )
protectedslotinherited

Processing of values changed in model widget by store the current value to the feature.

◆ onWidgetValuesModified

void ModuleBase_ModelWidget::onWidgetValuesModified ( )
protectedslotinherited

Changes widget state.

Field Documentation

◆ myExternalObjectMgr

PartSet_ExternalObjectsMgr* PartSet_WidgetMultiSelector::myExternalObjectMgr
protected

Manager of external objects.

◆ mySketch

CompositeFeaturePtr PartSet_WidgetMultiSelector::mySketch
protected

Pointer to a sketch.

◆ myListView

ModuleBase_ListView* ModuleBase_WidgetMultiSelector::myListView
protectedinherited

List control.

◆ myIsUseChoice

bool ModuleBase_WidgetMultiSelector::myIsUseChoice
protectedinherited

A flag to store use_choice parameter state.

◆ myShapeTypes

QStringList ModuleBase_WidgetMultiSelector::myShapeTypes
protectedinherited

List of Shape types defined in XML.

◆ myTypeCtrl

ModuleBase_ChoiceCtrl* ModuleBase_WidgetMultiSelector::myTypeCtrl
protectedinherited

Control for types.

◆ myIsNeutralPointClear

bool ModuleBase_WidgetMultiSelector::myIsNeutralPointClear
protectedinherited

A flag to clear selection by click in empty place in the viewer.

◆ myIsSetSelectionBlocked

bool ModuleBase_WidgetMultiSelector::myIsSetSelectionBlocked
protectedinherited

A flag to block set selection perform if the method is in process.

◆ mySelectedHistoryValues

QList<QList<std::shared_ptr<ModuleBase_ViewerPrs> > > ModuleBase_WidgetMultiSelector::mySelectedHistoryValues
protectedinherited

A container of selected objects.

◆ myCurrentHistoryIndex

int ModuleBase_WidgetMultiSelector::myCurrentHistoryIndex
protectedinherited

Position in a container of selected values.

◆ myWorkshop

ModuleBase_IWorkshop* ModuleBase_WidgetValidated::myWorkshop
protectedinherited

Reference to workshop.

◆ myIsInValidate

bool ModuleBase_WidgetValidated::myIsInValidate
protectedinherited

The widget is in validation mode: store is performed, restore is not.

◆ myWidgetValidator

ModuleBase_WidgetValidator* ModuleBase_ModelWidget::myWidgetValidator
protectedinherited

own validator, by default it is zero

◆ myAttributeID

std::string ModuleBase_ModelWidget::myAttributeID
protectedinherited

The attribute name of the model feature.

◆ myFeature

FeaturePtr ModuleBase_ModelWidget::myFeature
protectedinherited

A feature which is processing by active operation.

◆ myFeatureId

std::string ModuleBase_ModelWidget::myFeatureId
protectedinherited

A feature ID.

◆ myIsObligatory

bool ModuleBase_ModelWidget::myIsObligatory
protectedinherited

Flag which shows whether current widget is obligatory The non-obligatory widgets should not accept the focus in the property panel.

◆ myIsValueEnabled

EnableState ModuleBase_ModelWidget::myIsValueEnabled
protectedinherited

Flag about value of the control is enabled (can be modified)

◆ myState

ValueState ModuleBase_ModelWidget::myState
protectedinherited

The widget value state.