r25015 by jghali - More removals of deprecated globalPos() calls

scribus-commit scribus-commit at lists.scribus.net
Fri Mar 11 19:54:35 UTC 2022


Author: jghali
Date: Fri Mar 11 19:54:35 2022
New Revision: 25015

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=25015
Log:
More removals of deprecated globalPos() calls

Modified:
    trunk/Scribus/scribus/canvasgesture_cellselect.cpp
    trunk/Scribus/scribus/canvasgesture_columnresize.cpp
    trunk/Scribus/scribus/canvasgesture_resize.cpp
    trunk/Scribus/scribus/canvasmode_drawbezier.cpp
    trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
    trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
    trunk/Scribus/scribus/canvasmode_eyedropper.cpp
    trunk/Scribus/scribus/canvasmode_framelinks.cpp
    trunk/Scribus/scribus/canvasmode_magnifier.cpp
    trunk/Scribus/scribus/canvasmode_rotate.cpp
    trunk/Scribus/scribus/chartableview.cpp
    trunk/Scribus/scribus/scribusview.cpp

Modified: trunk/Scribus/scribus/canvasgesture_cellselect.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/canvasgesture_cellselect.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_cellselect.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_cellselect.cpp	Fri Mar 11 19:54:35 2022
@@ -86,7 +86,7 @@
 {
 	event->accept();
 
-	TableCell newCell = table()->cellAt(m_canvas->globalToCanvas(event->globalPos()).toQPointF());
+	TableCell newCell = table()->cellAt(m_canvas->globalToCanvas(event->globalPosition()).toQPointF());
 
 	if (newCell == m_endCell || !newCell.isValid() || !m_startCell.isValid())
 		return;

Modified: trunk/Scribus/scribus/canvasgesture_columnresize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/canvasgesture_columnresize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_columnresize.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_columnresize.cpp	Fri Mar 11 19:54:35 2022
@@ -98,7 +98,7 @@
 		actualWidth = resizeColumnResizeFollowing(requestedWidth);
 
 	// Display width tooltip.
-	m_canvas->displayDoubleHUD(event->globalPos(), tr("Width"), actualWidth);
+	m_canvas->displayDoubleHUD(event->globalPosition(), tr("Width"), actualWidth);
 
 	// Update canvas.
 	m_canvas->update();

Modified: trunk/Scribus/scribus/canvasgesture_resize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/canvasgesture_resize.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.cpp	(original)
+++ trunk/Scribus/scribus/canvasgesture_resize.cpp	Fri Mar 11 19:54:35 2022
@@ -431,7 +431,7 @@
 void ResizeGesture::mouseMoveEvent(QMouseEvent *m)
 {
 	adjustBounds(m);
-	FPoint where = m_canvas->globalToCanvas(m->globalPos());
+	FPoint where = m_canvas->globalToCanvas(m->globalPosition());
 	if (// directly after a create the shape of an item isn't really usable, so we fix here
 		m_origBounds.width() < 20 || m_origBounds.height() < 20 ||
 		// and if we resize outside of the current canvas dimensions, we need to enlarge it

Modified: trunk/Scribus/scribus/canvasmode_drawbezier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/canvasmode_drawbezier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.cpp	Fri Mar 11 19:54:35 2022
@@ -235,14 +235,12 @@
 
 void BezierMode::mouseMoveEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	
 	PageItem *currItem;
 	m->accept();
 	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());
+
 	if (commonMouseMove(m))
 		return;
 	
@@ -250,8 +248,8 @@
 	{
 		if (GetItem(&currItem))
 		{
-			double newX = qRound(mousePointDoc.x()); //m_view->translateToDoc(m->x(), m->y()).x());
-			double newY = qRound(mousePointDoc.y()); //m_view->translateToDoc(m->x(), m->y()).y());
+			double newX = qRound(mousePointDoc.x());
+			double newY = qRound(mousePointDoc.y());
 			
 			if (m_doc->DragP)
 				return;
@@ -274,7 +272,8 @@
 			if ((m_mouseButtonPressed) && (m->buttons() & Qt::LeftButton))
 			{
 				QPoint startP = m_canvas->canvasToGlobal(QPointF(m_xp, m_yp));
-				m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
+				QPoint globalPos = m->globalPosition().toPoint();
+				m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(globalPos)).normalized());
 				m_view->setRedrawMarkerShown(true);
 				m_view->HaveSelRect = true;
 				return;
@@ -285,7 +284,7 @@
 
 void BezierMode::mousePressEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	
 	int z;
 	double Rxp = 0;
@@ -302,9 +301,9 @@
 	m_doc->leaveDrag = false;
 
 	m->accept();
-	m_view->registerMousePress(m->globalPos());
-	m_xp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
-	m_yp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
+	m_view->registerMousePress(m->globalPosition());
+	m_xp = mousePointDoc.x();
+	m_yp = mousePointDoc.y();
 	Rxp = m_doc->ApplyGridF(FPoint(m_xp, m_yp)).x();
 	Rxpd = m_xp - Rxp;
 	m_xp = qRound(Rxp);
@@ -360,7 +359,7 @@
 
 void BezierMode::mouseReleaseEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 
 	PageItem *currItem;
 	m_mouseButtonPressed = false;
@@ -479,9 +478,9 @@
 void BezierMode::selectPage(QMouseEvent *m)
 {
 	m_mouseButtonPressed = true;
-	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
-	m_xp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
-	m_yp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
+	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
+	m_xp = mousePointDoc.x();
+	m_yp = mousePointDoc.y();
 	m_doc->nodeEdit.deselect();
 	m_view->deselectItems(false);
 

Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.cpp	Fri Mar 11 19:54:35 2022
@@ -106,7 +106,7 @@
 
 void CalligraphicMode::mouseMoveEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	
 	PageItem *currItem;
 	m->accept();
@@ -169,7 +169,8 @@
 		if ((m_mouseButtonPressed) && (m->buttons() & Qt::LeftButton))
 		{
 			QPoint startP = m_canvas->canvasToGlobal(QPointF(m_xp, m_yp));
-			m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
+			QPoint globalPos = m->globalPosition().toPoint();
+			m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(globalPos)).normalized());
 			m_view->setRedrawMarkerShown(true);
 			m_view->HaveSelRect = true;
 			return;
@@ -179,7 +180,7 @@
 
 void CalligraphicMode::mousePressEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	double Rxp = 0;
 	double Ryp = 0;
 	QTransform pm;
@@ -190,11 +191,9 @@
 	m_doc->leaveDrag = false;
 
 	m->accept();
-	m_view->registerMousePress(m->globalPos());
-
-	m_xp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
-	m_yp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
-//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+	m_view->registerMousePress(m->globalPosition());
+	m_xp = mousePointDoc.x();
+	m_yp = mousePointDoc.y();
 	Rxp = m_doc->ApplyGridF(FPoint(m_xp, m_yp)).x();
 	m_xp = qRound(Rxp);
 	Ryp = m_doc->ApplyGridF(FPoint(m_xp, m_yp)).y();
@@ -324,9 +323,9 @@
 void CalligraphicMode::selectPage(QMouseEvent *m)
 {
 	m_mouseButtonPressed = true;
-	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
-	m_xp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
-	m_yp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
+	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
+	m_xp = mousePointDoc.x();
+	m_yp = mousePointDoc.y();
 	m_doc->nodeEdit.deselect();
 	m_view->deselectItems(false);
 

Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.cpp	Fri Mar 11 19:54:35 2022
@@ -102,7 +102,7 @@
 
 void FreehandMode::mouseMoveEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	PageItem *currItem;
 	m->accept();
 	m_canvas->displayCorrectedXYHUD(m->globalPosition(), mousePointDoc.x(), mousePointDoc.y());
@@ -110,8 +110,8 @@
 		return;
 	if (m_mouseButtonPressed && (m_doc->appMode == modeDrawFreehandLine))
 	{
-		double newXF = mousePointDoc.x(); //m_view->translateToDoc(m->x(), m->y()).x();
-		double newYF = mousePointDoc.y(); //m_view->translateToDoc(m->x(), m->y()).y();
+		double newXF = mousePointDoc.x();
+		double newYF = mousePointDoc.y();
 		if (!m_poly.empty())
 		{
 			if (FPoint(newXF, newYF) != m_poly.point(m_poly.size()-1))
@@ -155,7 +155,8 @@
 		if ((m_mouseButtonPressed) && (m->buttons() & Qt::LeftButton))
 		{
 			QPoint startP = m_canvas->canvasToGlobal(QPointF(m_xp, m_yp));
-			m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
+			QPoint globalPos = m->globalPosition().toPoint();
+			m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(globalPos)).normalized());
 			m_view->setRedrawMarkerShown(true);
 			m_view->HaveSelRect = true;
 			return;
@@ -165,7 +166,7 @@
 
 void FreehandMode::mousePressEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	double Rxp = 0;
 	double Ryp = 0;
 	QTransform pm;
@@ -174,10 +175,9 @@
 	m_doc->DragP = false;
 	m_doc->leaveDrag = false;
 	m->accept();
-	m_view->registerMousePress(m->globalPos());
-	m_xp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
-	m_yp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
-//	QRect mpo(m->x()-m_doc->guidesPrefs().grabRadius, m->y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
+	m_view->registerMousePress(m->globalPosition());
+	m_xp = mousePointDoc.x();
+	m_yp = mousePointDoc.y();
 	Rxp = m_doc->ApplyGridF(FPoint(m_xp, m_yp)).x();
 	m_xp = qRound(Rxp);
 	Ryp = m_doc->ApplyGridF(FPoint(m_xp, m_yp)).y();
@@ -308,9 +308,9 @@
 void FreehandMode::selectPage(QMouseEvent *m)
 {
 	m_mouseButtonPressed = true;
-	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
-	m_xp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
-	m_yp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
+	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
+	m_xp = mousePointDoc.x();
+	m_yp = mousePointDoc.y();
 	m_doc->nodeEdit.deselect();
 	m_view->deselectItems(false);
 

Modified: trunk/Scribus/scribus/canvasmode_eyedropper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/canvasmode_eyedropper.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_eyedropper.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_eyedropper.cpp	Fri Mar 11 19:54:35 2022
@@ -156,7 +156,7 @@
 	QPixmap pm;
 	QScreen *screen = QGuiApplication::primaryScreen();
 	if (screen)
-		pm = screen->grabWindow(0); // screen()->winId(), m->globalPos().x(), m->globalPos().y(), 1, 1);
+		pm = screen->grabWindow(0);
 	QImage i = pm.toImage();
 	QColor selectedColor = i.pixel(0, 0);
 

Modified: trunk/Scribus/scribus/canvasmode_framelinks.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/canvasmode_framelinks.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_framelinks.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_framelinks.cpp	Fri Mar 11 19:54:35 2022
@@ -150,8 +150,6 @@
 
 void CanvasMode_FrameLinks::mouseMoveEvent(QMouseEvent *m)
 {
-	//const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
-	
 	m->accept();
 
 	if (commonMouseMove(m))
@@ -168,7 +166,7 @@
 
 void CanvasMode_FrameLinks::mousePressEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 
 	double Rxp = 0;
 	double Ryp = 0;
@@ -180,9 +178,9 @@
 	m_doc->leaveDrag = false;
 //	oldClip = 0;
 	m->accept();
-	m_view->registerMousePress(m->globalPos());
-	m_Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
-	m_Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
+	m_view->registerMousePress(m->globalPosition());
+	m_Mxp = mousePointDoc.x();
+	m_Myp = mousePointDoc.y();
 	Rxp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).x();
 	m_Mxp = qRound(Rxp);
 	Ryp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).y();
@@ -330,7 +328,7 @@
 #ifdef GESTURE_FRAME_PREVIEW
 	clearPixmapCache();
 #endif // GESTURE_FRAME_PREVIEW
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	PageItem *currItem;
 	m_canvas->m_viewMode.m_MouseButtonPressed = false;
 	m_canvas->resetRenderMode();
@@ -365,9 +363,9 @@
 void CanvasMode_FrameLinks::selectPage(QMouseEvent *m)
 {
 	m_canvas->m_viewMode.m_MouseButtonPressed = true;
-	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
-	m_Mxp = mousePointDoc.x(); //static_cast<int>(m->x()/m_canvas->scale());
-	m_Myp = mousePointDoc.y(); //static_cast<int>(m->y()/m_canvas->scale());
+	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
+	m_Mxp = mousePointDoc.x();
+	m_Myp = mousePointDoc.y();
 	m_doc->nodeEdit.deselect();
 	m_view->deselectItems(false);
 	if (!m_doc->masterPageMode())
@@ -397,11 +395,11 @@
 	QTransform p;
 	PageItem *currItem;
 	m_canvas->m_viewMode.m_MouseButtonPressed = true;
-	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
-	m_Mxp = mousePointDoc.x(); //m->x()/m_canvas->scale());
-	m_Myp = mousePointDoc.y(); //m->y()/m_canvas->scale());
-	int MxpS = static_cast<int>(mousePointDoc.x()); //m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
-	int MypS = static_cast<int>(mousePointDoc.y()); //m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
+	FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
+	m_Mxp = mousePointDoc.x();
+	m_Myp = mousePointDoc.y();
+	int MxpS = static_cast<int>(mousePointDoc.x());
+	int MypS = static_cast<int>(mousePointDoc.y());
 	m_doc->nodeEdit.deselect();
 	if (!m_doc->masterPageMode())
 	{
@@ -469,7 +467,7 @@
 	{
 		m_view->deselectItems(false);
 	}
-	currItem = m_canvas->itemUnderCursor(m->globalPos(), currItem, (m->modifiers() & SELECT_IN_GROUP));
+	currItem = m_canvas->itemUnderCursor(m->globalPosition(), currItem, (m->modifiers() & SELECT_IN_GROUP));
 	if (currItem)
 	{
 		m_doc->m_Selection->delaySignalsOn();

Modified: trunk/Scribus/scribus/canvasmode_magnifier.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/canvasmode_magnifier.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_magnifier.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_magnifier.cpp	Fri Mar 11 19:54:35 2022
@@ -128,7 +128,8 @@
 		m_SeRx = newX;
 		m_SeRy = newY;
 		QPoint startP = m_canvas->canvasToGlobal(QPointF(m_Mxp, m_Myp));
-		m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(m->globalPos())).normalized());
+		QPoint globalPos = m->globalPosition().toPoint();
+		m_view->redrawMarker->setGeometry(QRect(m_view->mapFromGlobal(startP), m_view->mapFromGlobal(globalPos)).normalized());
 		m_view->setRedrawMarkerShown(true);
 		m_view->HaveSelRect = true;
 	}
@@ -145,9 +146,9 @@
 	m_doc->DragP = false;
 	m_doc->leaveDrag = false;
 	m->accept();
-	m_view->registerMousePress(m->globalPos());
-	m_Mxp = mousePointDoc.x(); //qRound(m->x()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x());
-	m_Myp = mousePointDoc.y(); //qRound(m->y()/m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y());
+	m_view->registerMousePress(m->globalPosition());
+	m_Mxp = mousePointDoc.x();
+	m_Myp = mousePointDoc.y();
 	double Rxp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).x();
 	m_Mxp = qRound(Rxp);
 	double Ryp = m_doc->ApplyGridF(FPoint(m_Mxp, m_Myp)).y();
@@ -172,11 +173,13 @@
 		m_view->Magnify = true;
 		m_view->setCursor(IconManager::instance().loadCursor("lupez.png"));
 	}
-	m_Mxp = mousePointDoc.x(); //m->globalPos().x();
-	m_Myp = mousePointDoc.y(); //m->globalPos().y();
+	m_Mxp = mousePointDoc.x();
+	m_Myp = mousePointDoc.y();
 	m_SeRx = m_Mxp;
 	m_SeRy = m_Myp;
-	m_view->redrawMarker->setGeometry(m->globalPos().x(), m->globalPos().y(), 1, 1);
+
+	QPoint globalPos = m->globalPosition().toPoint();
+	m_view->redrawMarker->setGeometry(globalPos.x(), globalPos.y(), 1, 1);
 }
 
 void CanvasMode_Magnifier::mouseReleaseEvent(QMouseEvent *m)

Modified: trunk/Scribus/scribus/canvasmode_rotate.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/canvasmode_rotate.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.cpp	(original)
+++ trunk/Scribus/scribus/canvasmode_rotate.cpp	Fri Mar 11 19:54:35 2022
@@ -196,7 +196,7 @@
 
 void CanvasMode_Rotate::mousePressEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	m_canvasPressCoord = mousePointDoc;
 	
 	m_canvas->PaintSizeRect(QRect());
@@ -207,7 +207,7 @@
 	m_view->HaveSelRect = false;
 	m_doc->leaveDrag = false;
 	m->accept();
-	m_view->registerMousePress(m->globalPos());
+	m_view->registerMousePress(m->globalPosition());
 	QRect mpo(m->position().x()-m_doc->guidesPrefs().grabRadius, m->position().y()-m_doc->guidesPrefs().grabRadius, m_doc->guidesPrefs().grabRadius*2, m_doc->guidesPrefs().grabRadius*2);
 	double Rxp = m_doc->ApplyGridF(m_canvasPressCoord).x();
 	m_canvasPressCoord.setX( qRound(Rxp) );
@@ -294,7 +294,7 @@
 #ifdef GESTURE_FRAME_PREVIEW
 	clearPixmapCache();
 #endif // GESTURE_FRAME_PREVIEW
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	PageItem *currItem;
 	m_canvas->m_viewMode.m_MouseButtonPressed = false;
 	m_canvas->resetRenderMode();
@@ -378,7 +378,7 @@
 
 void CanvasMode_Rotate::mouseMoveEvent(QMouseEvent *m)
 {
-	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPos());
+	const FPoint mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 	m_canvasCurrCoord  = mousePointDoc;
 	m_angleConstrained = false;
 	

Modified: trunk/Scribus/scribus/chartableview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/chartableview.cpp
==============================================================================
--- trunk/Scribus/scribus/chartableview.cpp	(original)
+++ trunk/Scribus/scribus/chartableview.cpp	Fri Mar 11 19:54:35 2022
@@ -86,8 +86,9 @@
 		if (!acceptDrops())
 		{
 			hideZoomedChar();
+			QPoint globalPos = event->globalPosition().toPoint();
 			zoom = new CharZoom(this, currentChar, model()->fontFace());
-			zoom->move(event->globalPos().x()-2, event->globalPos().y()-2);
+			zoom->move(globalPos.x() - 2, globalPos.y() - 2);
 			zoom->show();
 		}
 		else

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=25015&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Fri Mar 11 19:54:35 2022
@@ -238,13 +238,13 @@
 	if (e->gestureType() == Qt::ZoomNativeGesture)
 	{
 		double delta = 1 + e->value();
-		FPoint mp = m_canvas->globalToCanvas(e->globalPos());
+		FPoint mp = m_canvas->globalToCanvas(e->globalPosition());
 		zoom(mp.x(), mp.y(), m_canvas->scale() * delta, true);
 	}
 	if (e->gestureType() == Qt::SmartZoomNativeGesture)
 	{
 		static bool zoomTo100 = false;
-		FPoint mp = m_canvas->globalToCanvas(e->globalPos());
+		FPoint mp = m_canvas->globalToCanvas(e->globalPosition());
 		if (zoomTo100)
 		{
 			zoom(mp.x(), mp.y(), Prefs->displayPrefs.displayScale, true);
@@ -2699,7 +2699,7 @@
 
 void ScribusView::setNewRulerOrigin(QMouseEvent *m)
 {
-	QPoint py = viewport()->mapFromGlobal(m->globalPos());
+	QPointF py = viewport()->mapFromGlobal(m->globalPosition());
 	m_doc->rulerXoffset = (py.x() + contentsX()) / m_canvas->scale() + 0*m_doc->minCanvasCoordinate.x();
 	m_doc->rulerYoffset = (py.y() + contentsY()) / m_canvas->scale() + 0*m_doc->minCanvasCoordinate.y();
 	if (m_doc->guidesPrefs().rulerMode)
@@ -3312,10 +3312,10 @@
 	if (obj == widget() && event->type() == QEvent::MouseMove)
 	{
 		auto* m = dynamic_cast<QMouseEvent*> (event);
-		m_mousePointDoc=m_canvas->globalToCanvas(m->globalPos());
+		m_mousePointDoc = m_canvas->globalToCanvas(m->globalPosition());
 		FPoint p = m_canvas->localToCanvas(QPoint(m->position().x(),m->position().y()));
 		emit MousePos(p.x(),p.y());
-		horizRuler->draw(m->position().x() + qRound(m_doc->minCanvasCoordinate.x() * m_canvas->scale())); //  - 2 * contentsX());
+		horizRuler->draw(m->position().x() + qRound(m_doc->minCanvasCoordinate.x() * m_canvas->scale()));
 		vertRuler->draw(m->position().y() + qRound(m_doc->minCanvasCoordinate.y() * m_canvas->scale()));
 		m_canvasMode->mouseMoveEvent(m);
 		return true;




More information about the scribus-commit mailing list