### ----------------------------------------------------
### -- Qt::QtWidgets
### -- Licenses: GPL-3.0-or-later
### -- Authors: Yves Guillemot <yc.guillemot@wanadoo.fr>
### -- File: lib/Qt/QtWidgets/QRectF.rakumod
### ----------------------------------------------------

# 
# This file has been automatically generated by RaQt_maker V0.0.7.
# To modify and regenerate it, see the source code available here: 
#         https://github.com/yguillemot/RaQt_maker
# 

use NativeCall;
use Qt::QtWidgets:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QtHelpers:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QtWrappers:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QPointF:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QRect:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QSizeF:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QtBase:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::RQRectF:ver<0.0.7>:auth<zef:yguillemot>:api<2>;



class QRectF:ver<0.0.7>:auth<zef:yguillemot>:api<2>
    is QtObject
    does RQRectF
    is export {

    multi sub ctor(QtBase $this) {
        $this.address = QWQRectFCtor_1();
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this) {
        $this.address = SCWQRectFCtor_1();
        $this.ownedByRaku = True;
    }

    method validateCB(Str $m) {
        QWvalidateCB_QRectF(self.address, self.id, $m);
    }

    multi sub ctor(QtBase $this, QPointF $topleft, QSizeF $size) {
        my $a1 = $topleft.address;
        my $a2 = $size.address;
        $this.address = QWQRectFCtor_2($a1, $a2);
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this, QPointF $topleft, QSizeF $size) {
        my $a1 = $topleft.address;
        my $a2 = $size.address;
        $this.address = SCWQRectFCtor_2($a1, $a2);
        $this.ownedByRaku = True;
    }

    multi sub ctor(QtBase $this, QPointF $topleft, QPointF $bottomRight) {
        my $a1 = $topleft.address;
        my $a2 = $bottomRight.address;
        $this.address = QWQRectFCtor_3($a1, $a2);
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this, QPointF $topleft, QPointF $bottomRight) {
        my $a1 = $topleft.address;
        my $a2 = $bottomRight.address;
        $this.address = SCWQRectFCtor_3($a1, $a2);
        $this.ownedByRaku = True;
    }

    multi sub ctor(QtBase $this, Real $left, Real $top, Real $width, Real $height) {
        my Num $a1 = $left.Num;
        my Num $a2 = $top.Num;
        my Num $a3 = $width.Num;
        my Num $a4 = $height.Num;
        $this.address = QWQRectFCtor_4($a1, $a2, $a3, $a4);
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this, Real $left, Real $top, Real $width, Real $height) {
        my Num $a1 = $left.Num;
        my Num $a2 = $top.Num;
        my Num $a3 = $width.Num;
        my Num $a4 = $height.Num;
        $this.address = SCWQRectFCtor_4($a1, $a2, $a3, $a4);
        $this.ownedByRaku = True;
    }

    multi sub ctor(QtBase $this, QRect $rect) {
        my $a1 = $rect.address;
        $this.address = QWQRectFCtor_5($a1);
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this, QRect $rect) {
        my $a1 = $rect.address;
        $this.address = SCWQRectFCtor_5($a1);
        $this.ownedByRaku = True;
    }

    multi sub ctor(QtBase $this, NativeCall::Types::Pointer $p, Bool :$obr = False) {
        # Get access to a preexisting Qt object
        $this.address = $p;
        $this.ownedByRaku = $obr;
    }

    multi sub ctor(|capture) {
        note "QtWidgets ", ::?CLASS.^name,
             " ctor called with unsupported args";
        die "Bad args";
    }

    submethod new(|capture) {
        my QRectF $rObj = self.bless;
        ctor($rObj, |capture);
        return $rObj;
    }

    multi sub subClassCtor(|capture) {
        note "QtWidgets subclass ", ::?CLASS.^name,
             " ctor called with unsupported args";
        die "Bad args";
    }

    submethod subClass(|capture) {
        subClassCtor(self, |capture);
        self.validateCallBacks();
    }

    submethod DESTROY {
        if self.ownedByRaku {
            QWQRectFDtor(self.address);
            self.ownedByRaku = False;
        }
    }

    method isNull( --> Bool)
    {
        my $result = QWQRectFisNull(self.address);
        my $result1 = ?$result;
        return $result1;
    }

    method isEmpty( --> Bool)
    {
        my $result = QWQRectFisEmpty(self.address);
        my $result1 = ?$result;
        return $result1;
    }

    method isValid( --> Bool)
    {
        my $result = QWQRectFisValid(self.address);
        my $result1 = ?$result;
        return $result1;
    }

    method normalized( --> QRectF)
    {
        my $result = QWQRectFnormalized(self.address);
        my $result1 = QRectF.new($result, obr => True);
        return $result1;
    }

    method left( --> Real)
    {
        my $result = QWQRectFleft(self.address);
        my $result1 = $result.Real;
        return $result1;
    }

    method top( --> Real)
    {
        my $result = QWQRectFtop(self.address);
        my $result1 = $result.Real;
        return $result1;
    }

    method right( --> Real)
    {
        my $result = QWQRectFright(self.address);
        my $result1 = $result.Real;
        return $result1;
    }

    method bottom( --> Real)
    {
        my $result = QWQRectFbottom(self.address);
        my $result1 = $result.Real;
        return $result1;
    }

    method x( --> Real)
    {
        my $result = QWQRectFx(self.address);
        my $result1 = $result.Real;
        return $result1;
    }

    method y( --> Real)
    {
        my $result = QWQRectFy(self.address);
        my $result1 = $result.Real;
        return $result1;
    }

    method setX(Real $pos)
    {
        my Num $a1 = $pos.Num;
        QWQRectFsetX(self.address, $a1);
    }

    method setY(Real $pos)
    {
        my Num $a1 = $pos.Num;
        QWQRectFsetY(self.address, $a1);
    }

    method topLeft( --> QPointF)
    {
        my $result = QWQRectFtopLeft(self.address);
        my $result1 = QPointF.new($result, obr => True);
        return $result1;
    }

    method bottomRight( --> QPointF)
    {
        my $result = QWQRectFbottomRight(self.address);
        my $result1 = QPointF.new($result, obr => True);
        return $result1;
    }

    method topRight( --> QPointF)
    {
        my $result = QWQRectFtopRight(self.address);
        my $result1 = QPointF.new($result, obr => True);
        return $result1;
    }

    method bottomLeft( --> QPointF)
    {
        my $result = QWQRectFbottomLeft(self.address);
        my $result1 = QPointF.new($result, obr => True);
        return $result1;
    }

    method center( --> QPointF)
    {
        my $result = QWQRectFcenter(self.address);
        my $result1 = QPointF.new($result, obr => True);
        return $result1;
    }

    method transposed( --> QRectF)
    {
        my $result = QWQRectFtransposed(self.address);
        my $result1 = QRectF.new($result, obr => True);
        return $result1;
    }

    method setRect(Real $x, Real $y, Real $w, Real $h)
    {
        my Num $a1 = $x.Num;
        my Num $a2 = $y.Num;
        my Num $a3 = $w.Num;
        my Num $a4 = $h.Num;
        QWQRectFsetRect(self.address, $a1, $a2, $a3, $a4);
    }

    method size( --> QSizeF)
    {
        my $result = QWQRectFsize(self.address);
        my $result1 = QSizeF.new($result, obr => True);
        return $result1;
    }

    method width( --> Real)
    {
        my $result = QWQRectFwidth(self.address);
        my $result1 = $result.Real;
        return $result1;
    }

    method height( --> Real)
    {
        my $result = QWQRectFheight(self.address);
        my $result1 = $result.Real;
        return $result1;
    }

    method setWidth(Real $w)
    {
        my Num $a1 = $w.Num;
        QWQRectFsetWidth(self.address, $a1);
    }

    method setHeight(Real $h)
    {
        my Num $a1 = $h.Num;
        QWQRectFsetHeight(self.address, $a1);
    }

    method setSize(QSizeF $s)
    {
        my $a1 = $s.address;
        QWQRectFsetSize(self.address, $a1);
    }

    method toRect( --> QRect)
    {
        my $result = QWQRectFtoRect(self.address);
        my $result1 = QRect.new($result, obr => True);
        return $result1;
    }

    method toAlignedRect( --> QRect)
    {
        my $result = QWQRectFtoAlignedRect(self.address);
        my $result1 = QRect.new($result, obr => True);
        return $result1;
    }

}


sub QWQRectFCtor_1()
    returns Pointer is native(&libwrapper) { * }

sub SCWQRectFCtor_1()
    returns Pointer is native(&libwrapper) { * }

sub QWvalidateCB_QRectF(Pointer, int32, Str)
    is native(&libwrapper) { * }

sub QWQRectFCtor_2(Pointer, Pointer)
    returns Pointer is native(&libwrapper) { * }

sub SCWQRectFCtor_2(Pointer, Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFCtor_3(Pointer, Pointer)
    returns Pointer is native(&libwrapper) { * }

sub SCWQRectFCtor_3(Pointer, Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFCtor_4(num64, num64, num64, num64)
    returns Pointer is native(&libwrapper) { * }

sub SCWQRectFCtor_4(num64, num64, num64, num64)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFCtor_5(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub SCWQRectFCtor_5(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFDtor(Pointer)
    is native(&libwrapper) { * }

sub QWQRectFisNull(Pointer)
    returns int8 is native(&libwrapper) { * }

sub QWQRectFisEmpty(Pointer)
    returns int8 is native(&libwrapper) { * }

sub QWQRectFisValid(Pointer)
    returns int8 is native(&libwrapper) { * }

sub QWQRectFnormalized(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFleft(Pointer)
    returns num64 is native(&libwrapper) { * }

sub QWQRectFtop(Pointer)
    returns num64 is native(&libwrapper) { * }

sub QWQRectFright(Pointer)
    returns num64 is native(&libwrapper) { * }

sub QWQRectFbottom(Pointer)
    returns num64 is native(&libwrapper) { * }

sub QWQRectFx(Pointer)
    returns num64 is native(&libwrapper) { * }

sub QWQRectFy(Pointer)
    returns num64 is native(&libwrapper) { * }

sub QWQRectFsetX(Pointer, num64)
    is native(&libwrapper) { * }

sub QWQRectFsetY(Pointer, num64)
    is native(&libwrapper) { * }

sub QWQRectFtopLeft(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFbottomRight(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFtopRight(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFbottomLeft(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFcenter(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFtransposed(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFsetRect(Pointer, num64, num64, num64, num64)
    is native(&libwrapper) { * }

sub QWQRectFsize(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFwidth(Pointer)
    returns num64 is native(&libwrapper) { * }

sub QWQRectFheight(Pointer)
    returns num64 is native(&libwrapper) { * }

sub QWQRectFsetWidth(Pointer, num64)
    is native(&libwrapper) { * }

sub QWQRectFsetHeight(Pointer, num64)
    is native(&libwrapper) { * }

sub QWQRectFsetSize(Pointer, Pointer)
    is native(&libwrapper) { * }

sub QWQRectFtoRect(Pointer)
    returns Pointer is native(&libwrapper) { * }

sub QWQRectFtoAlignedRect(Pointer)
    returns Pointer is native(&libwrapper) { * }



