![]() |
Reference documentation for deal.II version 8.4.2
|
#include </build/deal.ii-pdtiAo/deal.ii-8.4.2/contrib/parameter_gui/parameter_delegate.h>
Inherits QItemDelegate.
Public Member Functions | |
| ParameterDelegate (const int value_column, QObject *parent=0) | |
| QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| void | setEditorData (QWidget *editor, const QModelIndex &index) const |
| void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const |
Private Slots | |
| void | commit_and_close_editor () |
Private Attributes | |
| int | value_column |
| double | double_steps |
| unsigned int | int_steps |
| unsigned int | double_decimals |
The ParameterDelegate class implements special delegates for the QTreeWidget class used in the parameterGUI. The QTreeWidget class provides some different standard delegates for editing parameters shown in the tree structure. The ParameterDelegate class provides special editors for the different types of parameters defined in the ParameterHandler class. For all parameter types based on strings as "Anything", "MultipleSelection" "Map" and "List" a simple line editor will be shown up. In the case of integer and double type parameters the editor is a spin box and for "Selection" type parameters a combo box will be shown up. For parameters of type "FileName" and "DirectoryName" the delegate shows a BrowseLineEdit editor. The column of the tree structure with the parameter values has to be set in the constructor.
Definition at line 53 of file parameter_delegate.h.
| dealii::ParameterGui::ParameterDelegate::ParameterDelegate | ( | const int | value_column, |
| QObject * | parent = 0 |
||
| ) |
Constructor, value_column specifies the column of the parameter tree this delegate will be used on.
Definition at line 28 of file parameter_delegate.cpp.
| QWidget * dealii::ParameterGui::ParameterDelegate::createEditor | ( | QWidget * | parent, |
| const QStyleOptionViewItem & | option, | ||
| const QModelIndex & | index | ||
| ) | const |
This function creates the appropriate editor for the parameter based on the index.
Definition at line 96 of file parameter_delegate.cpp.
| QSize dealii::ParameterGui::ParameterDelegate::sizeHint | ( | const QStyleOptionViewItem & | option, |
| const QModelIndex & | index | ||
| ) | const |
Reimplemented from QItemDelegate.
Definition at line 41 of file parameter_delegate.cpp.
| void dealii::ParameterGui::ParameterDelegate::paint | ( | QPainter * | painter, |
| const QStyleOptionViewItem & | option, | ||
| const QModelIndex & | index | ||
| ) | const |
Reimplemented from QItemDelegate.
Definition at line 67 of file parameter_delegate.cpp.
| void dealii::ParameterGui::ParameterDelegate::setEditorData | ( | QWidget * | editor, |
| const QModelIndex & | index | ||
| ) | const |
Reimplemented from QItemDelegate.
Definition at line 240 of file parameter_delegate.cpp.
| void dealii::ParameterGui::ParameterDelegate::setModelData | ( | QWidget * | editor, |
| QAbstractItemModel * | model, | ||
| const QModelIndex & | index | ||
| ) | const |
Reimplemented from QItemDelegate.
Definition at line 292 of file parameter_delegate.cpp.
|
privateslot |
Reimplemented from QItemDelegate.
Definition at line 283 of file parameter_delegate.cpp.
|
private |
The column this delegate will be used on.
Definition at line 97 of file parameter_delegate.h.
|
private |
For parameters of type double a spin box will be shown as editor. Any click on the spin box will change the value about double_steps.
Definition at line 103 of file parameter_delegate.h.
|
private |
For parameters of type integer a spin box will be shown as editor. Any click on the spin box will change the value about int_steps.
Definition at line 109 of file parameter_delegate.h.
|
private |
For parameters of type double a spin box will be shown as editor. The spin box will show parameters with a precision of double_decimals.
Definition at line 115 of file parameter_delegate.h.
1.8.12