9 _parent = qobject_cast<QTableWidget *>(parent);
17 QLineEdit *edit =
new QLineEdit(parent);
18 if( index.column() != 2){
19 edit->setReadOnly(
true);
26 QLineEdit *edit = qobject_cast<QLineEdit *>(editor);
27 edit->setText(index.model()->data(index).toString());
31 _parent->currentItem()->setBackgroundColor(
32 _p->
isErrorCol(
_parent->item(index.row(),1)->text().toStdString(), edit->text().toStdString() ) ?
33 QColor(184,16,0,180) : QColor(32,140,64,180) );
39 QLineEdit *edit = qobject_cast<QLineEdit *>(editor);
40 model->setData(index, edit->displayText());
43 _p->
getCols(
OUTPUT,
_parent->item(index.row(),0)->text().toStdString() )[ 0 ]->setValue(edit->displayText().toStdString());
48 _parent->currentItem()->setBackgroundColor(
49 _p->
isErrorCol(
_parent->item(index.row(),1)->text().toStdString(), edit->text().toStdString() ) ?
50 QColor(184,16,0,180) : QColor(32,140,64,180) );
this class is a Marlin Steering File consistency check Tool.
bool isErrorCol(const std::string &type, const std::string &value)
Returns true if the given collection is in the unavailable or duplicate list of this processor...
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
handles information about marlin processors and their collections needed by MarlinSteerCheck ...
ColVec & getCols(const std::string &iotype, const std::string &type_name="ALL_COLLECTIONS")
Returns collections of a given iotype ( INPUT, OUTPUT, UNAVAILABLE, DUPLICATE ) for a given name or t...
void consistencyCheck()
Performs a check at all active processors to search for unavailable collections.
void setEditorData(QWidget *editor, const QModelIndex &index) const
OColDelegate(const OColDelegate &)=default
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
bool isActive()
Returns true if the processor is active.