pub struct DiskMap { /* private fields */ }Expand description
A painted proportional disk-usage overview.
Implementations§
Source§impl DiskMap
impl DiskMap
Sourcepub fn set_segments(
&self,
labels: impl IntoIterator<Item = String>,
shares: impl IntoIterator<Item = f64>,
)
pub fn set_segments( &self, labels: impl IntoIterator<Item = String>, shares: impl IntoIterator<Item = f64>, )
Replace the displayed segments. Shares are percentages and need not add up exactly to 100; the widget normalizes them for display.
Source§impl DiskMap
impl DiskMap
Sourcepub fn set_visible(&self, visible: bool)
pub fn set_visible(&self, visible: bool)
Show or hide the widget.
Sourcepub fn bind_visible(&self, signal: &Signal<bool>)
pub fn bind_visible(&self, signal: &Signal<bool>)
Bind the visibility to a signal. The binding lives in the component’s owner and is released when the widget is destroyed.
Sourcepub fn is_visible(&self) -> bool
pub fn is_visible(&self) -> bool
Whether the widget is currently visible on screen.
Sourcepub fn qobject_ptr(&self) -> *mut Void
pub fn qobject_ptr(&self) -> *mut Void
Escape hatch: the underlying Qt QWidget pointer.
The pointer is valid only while this handle’s Qt object is alive. Do not retain it after destruction or use it from a thread other than the GUI thread. Dereferencing or passing the pointer across FFI remains unsafe.
Sourcepub fn set_style_class(&self, style_class: impl AsRef<str>)
pub fn set_style_class(&self, style_class: impl AsRef<str>)
Set an application-defined style class for scoped Qt style-sheet rules.
This leaves the platform style untouched unless the application supplies
matching rules through crate::Application::set_style_sheet.
Sourcepub fn bind_style_class(&self, signal: &Signal<String>)
pub fn bind_style_class(&self, signal: &Signal<String>)
Bind the style class to a signal, keeping the class derived from state instead of toggled imperatively.