LensStudio:Ui.ScriptableModel
ClassBase class for custom item models implemented in plugin script; subclasses override rowCount, columnCount, data, headerData, flags, index, and roleNames to f…
Base class for custom item models implemented in plugin script; subclasses override rowCount, columnCount, data, headerData, flags, index, and roleNames to feed views like AbstractItemView.
Index
Properties
Methods
Extends
Properties
isNull
readonlyisNull:boolean
Whether the underlying native model object has been destroyed.
onChanged
readonlyonChanged:signal0<void>
Signal fired when the model's overall layout or contents change.
onDataChanged
readonlyonDataChanged:signal3<ModelIndex,ModelIndex,number[],void>
Signal fired when data in a contiguous range of cells changes, carrying the top-left and bottom-right indices and the affected roles.
onModelReset
readonlyonModelReset:signal0<void>
Signal fired when the model is reset and views must re-read all data.
onRowsInserted
readonlyonRowsInserted:signal3<ModelIndex,number,number,void>
Signal fired after rows have been inserted under a parent, carrying the parent index and the inserted row range.
onRowsRemoved
readonlyonRowsRemoved:signal3<ModelIndex,number,number,void>
Signal fired after rows have been removed under a parent, carrying the parent index and the removed row range.
Methods
columnCount()
columnCount(
parent):number
Override that returns the number of columns under the given parent index.
Parameters
| Parameter | Type |
|---|---|
parent | ModelIndex |
Returns
number
data()
data(
index,role):any
Override that returns the value at the given index for the given role (for example display or decoration).
Parameters
| Parameter | Type |
|---|---|
index | ModelIndex |
role | number |
Returns
any
flags()
flags(
index):number
Override that returns the ItemFlag bitmask describing the cell's interactive capabilities.
Parameters
| Parameter | Type |
|---|---|
index | ModelIndex |
Returns
number
getTypeName()
staticgetTypeName():string
Returns the type name of this class.
Returns
string
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
headerData()
headerData(
section,orientation,role):any
Override that returns the header value for the given section, orientation, and role.
Parameters
| Parameter | Type |
|---|---|
section | number |
orientation | Orientation |
role | number |
Returns
any
index()
index(
row,column,parent):ModelIndex
Override that constructs a ModelIndex for the cell at the given row and column under the given parent.
Parameters
| Parameter | Type |
|---|---|
row | number |
column | number |
parent | ModelIndex |
Returns
isOfType()
isOfType(
type):boolean
Returns true if the object is of the specified type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object refers to the same instance as the given object.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
roleNames()
roleNames():
any
Override that returns the mapping from numeric role identifiers to role name strings used by views.
Returns
any
rowCount()
rowCount(
parent):number
Override that returns the number of rows under the given parent index.
Parameters
| Parameter | Type |
|---|---|
parent | ModelIndex |
Returns
number