[][src]Struct qt_widgets::QGraphicsEllipseItem

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

The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.

C++ class: QGraphicsEllipseItem.

C++ documentation:

The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.

QGraphicsEllipseItem respresents an ellipse with a fill and an outline, and you can also use it for ellipse segments (see startAngle(), spanAngle()).

To set the item's ellipse, pass a QRectF to QGraphicsEllipseItem's constructor, or call setRect(). The rect() function returns the current ellipse geometry.

QGraphicsEllipseItem uses the rect and the pen width to provide a reasonable implementation of boundingRect(), shape(), and contains(). The paint() function draws the ellipse using the item's associated pen and brush, which you can set by calling setPen() and setBrush().

Methods

impl QGraphicsEllipseItem[src]

pub unsafe fn bounding_rect(&self) -> CppBox<QRectF>[src]

Reimplemented from QGraphicsItem::boundingRect().

Calls C++ function: virtual QRectF QGraphicsEllipseItem::boundingRect() const.

C++ documentation:

Reimplemented from QGraphicsItem::boundingRect().

pub unsafe fn contains(&self, point: impl CastInto<Ref<QPointF>>) -> bool[src]

Reimplemented from QGraphicsItem::contains().

Calls C++ function: virtual bool QGraphicsEllipseItem::contains(const QPointF& point) const.

C++ documentation:

Reimplemented from QGraphicsItem::contains().

pub unsafe fn is_obscured_by(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>
) -> bool
[src]

Reimplemented from QGraphicsItem::isObscuredBy().

Calls C++ function: virtual bool QGraphicsEllipseItem::isObscuredBy(const QGraphicsItem* item) const.

C++ documentation:

Reimplemented from QGraphicsItem::isObscuredBy().

pub unsafe fn from_q_graphics_item(
    parent: impl CastInto<MutPtr<QGraphicsItem>>
) -> CppBox<QGraphicsEllipseItem>
[src]

Constructs a QGraphicsEllipseItem. parent is passed to QAbstractGraphicsShapeItem's constructor.

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

C++ documentation:

Constructs a QGraphicsEllipseItem. parent is passed to QAbstractGraphicsShapeItem's constructor.

See also QGraphicsScene::addItem().

pub unsafe fn from_q_rect_f_q_graphics_item(
    rect: impl CastInto<Ref<QRectF>>,
    parent: impl CastInto<MutPtr<QGraphicsItem>>
) -> CppBox<QGraphicsEllipseItem>
[src]

Constructs a QGraphicsEllipseItem using rect as the default rectangle. parent is passed to QAbstractGraphicsShapeItem's constructor.

Calls C++ function: [constructor] void QGraphicsEllipseItem::QGraphicsEllipseItem(const QRectF& rect, QGraphicsItem* parent = …).

C++ documentation:

Constructs a QGraphicsEllipseItem using rect as the default rectangle. parent is passed to QAbstractGraphicsShapeItem's constructor.

See also QGraphicsScene::addItem().

pub unsafe fn from_4_double_q_graphics_item(
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double,
    parent: impl CastInto<MutPtr<QGraphicsItem>>
) -> CppBox<QGraphicsEllipseItem>
[src]

Constructs a QGraphicsEllipseItem using the rectangle defined by (x, y) and the given width and height, as the default rectangle. parent is passed to QAbstractGraphicsShapeItem's constructor.

Calls C++ function: [constructor] void QGraphicsEllipseItem::QGraphicsEllipseItem(double x, double y, double w, double h, QGraphicsItem* parent = …).

C++ documentation:

Constructs a QGraphicsEllipseItem using the rectangle defined by (x, y) and the given width and height, as the default rectangle. parent is passed to QAbstractGraphicsShapeItem's constructor.

This function was introduced in Qt 4.3.

See also QGraphicsScene::addItem().

pub unsafe fn new() -> CppBox<QGraphicsEllipseItem>[src]

The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.

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

C++ documentation:

The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.

QGraphicsEllipseItem respresents an ellipse with a fill and an outline, and you can also use it for ellipse segments (see startAngle(), spanAngle()).

To set the item's ellipse, pass a QRectF to QGraphicsEllipseItem's constructor, or call setRect(). The rect() function returns the current ellipse geometry.

QGraphicsEllipseItem uses the rect and the pen width to provide a reasonable implementation of boundingRect(), shape(), and contains(). The paint() function draws the ellipse using the item's associated pen and brush, which you can set by calling setPen() and setBrush().

pub unsafe fn from_q_rect_f(
    rect: impl CastInto<Ref<QRectF>>
) -> CppBox<QGraphicsEllipseItem>
[src]

Constructs a QGraphicsEllipseItem using rect as the default rectangle. parent is passed to QAbstractGraphicsShapeItem's constructor.

Calls C++ function: [constructor] void QGraphicsEllipseItem::QGraphicsEllipseItem(const QRectF& rect).

C++ documentation:

Constructs a QGraphicsEllipseItem using rect as the default rectangle. parent is passed to QAbstractGraphicsShapeItem's constructor.

See also QGraphicsScene::addItem().

pub unsafe fn from_4_double(
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
) -> CppBox<QGraphicsEllipseItem>
[src]

Constructs a QGraphicsEllipseItem using the rectangle defined by (x, y) and the given width and height, as the default rectangle. parent is passed to QAbstractGraphicsShapeItem's constructor.

Calls C++ function: [constructor] void QGraphicsEllipseItem::QGraphicsEllipseItem(double x, double y, double w, double h).

C++ documentation:

Constructs a QGraphicsEllipseItem using the rectangle defined by (x, y) and the given width and height, as the default rectangle. parent is passed to QAbstractGraphicsShapeItem's constructor.

This function was introduced in Qt 4.3.

See also QGraphicsScene::addItem().

pub unsafe fn opaque_area(&self) -> CppBox<QPainterPath>[src]

Reimplemented from QGraphicsItem::opaqueArea().

Calls C++ function: virtual QPainterPath QGraphicsEllipseItem::opaqueArea() const.

C++ documentation:

Reimplemented from QGraphicsItem::opaqueArea().

pub unsafe fn paint_3a(
    &mut self,
    painter: impl CastInto<MutPtr<QPainter>>,
    option: impl CastInto<Ptr<QStyleOptionGraphicsItem>>,
    widget: impl CastInto<MutPtr<QWidget>>
)
[src]

Reimplemented from QGraphicsItem::paint().

Calls C++ function: virtual void QGraphicsEllipseItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = …).

C++ documentation:

Reimplemented from QGraphicsItem::paint().

pub unsafe fn paint_2a(
    &mut self,
    painter: impl CastInto<MutPtr<QPainter>>,
    option: impl CastInto<Ptr<QStyleOptionGraphicsItem>>
)
[src]

Reimplemented from QGraphicsItem::paint().

Calls C++ function: virtual void QGraphicsEllipseItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option).

C++ documentation:

Reimplemented from QGraphicsItem::paint().

pub unsafe fn rect(&self) -> CppBox<QRectF>[src]

Returns the item's ellipse geometry as a QRectF.

Calls C++ function: QRectF QGraphicsEllipseItem::rect() const.

C++ documentation:

Returns the item's ellipse geometry as a QRectF.

See also setRect() and QPainter::drawEllipse().

pub unsafe fn set_rect_1a(&mut self, rect: impl CastInto<Ref<QRectF>>)[src]

Sets the item's ellipse geometry to rect. The rectangle's left edge defines the left edge of the ellipse, and the rectangle's top edge describes the top of the ellipse. The height and width of the rectangle describe the height and width of the ellipse.

Calls C++ function: void QGraphicsEllipseItem::setRect(const QRectF& rect).

C++ documentation:

Sets the item's ellipse geometry to rect. The rectangle's left edge defines the left edge of the ellipse, and the rectangle's top edge describes the top of the ellipse. The height and width of the rectangle describe the height and width of the ellipse.

See also rect() and QPainter::drawEllipse().

pub unsafe fn set_rect_4a(
    &mut self,
    x: c_double,
    y: c_double,
    w: c_double,
    h: c_double
)
[src]

Sets the item's rectangle to the rectangle defined by (x, y) and the given width and height.

Calls C++ function: void QGraphicsEllipseItem::setRect(double x, double y, double w, double h).

C++ documentation:

Sets the item's rectangle to the rectangle defined by (x, y) and the given width and height.

This convenience function is equivalent to calling setRect(QRectF(x, y, width, height))

See also rect().

pub unsafe fn set_span_angle(&mut self, angle: c_int)[src]

Sets the span angle for an ellipse segment to angle, which is in 16ths of a degree. This angle is used together with startAngle() to represent an ellipse segment (a pie). By default, the span angle is 5760 (360 * 16, a full ellipse).

Calls C++ function: void QGraphicsEllipseItem::setSpanAngle(int angle).

C++ documentation:

Sets the span angle for an ellipse segment to angle, which is in 16ths of a degree. This angle is used together with startAngle() to represent an ellipse segment (a pie). By default, the span angle is 5760 (360 * 16, a full ellipse).

See also spanAngle(), setStartAngle(), and QPainter::drawPie().

pub unsafe fn set_start_angle(&mut self, angle: c_int)[src]

Sets the start angle for an ellipse segment to angle, which is in 16ths of a degree. This angle is used together with spanAngle() for representing an ellipse segment (a pie). By default, the start angle is 0.

Calls C++ function: void QGraphicsEllipseItem::setStartAngle(int angle).

C++ documentation:

Sets the start angle for an ellipse segment to angle, which is in 16ths of a degree. This angle is used together with spanAngle() for representing an ellipse segment (a pie). By default, the start angle is 0.

See also startAngle(), setSpanAngle(), and QPainter::drawPie().

pub unsafe fn shape(&self) -> CppBox<QPainterPath>[src]

Reimplemented from QGraphicsItem::shape().

Calls C++ function: virtual QPainterPath QGraphicsEllipseItem::shape() const.

C++ documentation:

Reimplemented from QGraphicsItem::shape().

pub unsafe fn span_angle(&self) -> c_int[src]

Returns the span angle of an ellipse segment in 16ths of a degree. This angle is used together with startAngle() for representing an ellipse segment (a pie). By default, this function returns 5760 (360 * 16, a full ellipse).

Calls C++ function: int QGraphicsEllipseItem::spanAngle() const.

C++ documentation:

Returns the span angle of an ellipse segment in 16ths of a degree. This angle is used together with startAngle() for representing an ellipse segment (a pie). By default, this function returns 5760 (360 * 16, a full ellipse).

See also setSpanAngle() and startAngle().

pub unsafe fn start_angle(&self) -> c_int[src]

Returns the start angle for an ellipse segment in 16ths of a degree. This angle is used together with spanAngle() for representing an ellipse segment (a pie). By default, the start angle is 0.

Calls C++ function: int QGraphicsEllipseItem::startAngle() const.

C++ documentation:

Returns the start angle for an ellipse segment in 16ths of a degree. This angle is used together with spanAngle() for representing an ellipse segment (a pie). By default, the start angle is 0.

See also setStartAngle() and spanAngle().

pub unsafe fn type_(&self) -> c_int[src]

Reimplemented from QGraphicsItem::type().

Calls C++ function: virtual int QGraphicsEllipseItem::type() const.

C++ documentation:

Reimplemented from QGraphicsItem::type().

Methods from Deref<Target = QAbstractGraphicsShapeItem>

pub unsafe fn brush(&self) -> CppBox<QBrush>[src]

Returns the item's brush, or an empty brush if no brush has been set.

Calls C++ function: QBrush QAbstractGraphicsShapeItem::brush() const.

C++ documentation:

Returns the item's brush, or an empty brush if no brush has been set.

See also setBrush().

pub unsafe fn is_obscured_by(
    &self,
    item: impl CastInto<Ptr<QGraphicsItem>>
) -> bool
[src]

Reimplemented from QGraphicsItem::isObscuredBy().

Calls C++ function: virtual bool QAbstractGraphicsShapeItem::isObscuredBy(const QGraphicsItem* item) const.

C++ documentation:

Reimplemented from QGraphicsItem::isObscuredBy().

pub unsafe fn opaque_area(&self) -> CppBox<QPainterPath>[src]

Reimplemented from QGraphicsItem::opaqueArea().

Calls C++ function: virtual QPainterPath QAbstractGraphicsShapeItem::opaqueArea() const.

C++ documentation:

Reimplemented from QGraphicsItem::opaqueArea().

pub unsafe fn pen(&self) -> CppBox<QPen>[src]

Returns the item's pen. If no pen has been set, this function returns QPen(), a default black solid line pen with 1 width.

Calls C++ function: QPen QAbstractGraphicsShapeItem::pen() const.

C++ documentation:

Returns the item's pen. If no pen has been set, this function returns QPen(), a default black solid line pen with 1 width.

See also setPen().

pub unsafe fn set_brush(&mut self, brush: impl CastInto<Ref<QBrush>>)[src]

Sets the item's brush to brush.

Calls C++ function: void QAbstractGraphicsShapeItem::setBrush(const QBrush& brush).

C++ documentation:

Sets the item's brush to brush.

The item's brush is used to fill the item.

If you use a brush with a QGradient, the gradient is relative to the item's coordinate system.

See also brush().

pub unsafe fn set_pen(&mut self, pen: impl CastInto<Ref<QPen>>)[src]

Sets the pen for this item to pen.

Calls C++ function: void QAbstractGraphicsShapeItem::setPen(const QPen& pen).

C++ documentation:

Sets the pen for this item to pen.

The pen is used to draw the item's outline.

See also pen().

Trait Implementations

impl CppDeletable for QGraphicsEllipseItem[src]

unsafe fn delete(&mut self)[src]

Destroys the QGraphicsEllipseItem.

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

C++ documentation:

Destroys the QGraphicsEllipseItem.

impl Deref for QGraphicsEllipseItem[src]

type Target = QAbstractGraphicsShapeItem

The resulting type after dereferencing.

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

Calls C++ function: QAbstractGraphicsShapeItem* static_cast<QAbstractGraphicsShapeItem*>(QGraphicsEllipseItem* ptr).

impl DerefMut for QGraphicsEllipseItem[src]

fn deref_mut(&mut self) -> &mut QAbstractGraphicsShapeItem[src]

Calls C++ function: QAbstractGraphicsShapeItem* static_cast<QAbstractGraphicsShapeItem*>(QGraphicsEllipseItem* ptr).

impl DynamicCast<QGraphicsEllipseItem> for QAbstractGraphicsShapeItem[src]

unsafe fn dynamic_cast(
    ptr: Ptr<QAbstractGraphicsShapeItem>
) -> Ptr<QGraphicsEllipseItem>
[src]

Calls C++ function: QGraphicsEllipseItem* dynamic_cast<QGraphicsEllipseItem*>(QAbstractGraphicsShapeItem* ptr).

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QAbstractGraphicsShapeItem>
) -> MutPtr<QGraphicsEllipseItem>
[src]

Calls C++ function: QGraphicsEllipseItem* dynamic_cast<QGraphicsEllipseItem*>(QAbstractGraphicsShapeItem* ptr).

impl DynamicCast<QGraphicsEllipseItem> for QGraphicsItem[src]

unsafe fn dynamic_cast(ptr: Ptr<QGraphicsItem>) -> Ptr<QGraphicsEllipseItem>[src]

Calls C++ function: QGraphicsEllipseItem* dynamic_cast<QGraphicsEllipseItem*>(QGraphicsItem* ptr).

unsafe fn dynamic_cast_mut(
    ptr: MutPtr<QGraphicsItem>
) -> MutPtr<QGraphicsEllipseItem>
[src]

Calls C++ function: QGraphicsEllipseItem* dynamic_cast<QGraphicsEllipseItem*>(QGraphicsItem* ptr).

impl StaticDowncast<QGraphicsEllipseItem> for QAbstractGraphicsShapeItem[src]

unsafe fn static_downcast(
    ptr: Ptr<QAbstractGraphicsShapeItem>
) -> Ptr<QGraphicsEllipseItem>
[src]

Calls C++ function: QGraphicsEllipseItem* static_cast<QGraphicsEllipseItem*>(QAbstractGraphicsShapeItem* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QAbstractGraphicsShapeItem>
) -> MutPtr<QGraphicsEllipseItem>
[src]

Calls C++ function: QGraphicsEllipseItem* static_cast<QGraphicsEllipseItem*>(QAbstractGraphicsShapeItem* ptr).

impl StaticDowncast<QGraphicsEllipseItem> for QGraphicsItem[src]

unsafe fn static_downcast(ptr: Ptr<QGraphicsItem>) -> Ptr<QGraphicsEllipseItem>[src]

Calls C++ function: QGraphicsEllipseItem* static_cast<QGraphicsEllipseItem*>(QGraphicsItem* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QGraphicsItem>
) -> MutPtr<QGraphicsEllipseItem>
[src]

Calls C++ function: QGraphicsEllipseItem* static_cast<QGraphicsEllipseItem*>(QGraphicsItem* ptr).

impl StaticUpcast<QAbstractGraphicsShapeItem> for QGraphicsEllipseItem[src]

unsafe fn static_upcast(
    ptr: Ptr<QGraphicsEllipseItem>
) -> Ptr<QAbstractGraphicsShapeItem>
[src]

Calls C++ function: QAbstractGraphicsShapeItem* static_cast<QAbstractGraphicsShapeItem*>(QGraphicsEllipseItem* ptr).

unsafe fn static_upcast_mut(
    ptr: MutPtr<QGraphicsEllipseItem>
) -> MutPtr<QAbstractGraphicsShapeItem>
[src]

Calls C++ function: QAbstractGraphicsShapeItem* static_cast<QAbstractGraphicsShapeItem*>(QGraphicsEllipseItem* ptr).

impl StaticUpcast<QGraphicsItem> for QGraphicsEllipseItem[src]

unsafe fn static_upcast(ptr: Ptr<QGraphicsEllipseItem>) -> Ptr<QGraphicsItem>[src]

Calls C++ function: QGraphicsItem* static_cast<QGraphicsItem*>(QGraphicsEllipseItem* ptr).

unsafe fn static_upcast_mut(
    ptr: MutPtr<QGraphicsEllipseItem>
) -> MutPtr<QGraphicsItem>
[src]

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