#include <ValueDelegate.hxx>
Public Member Functions | |
ValueDelegate (QObject *parent=0) | |
virtual | ~ValueDelegate () |
virtual QWidget * | createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const |
virtual void | setEditorData (QWidget *editor, const QModelIndex &index) const |
virtual void | setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const |
virtual void | updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const |
virtual void | setResultEditing (QWidget *editor, bool isOk) |
Protected Attributes | |
std::map< Subject *, std::string > | _errorMap |
Definition at line 116 of file ValueDelegate.hxx.
ValueDelegate::ValueDelegate | ( | QObject * | parent = 0 | ) |
|
virtual |
Definition at line 252 of file ValueDelegate.cxx.
References DEBTRACE.
|
virtual |
Definition at line 257 of file ValueDelegate.cxx.
References DEBTRACE, YACS::ENGINE::DataPort::edGetType(), YACS::HMI::Subject::getName(), YACS::HMI::Subject::getParent(), YACS::HMI::SubjectDataPort::getPort(), YACS::HMI::SchemaItem::getSubject(), YACS::ENGINE::Int, YACS::ENGINE::TypeCode::kind(), YACS::HMI::YLabel, and YACS::HMI::YValue.
|
virtual |
Initialise the editor with data from model, unless there is a previous error in edition of this item, and it is the first initialisation of the editor: in case of error, a new editor must be initialised with the wrong edited string, for correction.
Definition at line 313 of file ValueDelegate.cxx.
References _errorMap, DEBTRACE, YACS::HMI::GenericEditor::firstSetData(), YACS::HMI::GenericEditor::GetStrValue(), YACS::HMI::GenericEditor::getSubject(), YACS::HMI::GenericEditor::setData(), and YASSERT.
|
virtual |
Nothing done here: model->setData is done by UPDATE.
Definition at line 338 of file ValueDelegate.cxx.
References DEBTRACE, YACS::HMI::GenericEditor::GetStrValue(), and YASSERT.
|
virtual |
If edition is in error, keep the wrong string value in a map, to initialise a next instance of editor with the wrong string, in order to help correction of the edition.
Definition at line 363 of file ValueDelegate.cxx.
References _errorMap, DEBTRACE, YACS::HMI::EDIT, YACS::HMI::Subject::getName(), YACS::HMI::GenericEditor::GetStrValue(), YACS::HMI::GenericEditor::getSubject(), YACS::HMI::Subject::update(), and YASSERT.
Referenced by YACS::HMI::EditionSwitch::onCommitData(), YACS::HMI::EditionElementaryNode::onCommitData(), and YACS::HMI::TreeView::onCommitData().
|
virtual |
|
mutableprotected |
Definition at line 140 of file ValueDelegate.hxx.
Referenced by setEditorData(), setResultEditing(), and ValueDelegate().