io.qt.core.QLineF Maven / Gradle / Ivy
Show all versions of qtjambi Show documentation
package io.qt.core;
import io.qt.*;
/**
* Two-dimensional vector using floating point precision
* Java wrapper for Qt class QLineF
*/
public class QLineF extends QtObject
implements java.lang.Cloneable
{
static {
QtJambi_LibraryUtilities.initialize();
}
/**
* Java wrapper for Qt enum QLineF::IntersectionType
*/
public enum IntersectionType implements QtEnumerator {
/**
* Representing QLineF:: NoIntersection
*/
NoIntersection(0),
/**
* Representing QLineF:: BoundedIntersection
*/
BoundedIntersection(1),
/**
* Representing QLineF:: UnboundedIntersection
*/
UnboundedIntersection(2);
static {
QtJambi_LibraryUtilities.initialize();
}
private IntersectionType(int value) {
this.value = value;
}
/**
* {@inheritDoc}
*/
@Override
public int value() {
return value;
}
/**
* Returns the corresponding enum entry for the given value.
* @param value
* @return enum entry
*/
public static @NonNull IntersectionType resolve(int value) {
switch (value) {
case 0: return NoIntersection;
case 1: return BoundedIntersection;
case 2: return UnboundedIntersection;
default: throw new QNoSuchEnumValueException(value);
}
}
private final int value;
}
/**
* See QLineF:: QLineF()
*/
public QLineF(){
super((QPrivateConstructor)null);
initialize_native(this);
}
private native static void initialize_native(QLineF instance);
/**
*
*/
public QLineF(io.qt.core.@NonNull QLine line){
super((QPrivateConstructor)null);
initialize_native(this, line);
}
private native static void initialize_native(QLineF instance, io.qt.core.QLine line);
/**
* See QLineF:: QLineF(QLineF)
*/
public QLineF(io.qt.core.@NonNull QLineF other){
super((QPrivateConstructor)null);
initialize_native(this, other);
}
private native static void initialize_native(QLineF instance, io.qt.core.QLineF other);
/**
* See QLineF:: QLineF(QPointF, QPointF)
*/
public QLineF(io.qt.core.@NonNull QPointF pt1, io.qt.core.@NonNull QPointF pt2){
super((QPrivateConstructor)null);
initialize_native(this, pt1, pt2);
}
private native static void initialize_native(QLineF instance, io.qt.core.QPointF pt1, io.qt.core.QPointF pt2);
/**
* See QLineF:: QLineF(qreal, qreal, qreal, qreal)
*/
public QLineF(double x1, double y1, double x2, double y2){
super((QPrivateConstructor)null);
initialize_native(this, x1, y1, x2, y2);
}
private native static void initialize_native(QLineF instance, double x1, double y1, double x2, double y2);
/**
*
*/
@QtUninvokable
public final double angle(){
return angle_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double angle_native_constfct(long __this__nativeId);
/**
* See QLineF:: angleTo(QLineF)const
*/
@QtUninvokable
public final double angleTo(io.qt.core.@NonNull QLineF l){
return angleTo_native_cref_QLineF_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(l));
}
@QtUninvokable
private native double angleTo_native_cref_QLineF_constfct(long __this__nativeId, long l);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QPointF center(){
return center_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QPointF center_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final double dx(){
return dx_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double dx_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final double dy(){
return dy_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double dy_native_constfct(long __this__nativeId);
/**
* See QLineF:: intersects(QLineF, QPointF*)const
*/
@QtUninvokable
public final io.qt.core.QLineF.@NonNull IntersectionType intersects(io.qt.core.@NonNull QLineF l, io.qt.core.@Nullable QPointF intersectionPoint){
return io.qt.core.QLineF.IntersectionType.resolve(intersects_native_cref_QLineF_QPointF_ptr_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(l), QtJambi_LibraryUtilities.internal.checkedNativeId(intersectionPoint)));
}
@QtUninvokable
private native int intersects_native_cref_QLineF_QPointF_ptr_constfct(long __this__nativeId, long l, long intersectionPoint);
/**
*
*/
@QtUninvokable
public final boolean isNull(){
return isNull_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native boolean isNull_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final double length(){
return length_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double length_native_constfct(long __this__nativeId);
/**
* See QLineF:: normalVector()const
*/
@QtUninvokable
public final io.qt.core.@NonNull QLineF normalVector(){
return normalVector_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QLineF normalVector_native_constfct(long __this__nativeId);
/**
* See operator<<(QDataStream&, QLineF)
*/
@QtUninvokable
public void writeTo(io.qt.core.@StrictNonNull QDataStream arg__1){
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
writeTo_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void writeTo_native_ref_QDataStream(long __this__nativeId, long arg__1);
/**
* See QLineF:: operator==(QLineF)const
*/
@QtUninvokable
public final boolean equals(io.qt.core.@NonNull QLineF d){
return equals_native_cref_QLineF_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(d));
}
@QtUninvokable
private native boolean equals_native_cref_QLineF_constfct(long __this__nativeId, long d);
/**
* See operator>>(QDataStream&, QLineF&)
*/
@QtUninvokable
public void readFrom(io.qt.core.@StrictNonNull QDataStream arg__1){
java.util.Objects.requireNonNull(arg__1, "Argument 'arg__1': null not expected.");
readFrom_native_ref_QDataStream(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(arg__1));
}
@QtUninvokable
private native void readFrom_native_ref_QDataStream(long __this__nativeId, long arg__1);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QPointF p1(){
return p1_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QPointF p1_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QPointF p2(){
return p2_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QPointF p2_native_constfct(long __this__nativeId);
/**
* See QLineF:: pointAt(qreal)const
*/
@QtUninvokable
public final io.qt.core.@NonNull QPointF pointAt(double t){
return pointAt_native_qreal_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), t);
}
@QtUninvokable
private native io.qt.core.QPointF pointAt_native_qreal_constfct(long __this__nativeId, double t);
/**
*
*/
@QtUninvokable
public final void setAngle(double angle){
setAngle_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), angle);
}
@QtUninvokable
private native void setAngle_native_qreal(long __this__nativeId, double angle);
/**
*
*/
@QtUninvokable
public final void setLength(double len){
setLength_native_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), len);
}
@QtUninvokable
private native void setLength_native_qreal(long __this__nativeId, double len);
/**
* See QLineF:: setLine(qreal, qreal, qreal, qreal)
*/
@QtUninvokable
public final void setLine(double x1, double y1, double x2, double y2){
setLine_native_qreal_qreal_qreal_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), x1, y1, x2, y2);
}
@QtUninvokable
private native void setLine_native_qreal_qreal_qreal_qreal(long __this__nativeId, double x1, double y1, double x2, double y2);
/**
*
*/
@QtUninvokable
public final void setP1(io.qt.core.@NonNull QPointF p1){
setP1_native_cref_QPointF(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p1));
}
@QtUninvokable
private native void setP1_native_cref_QPointF(long __this__nativeId, long p1);
/**
*
*/
@QtUninvokable
public final void setP2(io.qt.core.@NonNull QPointF p2){
setP2_native_cref_QPointF(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p2));
}
@QtUninvokable
private native void setP2_native_cref_QPointF(long __this__nativeId, long p2);
/**
* See QLineF:: setPoints(QPointF, QPointF)
*/
@QtUninvokable
public final void setPoints(io.qt.core.@NonNull QPointF p1, io.qt.core.@NonNull QPointF p2){
setPoints_native_cref_QPointF_cref_QPointF(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p1), QtJambi_LibraryUtilities.internal.checkedNativeId(p2));
}
@QtUninvokable
private native void setPoints_native_cref_QPointF_cref_QPointF(long __this__nativeId, long p1, long p2);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QLine toLine(){
return toLine_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QLine toLine_native_constfct(long __this__nativeId);
/**
* See QLineF:: translate(QPointF)
*/
@QtUninvokable
public final void translate(io.qt.core.@NonNull QPointF p){
translate_native_cref_QPointF(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p));
}
@QtUninvokable
private native void translate_native_cref_QPointF(long __this__nativeId, long p);
/**
* See QLineF:: translate(qreal, qreal)
*/
@QtUninvokable
public final void translate(double dx, double dy){
translate_native_qreal_qreal(QtJambi_LibraryUtilities.internal.nativeId(this), dx, dy);
}
@QtUninvokable
private native void translate_native_qreal_qreal(long __this__nativeId, double dx, double dy);
/**
* See QLineF:: translated(QPointF)const
*/
@QtUninvokable
public final io.qt.core.@NonNull QLineF translated(io.qt.core.@NonNull QPointF p){
return translated_native_cref_QPointF_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), QtJambi_LibraryUtilities.internal.checkedNativeId(p));
}
@QtUninvokable
private native io.qt.core.QLineF translated_native_cref_QPointF_constfct(long __this__nativeId, long p);
/**
* See QLineF:: translated(qreal, qreal)const
*/
@QtUninvokable
public final io.qt.core.@NonNull QLineF translated(double dx, double dy){
return translated_native_qreal_qreal_constfct(QtJambi_LibraryUtilities.internal.nativeId(this), dx, dy);
}
@QtUninvokable
private native io.qt.core.QLineF translated_native_qreal_qreal_constfct(long __this__nativeId, double dx, double dy);
/**
*
*/
@QtUninvokable
public final io.qt.core.@NonNull QLineF unitVector(){
return unitVector_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native io.qt.core.QLineF unitVector_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final double x1(){
return x1_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double x1_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final double x2(){
return x2_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double x2_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final double y1(){
return y1_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double y1_native_constfct(long __this__nativeId);
/**
*
*/
@QtUninvokable
public final double y2(){
return y2_native_constfct(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native double y2_native_constfct(long __this__nativeId);
/**
* See QLineF:: fromPolar(qreal, qreal)
*/
public native static io.qt.core.@NonNull QLineF fromPolar(double length, double angle);
/**
* Constructor for internal use only.
* @param p expected to be null
.
* @hidden
*/
@NativeAccess
protected QLineF(QPrivateConstructor p) { super(p); }
/**
* See QLineF:: operator==(QLineF)const
*/
@Override
@QtUninvokable
public boolean equals(Object other) {
if (other==null || other instanceof io.qt.core.QLineF) {
return equals((io.qt.core.QLineF) other);
}
return false;
}
/**
* Returns the objects's hash code computed by qHash(QLineF)
.
*/
@QtUninvokable
@Override
public int hashCode() {
return hashCode_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private native static int hashCode_native(long __this_nativeId);
/**
* See operator<<(QDebug, QLineF)
*/
@QtUninvokable
@Override
public @NonNull String toString() {
return toString_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
@QtUninvokable
private static native String toString_native(long __this_nativeId);
/**
* Creates and returns a copy of this object.
See QLineF:: QLineF(QLineF)
*/
@QtUninvokable
@Override
public QLineF clone() {
return clone_native(QtJambi_LibraryUtilities.internal.nativeId(this));
}
private static native QLineF clone_native(long __this_nativeId);
/**
* Overloaded constructor for {@link #QLineF(io.qt.core.QPointF, io.qt.core.QPointF)}.
*/
public QLineF(io.qt.core.@NonNull QPoint pt1, io.qt.core.@NonNull QPointF pt2) {
this(new io.qt.core.QPointF(pt1), pt2);
}
/**
* Overloaded constructor for {@link #QLineF(io.qt.core.QPointF, io.qt.core.QPointF)}.
*/
public QLineF(io.qt.core.@NonNull QPointF pt1, io.qt.core.@NonNull QPoint pt2) {
this(pt1, new io.qt.core.QPointF(pt2));
}
/**
* Overloaded constructor for {@link #QLineF(io.qt.core.QPointF, io.qt.core.QPointF)}.
*/
public QLineF(io.qt.core.@NonNull QPoint pt1, io.qt.core.@NonNull QPoint pt2) {
this(new io.qt.core.QPointF(pt1), new io.qt.core.QPointF(pt2));
}
/**
* Overloaded function for {@link #angleTo(io.qt.core.QLineF)}.
*/
@QtUninvokable
public final double angleTo(io.qt.core.@NonNull QLine l) {
return angleTo(new io.qt.core.QLineF(l));
}
/**
* Overloaded function for {@link #intersects(io.qt.core.QLineF, io.qt.core.QPointF)}
* with intersectionPoint = null
.
*/
@QtUninvokable
public final io.qt.core.QLineF.@NonNull IntersectionType intersects(io.qt.core.@NonNull QLineF l) {
return intersects(l, (io.qt.core.QPointF)null);
}
/**
* Overloaded function for {@link #intersects(io.qt.core.QLine, io.qt.core.QPointF)}
* with intersectionPoint = null
.
*/
@QtUninvokable
public final io.qt.core.QLineF.@NonNull IntersectionType intersects(io.qt.core.@NonNull QLine l) {
return intersects(l, (io.qt.core.QPointF)null);
}
/**
* Overloaded function for {@link #intersects(io.qt.core.QLineF, io.qt.core.QPointF)}.
*/
@QtUninvokable
public final io.qt.core.QLineF.@NonNull IntersectionType intersects(io.qt.core.@NonNull QLine l, io.qt.core.@Nullable QPointF intersectionPoint) {
return intersects(new io.qt.core.QLineF(l), intersectionPoint);
}
/**
* Overloaded function for {@link #equals(io.qt.core.QLineF)}.
*/
@QtUninvokable
public final boolean equals(io.qt.core.@NonNull QLine d) {
return equals(new io.qt.core.QLineF(d));
}
/**
* Overloaded function for {@link #setP1(io.qt.core.QPointF)}.
*/
@QtUninvokable
public final void setP1(io.qt.core.@NonNull QPoint p1) {
setP1(new io.qt.core.QPointF(p1));
}
/**
* Overloaded function for {@link #setP2(io.qt.core.QPointF)}.
*/
@QtUninvokable
public final void setP2(io.qt.core.@NonNull QPoint p2) {
setP2(new io.qt.core.QPointF(p2));
}
/**
* Overloaded function for {@link #setPoints(io.qt.core.QPointF, io.qt.core.QPointF)}.
*/
@QtUninvokable
public final void setPoints(io.qt.core.@NonNull QPoint p1, io.qt.core.@NonNull QPointF p2) {
setPoints(new io.qt.core.QPointF(p1), p2);
}
/**
* Overloaded function for {@link #setPoints(io.qt.core.QPointF, io.qt.core.QPointF)}.
*/
@QtUninvokable
public final void setPoints(io.qt.core.@NonNull QPointF p1, io.qt.core.@NonNull QPoint p2) {
setPoints(p1, new io.qt.core.QPointF(p2));
}
/**
* Overloaded function for {@link #setPoints(io.qt.core.QPointF, io.qt.core.QPointF)}.
*/
@QtUninvokable
public final void setPoints(io.qt.core.@NonNull QPoint p1, io.qt.core.@NonNull QPoint p2) {
setPoints(new io.qt.core.QPointF(p1), new io.qt.core.QPointF(p2));
}
/**
* Overloaded function for {@link #translate(io.qt.core.QPointF)}.
*/
@QtUninvokable
public final void translate(io.qt.core.@NonNull QPoint p) {
translate(new io.qt.core.QPointF(p));
}
/**
* Overloaded function for {@link #translated(io.qt.core.QPointF)}.
*/
@QtUninvokable
public final io.qt.core.@NonNull QLineF translated(io.qt.core.@NonNull QPoint p) {
return translated(new io.qt.core.QPointF(p));
}
}