Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
ParamEditorDelegate Class Reference

Internal delegate class for QTreeWidget. More...

#include <OpenMS/VISUAL/ParamEditor.h>

Inheritance diagram for ParamEditorDelegate:
QItemDelegate

Signals

void modified (bool) const
 signal for showing ParamEditor if the Model data changed More...
 

Public Member Functions

 ParamEditorDelegate (QObject *parent)
 Constructor. More...
 
QWidgetcreateEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 Returns the widget(combobox or QLineEdit) used to edit the item specified by index for editing. Prevents edit operations on nodes' values and types. More...
 
void setEditorData (QWidget *editor, const QModelIndex &index) const
 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
 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
 Updates the editor for the item specified by index according to the style option given. More...
 
bool hasUncommittedData () const
 true if the underlying tree has an open QLineEdit which has uncommitted data More...
 

Protected Member Functions

bool exists_ (QString name, QModelIndex index) const
 Checks if a name is valid for the entry corresponding to index (checks if it would be duplicate) More...
 

Private Slots

void commitAndCloseListEditor_ ()
 For closing ListEditor and updating ParamEditor. More...
 
void commitAndCloseComboBox_ ()
 For closing QcomboBox and updating ParamEditor. More...
 
void closeListEditor_ ()
 if cancel in ListEditor is clicked Dialog is closed and changes are rejected More...
 
void commitAndCloseLineEdit_ ()
 ... More...
 

Private Member Functions

 ParamEditorDelegate ()
 Not implemented. More...
 

Private Attributes

QString fileName_
 used to modify value of output and input files( not for output and input lists) More...
 
bool has_uncommited_data_
 true if a QLineEdit is still open and has not committed its data yet (so storing the current param is a bad idea) More...
 

Detailed Description

Internal delegate class for QTreeWidget.

This handles editing of items.

Constructor & Destructor Documentation

◆ ParamEditorDelegate() [1/2]

Constructor.

◆ ParamEditorDelegate() [2/2]

ParamEditorDelegate ( )
private

Not implemented.

Member Function Documentation

◆ closeListEditor_

void closeListEditor_ ( )
privateslot

if cancel in ListEditor is clicked Dialog is closed and changes are rejected

◆ commitAndCloseComboBox_

void commitAndCloseComboBox_ ( )
privateslot

For closing QcomboBox and updating ParamEditor.

◆ commitAndCloseLineEdit_

void commitAndCloseLineEdit_ ( )
privateslot

...

◆ commitAndCloseListEditor_

void commitAndCloseListEditor_ ( )
privateslot

For closing ListEditor and updating ParamEditor.

◆ createEditor()

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

Returns the widget(combobox or QLineEdit) used to edit the item specified by index for editing. Prevents edit operations on nodes' values and types.

◆ exists_()

bool exists_ ( QString  name,
QModelIndex  index 
) const
protected

Checks if a name is valid for the entry corresponding to index (checks if it would be duplicate)

◆ hasUncommittedData()

bool hasUncommittedData ( ) const

true if the underlying tree has an open QLineEdit which has uncommitted data

◆ modified

void modified ( bool  ) const
signal

signal for showing ParamEditor if the Model data changed

◆ setEditorData()

void setEditorData ( QWidget editor,
const QModelIndex &  index 
) const

Sets the data to be displayed and edited by the editor for the item specified by index.

◆ setModelData()

void setModelData ( QWidget editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const

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.

◆ updateEditorGeometry()

void updateEditorGeometry ( QWidget editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const

Updates the editor for the item specified by index according to the style option given.

Member Data Documentation

◆ fileName_

QString fileName_
mutableprivate

used to modify value of output and input files( not for output and input lists)

◆ has_uncommited_data_

bool has_uncommited_data_
mutableprivate

true if a QLineEdit is still open and has not committed its data yet (so storing the current param is a bad idea)


OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:15 using doxygen 1.8.13