[][src]Struct qt_widgets::QGraphicsScale

#[repr(C)]pub struct QGraphicsScale { /* fields omitted */ }

The QGraphicsScale class provides a scale transformation.

C++ class: QGraphicsScale.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

This signal is emitted whenever the xScale property changes.

This function was introduced in Qt 4.7.

Note: Notifier signal for property xScale.

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.

C++ documentation:

This signal is emitted whenever the yScale property changes.

This function was introduced in Qt 4.7.

Note: Notifier signal for property yScale.

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.

C++ documentation:

This signal is emitted whenever the zScale property changes.

This function was introduced in Qt 4.7.

Note: Notifier signal for property zScale.

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.

C++ documentation:

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<Ptr<QMatrix4X4>>)[src]

Reimplemented from QGraphicsTransform::applyTo().

Calls C++ function: virtual void QGraphicsScale::applyTo(QMatrix4x4* matrix) const.

C++ documentation:

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<Ptr<QObject>>
) -> QBox<QGraphicsScale>
[src]

Constructs an empty QGraphicsScale object with the given parent.

Calls C++ function: [constructor] void QGraphicsScale::QGraphicsScale(QObject* parent = …).

C++ documentation:

Constructs an empty QGraphicsScale object with the given parent.

pub unsafe fn new_0a() -> QBox<QGraphicsScale>[src]

The QGraphicsScale class provides a scale transformation.

Calls C++ function: [constructor] void QGraphicsScale::QGraphicsScale().

C++ documentation:

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.

C++ documentation:

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()

See also xScale, yScale, and zScale.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QGraphicsScale::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QGraphicsScale::qt_metacast(const char* arg1).

pub unsafe fn set_origin(&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).

C++ documentation:

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()

See also xScale, yScale, and zScale.

pub unsafe fn set_x_scale(&self, arg1: c_double)[src]

This property holds the horizontal scale factor.

Calls C++ function: void QGraphicsScale::setXScale(double arg1).

C++ documentation:

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()

See also yScale, zScale, and origin.

pub unsafe fn set_y_scale(&self, arg1: c_double)[src]

This property holds the vertical scale factor.

Calls C++ function: void QGraphicsScale::setYScale(double arg1).

C++ documentation:

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()

See also xScale, zScale, and origin.

pub unsafe fn set_z_scale(&self, arg1: c_double)[src]

This property holds the depth scale factor.

Calls C++ function: void QGraphicsScale::setZScale(double arg1).

C++ documentation:

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()

See also xScale, yScale, and origin.

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QGraphicsScale::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

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.

C++ documentation:

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()

See also yScale, zScale, and origin.

pub unsafe fn y_scale(&self) -> c_double[src]

This property holds the vertical scale factor.

Calls C++ function: double QGraphicsScale::yScale() const.

C++ documentation:

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()

See also xScale, zScale, and origin.

pub unsafe fn z_scale(&self) -> c_double[src]

This property holds the depth scale factor.

Calls C++ function: double QGraphicsScale::zScale() const.

C++ documentation:

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()

See also xScale, yScale, and origin.

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.

C++ documentation:

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<Ptr<QMatrix4X4>>)[src]

This pure virtual method has to be reimplemented in derived classes.

Calls C++ function: pure virtual void QGraphicsTransform::applyTo(QMatrix4x4* matrix) const.

C++ documentation:

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(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QGraphicsTransform::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QGraphicsTransform::qt_metacast(const char* arg1).

Trait Implementations

impl CppDeletable for QGraphicsScale[src]

unsafe fn delete(&self)[src]

Destroys the graphics scale.

Calls C++ function: virtual [destructor] void QGraphicsScale::~QGraphicsScale().

C++ documentation:

Destroys the graphics scale.

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 DynamicCast<QGraphicsScale> for QGraphicsTransform[src]

unsafe fn dynamic_cast(ptr: Ptr<QGraphicsTransform>) -> Ptr<QGraphicsScale>[src]

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).

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).

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).

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).

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).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.