Gui::Dialog::ParameterValue Class Reference

The ParameterValue class displays all leaves of a parameter group. More...

#include <DlgParameterImp.h>

Public Member Functions

Base::Reference< ParameterGrpcurrentGroup () const
 Returns the current parameter group that is displayed. More...
 
 ParameterValue (QWidget *parent=nullptr)
 
void setCurrentGroup (const Base::Reference< ParameterGrp > &_hcGrp)
 Sets the current parameter group that is displayed. More...
 
virtual ~ParameterValue ()
 

Protected Slots

bool edit (const QModelIndex &index, EditTrigger trigger, QEvent *event)
 Defines that the first column is editable. More...
 
void onChangeSelectedItem ()
 
void onChangeSelectedItem (QTreeWidgetItem *, int)
 Changes the value of the leaf of the selected item. More...
 
void onCreateBoolItem ()
 Creates and appends a new "boolean" leaf. More...
 
void onCreateFloatItem ()
 Creates and appends a new "float" leaf. More...
 
void onCreateIntItem ()
 Creates and appends a new "integer" leaf. More...
 
void onCreateTextItem ()
 Creates and appends a new "text" leaf. More...
 
void onCreateUIntItem ()
 Creates and appends a new "unsigned integer" leaf. More...
 
void onDeleteSelectedItem ()
 Remove the underlying leaf from the parameter group. More...
 
void onRenameSelectedItem ()
 Changes the name of the leaf of the selected item. More...
 

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event)
 Shows the context menu. More...
 
void keyPressEvent (QKeyEvent *event)
 Invokes onDeleteSelectedItem() if the "Del" key was pressed. More...
 
void resizeEvent (QResizeEvent *)
 

Detailed Description

The ParameterValue class displays all leaves of a parameter group.

A leaf is represented by the ParameterValueItem class.

Author
Werner Mayer

Constructor & Destructor Documentation

◆ ParameterValue()

◆ ~ParameterValue()

ParameterValue::~ParameterValue ( )
virtual

Member Function Documentation

◆ contextMenuEvent()

void ParameterValue::contextMenuEvent ( QContextMenuEvent *  event)
protected

Shows the context menu.

◆ currentGroup()

Base::Reference< ParameterGrp > ParameterValue::currentGroup ( ) const

Returns the current parameter group that is displayed.

◆ edit

bool ParameterValue::edit ( const QModelIndex &  index,
EditTrigger  trigger,
QEvent event 
)
protectedslot

Defines that the first column is editable.

Note
We need to reimplement this method as QTreeWidgetItem::flags() doesn't have an int parameter.

Referenced by PathScripts.PathToolLibraryEditor.CommandToolLibraryEdit::Activated(), and onCreateUIntItem().

◆ keyPressEvent()

void ParameterValue::keyPressEvent ( QKeyEvent *  event)
protected

Invokes onDeleteSelectedItem() if the "Del" key was pressed.

References onDeleteSelectedItem().

◆ onChangeSelectedItem [1/2]

void ParameterValue::onChangeSelectedItem ( )
protectedslot

◆ onChangeSelectedItem [2/2]

void ParameterValue::onChangeSelectedItem ( QTreeWidgetItem item,
int  col 
)
protectedslot

Changes the value of the leaf of the selected item.

◆ onCreateBoolItem

void ParameterValue::onCreateBoolItem ( )
protectedslot

Creates and appends a new "boolean" leaf.

References Gui::Dialog::ParameterValueItem::appendToGroup(), draftfunctions.svgtext::getText(), and Gui::validateInput().

Referenced by ParameterValue().

◆ onCreateFloatItem

void ParameterValue::onCreateFloatItem ( )
protectedslot

Creates and appends a new "float" leaf.

References Gui::Dialog::ParameterValueItem::appendToGroup(), draftfunctions.svgtext::getText(), and Gui::validateInput().

Referenced by ParameterValue().

◆ onCreateIntItem

void ParameterValue::onCreateIntItem ( )
protectedslot

Creates and appends a new "integer" leaf.

References Gui::Dialog::ParameterValueItem::appendToGroup(), draftfunctions.svgtext::getText(), and Gui::validateInput().

Referenced by ParameterValue().

◆ onCreateTextItem

void ParameterValue::onCreateTextItem ( )
protectedslot

◆ onCreateUIntItem

void ParameterValue::onCreateUIntItem ( )
protectedslot

◆ onDeleteSelectedItem

void ParameterValue::onDeleteSelectedItem ( )
protectedslot

Remove the underlying leaf from the parameter group.

The selected item is also removed and destroyed.

Referenced by keyPressEvent(), and ParameterValue().

◆ onRenameSelectedItem

void ParameterValue::onRenameSelectedItem ( )
protectedslot

Changes the name of the leaf of the selected item.

Referenced by ParameterValue().

◆ resizeEvent()

void ParameterValue::resizeEvent ( QResizeEvent *  event)
protected

◆ setCurrentGroup()

void ParameterValue::setCurrentGroup ( const Base::Reference< ParameterGrp > &  _hcGrp)

Sets the current parameter group that is displayed.


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