Expand description
yse-ui binds yse_model to a retained Qt Widgets tree.
Components are plain Rust wrappers around a small hand-written C++ shim.
Every component owns its subscriptions through an Owner that is tied to
the Qt object lifetime: when the widget is destroyed, all of its bindings
are released automatically.
Re-exports§
pub use dsl::ButtonView;pub use dsl::CheckBoxView;pub use dsl::ComboBoxView;pub use dsl::IntoBoolValue;pub use dsl::IntoIntValue;pub use dsl::IntoTextValue;pub use dsl::LabelView;pub use dsl::LayoutView;pub use dsl::LineEditView;pub use dsl::ProgressBarView;pub use dsl::SliderView;pub use dsl::SpacerView;pub use dsl::SpinBoxView;pub use dsl::Ui;pub use dsl::View;pub use dsl::checkbox;pub use dsl::column;pub use dsl::combo_box;pub use dsl::label;pub use dsl::line_edit;pub use dsl::progress_bar;pub use dsl::row;pub use dsl::slider;pub use dsl::spacer;pub use dsl::spin_box;
Macros§
- clone
- Clone each named binding and move the clones into
body(typically amoveclosure), avoidinglet x = x.clone();boilerplate.
Structs§
- Action
- A retained command that can appear in menus or toolbars.
- Application
- The Qt application object. Must be created before any window.
- Button
- A retained push-button widget.
- Button
View - A push-button description.
- Check
Box - A retained two-state checkbox widget.
- Check
BoxView - A checkbox description.
- Column
- A vertical column of widgets.
- Combo
Box - A retained drop-down selection widget.
- Combo
BoxView - A combo-box description.
- Date
Edit - A Qt calendar date editor with a popup calendar.
- Date
Time Edit - A retained local date-and-time editor.
- DiskMap
- A painted proportional disk-usage overview.
- File
Dialog - A non-modal “open file” dialog whose selection arrives on a stream.
- Grid
- A grid layout.
- Label
- A retained text label widget.
- Label
View - A declarative label description.
- Layout
View - A row or column whose children are mounted in tuple order.
- Line
Chart - A lightweight painted chart for one or more line series.
- Line
Edit - A retained single-line text editor.
- Line
Edit View - A single-line text input description.
- List
View - A retained list view backed by a
StringListModel. - Menu
- A menu of actions.
- MenuBar
- A menu bar attached to a window.
- Message
Box - A non-modal message box whose result arrives on a stream.
- Progress
Bar - A retained progress indicator widget.
- Progress
BarView - A progress-bar description.
- QtGui
Scheduler - A
Schedulerthat runs tasks on the Qt event loop, i.e. the GUI thread. Use this as the delivery target foryse_model::spawn_task. - QtTimer
- A
yse_model::Timerbacked by Qt’s event loop, so delayed tasks run on the GUI thread. Use it to drivedebounce/throttle/delayoperators in a live application;yse_model::ManualTimeris the deterministic equivalent for tests. - Row
- A retained horizontal box layout.
- Settings
- A cloneable handle to an application-scoped Qt settings store.
- Slider
- A retained integer slider widget.
- Slider
View - A horizontal slider description.
- Spacer
View - A stretchable empty item that consumes spare layout space.
- SpinBox
- A retained integer spin-box widget.
- Spin
BoxView - A numeric spinner description.
- Stacked
Widget - A stack of pages where exactly one is visible at a time; pages are built
with
crate::Ui. - String
List Model - A string list model that drives a Qt
QListViewincrementally. - String
Table Model - A string table model that drives a Qt
QTableViewincrementally. - TabWidget
- A retained container that switches between labelled pages.
- Table
View - A
QTableViewbound to aStringTableModel. - Time
Edit - A Qt time editor with dedicated hour and minute spin controls.
- ToolBar
- A toolbar attached to a window.
- Tree
Model - A tree model whose rows are supplied as flat
(parent, cells, icon)rows; group/root rows useparent == -1, children point at their parent’s flat row. - Tree
View - A
QTreeViewbound to aTreeModel. - Ui
- A scoped builder for a retained Qt widget tree.
- Window
- A top-level Qt Widgets window and root ownership scope.
Enums§
- Message
BoxButtons - Standard button combinations for a
MessageBox. - Message
BoxResult - The button a
MessageBoxwas closed with. - Text
Align - Horizontal text alignment for a model column.
Traits§
- Into
Bool Value - Convert a boolean or
Signal<bool>into a reactive property. - Into
IntValue - Convert an
i32,Signal<i32>, orVar<i32>into a reactive property. - Into
Text Value - Convert a static string or a
Signal<String>into a reactive property. - Into
Widget - Common access implemented by every retained widget wrapper.
- View
- A retained widget description that can be mounted into a window.
Functions§
- button
- Describe a push button.
- checkbox
- Describe a checkbox.
- column
- Describe a vertical layout.
- combo_
box - Describe a combo box with the given item labels.
- label
- Describe a label. A
Signal<String>binds reactively. - line_
edit - Describe an uncontrolled text input with an initial value.
- progress_
bar - Describe a progress bar (default range
0..=100). - row
- Describe a horizontal layout.
- slider
- Describe a horizontal slider (default range
0..=100). - spacer
- Describe a stretch spacer.
- spin_
box - Describe a numeric spinner (default range
0..=100).