Esempio n. 1
0
void UBScreenMirror::timerEvent(QTimerEvent *event)
{
    Q_UNUSED(event);

    grabPixmap();

    update();
}
Esempio n. 2
0
void UBScreenMirror::setSourceWidget(QWidget *sourceWidget)
{
    mSourceWidget = sourceWidget;

    mScreenIndex = qApp->desktop()->screenNumber(sourceWidget);

    grabPixmap();

    update();
}
Esempio n. 3
0
ZoomWidget::ZoomWidget(SelWin* sw, QWidget* parent) : QWidget(parent), selWin(sw)
{
    //setAttribute(Qt::WA_DeleteOnClose);

    setMouseTracking(true);
    hasCurrentLine = false;
    m_isDrawing = false;
    m_zoomFactor = 10;
    
    timer = new QTimer(this);
    timer->setInterval(1000);
    connect(timer, SIGNAL(timeout()), this, SLOT(grabPixmap()));
    
}
QPixmap
MImRotationAnimation::grabComposited()
{
    if (!remoteWindow || remoteWindow->windowPixmap().isNull()) {
        return QPixmap();
    }

    // Explicitly copying here since we want to paint the keyboard on top.
    QPixmap grabPixmap(remoteWindow->windowPixmap());

    // Overlay keyboard, transparency not required, so initializing
    // QPainter from QPixmap is okay.
    QPainter painter(&grabPixmap);
    snapshotWidget->render(&painter,QPoint(0,0),QRect(0,0,width(),height()));

    return grabPixmap;
}
Esempio n. 5
0
void ZoomWidget::play() {
    selWin->show();
    grabPixmap();
    timer->start();
}