
# 
# 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::Qt: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::RQSlider:ver<0.0.5>:auth<cpan:YGUILLEMO>:api<2>;
use Qt::QtWidgets::RQWidget:ver<0.0.5>:auth<cpan:YGUILLEMO>:api<2>;



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

    enum TickPosition (
        NoTicks => 0,
        TicksAbove => 1,
        TicksLeft => 1,
        TicksBelow => 2,
        TicksRight => 2,
        TicksBothSides => 3,
    );

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

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

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

    multi sub ctor(QtBase $this, Qt::Orientation $orientation, RQWidget $parent = (RQWidget)) {
        my $a2 = ?$parent ?? $parent.address !! QWInt2Pointer(0);
        $this.address = QWQSliderCtor_2($orientation, $a2);
        $this.ownedByRaku = True;
    }

    multi sub subClassCtor(QtBase $this, Qt::Orientation $orientation, RQWidget $parent = (RQWidget)) {
        my $a2 = ?$parent ?? $parent.address !! QWInt2Pointer(0);
        $this.address = SCWQSliderCtor_2($orientation, $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 QSlider $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 {
            QWQSliderDtor(self.address);
            self.ownedByRaku = False;
        }
    }

    method setTickPosition(QSlider::TickPosition $position)
    {
        QWQSlidersetTickPosition(self.address, $position);
    }

    method tickPosition( --> QSlider::TickPosition)
    {
        my $result = QWQSlidertickPosition(self.address);
        my $result1 = QSlider::TickPosition($result);
        return $result1;
    }

    method setTickInterval(Int $ti)
    {
        QWQSlidersetTickInterval(self.address, $ti);
    }

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

}


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

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

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

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

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

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

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

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

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

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

