QPoint

The QPoint class defines a point in the plane using integer precision.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

+ new QPoint(): QPoint

Overrides Component.constructor

Returns: QPoint

+ new QPoint(nativeElement: NativeElement): QPoint

Overrides Component.constructor

Parameters:

NameType
nativeElementNativeElement

Returns: QPoint

+ new QPoint(x?: undefined | number, y?: undefined | number): QPoint

Overrides Component.constructor

Parameters:

NameType
x?undefined | number
y?undefined | number

Returns: QPoint

Properties

native

• native: NativeElement

Overrides Component.native


nodeChildren

• nodeChildren: Set‹Component›

Inherited from Component.nodeChildren


Optional nodeParent

• nodeParent? : Component

Inherited from Component.nodeParent

Methods

isNull

â–¸ isNull(): boolean

Returns true if both the x and y coordinates are set to 0.0 (ignoring the sign); otherwise returns false.

Returns: boolean


manhattanLength

â–¸ manhattanLength(): number

Returns the sum of the absolute values of x() and y(), traditionally known as the "Manhattan length" of the vector from the origin to the point.

Returns: number


setNodeParent

â–¸ setNodeParent(parent?: Component): void

Inherited from Component.setNodeParent

Parameters:

NameType
parent?Component

Returns: void


setX

â–¸ setX(value: number): void

Parameters:

NameType
valuenumber

Returns: void


setY

â–¸ setY(value: number): void

Parameters:

NameType
valuenumber

Returns: void


transposed

â–¸ transposed(): QPoint

Returns a point with x and y coordinates exchanged

Returns: QPoint


x

â–¸ x(): number

Returns: number


y

â–¸ y(): number

Returns: number


Static fromQVariant

â–¸ fromQVariant(variant: QVariant): QPoint

Parameters:

NameType
variantQVariant

Returns: QPoint