Skip to main content

QPen

Struct QPen 

Source
pub struct QPen { /* private fields */ }
Expand description

C++ class: QPen.

Implementations§

Source§

impl QPen

Source

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

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

Source

pub unsafe fn cap_style(&self) -> PenCapStyle

Calls C++ function: Qt::PenCapStyle QPen::capStyle() const.

Source

pub unsafe fn color(&self) -> CppBox<QColor>

Calls C++ function: QColor QPen::color() const.

Source

pub unsafe fn copy_from(&self, pen: impl CastInto<Ref<QPen>>) -> Ref<QPen>

Calls C++ function: QPen& QPen::operator=(const QPen& pen).

Source

pub unsafe fn dash_offset(&self) -> c_double

Calls C++ function: double QPen::dashOffset() const.

Source

pub unsafe fn dash_pattern(&self) -> CppBox<QVectorOfDouble>

Calls C++ function: QVector<double> QPen::dashPattern() const.

Source

pub unsafe fn is_cosmetic(&self) -> bool

Calls C++ function: bool QPen::isCosmetic() const.

Source

pub unsafe fn is_detached(&self) -> bool

Calls C++ function: bool QPen::isDetached().

Source

pub unsafe fn is_solid(&self) -> bool

Calls C++ function: bool QPen::isSolid() const.

Source

pub unsafe fn join_style(&self) -> PenJoinStyle

Calls C++ function: Qt::PenJoinStyle QPen::joinStyle() const.

Source

pub unsafe fn miter_limit(&self) -> c_double

Calls C++ function: double QPen::miterLimit() const.

Source

pub unsafe fn new() -> CppBox<QPen>

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

Source

pub unsafe fn from_pen_style(arg1: PenStyle) -> CppBox<QPen>

Calls C++ function: [constructor] void QPen::QPen(Qt::PenStyle arg1).

Source

pub unsafe fn from_q_color(color: impl CastInto<Ref<QColor>>) -> CppBox<QPen>

Calls C++ function: [constructor] void QPen::QPen(const QColor& color).

Source

pub unsafe fn from_q_brush_double_pen_style_pen_cap_style_pen_join_style( brush: impl CastInto<Ref<QBrush>>, width: c_double, s: PenStyle, c: PenCapStyle, j: PenJoinStyle, ) -> CppBox<QPen>

Calls C++ function: [constructor] void QPen::QPen(const QBrush& brush, double width, Qt::PenStyle s = …, Qt::PenCapStyle c = …, Qt::PenJoinStyle j = …).

Source

pub unsafe fn from_q_brush_double_pen_style_pen_cap_style( brush: impl CastInto<Ref<QBrush>>, width: c_double, s: PenStyle, c: PenCapStyle, ) -> CppBox<QPen>

Calls C++ function: [constructor] void QPen::QPen(const QBrush& brush, double width, Qt::PenStyle s = …, Qt::PenCapStyle c = …).

Source

pub unsafe fn from_q_brush_double_pen_style( brush: impl CastInto<Ref<QBrush>>, width: c_double, s: PenStyle, ) -> CppBox<QPen>

Calls C++ function: [constructor] void QPen::QPen(const QBrush& brush, double width, Qt::PenStyle s = …).

Source

pub unsafe fn from_q_brush_double( brush: impl CastInto<Ref<QBrush>>, width: c_double, ) -> CppBox<QPen>

Calls C++ function: [constructor] void QPen::QPen(const QBrush& brush, double width).

Source

pub unsafe fn new_copy(pen: impl CastInto<Ref<QPen>>) -> CppBox<QPen>

Calls C++ function: [constructor] void QPen::QPen(const QPen& pen).

Source

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

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

Source

pub unsafe fn set_cap_style(&self, pcs: PenCapStyle)

Calls C++ function: void QPen::setCapStyle(Qt::PenCapStyle pcs).

Source

pub unsafe fn set_color(&self, color: impl CastInto<Ref<QColor>>)

Calls C++ function: void QPen::setColor(const QColor& color).

Source

pub unsafe fn set_cosmetic(&self, cosmetic: bool)

Calls C++ function: void QPen::setCosmetic(bool cosmetic).

Source

pub unsafe fn set_dash_offset(&self, doffset: c_double)

Calls C++ function: void QPen::setDashOffset(double doffset).

Source

pub unsafe fn set_dash_pattern( &self, pattern: impl CastInto<Ref<QVectorOfDouble>>, )

Calls C++ function: void QPen::setDashPattern(const QVector<double>& pattern).

Source

pub unsafe fn set_join_style(&self, pcs: PenJoinStyle)

Calls C++ function: void QPen::setJoinStyle(Qt::PenJoinStyle pcs).

Source

pub unsafe fn set_miter_limit(&self, limit: c_double)

Calls C++ function: void QPen::setMiterLimit(double limit).

Source

pub unsafe fn set_style(&self, arg1: PenStyle)

Calls C++ function: void QPen::setStyle(Qt::PenStyle arg1).

Source

pub unsafe fn set_width(&self, width: c_int)

Calls C++ function: void QPen::setWidth(int width).

Source

pub unsafe fn set_width_f(&self, width: c_double)

Calls C++ function: void QPen::setWidthF(double width).

Source

pub unsafe fn style(&self) -> PenStyle

Calls C++ function: Qt::PenStyle QPen::style() const.

Source

pub unsafe fn swap(&self, other: impl CastInto<Ref<QPen>>)

Calls C++ function: void QPen::swap(QPen& other).

Source

pub unsafe fn to_q_variant(&self) -> CppBox<QVariant>

Calls C++ function: QVariant QPen::operator QVariant() const.

Source

pub unsafe fn width(&self) -> c_int

Calls C++ function: int QPen::width() const.

Source

pub unsafe fn width_f(&self) -> c_double

Calls C++ function: double QPen::widthF() const.

Trait Implementations§

Source§

impl CppDeletable for QPen

Source§

unsafe fn delete(&self)

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

Source§

impl PartialEq<Ref<QPen>> for QPen

Source§

fn eq(&self, p: &Ref<QPen>) -> bool

Calls C++ function: bool QPen::operator==(const QPen& p) const.

1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl Freeze for QPen

§

impl RefUnwindSafe for QPen

§

impl Send for QPen

§

impl Sync for QPen

§

impl Unpin for QPen

§

impl UnsafeUnpin for QPen

§

impl UnwindSafe for QPen

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> StaticUpcast<T> for T

Source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.