Add formatted diagnostic output to NotebookCell
diff --git a/ide/CellModel.cpp b/ide/CellModel.cpp
index 8ed684f..167a2af 100644
--- a/ide/CellModel.cpp
+++ b/ide/CellModel.cpp
@@ -37,6 +37,8 @@
return _notebook->_cells[index.row()]->uuid();
case StatusRole:
return _notebook->_cells[index.row()]->status();
+ case ResultTypeRole:
+ return _notebook->_cells[index.row()]->resultType();
default:
return QVariant();
}
@@ -57,6 +59,9 @@
case StatusRole:
_notebook->_cells[index.row()]->setStatus(value.toInt());
break;
+ case ResultTypeRole:
+ _notebook->_cells[index.row()]->setResultType(value.toInt());
+ break;
default:
return false;
}
@@ -100,6 +105,11 @@
announceCellChange(cell, StatusRole);
});
+ connect(cell, &Cell::resultTypeChanged, this, [this, cell](int)
+ {
+ announceCellChange(cell, ResultTypeRole);
+ });
+
_notebook->_cells.insert(row, cell);
}
@@ -130,6 +140,7 @@
{ResultRole, "result"},
{UuidRole, "uuid"},
{StatusRole, "status"},
+ {ResultTypeRole, "resultType"},
};
}