[−][src]Struct qt_widgets::QGraphicsScale
The QGraphicsScale class provides a scale transformation.
C++ class: QGraphicsScale
.
The QGraphicsScale class provides a scale transformation.
QGraphicsScene provides certain parameters to help control how the scale should be applied.
The origin is the point that the item is scaled from (i.e., it stays fixed relative to the parent as the rest of the item grows). By default the origin is QPointF(0, 0).
The parameters xScale, yScale, and zScale describe the scale factors to apply in horizontal, vertical, and depth directions. They can take on any value, including 0 (to collapse the item to a point) or negative value. A negative xScale value will mirror the item horizontally. A negative yScale value will flip the item vertically. A negative zScale will flip the item end for end.
Methods
impl QGraphicsScale
[src]
pub fn origin_changed(&self) -> Signal<()>
[src]
QGraphicsScale emits this signal when its origin changes.
Returns a built-in Qt signal QGraphicsScale::originChanged
that can be passed to qt_core::Signal::connect
.
QGraphicsScale emits this signal when its origin changes.
Note: Notifier signal for property origin.
See also QGraphicsScale::origin.
pub fn x_scale_changed(&self) -> Signal<()>
[src]
This signal is emitted whenever the xScale property changes.
Returns a built-in Qt signal QGraphicsScale::xScaleChanged
that can be passed to qt_core::Signal::connect
.
pub fn y_scale_changed(&self) -> Signal<()>
[src]
This signal is emitted whenever the yScale property changes.
Returns a built-in Qt signal QGraphicsScale::yScaleChanged
that can be passed to qt_core::Signal::connect
.
pub fn z_scale_changed(&self) -> Signal<()>
[src]
This signal is emitted whenever the zScale property changes.
Returns a built-in Qt signal QGraphicsScale::zScaleChanged
that can be passed to qt_core::Signal::connect
.
pub fn scale_changed(&self) -> Signal<()>
[src]
This signal is emitted whenever the xScale, yScale, or zScale of the object changes.
Returns a built-in Qt signal QGraphicsScale::scaleChanged
that can be passed to qt_core::Signal::connect
.
This signal is emitted whenever the xScale, yScale, or zScale of the object changes.
See also QGraphicsScale::xScale, QGraphicsScale::yScale, and QGraphicsScale::zScale.
pub unsafe fn apply_to(&self, matrix: impl CastInto<MutPtr<QMatrix4X4>>)
[src]
Reimplemented from QGraphicsTransform::applyTo().
Calls C++ function: virtual void QGraphicsScale::applyTo(QMatrix4x4* matrix) const
.
Reimplemented from QGraphicsTransform::applyTo().
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QGraphicsScale::metaObject() const
.
pub unsafe fn new_1a(
parent: impl CastInto<MutPtr<QObject>>
) -> CppBox<QGraphicsScale>
[src]
parent: impl CastInto<MutPtr<QObject>>
) -> CppBox<QGraphicsScale>
Constructs an empty QGraphicsScale object with the given parent.
Calls C++ function: [constructor] void QGraphicsScale::QGraphicsScale(QObject* parent = …)
.
Constructs an empty QGraphicsScale object with the given parent.
pub unsafe fn new_0a() -> CppBox<QGraphicsScale>
[src]
The QGraphicsScale class provides a scale transformation.
Calls C++ function: [constructor] void QGraphicsScale::QGraphicsScale()
.
The QGraphicsScale class provides a scale transformation.
QGraphicsScene provides certain parameters to help control how the scale should be applied.
The origin is the point that the item is scaled from (i.e., it stays fixed relative to the parent as the rest of the item grows). By default the origin is QPointF(0, 0).
The parameters xScale, yScale, and zScale describe the scale factors to apply in horizontal, vertical, and depth directions. They can take on any value, including 0 (to collapse the item to a point) or negative value. A negative xScale value will mirror the item horizontally. A negative yScale value will flip the item vertically. A negative zScale will flip the item end for end.
pub unsafe fn origin(&self) -> CppBox<QVector3D>
[src]
This property holds the origin of the scale in 3D space.
Calls C++ function: QVector3D QGraphicsScale::origin() const
.
This property holds the origin of the scale in 3D space.
All scaling will be done relative to this point (i.e., this point will stay fixed, relative to the parent, when the item is scaled).
Access functions:
QVector3D | origin() const |
void | setOrigin(const QVector3D &point) |
Notifier signal:
void | originChanged() |
pub unsafe fn qt_metacall(
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
Calls C++ function: virtual int QGraphicsScale::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
Calls C++ function: virtual void* QGraphicsScale::qt_metacast(const char* arg1)
.
pub unsafe fn set_origin(&mut self, point: impl CastInto<Ref<QVector3D>>)
[src]
This property holds the origin of the scale in 3D space.
Calls C++ function: void QGraphicsScale::setOrigin(const QVector3D& point)
.
This property holds the origin of the scale in 3D space.
All scaling will be done relative to this point (i.e., this point will stay fixed, relative to the parent, when the item is scaled).
Access functions:
QVector3D | origin() const |
void | setOrigin(const QVector3D &point) |
Notifier signal:
void | originChanged() |
pub unsafe fn set_x_scale(&mut self, arg1: c_double)
[src]
This property holds the horizontal scale factor.
Calls C++ function: void QGraphicsScale::setXScale(double arg1)
.
This property holds the horizontal scale factor.
The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be mirrored horizontally around its origin.
Access functions:
qreal | xScale() const |
void | setXScale(qreal) |
Notifier signal:
void | xScaleChanged() |
pub unsafe fn set_y_scale(&mut self, arg1: c_double)
[src]
This property holds the vertical scale factor.
Calls C++ function: void QGraphicsScale::setYScale(double arg1)
.
This property holds the vertical scale factor.
The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be flipped vertically around its origin.
Access functions:
qreal | yScale() const |
void | setYScale(qreal) |
Notifier signal:
void | yScaleChanged() |
pub unsafe fn set_z_scale(&mut self, arg1: c_double)
[src]
This property holds the depth scale factor.
Calls C++ function: void QGraphicsScale::setZScale(double arg1)
.
This property holds the depth scale factor.
The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be flipped end for end around its origin.
Access functions:
qreal | zScale() const |
void | setZScale(qreal) |
Notifier signal:
void | zScaleChanged() |
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
Returns a reference to the staticMetaObject
field.
pub unsafe fn tr(
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QGraphicsScale::tr(const char* s, const char* c, int n)
.
pub unsafe fn tr_utf8(
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QGraphicsScale::trUtf8(const char* s, const char* c, int n)
.
pub unsafe fn x_scale(&self) -> c_double
[src]
This property holds the horizontal scale factor.
Calls C++ function: double QGraphicsScale::xScale() const
.
This property holds the horizontal scale factor.
The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be mirrored horizontally around its origin.
Access functions:
qreal | xScale() const |
void | setXScale(qreal) |
Notifier signal:
void | xScaleChanged() |
pub unsafe fn y_scale(&self) -> c_double
[src]
This property holds the vertical scale factor.
Calls C++ function: double QGraphicsScale::yScale() const
.
This property holds the vertical scale factor.
The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be flipped vertically around its origin.
Access functions:
qreal | yScale() const |
void | setYScale(qreal) |
Notifier signal:
void | yScaleChanged() |
pub unsafe fn z_scale(&self) -> c_double
[src]
This property holds the depth scale factor.
Calls C++ function: double QGraphicsScale::zScale() const
.
This property holds the depth scale factor.
The scale factor can be any real number; the default value is 1.0. If you set the factor to 0.0, the item will be collapsed to a single point. If you provide a negative value, the item will be flipped end for end around its origin.
Access functions:
qreal | zScale() const |
void | setZScale(qreal) |
Notifier signal:
void | zScaleChanged() |
Methods from Deref<Target = QGraphicsTransform>
pub fn slot_update(&self) -> Receiver<()>
[src]
Notifies that this transform operation has changed its parameters in such a way that applyTo() will return a different result than before.
Returns a built-in Qt slot QGraphicsTransform::update
that can be passed to qt_core::Signal::connect
.
Notifies that this transform operation has changed its parameters in such a way that applyTo() will return a different result than before.
When implementing you own custom graphics transform, you must call this function every time you change a parameter, to let QGraphicsItem know that its transformation needs to be updated.
See also applyTo().
pub unsafe fn apply_to(&self, matrix: impl CastInto<MutPtr<QMatrix4X4>>)
[src]
This pure virtual method has to be reimplemented in derived classes.
Calls C++ function: pure virtual void QGraphicsTransform::applyTo(QMatrix4x4* matrix) const
.
This pure virtual method has to be reimplemented in derived classes.
It applies this transformation to matrix.
See also QGraphicsItem::transform() and QMatrix4x4::toTransform().
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QGraphicsTransform::metaObject() const
.
pub unsafe fn qt_metacall(
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
Calls C++ function: virtual int QGraphicsTransform::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
Calls C++ function: virtual void* QGraphicsTransform::qt_metacast(const char* arg1)
.
Trait Implementations
impl Deref for QGraphicsScale
[src]
type Target = QGraphicsTransform
The resulting type after dereferencing.
fn deref(&self) -> &QGraphicsTransform
[src]
Calls C++ function: QGraphicsTransform* static_cast<QGraphicsTransform*>(QGraphicsScale* ptr)
.
impl DerefMut for QGraphicsScale
[src]
fn deref_mut(&mut self) -> &mut QGraphicsTransform
[src]
Calls C++ function: QGraphicsTransform* static_cast<QGraphicsTransform*>(QGraphicsScale* ptr)
.
impl StaticUpcast<QGraphicsTransform> for QGraphicsScale
[src]
unsafe fn static_upcast(ptr: Ptr<QGraphicsScale>) -> Ptr<QGraphicsTransform>
[src]
Calls C++ function: QGraphicsTransform* static_cast<QGraphicsTransform*>(QGraphicsScale* ptr)
.
unsafe fn static_upcast_mut(
ptr: MutPtr<QGraphicsScale>
) -> MutPtr<QGraphicsTransform>
[src]
ptr: MutPtr<QGraphicsScale>
) -> MutPtr<QGraphicsTransform>
Calls C++ function: QGraphicsTransform* static_cast<QGraphicsTransform*>(QGraphicsScale* ptr)
.
impl StaticUpcast<QObject> for QGraphicsScale
[src]
unsafe fn static_upcast(ptr: Ptr<QGraphicsScale>) -> Ptr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QGraphicsScale* ptr)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QGraphicsScale>) -> MutPtr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QGraphicsScale* ptr)
.
impl StaticDowncast<QGraphicsScale> for QGraphicsTransform
[src]
unsafe fn static_downcast(ptr: Ptr<QGraphicsTransform>) -> Ptr<QGraphicsScale>
[src]
Calls C++ function: QGraphicsScale* static_cast<QGraphicsScale*>(QGraphicsTransform* ptr)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QGraphicsTransform>
) -> MutPtr<QGraphicsScale>
[src]
ptr: MutPtr<QGraphicsTransform>
) -> MutPtr<QGraphicsScale>
Calls C++ function: QGraphicsScale* static_cast<QGraphicsScale*>(QGraphicsTransform* ptr)
.
impl StaticDowncast<QGraphicsScale> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QGraphicsScale>
[src]
Calls C++ function: QGraphicsScale* static_cast<QGraphicsScale*>(QObject* ptr)
.
unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QGraphicsScale>
[src]
Calls C++ function: QGraphicsScale* static_cast<QGraphicsScale*>(QObject* ptr)
.
impl DynamicCast<QGraphicsScale> for QGraphicsTransform
[src]
unsafe fn dynamic_cast(ptr: Ptr<QGraphicsTransform>) -> Ptr<QGraphicsScale>
[src]
Calls C++ function: QGraphicsScale* dynamic_cast<QGraphicsScale*>(QGraphicsTransform* ptr)
.
unsafe fn dynamic_cast_mut(
ptr: MutPtr<QGraphicsTransform>
) -> MutPtr<QGraphicsScale>
[src]
ptr: MutPtr<QGraphicsTransform>
) -> MutPtr<QGraphicsScale>
Calls C++ function: QGraphicsScale* dynamic_cast<QGraphicsScale*>(QGraphicsTransform* ptr)
.
impl DynamicCast<QGraphicsScale> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QGraphicsScale>
[src]
Calls C++ function: QGraphicsScale* dynamic_cast<QGraphicsScale*>(QObject* ptr)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QGraphicsScale>
[src]
Calls C++ function: QGraphicsScale* dynamic_cast<QGraphicsScale*>(QObject* ptr)
.
impl CppDeletable for QGraphicsScale
[src]
Auto Trait Implementations
impl Send for QGraphicsScale
impl Sync for QGraphicsScale
impl Unpin for QGraphicsScale
impl RefUnwindSafe for QGraphicsScale
impl UnwindSafe for QGraphicsScale
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,