Struct qt_core::q_locale::NumberOption
source · pub struct NumberOption(/* private fields */);
Expand description
This enum defines a set of options for number-to-string and string-to-number conversions. They can be retrieved with numberOptions() and set with setNumberOptions().
C++ enum: QLocale::NumberOption
.
This enum defines a set of options for number-to-string and string-to-number conversions. They can be retrieved with numberOptions() and set with setNumberOptions().
The NumberOptions type is a typedef for QFlags<NumberOption>. It stores an OR combination of NumberOption values.
See also setNumberOptions() and numberOptions().
Implementations§
source§impl NumberOption
impl NumberOption
sourcepub const DefaultNumberOptions: NumberOption = _
pub const DefaultNumberOptions: NumberOption = _
This option represents the default behavior, with group separators, with one leading zero in single digit exponents, and without trailing zeroes after the decimal dot. (C++ enum variant: DefaultNumberOptions = 0
)
sourcepub const OmitGroupSeparator: NumberOption = _
pub const OmitGroupSeparator: NumberOption = _
If this option is set, the number-to-string functions will not insert group separators in their return values. The default is to insert group separators. (C++ enum variant: OmitGroupSeparator = 1
)
sourcepub const RejectGroupSeparator: NumberOption = _
pub const RejectGroupSeparator: NumberOption = _
If this option is set, the string-to-number functions will fail if they encounter group separators in their input. The default is to accept numbers containing correctly placed group separators. (C++ enum variant: RejectGroupSeparator = 2
)
sourcepub const OmitLeadingZeroInExponent: NumberOption = _
pub const OmitLeadingZeroInExponent: NumberOption = _
If this option is set, the number-to-string functions will not pad exponents with zeroes when printing floating point numbers in scientific notation. The default is to add one leading zero to single digit exponents. (C++ enum variant: OmitLeadingZeroInExponent = 4
)
sourcepub const RejectLeadingZeroInExponent: NumberOption = _
pub const RejectLeadingZeroInExponent: NumberOption = _
If this option is set, the string-to-number functions will fail if they encounter an exponent padded with zeroes when parsing a floating point number in scientific notation. The default is to accept such padding. (C++ enum variant: RejectLeadingZeroInExponent = 8
)
sourcepub const IncludeTrailingZeroesAfterDot: NumberOption = _
pub const IncludeTrailingZeroesAfterDot: NumberOption = _
If this option is set, the number-to-string functions will pad numbers with zeroes to the requested precision in “g” or “most concise” mode, even if the number of significant digits is lower than the requested precision. The default is to omit trailing zeroes. (C++ enum variant: IncludeTrailingZeroesAfterDot = 16
)
sourcepub const RejectTrailingZeroesAfterDot: NumberOption = _
pub const RejectTrailingZeroesAfterDot: NumberOption = _
If this option is set, the string-to-number functions will fail if they encounter trailing zeroes after the decimal dot when parsing a number in scientific or decimal representation. The default is to accept trailing zeroes. (C++ enum variant: RejectTrailingZeroesAfterDot = 32
)
Trait Implementations§
source§impl<T: Into<QFlags<NumberOption>>> BitOr<T> for NumberOption
impl<T: Into<QFlags<NumberOption>>> BitOr<T> for NumberOption
§type Output = QFlags<NumberOption>
type Output = QFlags<NumberOption>
|
operator.source§impl Clone for NumberOption
impl Clone for NumberOption
source§fn clone(&self) -> NumberOption
fn clone(&self) -> NumberOption
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NumberOption
impl Debug for NumberOption
source§impl From<NumberOption> for QFlags<NumberOption>
impl From<NumberOption> for QFlags<NumberOption>
source§fn from(value: NumberOption) -> Self
fn from(value: NumberOption) -> Self
source§impl From<NumberOption> for c_int
impl From<NumberOption> for c_int
source§fn from(value: NumberOption) -> Self
fn from(value: NumberOption) -> Self
source§impl From<i32> for NumberOption
impl From<i32> for NumberOption
source§impl PartialEq for NumberOption
impl PartialEq for NumberOption
source§fn eq(&self, other: &NumberOption) -> bool
fn eq(&self, other: &NumberOption) -> bool
self
and other
values to be equal, and is used
by ==
.