Skip to main content

Crate yse_ui

Crate yse_ui 

Source
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::button;
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 a move closure), avoiding let 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.
ButtonView
A push-button description.
CheckBox
A retained two-state checkbox widget.
CheckBoxView
A checkbox description.
Column
A vertical column of widgets.
ComboBox
A retained drop-down selection widget.
ComboBoxView
A combo-box description.
DateEdit
A Qt calendar date editor with a popup calendar.
DateTimeEdit
A retained local date-and-time editor.
DiskMap
A painted proportional disk-usage overview.
FileDialog
A non-modal “open file” dialog whose selection arrives on a stream.
Grid
A grid layout.
Label
A retained text label widget.
LabelView
A declarative label description.
LayoutView
A row or column whose children are mounted in tuple order.
LineChart
A lightweight painted chart for one or more line series.
LineEdit
A retained single-line text editor.
LineEditView
A single-line text input description.
ListView
A retained list view backed by a StringListModel.
Menu
A menu of actions.
MenuBar
A menu bar attached to a window.
MessageBox
A non-modal message box whose result arrives on a stream.
ProgressBar
A retained progress indicator widget.
ProgressBarView
A progress-bar description.
QtGuiScheduler
A Scheduler that runs tasks on the Qt event loop, i.e. the GUI thread. Use this as the delivery target for yse_model::spawn_task.
QtTimer
A yse_model::Timer backed by Qt’s event loop, so delayed tasks run on the GUI thread. Use it to drive debounce/throttle/delay operators in a live application; yse_model::ManualTimer is 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.
SliderView
A horizontal slider description.
SpacerView
A stretchable empty item that consumes spare layout space.
SpinBox
A retained integer spin-box widget.
SpinBoxView
A numeric spinner description.
StackedWidget
A stack of pages where exactly one is visible at a time; pages are built with crate::Ui.
StringListModel
A string list model that drives a Qt QListView incrementally.
StringTableModel
A string table model that drives a Qt QTableView incrementally.
TabWidget
A retained container that switches between labelled pages.
TableView
A QTableView bound to a StringTableModel.
TimeEdit
A Qt time editor with dedicated hour and minute spin controls.
ToolBar
A toolbar attached to a window.
TreeModel
A tree model whose rows are supplied as flat (parent, cells, icon) rows; group/root rows use parent == -1, children point at their parent’s flat row.
TreeView
A QTreeView bound to a TreeModel.
Ui
A scoped builder for a retained Qt widget tree.
Window
A top-level Qt Widgets window and root ownership scope.

Enums§

MessageBoxButtons
Standard button combinations for a MessageBox.
MessageBoxResult
The button a MessageBox was closed with.
TextAlign
Horizontal text alignment for a model column.

Traits§

IntoBoolValue
Convert a boolean or Signal<bool> into a reactive property.
IntoIntValue
Convert an i32, Signal<i32>, or Var<i32> into a reactive property.
IntoTextValue
Convert a static string or a Signal<String> into a reactive property.
IntoWidget
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).