ArrayModel wraps a JavaScript array for use in .slint views. The underlying array can be modified with the [[ArrayModel.push]] and [[ArrayModel.remove]] methods.
.slint
Creates a new ArrayModel.
Returns the number of entries in the array model.
Returns an iterable of key, value pairs for every entry in the array.
Protected
Notifies the view that the complete data must be reload.
Notifies the view that multiple rows are added to the model.
index of the first added row.
the number of added items.
Notifies the view that the data of the current row is changed.
index of the changed row.
Notifies the view that multiple rows are removed to the model.
index of the first removed row.
the number of removed items.
Pushes new values to the array that's backing the model and notifies the run-time about the added rows.
Rest
list of values that will be pushed to the array.
Removes the specified number of element from the array that's backing the model, starting at the specified index.
index of first row to remove.
number of rows to remove.
Returns the data at the specified row.
index in range 0..(rowCount() - 1).
undefined if row is out of range otherwise the data.
Stores the given data on the given row index and notifies run-time about the changed row.
new data item to store on the given row index
Returns an iterable of values in the array.
ArrayModel wraps a JavaScript array for use in
.slint
views. The underlying array can be modified with the [[ArrayModel.push]] and [[ArrayModel.remove]] methods.