Construct a new code cell with optional original cell content.
Handle a change to the execution count.
Handle a change to the code cell value.
Set whether the cell is dirty or not.
A signal emitted when the state of the model changes.
The underlying IModelDB
instance in which model
data is stored.
A signal emitted when a model state changes.
The execution count of the cell.
The code cell's prompt number. Will be null if the cell has not been run.
The id for the cell.
Whether the cell is dirty or not.
A cell is dirty if it is output is not empty and does not result of the input code execution.
Whether the model is disposed.
The metadata associated with the cell.
A mime type of the model.
A signal emitted when a mimetype changes.
The cell outputs.
Get the selections for the model.
A signal emitted when the shared model was switched.
Get the trusted state of the model.
Set the trusted state of the model.
The type of the cell.
Get the value of the model.
Handle a change to the output shared model and reflect it in modelDB. We update the modeldb metadata when the nbcell changes.
This method overrides the CellModel protected _onSharedModelChanged so we first call super._onSharedModelChanged
Clear execution, outputs, and related metadata
Dispose of the resources held by the model.
Handle a change to the observable value.
Handle a change to the cell metadata modelDB and reflect it in the shared model.
Handle a change to the cell outputs modelDB and reflect it in the shared model.
Handle a change to the trusted state.
When we initialize a cell model, we create a standalone cell model that cannot be shared in a YNotebook. Call this function to re-initialize the local representation based on a fresh shared model (e.g. models.YFile or models.YCodeCell).
Serialize the model to JSON.
Generated using TypeDoc
An implementation of a code cell Model.