OpenMS
ListEditor Class Reference

Editor for editing int, double and string lists (including output and input file lists) More...

#include <OpenMS/VISUAL/ListEditor.h>

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

Public Types

enum  Type {
  INT , FLOAT , STRING , OUTPUT_FILE ,
  INPUT_FILE
}
 

Public Member Functions

 ListEditor (QWidget *parent=nullptr, const QString &title="")
 Constructor. More...
 
StringList getList () const
 returns modified list More...
 
void setList (const StringList &list, ListEditor::Type type)
 sets list (and its type)that will be modified by user More...
 
void setListRestrictions (const String &restrictions)
 set restrictions for list elements More...
 
void setTypeName (QString name)
 set name of type More...
 

Private Attributes

ListEditor::Type type_
 List type. More...
 
Internal::ListTablelistTable_
 displays the list More...
 
Internal::ListEditorDelegatelistDelegate_
 Delegate between view and model. More...
 
QPushButton * newRowButton_
 button for new Row More...
 
QPushButton * removeRowButton_
 button for removing row More...
 
QPushButton * OkButton_
 button clicked if modifications are accepted More...
 
QPushButton * CancelButton_
 button clicked if modifications are rejected More...
 

Detailed Description

Editor for editing int, double and string lists (including output and input file lists)

Member Enumeration Documentation

◆ Type

enum Type
Enumerator
INT 
FLOAT 
STRING 
OUTPUT_FILE 
INPUT_FILE 

Constructor & Destructor Documentation

◆ ListEditor()

ListEditor ( QWidget parent = nullptr,
const QString &  title = "" 
)

Constructor.

Member Function Documentation

◆ getList()

StringList getList ( ) const

returns modified list

◆ setList()

void setList ( const StringList list,
ListEditor::Type  type 
)

sets list (and its type)that will be modified by user

◆ setListRestrictions()

void setListRestrictions ( const String restrictions)

set restrictions for list elements

◆ setTypeName()

void setTypeName ( QString  name)

set name of type

Member Data Documentation

◆ CancelButton_

QPushButton* CancelButton_
private

button clicked if modifications are rejected

◆ listDelegate_

Internal::ListEditorDelegate* listDelegate_
private

Delegate between view and model.

◆ listTable_

Internal::ListTable* listTable_
private

displays the list

◆ newRowButton_

QPushButton* newRowButton_
private

button for new Row

◆ OkButton_

QPushButton* OkButton_
private

button clicked if modifications are accepted

◆ removeRowButton_

QPushButton* removeRowButton_
private

button for removing row

◆ type_

ListEditor::Type type_
private

List type.