SHAPER  9.12.0
ModuleBase_IPropertyPanel Class Referenceabstract

A class for Property panel object definition. More...

Inheritance diagram for ModuleBase_IPropertyPanel:
Inheritance graph

Public Slots

virtual void activateNextWidget (ModuleBase_ModelWidget *theWidget)=0
 Activate the next widget in the property panel. More...
 
virtual void activateNextWidget ()=0
 Activate the next from current widget in the property panel. More...
 
virtual void activateWidget (ModuleBase_ModelWidget *theWidget, const bool theEmitSignal=true)=0
 Makes the given widget active, highlights it and removes highlighting from the previous active widget. More...
 

Signals

void keyReleased (QObject *theObject, QKeyEvent *theEvent)
 The signal about key release on the control, that corresponds to the attribute. More...
 
void beforeWidgetActivated (ModuleBase_ModelWidget *theWidget)
 The signal about the widget activation. More...
 
void noMoreWidgets (const std::string &thePreviousAttributeID)
 The signal about the widget activation. More...
 

Public Member Functions

 ModuleBase_IPropertyPanel (QWidget *theParent)
 Constructor. More...
 
virtual QWidgetheaderWidget () const =0
 Returns header widget. More...
 
virtual ModuleBase_ModelWidgetactiveWidget (const bool isUseCustomWidget=false) const =0
 Returns currently active widget. More...
 
virtual const QList< ModuleBase_ModelWidget * > & modelWidgets () const =0
 Returns all property panel's widget created by WidgetFactory. More...
 
virtual ModuleBase_ModelWidgetmodelWidget (const std::string &theAttributeId) const
 Returns widget, that has the given attribute index. More...
 
virtual void cleanContent ()=0
 Removes all widgets in the widget area of the property panel. More...
 
virtual void setEditingMode (bool isEditing)
 Editing mode depends on mode of current operation. More...
 
bool isEditingMode () const
 
virtual void setFocusOnOkButton ()=0
 Set focus on the Ok button. More...
 
virtual void setCancelEnabled (bool theEnabled)=0
 Set Enable/Disable state of Cancel button. More...
 
virtual bool isCancelEnabled () const =0
 
virtual ModuleBase_ModelWidgetpreselectionWidget () const =0
 Returns widget processed by preselection. More...
 
virtual void setPreselectionWidget (ModuleBase_ModelWidget *theWidget)=0
 Sets widget processed by preselection. More...
 
ModuleBase_ModelWidgetfindFirstAcceptingValueWidget ()
 Returns the first widget, where canAcceptFocus returns true. More...
 
virtual void onAcceptData ()=0
 The method is called on accepting of operation. More...
 
virtual bool isModified () const
 Returns True if data of its feature was modified during operation. More...
 

Static Public Member Functions

static ModuleBase_ModelWidgetfindFirstAcceptingValueWidget (const QList< ModuleBase_ModelWidget * > &theWidgets)
 Returns the first widget, where canAcceptFocus returns true. More...
 

Protected Attributes

bool myIsEditing
 Flag which shows that current operation is in editing mode. More...
 

Detailed Description

A class for Property panel object definition.

Constructor & Destructor Documentation

◆ ModuleBase_IPropertyPanel()

ModuleBase_IPropertyPanel::ModuleBase_IPropertyPanel ( QWidget theParent)

Constructor.

Parameters
theParentis a parent of the property panel

Member Function Documentation

◆ headerWidget()

virtual QWidget* ModuleBase_IPropertyPanel::headerWidget ( ) const
pure virtual

Returns header widget.

Implemented in XGUI_PropertyPanel.

◆ activeWidget()

virtual ModuleBase_ModelWidget* ModuleBase_IPropertyPanel::activeWidget ( const bool  isUseCustomWidget = false) const
pure virtual

Returns currently active widget.

This is a widget from internal container of widgets (myWidgets) activated/deactivated by focus in property panel. If parameter is true, the method finds firstly the custom widget, after the direct active widget.

Parameters
isUseCustomWidgetboolean state if the custom widget might be a result

Implemented in XGUI_PropertyPanel.

◆ modelWidgets()

virtual const QList<ModuleBase_ModelWidget*>& ModuleBase_IPropertyPanel::modelWidgets ( ) const
pure virtual

Returns all property panel's widget created by WidgetFactory.

Implemented in XGUI_PropertyPanel.

◆ modelWidget()

ModuleBase_ModelWidget * ModuleBase_IPropertyPanel::modelWidget ( const std::string &  theAttributeId) const
virtual

Returns widget, that has the given attribute index.

Parameters
theAttributeIdan attribute from XML

◆ cleanContent()

virtual void ModuleBase_IPropertyPanel::cleanContent ( )
pure virtual

Removes all widgets in the widget area of the property panel.

Implemented in XGUI_PropertyPanel.

◆ setEditingMode()

virtual void ModuleBase_IPropertyPanel::setEditingMode ( bool  isEditing)
inlinevirtual

Editing mode depends on mode of current operation.

This value is defined by it.

Parameters
isEditingstate of editing mode flag

Reimplemented in XGUI_PropertyPanel.

◆ isEditingMode()

bool ModuleBase_IPropertyPanel::isEditingMode ( ) const
inline
Returns
State of editing mode flag

◆ setFocusOnOkButton()

virtual void ModuleBase_IPropertyPanel::setFocusOnOkButton ( )
pure virtual

Set focus on the Ok button.

Implemented in XGUI_PropertyPanel.

◆ setCancelEnabled()

virtual void ModuleBase_IPropertyPanel::setCancelEnabled ( bool  theEnabled)
pure virtual

Set Enable/Disable state of Cancel button.

Parameters
theEnabledEnable/Disable state of Cancel button

Implemented in XGUI_PropertyPanel.

◆ isCancelEnabled()

virtual bool ModuleBase_IPropertyPanel::isCancelEnabled ( ) const
pure virtual
Returns
Enable/Disable state of Cancel button

Implemented in XGUI_PropertyPanel.

◆ preselectionWidget()

virtual ModuleBase_ModelWidget* ModuleBase_IPropertyPanel::preselectionWidget ( ) const
pure virtual

Returns widget processed by preselection.

Implemented in XGUI_PropertyPanel.

◆ setPreselectionWidget()

virtual void ModuleBase_IPropertyPanel::setPreselectionWidget ( ModuleBase_ModelWidget theWidget)
pure virtual

Sets widget processed by preselection.

Implemented in XGUI_PropertyPanel.

◆ findFirstAcceptingValueWidget() [1/2]

ModuleBase_ModelWidget * ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget ( )

Returns the first widget, where canAcceptFocus returns true.

Returns
a widget or null

◆ onAcceptData()

virtual void ModuleBase_IPropertyPanel::onAcceptData ( )
pure virtual

The method is called on accepting of operation.

Implemented in XGUI_PropertyPanel.

◆ isModified()

bool ModuleBase_IPropertyPanel::isModified ( ) const
virtual

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

◆ findFirstAcceptingValueWidget() [2/2]

ModuleBase_ModelWidget * ModuleBase_IPropertyPanel::findFirstAcceptingValueWidget ( const QList< ModuleBase_ModelWidget * > &  theWidgets)
static

Returns the first widget, where canAcceptFocus returns true.

Returns
a widget or null

workaround for the same attributes used in different stacked widgets(attribute types)

◆ keyReleased

void ModuleBase_IPropertyPanel::keyReleased ( QObject theObject,
QKeyEvent *  theEvent 
)
signal

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

Parameters
theObjecta sender of the event
theEventkey release event

◆ beforeWidgetActivated

void ModuleBase_IPropertyPanel::beforeWidgetActivated ( ModuleBase_ModelWidget theWidget)
signal

The signal about the widget activation.

Parameters
theWidgetthe activated widget

◆ noMoreWidgets

void ModuleBase_IPropertyPanel::noMoreWidgets ( const std::string &  thePreviousAttributeID)
signal

The signal about the widget activation.

Parameters
theWidgetthe activated widget Emited when there is no next widget
thePreviousAttributeIDan attribute key of the previous active widget

◆ activateNextWidget [1/2]

virtual void ModuleBase_IPropertyPanel::activateNextWidget ( ModuleBase_ModelWidget theWidget)
pure virtualslot

Activate the next widget in the property panel.

Parameters
theWidgeta widget. The next widget should be activated

Implemented in XGUI_PropertyPanel.

◆ activateNextWidget [2/2]

virtual void ModuleBase_IPropertyPanel::activateNextWidget ( )
pure virtualslot

Activate the next from current widget in the property panel.

Implemented in XGUI_PropertyPanel.

◆ activateWidget

virtual void ModuleBase_IPropertyPanel::activateWidget ( ModuleBase_ModelWidget theWidget,
const bool  theEmitSignal = true 
)
pure virtualslot

Makes the given widget active, highlights it and removes highlighting from the previous active widget.

Parameters
theWidgetwhich has to be activated
theEmitSignala flag to prohibit signal emit

Field Documentation

◆ myIsEditing

bool ModuleBase_IPropertyPanel::myIsEditing
protected

Flag which shows that current operation is in editing mode.