Struct bitcoin_qt::BitcoinUnits
source · pub struct BitcoinUnits { /* private fields */ }
Expand description
| Bitcoin unit definitions. Encapsulates | parsing and formatting and serves as | list model for drop-down selection | boxes. |
Implementations§
source§impl BitcoinUnits
impl BitcoinUnits
pub fn new(parent: *mut u32) -> Self
pub fn available_units(&mut self) -> QList<Unit>
pub fn valid(&mut self, unit: i32) -> bool
pub fn long_name(&mut self, unit: i32) -> String
pub fn short_name(&mut self, unit: i32) -> String
pub fn description(&mut self, unit: i32) -> String
pub fn factor(&mut self, unit: i32) -> i64
pub fn decimals(&mut self, unit: i32) -> i32
pub fn format( &mut self, unit: i32, n_in: &Amount, plus: bool, separators: SeparatorStyle, justify: bool ) -> String
sourcepub fn format_with_unit(
&mut self,
unit: i32,
amount: &Amount,
plussign: bool,
separators: SeparatorStyle
) -> String
pub fn format_with_unit( &mut self, unit: i32, amount: &Amount, plussign: bool, separators: SeparatorStyle ) -> String
| NOTE: Using formatWithUnit in an HTML context | risks wrapping quantities at the thousands | separator. More subtly, it also results in | a standard space rather than a thin space, due | to a bug in Qt’s XML whitespace | canonicalisation | | Please take care to use formatHtmlWithUnit | instead, when appropriate.
pub fn format_html_with_unit( &mut self, unit: i32, amount: &Amount, plussign: bool, separators: SeparatorStyle ) -> String
pub fn format_with_privacy( &mut self, unit: i32, amount: &Amount, separators: SeparatorStyle, privacy: bool ) -> String
pub fn parse(&mut self, unit: i32, value: &String, val_out: *mut Amount) -> bool
sourcepub fn get_amount_column_title(&mut self, unit: i32) -> String
pub fn get_amount_column_title(&mut self, unit: i32) -> String
| Gets title for amount column including | current display unit if optionsModel | reference available |
pub fn row_count(&self, parent: &QModelIndex) -> i32
pub fn data(&self, index: &QModelIndex, role: i32) -> u32
pub fn max_money(&mut self) -> Amount
Auto Trait Implementations§
impl RefUnwindSafe for BitcoinUnits
impl Send for BitcoinUnits
impl Sync for BitcoinUnits
impl Unpin for BitcoinUnits
impl UnwindSafe for BitcoinUnits
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more