Gui::Dialog::ParameterValue Class Reference

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

#include <DlgParameterImp.h>

List of all members.

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.

Detailed Description

The ParameterValue class displays all leaves of a parameter group.

A leaf is represented by the ParameterValueItem class.

Author:
Werner Mayer

Definition at line 127 of file DlgParameterImp.h.


Constructor & Destructor Documentation

ParameterValue::ParameterValue ( QWidget *  parent = 0  ) 
ParameterValue::~ParameterValue (  )  [virtual]

Definition at line 535 of file DlgParameterImp.cpp.


Member Function Documentation

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.

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

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]
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.


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

Generated on Wed Nov 23 19:02:07 2011 for FreeCAD by  doxygen 1.6.1