### ----------------------------------------------------
### -- Qt::QtWidgets
### -- Licenses: GPL-3.0-or-later
### -- Authors: Yves Guillemot <yc.guillemot@wanadoo.fr>
### -- File: lib/Qt/QtWidgets/QGraphicsSimpleTextItem.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::QAbstractGraphicsShapeItem:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QFont:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QGraphicsItem:ver<0.0.7>:auth<zef:yguillemot>:api<2>;
use Qt::QtWidgets::QRectF: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::RQGraphicsSimpleTextItem:ver<0.0.7>:auth<zef:yguillemot>:api<2>;



class QGraphicsSimpleTextItem:ver<0.0.7>:auth<zef:yguillemot>:api<2>
    is QAbstractGraphicsShapeItem
    is QtObject
    does RQGraphicsSimpleTextItem
    is export {

    multi sub ctor(QtBase $this, QGraphicsItem $parent = (QGraphicsItem)) {
        my $a1 = ?$parent ?? $parent.address !! QWInt2Pointer(0);
        $this.address = QWQGraphicsSimpleTextItemCtor_1($a1);
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this, QGraphicsItem $parent = (QGraphicsItem)) {
        my $a1 = ?$parent ?? $parent.address !! QWInt2Pointer(0);
        $this.address = SCWQGraphicsSimpleTextItemCtor_1($a1);
        $this.ownedByRaku = True;
    }

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

    multi sub ctor(QtBase $this, Str $text, QGraphicsItem $parent = (QGraphicsItem)) {
        my $a2 = ?$parent ?? $parent.address !! QWInt2Pointer(0);
        $this.address = QWQGraphicsSimpleTextItemCtor_2($text, $a2);
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this, Str $text, QGraphicsItem $parent = (QGraphicsItem)) {
        my $a2 = ?$parent ?? $parent.address !! QWInt2Pointer(0);
        $this.address = SCWQGraphicsSimpleTextItemCtor_2($text, $a2);
        $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 QGraphicsSimpleTextItem $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 {
            QWQGraphicsSimpleTextItemDtor(self.address);
            self.ownedByRaku = False;
        }
    }

    method setText(Str $text)
    {
        QWQGraphicsSimpleTextItemsetText(self.address, $text);
    }

    method text( --> Str)
    {
        my Pointer $retBuffer = QWStrBufferAlloc;
        QWQGraphicsSimpleTextItemtext($retBuffer, self.address);
        my Str $returnedString = QWStrBufferRead($retBuffer);
        QWStrBufferFree($retBuffer);
        return $returnedString;
    }

    method setFont(QFont $font)
    {
        my $a1 = $font.address;
        QWQGraphicsSimpleTextItemsetFont(self.address, $a1);
    }

    method font( --> QFont)
    {
        my $result = QWQGraphicsSimpleTextItemfont(self.address);
        my $result1 = QFont.new($result, obr => True);
        return $result1;
    }

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

}


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

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

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

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

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

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

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

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

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

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

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



