|
|
|
|
@ -92,6 +92,7 @@ QRect VideoForm::getGrabCursorRect()
|
|
|
|
|
// high dpi support
|
|
|
|
|
rc.setTopLeft(rc.topLeft() * m_videoWidget->devicePixelRatio());
|
|
|
|
|
rc.setBottomRight(rc.bottomRight() * m_videoWidget->devicePixelRatio());
|
|
|
|
|
|
|
|
|
|
rc.setX(rc.x() + 10);
|
|
|
|
|
rc.setY(rc.y() + 10);
|
|
|
|
|
rc.setWidth(rc.width() - 20);
|
|
|
|
|
@ -100,15 +101,21 @@ QRect VideoForm::getGrabCursorRect()
|
|
|
|
|
rc = m_videoWidget->geometry();
|
|
|
|
|
rc.setTopLeft(ui->keepRadioWidget->mapToGlobal(rc.topLeft()));
|
|
|
|
|
rc.setBottomRight(ui->keepRadioWidget->mapToGlobal(rc.bottomRight()));
|
|
|
|
|
rc.setX(rc.x() + 100);
|
|
|
|
|
rc.setY(rc.y() + 30);
|
|
|
|
|
rc.setWidth(rc.width() - 180);
|
|
|
|
|
rc.setHeight(rc.height() - 60);
|
|
|
|
|
|
|
|
|
|
rc.setX(rc.x() + 10);
|
|
|
|
|
rc.setY(rc.y() + 10);
|
|
|
|
|
rc.setWidth(rc.width() - 20);
|
|
|
|
|
rc.setHeight(rc.height() - 20);
|
|
|
|
|
#elif defined(Q_OS_LINUX)
|
|
|
|
|
rc = QRect(ui->keepRadioWidget->mapToGlobal(m_videoWidget->pos()), m_videoWidget->size());
|
|
|
|
|
// high dpi support -- taken from the WIN32 section and untested
|
|
|
|
|
rc.setTopLeft(rc.topLeft() * m_videoWidget->devicePixelRatio());
|
|
|
|
|
rc.setBottomRight(rc.bottomRight() * m_videoWidget->devicePixelRatio());
|
|
|
|
|
|
|
|
|
|
rc.setX(rc.x() + 10);
|
|
|
|
|
rc.setY(rc.y() + 10);
|
|
|
|
|
rc.setWidth(rc.width() - 20);
|
|
|
|
|
rc.setHeight(rc.height() - 20);
|
|
|
|
|
#endif
|
|
|
|
|
return rc;
|
|
|
|
|
}
|
|
|
|
|
@ -504,7 +511,7 @@ void VideoForm::mousePressEvent(QMouseEvent *event)
|
|
|
|
|
qreal x = event->localPos().x() / m_videoWidget->size().width();
|
|
|
|
|
qreal y = event->localPos().y() / m_videoWidget->size().height();
|
|
|
|
|
QString posTip = QString(R"("pos": {"x": %1, "y": %2})").arg(x).arg(y);
|
|
|
|
|
qInfo(posTip.toStdString().c_str());
|
|
|
|
|
qInfo() << posTip.toStdString().c_str();
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (event->button() == Qt::LeftButton) {
|
|
|
|
|
|