mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 22:31:14 +00:00
Rename ModelHandle to SharedModel
This patch is mostly a rename now, but also contains a few small cleanups. SharedModel implements the Model trait itself and gracefully falls back to an empty model is no Model was provided. This allows for some small simplifications. Also make sure to use the same comparision for SharedModels everywhere. This fixes the last remaining clippy errors we had.
This commit is contained in:
parent
afb3f269c1
commit
018c1a6666
22 changed files with 88 additions and 112 deletions
|
@ -181,7 +181,7 @@ The follow table summarizes the entire mapping:
|
|||
| `duration` | `i64` | At run-time, durations are always represented as signed 64-bit integers with millisecond precision. |
|
||||
| `angle` | `f32` | The value in degrees |
|
||||
| structure | `struct` of the same name | |
|
||||
| array | [`ModelHandle`] | |
|
||||
| array | [`ModelRc`] | |
|
||||
|
||||
For user defined structures in the .60, an extra struct is generated.
|
||||
For example, if the `.60` contains
|
||||
|
@ -233,7 +233,7 @@ pub use sixtyfps_corelib::graphics::{
|
|||
Brush, Color, Image, LoadImageError, Rgb8Pixel, Rgba8Pixel, RgbaColor, SharedPixelBuffer,
|
||||
};
|
||||
pub use sixtyfps_corelib::model::{
|
||||
Model, ModelHandle, ModelNotify, ModelPeer, ModelTracker, StandardListViewItem, VecModel,
|
||||
Model, ModelNotify, ModelPeer, ModelRc, ModelTracker, StandardListViewItem, VecModel,
|
||||
};
|
||||
pub use sixtyfps_corelib::sharedvector::SharedVector;
|
||||
pub use sixtyfps_corelib::string::SharedString;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue