The ParameterValue class displays all leaves of a parameter group. More...
#include <DlgParameterImp.h>
Public Member Functions | |
| ParameterValue (QWidget *parent=0) | |
| void | setCurrentGroup (const Base::Reference< ParameterGrp > &_hcGrp) |
| Sets the current parameter group that is displayed. | |
| virtual | ~ParameterValue () |
Protected Slots | |
| bool | edit (const QModelIndex &index, EditTrigger trigger, QEvent *event) |
| Defines that the first column is editable. | |
| void | onChangeSelectedItem () |
| void | onChangeSelectedItem (QTreeWidgetItem *, int) |
| Changes the value of the leaf of the selected item. | |
| void | onCreateBoolItem () |
| Creates and appends a new "boolean" leaf. | |
| void | onCreateFloatItem () |
| Creates and appends a new "float" leaf. | |
| void | onCreateIntItem () |
| Creates and appends a new "integer" leaf. | |
| void | onCreateTextItem () |
| Creates and appends a new "text" leaf. | |
| void | onCreateUIntItem () |
| Creates and appends a new "unsigned integer" leaf. | |
| void | onDeleteSelectedItem () |
| Remove the underlying leaf from the parameter group. | |
| void | onRenameSelectedItem () |
| Changes the name of the leaf of the selected item. | |
Protected Member Functions | |
| void | contextMenuEvent (QContextMenuEvent *event) |
| Shows the context menu. | |
| void | keyPressEvent (QKeyEvent *event) |
| Invokes onDeleteSelectedItem() if the "Del" key was pressed. | |
The ParameterValue class displays all leaves of a parameter group.
A leaf is represented by the ParameterValueItem class.
Definition at line 127 of file DlgParameterImp.h.
| ParameterValue::ParameterValue | ( | QWidget * | parent = 0 |
) |
Definition at line 513 of file DlgParameterImp.cpp.
References draftlibs::fcgeo::connect(), onChangeSelectedItem(), onCreateBoolItem(), onCreateFloatItem(), onCreateIntItem(), onCreateTextItem(), onCreateUIntItem(), onDeleteSelectedItem(), and onRenameSelectedItem().
| ParameterValue::~ParameterValue | ( | ) | [virtual] |
Definition at line 535 of file DlgParameterImp.cpp.
| void ParameterValue::contextMenuEvent | ( | QContextMenuEvent * | event | ) | [protected] |
Shows the context menu.
Definition at line 551 of file DlgParameterImp.cpp.
| bool ParameterValue::edit | ( | const QModelIndex & | index, | |
| EditTrigger | trigger, | |||
| QEvent * | event | |||
| ) | [protected, slot] |
Defines that the first column is editable.
Definition at line 544 of file DlgParameterImp.cpp.
Referenced by onCreateUIntItem().
| void ParameterValue::keyPressEvent | ( | QKeyEvent * | event | ) | [protected] |
Invokes onDeleteSelectedItem() if the "Del" key was pressed.
Definition at line 560 of file DlgParameterImp.cpp.
References onDeleteSelectedItem().
| void ParameterValue::onChangeSelectedItem | ( | ) | [protected, slot] |
Definition at line 581 of file DlgParameterImp.cpp.
Referenced by ParameterValue().
| void ParameterValue::onChangeSelectedItem | ( | QTreeWidgetItem * | item, | |
| int | col | |||
| ) | [protected, slot] |
Changes the value of the leaf of the selected item.
Definition at line 573 of file DlgParameterImp.cpp.
| void ParameterValue::onCreateBoolItem | ( | ) | [protected, slot] |
Creates and appends a new "boolean" leaf.
Definition at line 730 of file DlgParameterImp.cpp.
References Gui::Dialog::ParameterValueItem::appendToGroup(), and Gui::validateInput().
Referenced by ParameterValue().
| void ParameterValue::onCreateFloatItem | ( | ) | [protected, slot] |
Creates and appends a new "float" leaf.
Definition at line 701 of file DlgParameterImp.cpp.
References Gui::Dialog::ParameterValueItem::appendToGroup(), and Gui::validateInput().
Referenced by ParameterValue().
| void ParameterValue::onCreateIntItem | ( | ) | [protected, slot] |
Creates and appends a new "integer" leaf.
Definition at line 635 of file DlgParameterImp.cpp.
References Gui::Dialog::ParameterValueItem::appendToGroup(), and Gui::validateInput().
Referenced by ParameterValue().
| void ParameterValue::onCreateTextItem | ( | ) | [protected, slot] |
Creates and appends a new "text" leaf.
Definition at line 606 of file DlgParameterImp.cpp.
References Gui::Dialog::ParameterValueItem::appendToGroup(), and Gui::validateInput().
Referenced by ParameterValue().
| void ParameterValue::onCreateUIntItem | ( | ) | [protected, slot] |
Creates and appends a new "unsigned integer" leaf.
Definition at line 665 of file DlgParameterImp.cpp.
References Gui::Dialog::ParameterValueItem::appendToGroup(), edit(), Gui::Dialog::DlgInputDialogImp::getUIntBox(), Gui::UIntSpinBox::setRange(), Gui::Dialog::DlgInputDialogImp::UIntBox, Gui::validateInput(), and Py::value().
Referenced by ParameterValue().
| void ParameterValue::onDeleteSelectedItem | ( | ) | [protected, slot] |
Remove the underlying leaf from the parameter group.
The selected item is also removed and destroyed.
Definition at line 586 of file DlgParameterImp.cpp.
Referenced by keyPressEvent(), and ParameterValue().
| void ParameterValue::onRenameSelectedItem | ( | ) | [protected, slot] |
Changes the name of the leaf of the selected item.
Definition at line 597 of file DlgParameterImp.cpp.
Referenced by ParameterValue().
| void ParameterValue::setCurrentGroup | ( | const Base::Reference< ParameterGrp > & | _hcGrp | ) |
Sets the current parameter group that is displayed.
Definition at line 539 of file DlgParameterImp.cpp.
1.6.1