BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The FitParameterDelegate class presents the content of SessionModel items in standard QTreeView. Extents base QItemDelegate with possibility to show/edit our custom QVariant's.
Definition at line 24 of file FitParameterDelegate.h.
Public Slots | |
void | onCustomEditorDataChanged (const QVariant &) |
Notifies everyone that the editor has completed editing the data. More... | |
Public Member Functions | |
FitParameterDelegate (QObject *parent) | |
QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
void | setEditorData (QWidget *editor, const QModelIndex &index) const override |
Propagates the data change from the model to the editor (if it is still opened). More... | |
void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
Propagates changed data from the editor to the model. More... | |
QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
Increases height of the row by 20% wrt the default. More... | |
void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
Makes an editor occupying whole available space in a cell. If cell contains an icon as a decoration (i.e. icon of material property), it will be hidden as soon as editor up and running. More... | |
Protected Member Functions | |
virtual QWidget * | createEditorFromIndex (const QModelIndex &index, QWidget *parent) const |
Private Member Functions | |
void | paintCustomLabel (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index, const QString &text) const |
Paints custom text in a a place corresponding given index. More... | |
FitParameterDelegate::FitParameterDelegate | ( | QObject * | parent | ) |
Definition at line 22 of file FitParameterDelegate.cpp.
|
override |
Definition at line 37 of file FitParameterDelegate.cpp.
References createEditorFromIndex(), CustomEditor::dataChanged(), and onCustomEditorDataChanged().
|
protectedvirtual |
Definition at line 103 of file FitParameterDelegate.cpp.
References GUI::View::PropertyEditorFactory::CreateEditor().
Referenced by createEditor().
|
slot |
Notifies everyone that the editor has completed editing the data.
Definition at line 115 of file FitParameterDelegate.cpp.
Referenced by createEditor().
|
override |
Definition at line 27 of file FitParameterDelegate.cpp.
References GUI::View::PropertyEditorFactory::hasStringRepresentation(), paintCustomLabel(), and GUI::View::PropertyEditorFactory::toString().
|
private |
Paints custom text in a a place corresponding given index.
Definition at line 124 of file FitParameterDelegate.cpp.
Referenced by paint().
|
override |
Propagates the data change from the model to the editor (if it is still opened).
Definition at line 70 of file FitParameterDelegate.cpp.
|
override |
Propagates changed data from the editor to the model.
Definition at line 56 of file FitParameterDelegate.cpp.
|
override |
Increases height of the row by 20% wrt the default.
Definition at line 83 of file FitParameterDelegate.cpp.
|
override |
Makes an editor occupying whole available space in a cell. If cell contains an icon as a decoration (i.e. icon of material property), it will be hidden as soon as editor up and running.
Definition at line 95 of file FitParameterDelegate.cpp.