38 #include <OpenMS/VISUAL/OpenMS_GUIConfig.h>
45 #include <QListWidget>
46 #include <QItemDelegate>
55 class ListEditorDelegate;
156 void setModelData(
QWidget * editor, QAbstractItemModel * model,
const QModelIndex & index)
const override;
Internal delegate class.
Definition: ListEditor.h:145
void setTypeName(QString name)
set name of type
void setFileName(QString name)
sets the fileName
void setRestrictions(const String &restrictions)
ListEditorDelegate(QObject *parent)
Constructor.
void setType(const ListEditor::Type type)
ListEditor::Type type_
List type.
Definition: ListEditor.h:173
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.
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....
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
not reimplemented
QString file_name_
used to set input and output values in setModelData
Definition: ListEditor.h:179
String restrictions_
restrictions for list elements
Definition: ListEditor.h:175
QString typeName_
type name. used to distinguish output/input from string lists
Definition: ListEditor.h:177
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.
ListEditorDelegate()
Not implemented => private.
Definition: ListEditor.h:113
void setList(const StringList &list, ListEditor::Type type)
ListEditor::Type type_
List type.
Definition: ListEditor.h:133
ListTable(QWidget *parent=nullptr)
StringList list_
Definition: ListEditor.h:135
Editor for editing int, double and string lists (including output and input file lists)
Definition: ListEditor.h:63
void setTypeName(QString name)
set name of type
QPushButton * CancelButton_
button clicked if modifications are rejected
Definition: ListEditor.h:102
void setList(const StringList &list, ListEditor::Type type)
sets list (and its type)that will be modified by user
Type
Definition: ListEditor.h:69
@ OUTPUT_FILE
Definition: ListEditor.h:73
@ FLOAT
Definition: ListEditor.h:71
@ STRING
Definition: ListEditor.h:72
@ INT
Definition: ListEditor.h:70
ListEditor::Type type_
List type.
Definition: ListEditor.h:90
void setListRestrictions(const String &restrictions)
set restrictions for list elements
QPushButton * removeRowButton_
button for removing row
Definition: ListEditor.h:98
QPushButton * newRowButton_
button for new Row
Definition: ListEditor.h:96
QPushButton * OkButton_
button clicked if modifications are accepted
Definition: ListEditor.h:100
ListEditor(QWidget *parent=nullptr, const QString &title="")
Constructor.
StringList getList() const
returns modified list
Internal::ListTable * listTable_
displays the list
Definition: ListEditor.h:92
Internal::ListEditorDelegate * listDelegate_
Delegate between view and model.
Definition: ListEditor.h:94
A more convenient string class.
Definition: String.h:60
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48