[−][src]Struct qt_gui::QTextLength
The QTextLength class encapsulates the different types of length used in a QTextDocument.
C++ class: QTextLength
.
The QTextLength class encapsulates the different types of length used in a QTextDocument.
When we specify a value for the length of an element in a text document, we often need to provide some other information so that the length is used in the way we expect. For example, when we specify a table width, the value can represent a fixed number of pixels, or it can be a percentage value. This information changes both the meaning of the value and the way it is used.
Generally, this class is used to specify table widths. These can be specified either as a fixed amount of pixels, as a percentage of the containing frame's width, or by a variable width that allows it to take up just the space it requires.
Methods
impl QTextLength
[src]
pub unsafe fn copy_from(
&mut self,
other: impl CastInto<Ref<QTextLength>>
) -> MutRef<QTextLength>
[src]
&mut self,
other: impl CastInto<Ref<QTextLength>>
) -> MutRef<QTextLength>
The QTextLength class encapsulates the different types of length used in a QTextDocument.
Calls C++ function: QTextLength& QTextLength::operator=(const QTextLength& other)
.
The QTextLength class encapsulates the different types of length used in a QTextDocument.
When we specify a value for the length of an element in a text document, we often need to provide some other information so that the length is used in the way we expect. For example, when we specify a table width, the value can represent a fixed number of pixels, or it can be a percentage value. This information changes both the meaning of the value and the way it is used.
Generally, this class is used to specify table widths. These can be specified either as a fixed amount of pixels, as a percentage of the containing frame's width, or by a variable width that allows it to take up just the space it requires.
pub unsafe fn new_0a() -> CppBox<QTextLength>
[src]
Constructs a new length object which represents a variable size.
Calls C++ function: [constructor] void QTextLength::QTextLength()
.
Constructs a new length object which represents a variable size.
pub unsafe fn new_2a(type_: Type, value: c_double) -> CppBox<QTextLength>
[src]
Constructs a new length object of the given type and value.
Calls C++ function: [constructor] void QTextLength::QTextLength(QTextLength::Type type, double value)
.
Constructs a new length object of the given type and value.
pub unsafe fn new_copy(
other: impl CastInto<Ref<QTextLength>>
) -> CppBox<QTextLength>
[src]
other: impl CastInto<Ref<QTextLength>>
) -> CppBox<QTextLength>
The QTextLength class encapsulates the different types of length used in a QTextDocument.
Calls C++ function: [constructor] void QTextLength::QTextLength(const QTextLength& other)
.
The QTextLength class encapsulates the different types of length used in a QTextDocument.
When we specify a value for the length of an element in a text document, we often need to provide some other information so that the length is used in the way we expect. For example, when we specify a table width, the value can represent a fixed number of pixels, or it can be a percentage value. This information changes both the meaning of the value and the way it is used.
Generally, this class is used to specify table widths. These can be specified either as a fixed amount of pixels, as a percentage of the containing frame's width, or by a variable width that allows it to take up just the space it requires.
pub unsafe fn raw_value(&self) -> c_double
[src]
Returns the constraint value that is specific for the type of the length. If the length is QTextLength::PercentageLength then the raw value is in percent, in the range of 0 to 100. If the length is QTextLength::FixedLength then that fixed amount is returned. For variable lengths, zero is returned.
Calls C++ function: double QTextLength::rawValue() const
.
Returns the constraint value that is specific for the type of the length. If the length is QTextLength::PercentageLength then the raw value is in percent, in the range of 0 to 100. If the length is QTextLength::FixedLength then that fixed amount is returned. For variable lengths, zero is returned.
pub unsafe fn to_q_variant(&self) -> CppBox<QVariant>
[src]
Returns the text length as a QVariant
Calls C++ function: QVariant QTextLength::operator QVariant() const
.
Returns the text length as a QVariant
pub unsafe fn type_(&self) -> Type
[src]
Returns the type of this length object.
Calls C++ function: QTextLength::Type QTextLength::type() const
.
Returns the type of this length object.
See also QTextLength::Type.
pub unsafe fn value(&self, maximum_length: c_double) -> c_double
[src]
Returns the effective length, constrained by the type of the length object and the specified maximumLength.
Calls C++ function: double QTextLength::value(double maximumLength) const
.
Returns the effective length, constrained by the type of the length object and the specified maximumLength.
See also type().
Trait Implementations
impl CppDeletable for QTextLength
[src]
unsafe fn delete(&mut self)
[src]
The QTextLength class encapsulates the different types of length used in a QTextDocument.
Calls C++ function: [destructor] void QTextLength::~QTextLength()
.
The QTextLength class encapsulates the different types of length used in a QTextDocument.
When we specify a value for the length of an element in a text document, we often need to provide some other information so that the length is used in the way we expect. For example, when we specify a table width, the value can represent a fixed number of pixels, or it can be a percentage value. This information changes both the meaning of the value and the way it is used.
Generally, this class is used to specify table widths. These can be specified either as a fixed amount of pixels, as a percentage of the containing frame's width, or by a variable width that allows it to take up just the space it requires.
impl PartialEq<Ref<QTextLength>> for QTextLength
[src]
fn eq(&self, other: &Ref<QTextLength>) -> bool
[src]
Returns true
if this text length is the same as the other text length.
Calls C++ function: bool QTextLength::operator==(const QTextLength& other) const
.
Returns true
if this text length is the same as the other text length.
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for QTextLength
impl Send for QTextLength
impl Sync for QTextLength
impl Unpin for QTextLength
impl UnwindSafe for QTextLength
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,