OpenMS
ListEditorDelegate Class Reference

Internal delegate class. More...

#include <OpenMS/VISUAL/ListEditor.h>

Inheritance diagram for ListEditorDelegate:
[legend]
Collaboration diagram for ListEditorDelegate:
[legend]

Public Member Functions

 ListEditorDelegate (QObject *parent)
 Constructor. More...
 
QWidgetcreateEditor (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...
 

Private Member Functions

 ListEditorDelegate ()
 Not implemented => private. More...
 

Private Attributes

ListEditor::Type type_
 List type. More...
 
String restrictions_
 restrictions for list elements More...
 
QString typeName_
 type name. used to distinguish output/input from string lists More...
 
QString file_name_
 used to set input and output values in setModelData More...
 

Detailed Description

Internal delegate class.

This handles editing of items.

Constructor & Destructor Documentation

◆ ListEditorDelegate() [1/2]

ListEditorDelegate ( QObject parent)

Constructor.

◆ ListEditorDelegate() [2/2]

ListEditorDelegate ( )
private

Not implemented => private.

Member Function Documentation

◆ createEditor()

QWidget* createEditor ( QWidget parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

not reimplemented

◆ 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)

sets the fileName

◆ 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()

void setType ( const ListEditor::Type  type)

◆ setTypeName()

void setTypeName ( QString  name)

set name of type

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

Member Data Documentation

◆ file_name_

QString file_name_
mutableprivate

used to set input and output values in setModelData

◆ restrictions_

String restrictions_
private

restrictions for list elements

◆ type_

ListEditor::Type type_
private

List type.

◆ typeName_

QString typeName_
private

type name. used to distinguish output/input from string lists