mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-10 12:50:04 +00:00
qt: Migrate to Qt6. (#6418)
This commit is contained in:
parent
70335a7f4d
commit
2273df4d70
32 changed files with 299 additions and 464 deletions
|
@ -40,8 +40,9 @@ void SurfacePicture::mousePressEvent(QMouseEvent* event) {
|
|||
}
|
||||
|
||||
if (surface_widget) {
|
||||
surface_widget->Pick(event->x() * pixmap.width() / width(),
|
||||
event->y() * pixmap.height() / height());
|
||||
const auto pos = event->position().toPoint();
|
||||
surface_widget->Pick(pos.x() * pixmap.width() / width(),
|
||||
pos.y() * pixmap.height() / height());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -142,24 +142,28 @@ void MicroProfileWidget::hideEvent(QHideEvent* event) {
|
|||
}
|
||||
|
||||
void MicroProfileWidget::mouseMoveEvent(QMouseEvent* event) {
|
||||
MicroProfileMousePosition(event->x() / x_scale, event->y() / y_scale, 0);
|
||||
const auto point = event->position().toPoint();
|
||||
MicroProfileMousePosition(point.x() / x_scale, point.y() / y_scale, 0);
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void MicroProfileWidget::mousePressEvent(QMouseEvent* event) {
|
||||
MicroProfileMousePosition(event->x() / x_scale, event->y() / y_scale, 0);
|
||||
const auto point = event->position().toPoint();
|
||||
MicroProfileMousePosition(point.x() / x_scale, point.y() / y_scale, 0);
|
||||
MicroProfileMouseButton(event->buttons() & Qt::LeftButton, event->buttons() & Qt::RightButton);
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void MicroProfileWidget::mouseReleaseEvent(QMouseEvent* event) {
|
||||
MicroProfileMousePosition(event->x() / x_scale, event->y() / y_scale, 0);
|
||||
const auto point = event->position().toPoint();
|
||||
MicroProfileMousePosition(point.x() / x_scale, point.y() / y_scale, 0);
|
||||
MicroProfileMouseButton(event->buttons() & Qt::LeftButton, event->buttons() & Qt::RightButton);
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void MicroProfileWidget::wheelEvent(QWheelEvent* event) {
|
||||
MicroProfileMousePosition(event->position().x() / x_scale, event->position().y() / y_scale,
|
||||
const auto point = event->position().toPoint();
|
||||
MicroProfileMousePosition(point.x() / x_scale, point.y() / y_scale,
|
||||
event->angleDelta().y() / 120);
|
||||
event->accept();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue