
# 
# This file has been automatically generated by RaQt_maker V0.0.5.
# 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.5>:auth<cpan:YGUILLEMO>:api<2>;
use Qt::QtWidgets::QtHelpers:ver<0.0.5>:auth<cpan:YGUILLEMO>:api<2>;
use Qt::QtWidgets::QtWrappers:ver<0.0.5>:auth<cpan:YGUILLEMO>:api<2>;
use Qt::QtWidgets::QAbstractSlider:ver<0.0.5>:auth<cpan:YGUILLEMO>:api<2>;
use Qt::QtWidgets::QtBase:ver<0.0.5>:auth<cpan:YGUILLEMO>:api<2>;
use Qt::QtWidgets::RQDial:ver<0.0.5>:auth<cpan:YGUILLEMO>:api<2>;
use Qt::QtWidgets::RQWidget:ver<0.0.5>:auth<cpan:YGUILLEMO>:api<2>;



class QDial:ver<0.0.5>:auth<cpan:YGUILLEMO>:api<2>
    is QAbstractSlider
    does RQDial
    is export {

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

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

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

    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 QDial $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 {
            QWQDialDtor(self.address);
            self.ownedByRaku = False;
        }
    }

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

    method notchSize( --> Int)
    {
        my $result = QWQDialnotchSize(self.address);
        return $result;
    }

    method setNotchTarget(Real $target)
    {
        my Num $a1 = $target.Num;
        QWQDialsetNotchTarget(self.address, $a1);
    }

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

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

    method setNotchesVisible(Bool $visible) is QtSlot
    {
        my int8 $a1 = $visible.Int;
        QWQDialsetNotchesVisible(self.address, $a1);
    }

    method setWrapping(Bool $on) is QtSlot
    {
        my int8 $a1 = $on.Int;
        QWQDialsetWrapping(self.address, $a1);
    }

}


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

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

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

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

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

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

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

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

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

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

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

