[−][src]Struct qt_widgets::QGraphicsAnchor
The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.
C++ class: QGraphicsAnchor
.
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(
&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 QGraphicsAnchor::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* QGraphicsAnchor::qt_metacast(const char* arg1)
.
pub unsafe fn set_size_policy(&mut self, policy: Policy)
[src]
This property holds the size policy for the QGraphicsAnchor.
Calls C++ function: void QGraphicsAnchor::setSizePolicy(QSizePolicy::Policy policy)
.
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(&mut self, spacing: c_double)
[src]
This property holds the preferred space between items in the QGraphicsAnchorLayout.
Calls C++ function: void QGraphicsAnchor::setSpacing(double spacing)
.
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
.
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
.
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: 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 QGraphicsAnchor::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 QGraphicsAnchor::trUtf8(const char* s, const char* c, int n)
.
pub unsafe fn unset_spacing(&mut self)
[src]
This property holds the preferred space between items in the QGraphicsAnchorLayout.
Calls C++ function: void QGraphicsAnchor::unsetSpacing()
.
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 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 DerefMut for QGraphicsAnchor
[src]
fn deref_mut(&mut self) -> &mut QObject
[src]
Calls C++ function: QObject* static_cast<QObject*>(QGraphicsAnchor* 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)
.
unsafe fn static_upcast_mut(ptr: MutPtr<QGraphicsAnchor>) -> MutPtr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QGraphicsAnchor* 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)
.
unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QGraphicsAnchor>
[src]
Calls C++ function: QGraphicsAnchor* static_cast<QGraphicsAnchor*>(QObject* 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)
.
unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QGraphicsAnchor>
[src]
Calls C++ function: QGraphicsAnchor* dynamic_cast<QGraphicsAnchor*>(QObject* ptr)
.
impl CppDeletable for QGraphicsAnchor
[src]
unsafe fn delete(&mut self)
[src]
Removes the QGraphicsAnchor object from the layout and destroys it.
Calls C++ function: virtual [destructor] void QGraphicsAnchor::~QGraphicsAnchor()
.
Removes the QGraphicsAnchor object from the layout and destroys it.
Auto Trait Implementations
impl Send for QGraphicsAnchor
impl Unpin for QGraphicsAnchor
impl Sync for QGraphicsAnchor
impl UnwindSafe for QGraphicsAnchor
impl RefUnwindSafe for QGraphicsAnchor
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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>,
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>,