r25013 by jghali - Get rid of a few deprecated globalPos() calls and replace them by globalPosition()

scribus-commit scribus-commit at lists.scribus.net
Thu Mar 10 22:56:14 UTC 2022


Author: jghali
Date: Thu Mar 10 22:56:14 2022
New Revision: 25013

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25013
Log:
Get rid of a few deprecated globalPos() calls and replace them by globalPosition()

Modified:
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/canvas.h
    trunk/Scribus/scribus/canvasgesture_columnresize.cpp
    trunk/Scribus/scribus/canvasgesture_linemove.cpp
    trunk/Scribus/scribus/canvasgesture_pan.cpp
    trunk/Scribus/scribus/canvasgesture_resize.cpp
    trunk/Scribus/scribus/canvasgesture_rowresize.cpp
    trunk/Scribus/scribus/canvasgesture_rulermove.cpp
    trunk/Scribus/scribus/canvasgesture_table.cpp
    trunk/Scribus/scribus/canvasgesture_table.h
    trunk/Scribus/scribus/canvasgesture_tableresize.cpp
    trunk/Scribus/scribus/canvasmode_create.cpp
    trunk/Scribus/scribus/canvasmode_drawbezier.cpp
    trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
    trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
    trunk/Scribus/scribus/canvasmode_edit.cpp
    trunk/Scribus/scribus/canvasmode_editarc.cpp
    trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
    trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
    trunk/Scribus/scribus/canvasmode_editspiral.cpp
    trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
    trunk/Scribus/scribus/canvasmode_imageimport.cpp
    trunk/Scribus/scribus/canvasmode_measurements.cpp
    trunk/Scribus/scribus/canvasmode_nodeedit.cpp
    trunk/Scribus/scribus/canvasmode_normal.cpp
    trunk/Scribus/scribus/canvasmode_rotate.cpp

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp	(original)
+++ trunk/Scribus/scribus/canvas.cpp	Thu Mar 10 22:56:14 2022
@@ -2474,7 +2474,7 @@
 	painter.drawPixmap(x, y, pixmap, sx, sy, sw, sh);
 }
 
-void Canvas::displayXYHUD(QPoint m)
+void Canvas::displayXYHUD(QPointF m)
 {
 	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
@@ -2519,7 +2519,7 @@
 	displayXYHUD(m, gx, gy);
 }
 
-void Canvas::displayCorrectedXYHUD(QPoint m, double x, double y)
+void Canvas::displayCorrectedXYHUD(QPointF m, double x, double y)
 {
 	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
@@ -2532,10 +2532,12 @@
 	}
 	gx -= m_doc->rulerXoffset;
 	gy -= m_doc->rulerYoffset;
-	QToolTip::showText(m + QPoint(5, 5), tr("X: %1\nY: %2").arg(value2String(gx, m_doc->unitIndex(), true, true), value2String(gy, m_doc->unitIndex(), true, true)), this);
-}
-
-void Canvas::displayCorrectedSingleHUD(QPoint m, double val, bool isX)
+
+	QPointF tooltipPos = m + QPointF(5.0, 5.0);
+	QToolTip::showText(tooltipPos.toPoint(), tr("X: %1\nY: %2").arg(value2String(gx, m_doc->unitIndex(), true, true), value2String(gy, m_doc->unitIndex(), true, true)), this);
+}
+
+void Canvas::displayCorrectedSingleHUD(QPointF m, double val, bool isX)
 {
 	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
@@ -2545,35 +2547,41 @@
 		if (m_doc->guidesPrefs().rulerMode)
 			gx -= m_doc->currentPage()->xOffset();
 		gx -= m_doc->rulerXoffset;
-		QToolTip::showText(m + QPoint(5, 5), tr("X: %1").arg(value2String(gx, m_doc->unitIndex(), true, true)), this);
+		QPointF tooltipPos = m + QPointF(5.0, 5.0);
+		QToolTip::showText(tooltipPos.toPoint(), tr("X: %1").arg(value2String(gx, m_doc->unitIndex(), true, true)), this);
 	}
 	else
 	{
 		if (m_doc->guidesPrefs().rulerMode)
 			gx -= m_doc->currentPage()->yOffset();
 		gx -= m_doc->rulerYoffset;
-		QToolTip::showText(m + QPoint(5, 5), tr("Y: %1").arg(value2String(gx, m_doc->unitIndex(), true, true)), this);
-	}
-}
-
-void Canvas::displayXYHUD(QPoint m, double x, double y)
+		QPointF tooltipPos = m + QPointF(5.0, 5.0);
+		QToolTip::showText(tooltipPos.toPoint(), tr("Y: %1").arg(value2String(gx, m_doc->unitIndex(), true, true)), this);
+	}
+}
+
+void Canvas::displayXYHUD(QPointF m, double x, double y)
 {
 	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
-	QToolTip::showText(m + QPoint(5, 5), tr("X: %1\nY: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, m_doc->unitIndex(), true, true)), this);
-}
-
-void Canvas::displaySizeHUD(QPoint m, double x, double y, bool isLine)
+
+	QPointF tooltipPos = m + QPointF(5.0, 5.0);
+	QToolTip::showText(tooltipPos.toPoint(), tr("X: %1\nY: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, m_doc->unitIndex(), true, true)), this);
+}
+
+void Canvas::displaySizeHUD(QPointF m, double x, double y, bool isLine)
 {
 	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
+
+	QPointF tooltipPos = m + QPointF(5.0, 5.0);
 	if (isLine)
-		QToolTip::showText(m + QPoint(5, 5), tr("Length: %1\nAngle: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, SC_DEGREES, true, true)), this);
+		QToolTip::showText(tooltipPos.toPoint(), tr("Length: %1\nAngle: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, SC_DEGREES, true, true)), this);
 	else
-		QToolTip::showText(m + QPoint(5, 5), tr("Width: %1\nHeight: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, m_doc->unitIndex(), true, true)), this);
-}
-
-void Canvas::displayRotHUD(QPoint m, double rot)
+		QToolTip::showText(tooltipPos.toPoint(), tr("Width: %1\nHeight: %2").arg(value2String(x, m_doc->unitIndex(), true, true), value2String(y, m_doc->unitIndex(), true, true)), this);
+}
+
+void Canvas::displayRotHUD(QPointF m, double rot)
 {
 	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
@@ -2582,21 +2590,24 @@
 		r = rot * -1.0;
 	else
 		r = 360.0 - rot;
-	QToolTip::showText(m + QPoint(5, 5), tr("Angle: %1").arg(value2String(r, SC_DEGREES, true, true)), this);
-}
-
-void Canvas::displayRealRotHUD(QPoint m, double rot)
+	QPointF tooltipPos = m + QPointF(5.0, 5.0);
+	QToolTip::showText(tooltipPos.toPoint(), tr("Angle: %1").arg(value2String(r, SC_DEGREES, true, true)), this);
+}
+
+void Canvas::displayRealRotHUD(QPointF m, double rot)
 {
 	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
-	QToolTip::showText(m + QPoint(5, 5), tr("Angle: %1").arg(value2String(rot, SC_DEGREES, true, true)), this);
-}
-
-void Canvas::displayDoubleHUD(QPoint point, const QString& label, double value)
+	QPointF tooltipPos = m + QPointF(5.0, 5.0);
+	QToolTip::showText(tooltipPos.toPoint(), tr("Angle: %1").arg(value2String(rot, SC_DEGREES, true, true)), this);
+}
+
+void Canvas::displayDoubleHUD(QPointF point, const QString& label, double value)
 {
 	if (!PrefsManager::instance().appPrefs.displayPrefs.showMouseCoordinates)
 		return;
-	QToolTip::showText(point + QPoint(5, 5), QString("%1: %2").arg(label, value2String(value, m_doc->unitIndex(), true, true)), this);
+	QPointF tooltipPos = point + QPointF(5.0, 5.0);
+	QToolTip::showText(tooltipPos.toPoint(), QString("%1: %2").arg(label, value2String(value, m_doc->unitIndex(), true, true)), this);
 }
 
 void Canvas::setupEditHRuler(PageItem * item, bool forceAndReset)

Modified: trunk/Scribus/scribus/canvas.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvas.h
==============================================================================
--- trunk/Scribus/scribus/canvas.h	(original)
+++ trunk/Scribus/scribus/canvas.h	Thu Mar 10 22:56:14 2022
@@ -203,19 +203,20 @@
 	//notesFramesPass determine if notes frames are drawn or not
 	void DrawPageItems(ScPainter *painter, ScLayer& layer, QRect clip, bool notesFramesPass);
 	void paintEvent ( QPaintEvent * p ) override;
-	void displayXYHUD(QPoint m);
-	void displayCorrectedXYHUD(QPoint m, double x, double y);
-	void displayCorrectedSingleHUD(QPoint m, double val, bool isX);
-	void displayXYHUD(QPoint m, double x, double y);
-	void displaySizeHUD(QPoint m, double x, double y, bool isLine = false);
-	void displayRotHUD(QPoint m, double rot);
-	void displayRealRotHUD(QPoint m, double rot);
+
+	void displayXYHUD(QPointF m);
+	void displayCorrectedXYHUD(QPointF m, double x, double y);
+	void displayCorrectedSingleHUD(QPointF m, double val, bool isX);
+	void displayXYHUD(QPointF m, double x, double y);
+	void displaySizeHUD(QPointF m, double x, double y, bool isLine = false);
+	void displayRotHUD(QPointF m, double rot);
+	void displayRealRotHUD(QPointF m, double rot);
 	/**
 	 * Displays a tooltip of the format <code>{label}: {N} {unit}</code> where <code>N</code> is
 	 * @a value converted to the current document unit and <code>unit</code> the current document
 	 * unit. The tooltip will be displayed nearby the global point @a point.
 	 */
-		void displayDoubleHUD(QPoint point, const QString& label, double value);
+	void displayDoubleHUD(QPointF point, const QString& label, double value);
 
 	void setupEditHRuler(PageItem * item, bool forceAndReset = false);
 	

Modified: trunk/Scribus/scribus/canvasgesture_columnresize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasgesture_columnresize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_columnresize.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_columnresize.cpp	Thu Mar 10 22:56:14 2022
@@ -52,7 +52,7 @@
 {
 	event->accept();
 
-	QPointF gridPoint = globalToTableGrid(event->globalPos());
+	QPointF gridPoint = globalToTableGrid(event->globalPosition());
 
 	// Perform the actual resize of the row.
 	PageItem_Table::ResizeStrategy strategy;
@@ -87,7 +87,7 @@
 {
 	event->accept();
 
-	QPointF gridPoint = globalToTableGrid(event->globalPos());
+	QPointF gridPoint = globalToTableGrid(event->globalPosition());
 
 	double requestedWidth = gridPoint.x() - m_columnPositions[m_column];
 	double actualWidth = 0.0;

Modified: trunk/Scribus/scribus/canvasgesture_linemove.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasgesture_linemove.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_linemove.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_linemove.cpp	Thu Mar 10 22:56:14 2022
@@ -134,7 +134,7 @@
 		bool hitsOrigin = m_canvas->hitsCanvasPoint(m->globalPosition(), line->xyPos());
 		prepare(line, hitsOrigin);
 		// now we also know the line's endpoint:
-		bool hitsEnd = m_canvas->hitsCanvasPoint(m->globalPos(), endPoint());
+		bool hitsEnd = m_canvas->hitsCanvasPoint(m->globalPosition(), endPoint());
 		m_haveLineItem = hitsOrigin || hitsEnd;
 	}
 	else

Modified: trunk/Scribus/scribus/canvasgesture_pan.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasgesture_pan.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_pan.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_pan.cpp	Thu Mar 10 22:56:14 2022
@@ -47,13 +47,13 @@
 
 void PanGesture::mousePressEvent(QMouseEvent* m)
 {
-	FPoint m_canvasPoint = m_canvas->globalToCanvas(m->globalPos());
+	FPoint m_canvasPoint = m_canvas->globalToCanvas(m->globalPosition());
 	m_canvasRefPoint = QPointF(m_canvasPoint.x(), m_canvasPoint.y());
 }
 
 void PanGesture::mouseMoveEvent(QMouseEvent* m)
 {
-	FPoint m_canvasPoint = m_canvas->globalToCanvas(m->globalPos());
+	FPoint m_canvasPoint = m_canvas->globalToCanvas(m->globalPosition());
 	double scale = m_canvas->scale();
 	double dx = (m_canvasRefPoint.x() - m_canvasPoint.x()) * scale;
 	double dy = (m_canvasRefPoint.y() - m_canvasPoint.y()) * scale;

Modified: trunk/Scribus/scribus/canvasgesture_resize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasgesture_resize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_resize.cpp	Thu Mar 10 22:56:14 2022
@@ -445,7 +445,7 @@
 	m_view->ensureVisible(point.x(), point.y(), 20, 20);
 	m_canvas->repaint();
 	QRectF newBounds = m_bounds.normalized();
-	m_canvas->displaySizeHUD(m->globalPos(), newBounds.width() - m_extraWidth, newBounds.height() - m_extraHeight);
+	m_canvas->displaySizeHUD(m->globalPosition(), newBounds.width() - m_extraWidth, newBounds.height() - m_extraHeight);
 }
 
 

Modified: trunk/Scribus/scribus/canvasgesture_rowresize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasgesture_rowresize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_rowresize.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_rowresize.cpp	Thu Mar 10 22:56:14 2022
@@ -52,7 +52,7 @@
 {
 	event->accept();
 
-	QPointF gridPoint = globalToTableGrid(event->globalPos());
+	QPointF gridPoint = globalToTableGrid(event->globalPosition());
 
 	// Perform the actual resize of the row.
 	PageItem_Table::ResizeStrategy strategy;
@@ -87,7 +87,7 @@
 {
 	event->accept();
 
-	QPointF gridPoint = globalToTableGrid(event->globalPos());
+	QPointF gridPoint = globalToTableGrid(event->globalPosition());
 
 	double requestedHeight = gridPoint.y() - m_rowPositions[m_row];
 	double actualHeight = 0.0;
@@ -98,7 +98,7 @@
 		actualHeight = resizeRowResizeFollowing(requestedHeight);
 
 	// Display height tooltip.
-	m_canvas->displayDoubleHUD(event->globalPos(), tr("Height"), actualHeight);
+	m_canvas->displayDoubleHUD(event->globalPosition(), tr("Height"), actualHeight);
 
 	// Update canvas.
 	m_canvas->update();

Modified: trunk/Scribus/scribus/canvasgesture_rulermove.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasgesture_rulermove.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_rulermove.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_rulermove.cpp	Thu Mar 10 22:56:14 2022
@@ -188,7 +188,7 @@
 	{
 		case ORIGIN:
 			m_canvas->repaint();
-			m_canvas->displayCorrectedXYHUD(m->globalPos(), x, y);
+			m_canvas->displayCorrectedXYHUD(m->globalPosition(), x, y);
 			break;
 		case HORIZONTAL:
 			if (!m_ScMW->doc->guidesPrefs().guidesShown)
@@ -257,7 +257,7 @@
 				}
 			}
 			m_canvas->update(0, newMousePoint.y() - 2, m_canvas->width(), 4);
-			m_canvas->displayCorrectedSingleHUD(m->globalPos(), y, false);
+			m_canvas->displayCorrectedSingleHUD(m->globalPosition(), y, false);
 			break;
 		case VERTICAL:
 			if (!m_ScMW->doc->guidesPrefs().guidesShown)
@@ -325,7 +325,7 @@
 				}
 			}
 			m_canvas->update(newMousePoint.x() - 2, 0, 4, m_canvas->height());
-			m_canvas->displayCorrectedSingleHUD(m->globalPos(), x, true);
+			m_canvas->displayCorrectedSingleHUD(m->globalPosition(), x, true);
 			break;
 	}
 	m_xy = newMousePoint;

Modified: trunk/Scribus/scribus/canvasgesture_table.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasgesture_table.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_table.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_table.cpp	Thu Mar 10 22:56:14 2022
@@ -23,7 +23,7 @@
 
 #include "canvasgesture_table.h"
 
-QPointF TableGesture::globalToTableGrid(const QPoint& point, bool snap)
+QPointF TableGesture::globalToTableGrid(const QPointF& point, bool snap)
 {
 	FPoint canvasPoint = m_canvas->globalToCanvas(point);
 

Modified: trunk/Scribus/scribus/canvasgesture_table.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasgesture_table.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_table.h	(original)
+++ trunk/Scribus/scribus/canvasgesture_table.h	Thu Mar 10 22:56:14 2022
@@ -49,7 +49,7 @@
 	 * on the table grid of the currently edited table. If @a snap is <code>true</code>,
 	 * @a point is first snapped to the page grid and guides, in that order.
 	 */
-	QPointF globalToTableGrid(const QPoint& point, bool snap = true);
+	QPointF globalToTableGrid(const QPointF& point, bool snap = true);
 
 	/**
 	 * Paints the outline of the currently edited table.

Modified: trunk/Scribus/scribus/canvasgesture_tableresize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasgesture_tableresize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_tableresize.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_tableresize.cpp	Thu Mar 10 22:56:14 2022
@@ -37,7 +37,7 @@
 {
 	event->accept();
 
-	QPointF gridPoint = globalToTableGrid(event->globalPos());
+	QPointF gridPoint = globalToTableGrid(event->globalPosition());
 
 	// Perform the actual resize of the table.
 	table()->resize(gridPoint.x(), gridPoint.y());
@@ -53,7 +53,7 @@
 {
 	event->accept();
 
-	QPointF gridPoint = globalToTableGrid(event->globalPos());
+	QPointF gridPoint = globalToTableGrid(event->globalPosition());
 
 	// Set the column  geometries for the table outline.
 	double requestedWidthFactor = gridPoint.x() / table()->tableWidth();
@@ -78,7 +78,7 @@
 	// Display size tooltip.
 	double actualTableWidth = table()->tableWidth() * actualWidthFactor;
 	double actualTableHeight = table()->tableHeight() * actualHeightFactor;
-	m_canvas->displaySizeHUD(event->globalPos(), actualTableWidth, actualTableHeight, false);
+	m_canvas->displaySizeHUD(event->globalPosition(), actualTableWidth, actualTableHeight, false);
 
 	m_canvas->update();
 }

Modified: trunk/Scribus/scribus/canvasmode_create.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_create.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_create.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_create.cpp	Thu Mar 10 22:56:14 2022
@@ -264,7 +264,7 @@
 	}
 	if ((!m_MouseButtonPressed) || !(m->buttons() & Qt::LeftButton))
 	{
-		m_canvas->displayCorrectedXYHUD(m->globalPos(), mousePointDoc.x(), mousePointDoc.y());
+		m_canvas->displayCorrectedXYHUD(m->globalPosition(), mousePointDoc.x(), mousePointDoc.y());
 		return;
 	}
 
@@ -319,7 +319,7 @@
 	{
 		if (modifiers == Qt::ControlModifier)
 			hSize = wSize;
-		m_canvas->displaySizeHUD(m->globalPos(), wSize, hSize, false);
+		m_canvas->displaySizeHUD(m->globalPosition(), wSize, hSize, false);
 	}
 	else
 	{
@@ -327,7 +327,7 @@
 		if (angle < 0.0)
 			angle = angle + 360;
 		double trueLength = sqrt(pow(createObjectRect.width(), 2) + pow(createObjectRect.height(), 2));
-		m_canvas->displaySizeHUD(m->globalPos(), trueLength, angle, true);
+		m_canvas->displaySizeHUD(m->globalPosition(), trueLength, angle, true);
 	}
 
 	// Necessary for drawControls to be called

Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp	Thu Mar 10 22:56:14 2022
@@ -239,7 +239,7 @@
 	
 	PageItem *currItem;
 	m->accept();
-	m_canvas->displayCorrectedXYHUD(m->globalPos(), mousePointDoc.x(), mousePointDoc.y());
+	m_canvas->displayCorrectedXYHUD(m->globalPosition(), mousePointDoc.x(), mousePointDoc.y());
 //	qDebug() << "legacy mode move:" << m->x() << m->y() << m_canvas->globalToCanvas(m->globalPos()).x() << m_canvas->globalToCanvas(m->globalPos()).y();
 //	emit MousePos(m->x()/m_canvas->scale(),// + m_doc->minCanvasCoordinate.x(), 
 //				  m->y()/m_canvas->scale()); // + m_doc->minCanvasCoordinate.y());

Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	Thu Mar 10 22:56:14 2022
@@ -110,7 +110,7 @@
 	
 	PageItem *currItem;
 	m->accept();
-	m_canvas->displayCorrectedXYHUD(m->globalPos(), mousePointDoc.x(), mousePointDoc.y());
+	m_canvas->displayCorrectedXYHUD(m->globalPosition(), mousePointDoc.x(), mousePointDoc.y());
 
 	if (commonMouseMove(m))
 		return;

Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	Thu Mar 10 22:56:14 2022
@@ -105,7 +105,7 @@
 	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
 	PageItem *currItem;
 	m->accept();
-	m_canvas->displayCorrectedXYHUD(m->globalPos(), mousePointDoc.x(), mousePointDoc.y());
+	m_canvas->displayCorrectedXYHUD(m->globalPosition(), mousePointDoc.x(), mousePointDoc.y());
 	if (commonMouseMove(m))
 		return;
 	if (m_mouseButtonPressed && (m_doc->appMode == modeDrawFreehandLine))

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp	Thu Mar 10 22:56:14 2022
@@ -417,7 +417,7 @@
 					QPointF rotP = p.map(QPointF(0.0, 0.0));
 					double itemRotation = xy2Deg(mousePointDoc.x() - rotP.x(), mousePointDoc.y() - rotP.y());
 					currItem->setImageRotation(itemRotation);
-					m_canvas->displayRotHUD(m->globalPos(), itemRotation);
+					m_canvas->displayRotHUD(m->globalPosition(), itemRotation);
 				}
 				else
 				{
@@ -426,7 +426,7 @@
 					QTransform mm2 = mm1.inverted();
 					QPointF rota = mm2.map(QPointF(newX, newY)) - mm2.map(QPointF(Mxp, Myp));
 					currItem->moveImageInFrame(rota.x() / currItem->imageXScale(), rota.y() / currItem->imageYScale());
-					m_canvas->displayXYHUD(m->globalPos(), currItem->imageXOffset() * currItem->imageXScale(), currItem->imageYOffset() * currItem->imageYScale());
+					m_canvas->displayXYHUD(m->globalPosition(), currItem->imageXOffset() * currItem->imageXScale(), currItem->imageYOffset() * currItem->imageYScale());
 				}
 				currItem->update();
 				Mxp = newX;

Modified: trunk/Scribus/scribus/canvasmode_editarc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_editarc.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editarc.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editarc.cpp	Thu Mar 10 22:56:14 2022
@@ -356,13 +356,13 @@
 			{
 				m_startPoint = ar.pointQF(2);
 				QLineF stLinA = QLineF(smPoint, itemMatrix.map(m_startPoint));
-				m_canvas->displayRotHUD(m->globalPos(), 360.0 - stLinA.angle());
+				m_canvas->displayRotHUD(m->globalPosition(), 360.0 - stLinA.angle());
 			}
 			else if (m_arcPoint == useControlSweep)
 			{
 				m_endPoint = ar.pointQF(ar.size() - 4);
 				QLineF stLinA = QLineF(smPoint, itemMatrix.map(m_endPoint));
-				m_canvas->displayRotHUD(m->globalPos(), 360.0 - stLinA.angle());
+				m_canvas->displayRotHUD(m->globalPosition(), 360.0 - stLinA.angle());
 			}
 			QLineF res = QLineF(m_centerPoint, m_startPoint);
 			QLineF swe = QLineF(m_centerPoint, m_endPoint);

Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.cpp	Thu Mar 10 22:56:14 2022
@@ -587,11 +587,11 @@
 				QPair<int, int> selP = m_selectedMeshPoints[0];
 				FPoint cP = currItem->meshGradientArray[selP.first][selP.second].controlColor;
 				FPoint gP = currItem->meshGradientArray[selP.first][selP.second].gridPoint;
-				m_canvas->displayXYHUD(m->globalPos(), cP.x() - gP.x(), cP.y() - gP.y());
+				m_canvas->displayXYHUD(m->globalPosition(), cP.x() - gP.x(), cP.y() - gP.y());
 			}
 		}
 		else
-			m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
+			m_canvas->displayXYHUD(m->globalPosition(), npf.x(), npf.y());
 		FPoint npx(m_Mxp - npfN.x(), m_Myp - npfN.y(), 0, 0, currItem->rotation(), 1, 1, true);
 		if (m_selectedMeshPoints.count() > 0)
 		{

Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.cpp	Thu Mar 10 22:56:14 2022
@@ -577,7 +577,7 @@
 	if (m_view->editStrokeGradient == 11)
 	{
 		m_currentPoint = QPointF(npf.x(), npf.y());
-		m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
+		m_canvas->displayXYHUD(m->globalPosition(), npf.x(), npf.y());
 		m_currItem->update();
 		QRectF upRect;
 		upRect = QRectF(QPointF(0, 0), QPointF(m_currItem->width(), m_currItem->height())).normalized();
@@ -614,7 +614,7 @@
 						cP = m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].BL.controlColor;
 						gP = m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].BL.gridPoint;
 					}
-					m_canvas->displayXYHUD(m->globalPos(), cP.x() - gP.x(), cP.y() - gP.y());
+					m_canvas->displayXYHUD(m->globalPosition(), cP.x() - gP.x(), cP.y() - gP.y());
 					if (m_patchPoint == useTL)
 						m_currItem->meshGradientPatches[m_currItem->selectedMeshPointX].TL.controlColor -= npx;
 					if (m_patchPoint == useTR)
@@ -626,7 +626,7 @@
 				}
 				else if (m_view->editStrokeGradient == 9)
 				{
-					m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
+					m_canvas->displayXYHUD(m->globalPosition(), npf.x(), npf.y());
 					if (m_view->editStrokeGradient == 9)
 					{
 						FPoint mp;

Modified: trunk/Scribus/scribus/canvasmode_editspiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_editspiral.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editspiral.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editspiral.cpp	Thu Mar 10 22:56:14 2022
@@ -315,7 +315,7 @@
 				applyValues(m_startAngle,m_endAngle,item->spiralFactor);
 				item->recalcPath();
 				m_startPoint = currItem->PoLine.pointQF(0);
-				m_canvas->displayRealRotHUD(m->globalPos(), m_startAngle);
+				m_canvas->displayRealRotHUD(m->globalPosition(), m_startAngle);
 			}
 			m_VectorDialog->setValues(computeRealAngle(m_startAngle, false), computeRealAngle(m_endAngle, false), item->spiralFactor);
 		}
@@ -327,7 +327,7 @@
 				applyValues(m_startAngle,m_endAngle,item->spiralFactor);
 				item->recalcPath();
 				m_endPoint = currItem->PoLine.pointQF(currItem->PoLine.size() - 2);
-				m_canvas->displayRealRotHUD(m->globalPos(), m_endAngle);
+				m_canvas->displayRealRotHUD(m->globalPosition(), m_endAngle);
 			}
 			m_VectorDialog->setValues(computeRealAngle(m_startAngle, false), computeRealAngle(m_endAngle, false), item->spiralFactor);
 		}

Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.cpp	Thu Mar 10 22:56:14 2022
@@ -354,14 +354,14 @@
 	m_currItem = m_doc->m_Selection->itemAt(0);
 	FPoint npf = FPoint(npfN.x(), npfN.y(), m_currItem->xPos(), m_currItem->yPos(), m_currItem->rotation(), 1, 1, true);
 	FPoint npx(m_Mxp - npfN.x(), m_Myp - npfN.y(), 0, 0, m_currItem->rotation(), 1, 1, true);
-	m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
+	m_canvas->displayXYHUD(m->globalPosition(), npf.x(), npf.y());
 	if (m_canvas->m_viewMode.m_MouseButtonPressed && m_view->moveTimerElapsed())
 	{
 		if (m_editWeldMode)
 		{
 			if (m_selectedPoint != -1)
 			{
-				m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
+				m_canvas->displayXYHUD(m->globalPosition(), npf.x(), npf.y());
 				FPoint mp_orig = m_currItem->weldList[m_selectedPoint].weldPoint;
 				FPoint mp = mp_orig - npx;
 				double xx = mp.x();

Modified: trunk/Scribus/scribus/canvasmode_imageimport.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_imageimport.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_imageimport.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_imageimport.cpp	Thu Mar 10 22:56:14 2022
@@ -161,8 +161,8 @@
 {
 	m_Mx = m->globalPos().x();
 	m_My = m->globalPos().y();
-	QToolTip::showText(m->globalPos(), m_tipText, qApp->activeWindow());
-	QToolTip::showText(m->globalPos(), m_tipText + "<b></b>", qApp->activeWindow());
+	QToolTip::showText(m->globalPosition().toPoint(), m_tipText, qApp->activeWindow());
+	QToolTip::showText(m->globalPosition().toPoint(), m_tipText + "<b></b>", qApp->activeWindow());
 	m->accept();
 	PageItem *item;
 	if ((item = m_canvas->itemUnderCursor(m->globalPos())) != nullptr)

Modified: trunk/Scribus/scribus/canvasmode_measurements.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_measurements.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_measurements.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_measurements.cpp	Thu Mar 10 22:56:14 2022
@@ -105,7 +105,7 @@
 	else
 	{
 		FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
-		m_canvas->displayCorrectedXYHUD(m->globalPos(), mousePointDoc.x(), mousePointDoc.y());
+		m_canvas->displayCorrectedXYHUD(m->globalPosition(), mousePointDoc.x(), mousePointDoc.y());
 	}
 }
 

Modified: trunk/Scribus/scribus/canvasmode_nodeedit.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_nodeedit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.cpp	Thu Mar 10 22:56:14 2022
@@ -1173,7 +1173,7 @@
 				}
 				m_doc->nodeEdit.moveClipPoint(currItem, npf);
 
-				m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
+				m_canvas->displayXYHUD(m->globalPosition(), npf.x(), npf.y());
 			}
 			else
 			{
@@ -1226,7 +1226,7 @@
 				}
 			}
 			m_doc->nodeEdit.moveClipPoint(currItem, npf);
-			m_canvas->displayXYHUD(m->globalPos(), npf.x(), npf.y());
+			m_canvas->displayXYHUD(m->globalPosition(), npf.x(), npf.y());
 		}
 		m_Mxp = newX;
 		m_Myp = newY;

Modified: trunk/Scribus/scribus/canvasmode_normal.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_normal.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_normal.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_normal.cpp	Thu Mar 10 22:56:14 2022
@@ -723,7 +723,7 @@
 					m_view->ensureVisible(selectionCenter.x(), selectionCenter.y(), localwidth / 2 + 20, localheight / 2 + 20);
 					m_canvas->repaint();
 					m_doc->m_Selection->getGroupRect(&gx, &gy, &gw, &gh);
-					m_canvas->displayCorrectedXYHUD(m->globalPos(), gx + m_objectDeltaPos.x(), gy + m_objectDeltaPos.y());
+					m_canvas->displayCorrectedXYHUD(m->globalPosition(), gx + m_objectDeltaPos.x(), gy + m_objectDeltaPos.y());
 				}
 			}
 		}

Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25013&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp	Thu Mar 10 22:56:14 2022
@@ -394,7 +394,7 @@
 			double itemRotation;
 			FPoint itemPos;
 			getNewItemPosition(currItem, itemPos, itemRotation);
-			m_canvas->displayRotHUD(m->globalPos(), itemRotation);
+			m_canvas->displayRotHUD(m->globalPosition(), itemRotation);
 		}
 		if (!m_canvas->m_viewMode.m_MouseButtonPressed)
 		{




More information about the scribus-commit mailing list