Qt

 view release on metacpan or  search on metacpan

qtgui/examples/graphicsview/padnavigator/Panel.pm  view on Meta::CPAN

sub splash() {
    return this->{splash};
}

sub selectionTimeLine() {
    return this->{selectionTimeLine};
}

sub flipTimeLine() {
    return this->{flipTimeLine};
}

sub selectedX() {
    return this->{selectedX};
}

sub selectedY() {
    return this->{selectedY};
}

sub grid() {
    return this->{grid};
}

sub startPos() {
    return this->{startPos};
}

sub endPos() {
    return this->{endPos};
}

sub xrot() {
    return this->{yrot};
}

sub yrot() {
    return this->{yrot};
}

sub yrot2() {
    return this->{yrot2};
}

sub width() {
    return this->{width};
}

sub height() {
    return this->{height};
}

sub flipped() {
    return this->{flipped};
}

sub flipLeft() {
    return this->{flipLeft};
}

sub ui() {
    return this->{ui};
}

use RoundRectItem;
use SplashItem;
use Ui_BackSide;

sub NEW
{
    my ($class, $width, $height) = @_;
    $class->SUPER::NEW();
    this->{selectedX} = 0;
    this->{selectedY} = 0;
    this->{width} = $width;
    this->{height} = $height;
    this->{flipped} = 0;
    this->{flipLeft} = 1;

    setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff());
    setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff());
    setCacheMode(CacheBackground());
    setViewportUpdateMode(FullViewportUpdate());
    setRenderHints(Qt::Painter::Antialiasing() | Qt::Painter::SmoothPixmapTransform()
                   | Qt::Painter::TextAntialiasing());
    setBackgroundBrush(Qt::Brush(Qt::Pixmap('images/blue_angle_swirl.jpg')));
#ifndef QT_NO_OPENGL
    setViewport(Qt::GLWidget(Qt::GLFormat(Qt::GL::SampleBuffers())));
#endif
    setMinimumSize(50, 50);

    this->{selectionTimeLine} = Qt::TimeLine(150, this);
    this->{flipTimeLine} = Qt::TimeLine(500, this);

    my $bounds = Qt::RectF((-width() / 2.0) * 150, (-$height / 2.0) * 150, width * 150, $height * 150);

    this->{scene} = Qt::GraphicsScene($bounds, this);
    this->scene->setItemIndexMethod(Qt::GraphicsScene::NoIndex());
    setScene(this->scene);

    this->{baseItem} = RoundRectItem($bounds, Qt::Color(226, 255, 92, 64));
    scene->addItem(baseItem);

    my $embed = Qt::Widget();
    this->{ui} = Ui_BackSide->setupUi($embed);
    ui->hostName->setFocus();

    this->{backItem} = RoundRectItem($bounds, $embed->palette()->window(), $embed);
    backItem->setTransform(Qt::Transform()->rotate(180, Qt::YAxis()));
    backItem->setParentItem(baseItem);
        
    this->{selectionItem} = RoundRectItem(Qt::RectF(-60, -60, 120, 120), Qt::Color(Qt::gray()));
    selectionItem->setParentItem(baseItem);
    selectionItem->setZValue(-1);
    selectionItem->setPos(this->posForLocation(0, 0));
    this->{startPos} = selectionItem->pos();
    this->{endPos} = Qt::PointF();

    this->{grid} = [];
    for (my $y = 0; $y < $height; ++$y) {
        this->{grid}->[$y] = [];



( run in 1.319 second using v1.01-cache-2.11-cpan-b16cb0d3907 )