Skip to main content

DiskMap

Struct DiskMap 

Source
pub struct DiskMap { /* private fields */ }
Expand description

A painted proportional disk-usage overview.

Implementations§

Source§

impl DiskMap

Source

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

Source

pub fn set_visible(&self, visible: bool)

Show or hide the widget.

Source

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.

Source

pub fn is_visible(&self) -> bool

Whether the widget is currently visible on screen.

Source

pub fn width(&self) -> i32

The widget’s current width in pixels.

Source

pub fn height(&self) -> i32

The widget’s current height in pixels.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for DiskMap

Source§

fn clone(&self) -> DiskMap

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl IntoWidget for DiskMap

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.