Major port Qt4 to Qt6

- Updated header inclusions from QtGui to QtWidgets for consistency and compatibility with Qt 5 and later.
- Replaced deprecated QApplication::desktop() with QApplication::primaryScreen() for obtaining screen DPI.
- Modified MyOutputHandler to use QMessageLogContext and QString for improved logging.
- Changed QMatrix to QTransform for image rotation in ImageCutout class.
- Updated various debug statements to use toLocal8Bit() instead of toAscii() for better string handling.
- Refactored several classes to use QElapsedTimer instead of QTime for performance measurement.
- Ensured all operator overloads in Section and Tag classes are marked as const for better const-correctness.
This commit is contained in:
Mo Elzubeir
2025-10-22 23:04:56 -05:00
parent 04bb35b772
commit 99581bc990
34 changed files with 170 additions and 187 deletions
+3 -3
View File
@@ -114,7 +114,7 @@ void FullPageScene::addTagCoordinates(QList<TagCoordinates> &tagH)
pt2 += m_imageItem->pos();
QRectF rec(pt1, pt2);
QGraphicsRectItem *rect = new QGraphicsRectItem(rec, 0, this);
QGraphicsRectItem *rect = new QGraphicsRectItem(rec);
rect->setZValue(1.1);
rect->setPen(QPen( Qt::NoPen ) );
rect->setBrush( brush );
@@ -271,7 +271,7 @@ bool FullPageScene::isPointIsOnImageCutoutItem(const QPointF & point)
foreach (ImageCutout* rec, m_imageCutoutsList)
{
if( itemAt(point) == rec)
if( itemAt(point, QTransform()) == rec)
{
m_currentImageCutout = rec;
return true;
@@ -397,7 +397,7 @@ QImage FullPageScene::screenShot()
QImage image(w, h, QImage::Format_ARGB32 );
QPainter painter(&image);
painter.setRenderHint(QPainter::HighQualityAntialiasing);
painter.setRenderHint(QPainter::Antialiasing);
foreach (ImageCutout *rect, m_imageCutoutsList)
rect->setScreenshot(true);