r20551 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Thu Nov 12 22:38:03 UTC 2015


Author: jghali
Date: Thu Nov 12 22:38:03 2015
New Revision: 20551

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20551
Log:
scribusview.h cleanup: remove a few unused members

Modified:
    trunk/Scribus/scribus/appmodehelper.cpp
    trunk/Scribus/scribus/canvas.cpp
    trunk/Scribus/scribus/scribusview.cpp
    trunk/Scribus/scribus/scribusview.h

Modified: trunk/Scribus/scribus/appmodehelper.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20551&path=/trunk/Scribus/scribus/appmodehelper.cpp
==============================================================================
--- trunk/Scribus/scribus/appmodehelper.cpp	(original)
+++ trunk/Scribus/scribus/appmodehelper.cpp	Thu Nov 12 22:38:03 2015
@@ -135,7 +135,6 @@
 				break;
 			}
 			scmw->slotDocCh();
-			doc->view()->FirstPoly = true;
 			setSpecialEditMode(false);
 			break;
 		}
@@ -236,7 +235,6 @@
 				setSpecialEditMode(true);
 				if ((doc->m_Selection->count() != 0) && (!PrefsManager::instance()->appPrefs.uiPrefs.stickyTools))
 					doc->view()->Deselect(true);
-				doc->view()->FirstPoly = true;
 			}
 			break;
 		case modeDrawCalligraphicLine:

Modified: trunk/Scribus/scribus/canvas.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20551&path=/trunk/Scribus/scribus/canvas.cpp
==============================================================================
--- trunk/Scribus/scribus/canvas.cpp	(original)
+++ trunk/Scribus/scribus/canvas.cpp	Thu Nov 12 22:38:03 2015
@@ -1104,16 +1104,6 @@
 
 void Canvas::drawControls(QPainter *psx)
 {
-				/*if (redrawMode == 1) // move ruler origin...
-{
-				pp.resetMatrix();
-				pp.setBrush(Qt::NoBrush);
-				pp.setPen(QPen(Qt::black, 1.0, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin));
-				QPoint nXY = redrawPolygon.point(0);
-				pp.drawLine(0, nXY.y(), this->width(), nXY.y());
-				pp.drawLine(nXY.x(), 0, nXY.x(), this->height());
-				redrawPolygon.clear();
-}*/
 	psx->save();
 	if ((m_doc->appMode == modeDrawBezierLine) && (!m_viewMode.redrawPolygon.isEmpty()) && (m_doc->m_Selection->count() != 0))
 	{

Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20551&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp	(original)
+++ trunk/Scribus/scribus/scribusview.cpp	Thu Nov 12 22:38:03 2015
@@ -145,13 +145,10 @@
 	dragX(0), dragY(0), dragW(0), dragH(0),
 	oldW(-1), // oldCp(-1),
 	RotMode(0),
-	DrHY(-1), DrVX(-1),
 	HaveSelRect(false),
 	DraggedGroup(false),
-	DraggedGroupFirst(false),
 	MidButt(false),
 	updateOn(true),
-	FirstPoly(true),
 	Magnify(false),
 	RCenter(-1,-1),
 	Ready(false),
@@ -208,8 +205,6 @@
 	m_canvas->m_viewMode.viewAsPreview = false;
 	m_canvas->setPreviewVisual(-1);
 	m_previousMode = -1;
-	redrawMode = 0;
-	redrawCount = 0;
 	redrawMarker = new SelectionRubberBand(QRubberBand::Rectangle, this);
 	redrawMarker->hide();
 	m_canvas->newRedrawPolygon();
@@ -655,7 +650,6 @@
 			dragW = gw;
 			dragH = gh;
 			DraggedGroup = true;
-			DraggedGroupFirst = true;
 			getDragRectScreen(&gx, &gy, &gw, &gh);
 //			QPoint evP = viewport()->mapToGlobal(e->pos());
 //			evP -= QPoint(contentsX(), contentsY());
@@ -687,7 +681,6 @@
 //			redrawMarker->setGeometry(QRect(evP.x() + 2, evP.y() + 2, qRound(gw - 2), qRound(gh - 2)).normalized());
 //			if (!redrawMarker->isVisible())
 //				redrawMarker->show();
-			DraggedGroupFirst = false;
 			emit MousePos(dragX, dragY); //+Doc->minCanvasCoordinate.x(), dragY+Doc->minCanvasCoordinate.y());
 			QPoint pos = m_canvas->canvasToLocal(dragPosDoc);
 			horizRuler->Draw(pos.x());
@@ -728,7 +721,6 @@
 	if (DraggedGroup)
 	{
 		DraggedGroup = false;
-		DraggedGroupFirst = false;
 		m_canvas->resetRenderMode();
 //		redrawMarker->hide();
 		updateContents();
@@ -743,14 +735,12 @@
 	UndoTransaction activeTransaction;
 	bool img = false;
 	m_canvas->resetRenderMode();
-	redrawMode = 0;
 //	redrawMarker->hide();
 //	struct ScText *hg;
 //	uint a;
 	int re = 0;
 //	e->accept(Q3TextDrag::canDecode(e));
 	e->accept();
-	DraggedGroupFirst = false;
 	bool selectedItemByDrag=false;
 	FPoint dropPosDoc = m_canvas->globalToCanvas(widget()->mapToGlobal(e->pos()));
 	QPointF dropPosDocQ(dropPosDoc.x(), dropPosDoc.y());
@@ -2129,9 +2119,7 @@
 	MidButt = false;
 	HaveSelRect = false;
 	Magnify = false;
-	FirstPoly = true;
 	Doc->nodeEdit.setEdPoints(true);
-	//GroupSel = false;
 	DraggedGroup = false;
 //FIXME:av	MoveGY = false;
 //FIXME:av	MoveGX = false;
@@ -2850,8 +2838,6 @@
 	vertRuler->Draw(out.y());
 	m_canvas->newRedrawPolygon() << QPoint(newX, newY);
 	updateContents();
-	DrHY = newY;
-	DrVX = newX;
 }
 #endif
 
@@ -2880,181 +2866,6 @@
 			Doc->m_Selection->itemAt(0)->emitAllToGUI();
 	}
 }
-
-#if 0
-void ScribusView::FromHRuler(QMouseEvent *m)
-{
-	QPoint py = viewport()->mapFromGlobal(m->globalPos());
-	int newY = py.y();
-	QPoint out = viewportToContents(py);
-	emit MousePos((py.x() + contentsX())/m_canvas->scale(), (py.y() + 2 + contentsY())/m_canvas->scale());
-	horizRuler->Draw(out.x());
-	vertRuler->Draw(out.y() + 2);
-	if (!redrawMarker->isVisible())
-		redrawMarker->show();
-	if (QRect(0, 0, visibleWidth(), visibleHeight()).contains(py))
-		redrawMarker->setGeometry(QRect(viewport()->mapToGlobal(QPoint(0, 0)).x(), m->globalPos().y(), visibleWidth(), 1));
-	DrHY = newY;
-	double newXp = (py.x() + contentsX()) / m_canvas->scale() + 0*Doc->minCanvasCoordinate.x();
-	double newYp = (py.y() + contentsY()) / m_canvas->scale() + 0*Doc->minCanvasCoordinate.y();
-	int pg = Doc->OnPage(newXp, newYp);
-	if ((pg == -1) || (!QRect(0, 0, visibleWidth(), visibleHeight()).contains(py)))
-		qApp->changeOverrideCursor(QCursor(loadIcon("DelPoint.png")));
-	else
-		qApp->changeOverrideCursor(QCursor(Qt::SplitVCursor));
-}
-
-void ScribusView::FromVRuler(QMouseEvent *m)
-{
-	QPoint py = viewport()->mapFromGlobal(m->globalPos());
-	int newY = py.x();
-	QPoint out = viewportToContents(py);
-	emit MousePos((py.x() + 2 + contentsX())/m_canvas->scale(), (py.y() + contentsY())/m_canvas->scale());
-	horizRuler->Draw(out.x() + 2);
-	vertRuler->Draw(out.y());
-	if (!redrawMarker->isVisible())
-		redrawMarker->show();
-	if (QRect(0, 0, visibleWidth(), visibleHeight()).contains(py))
-		redrawMarker->setGeometry(QRect(m->globalPos().x(), viewport()->mapToGlobal(QPoint(0, 0)).y(), 1, visibleHeight()));
-	DrVX = newY;
-	double newXp = (py.x() + contentsX()) / m_canvas->scale() + 0*Doc->minCanvasCoordinate.x();
-	double newYp = (py.y() + contentsY()) / m_canvas->scale() + 0*Doc->minCanvasCoordinate.y();
-	int pg = Doc->OnPage(newXp, newYp);
-	if ((pg == -1) || (!QRect(0, 0, visibleWidth(), visibleHeight()).contains(py)))
-		qApp->changeOverrideCursor(QCursor(loadIcon("DelPoint.png")));
-	else
-		qApp->changeOverrideCursor(QCursor(Qt::SplitHCursor));
-}
-#endif
-
-#if 0
-// TODO: PV - guides refactoring
-void ScribusView::SetYGuide(QMouseEvent *m, int oldIndex)
-{
-	QPoint py = viewport()->mapFromGlobal(m->globalPos());
-	double newX = (py.x() + contentsX()) / m_canvas->scale() + 0*Doc->minCanvasCoordinate.x();
-	double newY = (py.y() + contentsY()) / m_canvas->scale() + 0*Doc->minCanvasCoordinate.y();
-	int pg = Doc->OnPage(newX, newY);
-	if ((pg != -1) && (QRect(0, 0, visibleWidth(), visibleHeight()).contains(py)))
-	{
-		if (oldIndex < 0)
-		{
-			Doc->Pages->at(pg)->guides.addHorizontal(newY-Doc->Pages->at(pg)->yOffset(), GuideManagerCore::Standard);
-			emit signalGuideInformation(0, qRound((newY-Doc->Pages->at(pg)->yOffset()) * 10000.0) / 10000.0);
-		}
-		else
-		{
-			if (pg == Doc->currentPageNumber())
-			{
-				Doc->currentPage()->guides.moveHorizontal( Doc->currentPage()->guides.horizontal(oldIndex, GuideManagerCore::Standard),
-																							newY-Doc->currentPage()->yOffset(), GuideManagerCore::Standard);
-				emit signalGuideInformation(0, qRound((newY-Doc->Pages->at(pg)->yOffset()) * 10000.0) / 10000.0);
-			}
-			else
-			{
-				Doc->currentPage()->guides.deleteHorizontal( Doc->currentPage()->guides.horizontal(oldIndex, GuideManagerCore::Standard), GuideManagerCore::Standard);
-				emit signalGuideInformation(-1, 0.0);
-				Doc->Pages->at(pg)->guides.addHorizontal(newY-Doc->Pages->at(pg)->yOffset(), GuideManagerCore::Standard);
-			}
-		}
-		m_ScMW->guidePalette->clearRestoreHorizontalList();
-	}
-	else
-	{
-		if (oldIndex >= 0)
-		{
-			Doc->currentPage()->guides.deleteHorizontal( Doc->currentPage()->guides.horizontal(oldIndex, GuideManagerCore::Standard), GuideManagerCore::Standard);
-			emit signalGuideInformation(-1, 0.0);
-			m_ScMW->guidePalette->clearRestoreHorizontalList();
-		}
-	}
-	emit DocChanged();
-/*
-	if ((pg != -1) && (pg == Doc->currentPageNumber()) && (QRect(0, 0, visibleWidth(), visibleHeight()).contains(py)))
-	{
-		if (oldIndex < 0)
-			Doc->Pages->at(pg)->guides.addHorizontal(newY-Doc->Pages->at(pg)->yOffset(), GuideManagerCore::Standard);
-		else
-			Doc->Pages->at(pg)->guides.moveHorizontal(
-					Doc->Pages->at(pg)->guides.horizontal(oldIndex, GuideManagerCore::Standard),
-					newY-Doc->Pages->at(pg)->yOffset(),
-					GuideManagerCore::Standard);
-		m_ScMW->guidePalette->clearRestoreHorizontalList();
-		emit signalGuideInformation(0, qRound((newY-Doc->Pages->at(pg)->yOffset()) * 10000.0) / 10000.0);
-	}
-	else if (oldIndex >= 0)
-	{
-		Doc->currentPage()->guides.deleteHorizontal( Doc->currentPage()->guides.horizontal(oldIndex, GuideManagerCore::Standard), GuideManagerCore::Standard);
-		emit signalGuideInformation(-1, 0.0);
-		m_ScMW->guidePalette->clearRestoreHorizontalList();
-	}
-	emit DocChanged();
-*/
-}
-
-void ScribusView::SetXGuide(QMouseEvent *m, int oldIndex)
-{
-	QPoint py = viewport()->mapFromGlobal(m->globalPos());
-	double newX = (py.x() + contentsX()) / m_canvas->scale() + 0*Doc->minCanvasCoordinate.x();
-	double newY = (py.y() + contentsY()) / m_canvas->scale() + 0*Doc->minCanvasCoordinate.y();
-	int pg = Doc->OnPage(newX, newY);
-	if ((pg != -1) && (QRect(0, 0, visibleWidth(), visibleHeight()).contains(py)))
-	{
-		if (oldIndex < 0)
-		{
-			Doc->Pages->at(pg)->guides.addVertical(newX-Doc->Pages->at(pg)->xOffset(), GuideManagerCore::Standard);
-			emit signalGuideInformation(0, qRound((newX-Doc->Pages->at(pg)->xOffset()) * 10000.0) / 10000.0);
-		}
-		else
-		{
-			if (pg == Doc->currentPageNumber())
-			{
-				Doc->currentPage()->guides.moveVertical( Doc->currentPage()->guides.vertical(oldIndex, GuideManagerCore::Standard),
-																							newX-Doc->currentPage()->xOffset(), GuideManagerCore::Standard);
-				emit signalGuideInformation(0, qRound((newX-Doc->Pages->at(pg)->xOffset()) * 10000.0) / 10000.0);
-			}
-			else
-			{
-				Doc->currentPage()->guides.deleteVertical( Doc->currentPage()->guides.vertical(oldIndex, GuideManagerCore::Standard), GuideManagerCore::Standard);
-				emit signalGuideInformation(-1, 0.0);
-				Doc->Pages->at(pg)->guides.addVertical(newX-Doc->Pages->at(pg)->xOffset(), GuideManagerCore::Standard);
-			}
-		}
-		m_ScMW->guidePalette->clearRestoreVerticalList();
-	}
-	else
-	{
-		if (oldIndex >= 0)
-		{
-			Doc->currentPage()->guides.deleteVertical( Doc->currentPage()->guides.vertical(oldIndex, GuideManagerCore::Standard), GuideManagerCore::Standard);
-			emit signalGuideInformation(-1, 0.0);
-			m_ScMW->guidePalette->clearRestoreVerticalList();
-		}
-	}
-	emit DocChanged();
-/*
-	if ((pg != -1) && (pg == Doc->currentPageNumber()) && (QRect(0, 0, visibleWidth(), visibleHeight()).contains(py)))
-	{
-		if (oldIndex < 0)
-			Doc->Pages->at(pg)->guides.addVertical(newX-Doc->Pages->at(pg)->xOffset(), GuideManagerCore::Standard);
-		else
-			Doc->Pages->at(pg)->guides.moveVertical(
-					Doc->Pages->at(pg)->guides.vertical(oldIndex, GuideManagerCore::Standard),
-					newX-Doc->Pages->at(pg)->xOffset(),
-					GuideManagerCore::Standard);
-		m_ScMW->guidePalette->clearRestoreVerticalList();
-		emit signalGuideInformation(1, qRound((newX-Doc->Pages->at(pg)->xOffset()) * 10000.0) / 10000.0);
-	}
-	else if (oldIndex >= 0)
-	{
-		Doc->currentPage()->guides.deleteVertical( Doc->currentPage()->guides.vertical(oldIndex, GuideManagerCore::Standard), GuideManagerCore::Standard);
-		emit signalGuideInformation(-1, 0.0);
-		m_ScMW->guidePalette->clearRestoreVerticalList();
-	}
-	emit DocChanged();
-*/
-}
-#endif
 
 void ScribusView::editExtendedImageProperties()
 {

Modified: trunk/Scribus/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20551&path=/trunk/Scribus/scribus/scribusview.h
==============================================================================
--- trunk/Scribus/scribus/scribusview.h	(original)
+++ trunk/Scribus/scribus/scribusview.h	Thu Nov 12 22:38:03 2015
@@ -134,25 +134,17 @@
 	double dragX,dragY,dragW,dragH;
 	double oldW;
 	int RotMode;
-	int DrHY;
-	int DrVX;
 	bool HaveSelRect;
-	//bool GroupSel;
 	bool DraggedGroup;
-	bool DraggedGroupFirst;
 	bool MidButt;
 	bool updateOn;
-	bool FirstPoly;
 	bool Magnify;
 	bool storedFramesShown;
 	bool storedShowControls;
 	int editStrokeGradient;
-	int redrawMode;
-	int redrawCount;
 	bool m_AnnotChanged;
 	bool m_EditModeWasOn;
 	bool m_ChangedState;
-	PageItem *redrawItem;
 	SelectionRubberBand *redrawMarker;
 	FPoint RCenter;
 	FPoint m_mousePointDoc;
@@ -286,9 +278,6 @@
 	bool linkAfterDraw;
 	bool ImageAfterDraw;
 	bool m_oldSnapToElem;
-
-	double oldItemX;
-	double oldItemY;
 
 private slots:
 	void setZoom();




More information about the scribus-commit mailing list