mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-22 20:03:42 +00:00
feat: Implement Qt6 migration with aqtinstall 3.3.0
- Migrate from Qt5 to Qt6.7.3 using aqtinstall v3.3.0 - Add comprehensive Qt6 API compatibility updates - Implement responsive UI with High DPI scaling support - Add MSVC runtime library configuration for consistency - Update touch/mouse event handling for Qt6 APIs - Fix locale handling (countryToString → territoryToString) - Update string size methods (count() → size()) - Remove deprecated Qt5 high DPI attributes - Add new CopyCitronQt6Deps.cmake for Qt6 dependency management - Update CMake configuration for Qt6-only approach - Add aqt_config.ini with mirror configuration for reliable downloads Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -505,7 +505,7 @@ void TouchScreenPreview::mouseMoveEvent(QMouseEvent* event) {
|
||||
if (!coord_label) {
|
||||
return;
|
||||
}
|
||||
const auto pos = MapToDeviceCoords(event->x(), event->y());
|
||||
const auto pos = MapToDeviceCoords(event->position().x(), event->position().y());
|
||||
if (pos) {
|
||||
coord_label->setText(QStringLiteral("X: %1, Y: %2").arg(pos->x()).arg(pos->y()));
|
||||
} else {
|
||||
@@ -523,7 +523,7 @@ void TouchScreenPreview::mousePressEvent(QMouseEvent* event) {
|
||||
if (event->button() != Qt::MouseButton::LeftButton) {
|
||||
return;
|
||||
}
|
||||
const auto pos = MapToDeviceCoords(event->x(), event->y());
|
||||
const auto pos = MapToDeviceCoords(event->position().x(), event->position().y());
|
||||
if (pos) {
|
||||
emit DotAdded(*pos);
|
||||
}
|
||||
@@ -539,7 +539,7 @@ bool TouchScreenPreview::eventFilter(QObject* obj, QEvent* event) {
|
||||
emit DotSelected(obj->property(PropId).toInt());
|
||||
|
||||
drag_state.dot = qobject_cast<QLabel*>(obj);
|
||||
drag_state.start_pos = mouse_event->globalPos();
|
||||
drag_state.start_pos = mouse_event->globalPosition().toPoint();
|
||||
return true;
|
||||
}
|
||||
case QEvent::Type::MouseMove: {
|
||||
@@ -549,13 +549,13 @@ bool TouchScreenPreview::eventFilter(QObject* obj, QEvent* event) {
|
||||
const auto mouse_event = static_cast<QMouseEvent*>(event);
|
||||
if (!drag_state.active) {
|
||||
drag_state.active =
|
||||
(mouse_event->globalPos() - drag_state.start_pos).manhattanLength() >=
|
||||
(mouse_event->globalPosition().toPoint() - drag_state.start_pos).manhattanLength() >=
|
||||
QApplication::startDragDistance();
|
||||
if (!drag_state.active) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
auto current_pos = mapFromGlobal(mouse_event->globalPos());
|
||||
auto current_pos = mapFromGlobal(mouse_event->globalPosition().toPoint());
|
||||
current_pos.setX(std::clamp(current_pos.x(), contentsMargins().left(),
|
||||
contentsMargins().left() + contentsRect().width() - 1));
|
||||
current_pos.setY(std::clamp(current_pos.y(), contentsMargins().top(),
|
||||
|
||||
Reference in New Issue
Block a user