Internal delegate class.
More...
#include <OpenMS/VISUAL/ListEditor.h>
|
| | ListEditorDelegate (QObject *parent) |
| | Constructor. More...
|
| |
| QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| | not reimplemented More...
|
| |
| void | setEditorData (QWidget *editor, const QModelIndex &index) const override |
| | Sets the data to be displayed and edited by the editor for the item specified by index. More...
|
| |
| void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override |
| | Sets the data for the specified model and item index from that supplied by the editor. If data changed in a cell, that is if it is different from an initial value, then set its background color to yellow and emit the modified signal otherwise make it white. More...
|
| |
| void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| | Updates the editor for the item specified by index according to the style option given. More...
|
| |
| void | setType (const ListEditor::Type type) |
| |
| void | setRestrictions (const String &restrictions) |
| |
| void | setTypeName (QString name) |
| | set name of type More...
|
| |
| void | setFileName (QString name) |
| | sets the fileName More...
|
| |
Internal delegate class.
This handles editing of items.
◆ ListEditorDelegate() [1/2]
◆ ListEditorDelegate() [2/2]
Not implemented => private.
◆ createEditor()
| QWidget* createEditor |
( |
QWidget * |
parent, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
◆ setEditorData()
| void setEditorData |
( |
QWidget * |
editor, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Sets the data to be displayed and edited by the editor for the item specified by index.
◆ setFileName()
| void setFileName |
( |
QString |
name | ) |
|
◆ setModelData()
| void setModelData |
( |
QWidget * |
editor, |
|
|
QAbstractItemModel * |
model, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Sets the data for the specified model and item index from that supplied by the editor. If data changed in a cell, that is if it is different from an initial value, then set its background color to yellow and emit the modified signal otherwise make it white.
◆ setRestrictions()
| void setRestrictions |
( |
const String & |
restrictions | ) |
|
◆ setType()
◆ setTypeName()
| void setTypeName |
( |
QString |
name | ) |
|
◆ updateEditorGeometry()
| void updateEditorGeometry |
( |
QWidget * |
editor, |
|
|
const QStyleOptionViewItem & |
option, |
|
|
const QModelIndex & |
index |
|
) |
| const |
|
override |
Updates the editor for the item specified by index according to the style option given.
◆ file_name_
used to set input and output values in setModelData
◆ restrictions_
restrictions for list elements
◆ type_
◆ typeName_
type name. used to distinguish output/input from string lists