[][src]Struct qt_widgets::QGraphicsAnchor

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

The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.

C++ class: QGraphicsAnchor.

C++ documentation:

The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.

The graphics anchor provides an API that enables you to query and manipulate the properties an anchor has. When an anchor is added to the layout with QGraphicsAnchorLayout::addAnchor(), a QGraphicsAnchor instance is returned where the properties are initialized to their default values. The properties can then be further changed, and they will be picked up the next time the layout is activated.

Methods

impl QGraphicsAnchor[src]

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QGraphicsAnchor::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 QGraphicsAnchor::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* QGraphicsAnchor::qt_metacast(const char* arg1).

pub unsafe fn set_size_policy(&self, policy: Policy)[src]

This property holds the size policy for the QGraphicsAnchor.

Calls C++ function: void QGraphicsAnchor::setSizePolicy(QSizePolicy::Policy policy).

C++ documentation:

This property holds the size policy for the QGraphicsAnchor.

By setting the size policy on an anchor you can configure how the anchor can resize itself from its preferred spacing. For instance, if the anchor has the size policy QSizePolicy::Minimum, the spacing is the minimum size of the anchor. However, its size can grow up to the anchors maximum size. If the default size policy is QSizePolicy::Fixed, the anchor can neither grow or shrink, which means that the only size the anchor can have is the spacing. QSizePolicy::Fixed is the default size policy. QGraphicsAnchor always has a minimum spacing of 0 and a very large maximum spacing.

Access functions:

QSizePolicy::Policy sizePolicy() const
void setSizePolicy(QSizePolicy::Policy policy)

See also QGraphicsAnchor::spacing.

pub unsafe fn set_spacing(&self, spacing: c_double)[src]

This property holds the preferred space between items in the QGraphicsAnchorLayout.

Calls C++ function: void QGraphicsAnchor::setSpacing(double spacing).

C++ documentation:

This property holds the preferred space between items in the QGraphicsAnchorLayout.

Depending on the anchor type, the default spacing is either 0 or a value returned from the style.

Access functions:

qreal spacing() const
void setSpacing(qreal spacing)
void unsetSpacing()

See also QGraphicsAnchorLayout::addAnchor().

pub unsafe fn size_policy(&self) -> Policy[src]

This property holds the size policy for the QGraphicsAnchor.

Calls C++ function: QSizePolicy::Policy QGraphicsAnchor::sizePolicy() const.

C++ documentation:

This property holds the size policy for the QGraphicsAnchor.

By setting the size policy on an anchor you can configure how the anchor can resize itself from its preferred spacing. For instance, if the anchor has the size policy QSizePolicy::Minimum, the spacing is the minimum size of the anchor. However, its size can grow up to the anchors maximum size. If the default size policy is QSizePolicy::Fixed, the anchor can neither grow or shrink, which means that the only size the anchor can have is the spacing. QSizePolicy::Fixed is the default size policy. QGraphicsAnchor always has a minimum spacing of 0 and a very large maximum spacing.

Access functions:

QSizePolicy::Policy sizePolicy() const
void setSizePolicy(QSizePolicy::Policy policy)

See also QGraphicsAnchor::spacing.

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

This property holds the preferred space between items in the QGraphicsAnchorLayout.

Calls C++ function: double QGraphicsAnchor::spacing() const.

C++ documentation:

This property holds the preferred space between items in the QGraphicsAnchorLayout.

Depending on the anchor type, the default spacing is either 0 or a value returned from the style.

Access functions:

qreal spacing() const
void setSpacing(qreal spacing)
void unsetSpacing()

See also QGraphicsAnchorLayout::addAnchor().

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 QGraphicsAnchor::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 QGraphicsAnchor::trUtf8(const char* s, const char* c, int n).

pub unsafe fn unset_spacing(&self)[src]

This property holds the preferred space between items in the QGraphicsAnchorLayout.

Calls C++ function: void QGraphicsAnchor::unsetSpacing().

C++ documentation:

This property holds the preferred space between items in the QGraphicsAnchorLayout.

Depending on the anchor type, the default spacing is either 0 or a value returned from the style.

Access functions:

qreal spacing() const
void setSpacing(qreal spacing)
void unsetSpacing()

See also QGraphicsAnchorLayout::addAnchor().

Trait Implementations

impl CppDeletable for QGraphicsAnchor[src]

unsafe fn delete(&self)[src]

Removes the QGraphicsAnchor object from the layout and destroys it.

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

C++ documentation:

Removes the QGraphicsAnchor object from the layout and destroys it.

impl Deref for QGraphicsAnchor[src]

type Target = QObject

The resulting type after dereferencing.

fn deref(&self) -> &QObject[src]

Calls C++ function: QObject* static_cast<QObject*>(QGraphicsAnchor* ptr).

impl DynamicCast<QGraphicsAnchor> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QGraphicsAnchor>[src]

Calls C++ function: QGraphicsAnchor* dynamic_cast<QGraphicsAnchor*>(QObject* ptr).

impl StaticDowncast<QGraphicsAnchor> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QGraphicsAnchor>[src]

Calls C++ function: QGraphicsAnchor* static_cast<QGraphicsAnchor*>(QObject* ptr).

impl StaticUpcast<QObject> for QGraphicsAnchor[src]

unsafe fn static_upcast(ptr: Ptr<QGraphicsAnchor>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QGraphicsAnchor* 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.