r18095 by craig - Rename PageItem's Width/Height, some more rearranging of pageitem.h

scribus-commit scribus-commit at lists.scribus.net
Tue Jan 15 22:03:04 UTC 2013


Author: craig
Date: Tue Jan 15 22:03:04 2013
New Revision: 18095

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18095
Log:
Rename PageItem's Width/Height, some more rearranging of pageitem.h

Modified:
    trunk/Scribus/scribus/pageitem.cpp
    trunk/Scribus/scribus/pageitem.h
    trunk/Scribus/scribus/pageitem_group.cpp
    trunk/Scribus/scribus/pageitem_imageframe.cpp
    trunk/Scribus/scribus/pageitem_latexframe.cpp
    trunk/Scribus/scribus/pageitem_line.cpp
    trunk/Scribus/scribus/pageitem_noteframe.cpp
    trunk/Scribus/scribus/pageitem_symbol.cpp
    trunk/Scribus/scribus/pageitem_textframe.cpp

Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18095&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Tue Jan 15 22:03:04 2013
@@ -262,8 +262,8 @@
 	GrColorP4QColor(other.GrColorP4QColor),
 	m_xPos(other.m_xPos),
 	m_yPos(other.m_yPos),
-	Width(other.Width),
-	Height(other.Height),
+	m_width(other.m_width),
+	m_height(other.m_height),
 	m_rotation(other.m_rotation),
 	m_isSelected(other.m_isSelected),
 	m_imageXScale(other.m_imageXScale),
@@ -397,8 +397,8 @@
 	gXpos = oldXpos = m_xPos = x;
 	gYpos = oldYpos = m_yPos = y;
 	//CB Surely we can remove some of these?
-	OldB2 = OldB = oldWidth = Width = w;
-	OldH2 = OldH = oldHeight = Height = h;
+	OldB2 = OldB = oldWidth = m_width = w;
+	OldH2 = OldH = oldHeight = m_height = h;
 	BoundingX = x;
 	BoundingY = y;
 	BoundingW = w;
@@ -760,27 +760,27 @@
 	mgP.color = qcol;
 	mgList.append(mgP);
 	patch.TL = mgP;
-	mgP.resetTo(FPoint(Width / 2.0, 0.0));
+	mgP.resetTo(FPoint(m_width / 2.0, 0.0));
 	mgList.append(mgP);
-	mgP.resetTo(FPoint(Width, 0.0));
+	mgP.resetTo(FPoint(m_width, 0.0));
 	mgList.append(mgP);
 	patch.TR = mgP;
 	meshGradientArray.append(mgList);
 	mgList.clear();
-	mgP.resetTo(FPoint(0.0, Height / 2.0));
+	mgP.resetTo(FPoint(0.0, m_height / 2.0));
 	mgList.append(mgP);
-	mgP.resetTo(FPoint(Width / 2.0, Height / 2.0));
+	mgP.resetTo(FPoint(m_width / 2.0, m_height / 2.0));
 	mgList.append(mgP);
-	mgP.resetTo(FPoint(Width, Height / 2.0));
+	mgP.resetTo(FPoint(m_width, m_height / 2.0));
 	mgList.append(mgP);
 	meshGradientArray.append(mgList);
 	mgList.clear();
-	mgP.resetTo(FPoint(0.0, Height));
+	mgP.resetTo(FPoint(0.0, m_height));
 	mgList.append(mgP);
 	patch.BL = mgP;
-	mgP.resetTo(FPoint(Width / 2.0, Height));
+	mgP.resetTo(FPoint(m_width / 2.0, m_height));
 	mgList.append(mgP);
-	mgP.resetTo(FPoint(Width, Height));
+	mgP.resetTo(FPoint(m_width, m_height));
 	mgList.append(mgP);
 	patch.BR = mgP;
 	meshGradientArray.append(mgList);
@@ -915,7 +915,7 @@
 
 void PageItem::setWidth(const double newWidth)
 {
-	Width = newWidth;
+	m_width = newWidth;
 	updateConstants();
 	if (m_Doc->isLoading())
 		return;
@@ -924,7 +924,7 @@
 
 void PageItem::setHeight(const double newHeight)
 {
-	Height = newHeight;
+	m_height = newHeight;
 	updateConstants();
 	if (m_Doc->isLoading())
 		return;
@@ -933,8 +933,8 @@
 
 void PageItem::setWidthHeight(const double newWidth, const double newHeight, bool drawingOnly)
 {
-	Width = newWidth;
-	Height = newHeight;
+	m_width = newWidth;
+	m_height = newHeight;
 	updateConstants();
 	if (drawingOnly)
 		return;
@@ -943,8 +943,8 @@
 
 void PageItem::setWidthHeight(const double newWidth, const double newHeight)
 {
-	Width = newWidth;
-	Height = newHeight;
+	m_width = newWidth;
+	m_height = newHeight;
 	updateConstants();
 	if (m_Doc->isLoading())
 		return;
@@ -956,9 +956,9 @@
 	if (dH==0.0 && dW==0.0)
 		return;
 	if (dH!=0.0)
-		Width+=dH;
+		m_width+=dH;
 	if (dW!=0.0)
-		Height+=dW;
+		m_height+=dW;
 	updateConstants();
 	if (m_Doc->isLoading())
 		return;
@@ -1148,9 +1148,9 @@
 {
 	qreal sideLength = 10 / qMax(p->zoomFactor(), 1.0);
 	qreal offset = 1 / qMax(p->zoomFactor(), 1.0);
-	qreal left = Width - sideLength-offset;// / 2;
+	qreal left = m_width - sideLength-offset;// / 2;
 	qreal right = left + sideLength;
-	qreal top = Height - sideLength-offset;// * 1.5;
+	qreal top = m_height - sideLength-offset;// * 1.5;
 	qreal bottom = top + sideLength;
 
 	QColor color(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor);
@@ -2043,8 +2043,8 @@
 				|| ((72.0 / imageYScale()) > maxres)) 
 				&& (isRaster) && (checkres) && (!m_Doc->drawAsPreview) && (PrefsManager::instance()->appPrefs.displayPrefs.showVerifierWarningsOnCanvas))
 			{
-				double ofx = Width - 22.0;
-				double ofy = Height - 22.0;
+				double ofx = m_width - 22.0;
+				double ofy = m_height - 22.0;
 				p->save();
 				p->translate(ofx, ofy);
 				QImage ico = loadIcon("22/dialog-warning.png").toImage();
@@ -2060,8 +2060,8 @@
 			p->setBrushOpacity(1.0);
 			p->setFillMode(ScPainter::Solid);
 			double ofwh = 10;
-			double ofx = Width - ofwh/2;
-			double ofy = Height - ofwh*3;
+			double ofx = m_width - ofwh/2;
+			double ofy = m_height - ofwh*3;
 			p->drawSharpRect(ofx, ofy, ofwh, ofwh);
 		}
 		if (no_fill && no_stroke && m_Doc->guidesPrefs().framesShown)
@@ -2070,7 +2070,7 @@
 			if (m_Locked)
 				p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			p->setFillMode(ScPainter::None);
-			p->drawSharpRect(0, 0, Width, Height);
+			p->drawSharpRect(0, 0, m_width, m_height);
 			no_fill = false;
 			no_stroke = false;
 		}
@@ -2145,13 +2145,13 @@
 	if (m_Doc->guidesPrefs().framesShown)
 	{
 		p->save();
-		p->translate(0, -(cembedded->Height * (style.scaleV() / 1000.0)));
+		p->translate(0, -(cembedded->m_height * (style.scaleV() / 1000.0)));
 		if (style.baselineOffset() != 0)
-			p->translate(0, -cembedded->Height * (style.baselineOffset() / 1000.0));
+			p->translate(0, -cembedded->m_height * (style.baselineOffset() / 1000.0));
 		p->scale(style.scaleH() / 1000.0, style.scaleV() / 1000.0);
 		p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameNormColor, 0, Qt::DotLine, Qt::FlatCap, Qt::MiterJoin);
 		p->setFillMode(ScPainter::None);
-		p->drawSharpRect(0, 0, cembedded->Width, cembedded->Height);
+		p->drawSharpRect(0, 0, cembedded->m_width, cembedded->m_height);
 		p->restore();
 	}
 }
@@ -3335,8 +3335,8 @@
 		undoManager->action(this,is);
 	}
 	meshGradientArray.clear();
-	double xoffs = Width / static_cast<double>(cols);
-	double yoffs = Height / static_cast<double>(rows);
+	double xoffs = m_width / static_cast<double>(cols);
+	double yoffs = m_height / static_cast<double>(rows);
 	for (int x = 0; x < rows + 1; x++)
 	{
 		QList<meshPoint> mgList;
@@ -3365,8 +3365,8 @@
 		is->setItem(meshGradientArray);
 		undoManager->action(this,is);
 	}
-	double xoffs = Width / static_cast<double>(cols-1);
-	double yoffs = Height / static_cast<double>(rows-1);
+	double xoffs = m_width / static_cast<double>(cols-1);
+	double yoffs = m_height / static_cast<double>(rows-1);
 	for (int x = 0; x < rows; x++)
 		for (int y = 0; y < cols; y++)
 			meshGradientArray[x][y].resetTo(FPoint(y * xoffs, x * yoffs));
@@ -4610,7 +4610,7 @@
 {
 	bool spreadChanges(false);
 	// has the item been resized
-	if (force || ((oldWidth != Width || oldHeight != Height) && shouldCheck()))
+	if (force || ((oldWidth != m_width || oldHeight != m_height) && shouldCheck()))
 	{
 		resizeUndoAction();
 		spreadChanges = (textFlowMode() != TextFlowDisabled );
@@ -4679,28 +4679,28 @@
 
 void PageItem::resizeUndoAction()
 {
-	if (oldHeight == Height && oldWidth == Width)
+	if (oldHeight == m_height && oldWidth == m_width)
 		return;
 	bool doUndo = true;
 	if (isNoteFrame()
 		&& ((asNoteFrame()->isAutoHeight() && asNoteFrame()->isAutoWidth())
-			|| ((oldHeight == Height) && asNoteFrame()->isAutoWidth())
-			|| ((oldWidth == Width) && asNoteFrame()->isAutoHeight())))
+			|| ((oldHeight == m_height) && asNoteFrame()->isAutoWidth())
+			|| ((oldWidth == m_width) && asNoteFrame()->isAutoHeight())))
 		doUndo = false;
 	if (doUndo && UndoManager::undoEnabled())
 	{
 		SimpleState *ss = new SimpleState(Um::Resize,
-                           QString(Um::ResizeFromTo).arg(oldWidth).arg(oldHeight).arg(Width).arg(Height),
+						   QString(Um::ResizeFromTo).arg(oldWidth).arg(oldHeight).arg(m_width).arg(m_height),
                                           Um::IResize);
 		if (!isNoteFrame() || !asNoteFrame()->isAutoWidth())
 		{
 		ss->set("OLD_WIDTH", oldWidth);
-		ss->set("NEW_WIDTH", Width);
+		ss->set("NEW_WIDTH", m_width);
 		}
 		if (!isNoteFrame() || !asNoteFrame()->isAutoHeight())
 		{
 			ss->set("OLD_HEIGHT", oldHeight);
-		ss->set("NEW_HEIGHT", Height);
+		ss->set("NEW_HEIGHT", m_height);
 		}
 		if (!isNoteFrame() || !asNoteFrame()->isAutoWelded())
 		{
@@ -4714,9 +4714,9 @@
 		undoManager->action(this, ss);
 	}
 	if (!isNoteFrame() || !asNoteFrame()->isAutoWidth())
-		oldWidth = Width;
+		oldWidth = m_width;
 	if (!isNoteFrame() || !asNoteFrame()->isAutoHeight())
-		oldHeight = Height;
+		oldHeight = m_height;
 	if (!isNoteFrame() || !asNoteFrame()->isAutoWelded())
 	{
 		oldXpos = m_xPos;
@@ -4747,11 +4747,11 @@
 		if (!isNoteFrame() || !asNoteFrame()->isAutoHeight())
 		{
 		ss->set("OLD_RHEIGHT", oldHeight);
-		ss->set("NEW_RHEIGHT", Height);
+		ss->set("NEW_RHEIGHT", m_height);
 		}
 		if (!isNoteFrame() || !asNoteFrame()->isAutoWidth())
 		{
-			ss->set("NEW_RWIDTH", Width);
+			ss->set("NEW_RWIDTH", m_width);
 			ss->set("OLD_RWIDTH", oldWidth);
 		}
 		undoManager->action(this, ss);
@@ -4760,8 +4760,8 @@
 	oldXpos = m_xPos;
 	oldYpos = m_yPos;
 	oldOwnPage = OwnPage;
-	oldWidth = Width;
-	oldHeight = Height;
+	oldWidth = m_width;
+	oldHeight = m_height;
 }
 
 void PageItem::changeImageOffsetUndoAction()
@@ -6508,8 +6508,8 @@
 		m_Doc->MoveItem(mx, my, this, false);
 		m_Doc->RotateItem(rt, this);
 	}
-	oldWidth = Width;
-	oldHeight = Height;
+	oldWidth = m_width;
+	oldHeight = m_height;
 	oldXpos = m_xPos;
 	oldYpos = m_yPos;
 	oldOwnPage = OwnPage;
@@ -6546,8 +6546,8 @@
 	oldXpos = m_xPos;
 	oldYpos = m_yPos;
 	oldOwnPage = OwnPage;
-	oldWidth = Width;
-	oldHeight = Height;
+	oldWidth = m_width;
+	oldHeight = m_height;
 }
 
 void PageItem::restoreShowImage(SimpleState *state, bool isUndo)
@@ -8297,10 +8297,10 @@
 			PoLine.setMarker();
 			continue;
 		}
-		double x1 = Width * vals[a] / 100.0;
-		double y1 = Height * vals[a+1] / 100.0;
-		double x2 = Width * vals[a+2] / 100.0;
-		double y2 = Height * vals[a+3] / 100.0;
+		double x1 = m_width * vals[a] / 100.0;
+		double y1 = m_height * vals[a+1] / 100.0;
+		double x2 = m_width * vals[a+2] / 100.0;
+		double y2 = m_height * vals[a+3] / 100.0;
 		PoLine.addPoint(x1, y1);
 		PoLine.addPoint(x2, y2);
 	}
@@ -8340,27 +8340,27 @@
 
 void PageItem::SetFrameRound()
 {
-	setCornerRadius(qMin(m_roundedCorderRadius, qMin(Width,Height)/2));
+	setCornerRadius(qMin(m_roundedCorderRadius, qMin(m_width, m_height)/2));
 	PoLine.resize(0);
 	double rr = fabs(m_roundedCorderRadius);
 	if (m_roundedCorderRadius > 0.0)
 	{
 		QPainterPath path;
-		path.addRoundedRect(0, 0, Width, Height, rr, rr);
+		path.addRoundedRect(0, 0, m_width, m_height, rr, rr);
 		PoLine.fromQPainterPath(path);
 	}
 	else
 	{
 		double bezierFactor = 0.552284749; //Bezier Control Point Factor: 8/3*(sin(45)-0.5)
 		double rrxBezierFactor = rr*bezierFactor;
-		double Width_rr = Width-rr;
-		double Height_rr = Height-rr;
+		double Width_rr = m_width-rr;
+		double Height_rr = m_height-rr;
 		PoLine.addQuadPoint(rr, 0, rr, 0, Width_rr, 0, Width_rr, 0);
-		PoLine.addQuadPoint(Width_rr, 0, Width_rr, rrxBezierFactor, Width, rr, Width-rrxBezierFactor, rr);
-		PoLine.addQuadPoint(Width, rr, Width, rr, Width, Height_rr, Width, Height_rr);
-		PoLine.addQuadPoint(Width, Height_rr, Width-rrxBezierFactor, Height_rr, Width_rr, Height, Width_rr, Height-rrxBezierFactor);
-		PoLine.addQuadPoint(Width_rr, Height, Width_rr, Height, rr, Height, rr, Height);
-		PoLine.addQuadPoint(rr, Height, rr, Height-rrxBezierFactor, 0, Height_rr, rrxBezierFactor, Height_rr);
+		PoLine.addQuadPoint(Width_rr, 0, Width_rr, rrxBezierFactor, m_width, rr, m_width-rrxBezierFactor, rr);
+		PoLine.addQuadPoint(m_width, rr, m_width, rr, m_width, Height_rr, m_width, Height_rr);
+		PoLine.addQuadPoint(m_width, Height_rr, m_width-rrxBezierFactor, Height_rr, Width_rr, m_height, Width_rr, m_height-rrxBezierFactor);
+		PoLine.addQuadPoint(Width_rr, m_height, Width_rr, m_height, rr, m_height, rr, m_height);
+		PoLine.addQuadPoint(rr, m_height, rr, m_height-rrxBezierFactor, 0, Height_rr, rrxBezierFactor, Height_rr);
 		PoLine.addQuadPoint(0, Height_rr, 0, Height_rr, 0, rr, 0, rr);
 		PoLine.addQuadPoint(0, rr, rrxBezierFactor, rr, rr, 0, rr, rr*bezierFactor);
 	}
@@ -8488,9 +8488,9 @@
 		FPointArray pb;
 		pb.resize(0);
 		pb.addPoint(FPoint(m_xPos, m_yPos));
-		pb.addPoint(FPoint(Width,    0.0, m_xPos, m_yPos, m_rotation, 1.0, 1.0));
-		pb.addPoint(FPoint(Width, Height, m_xPos, m_yPos, m_rotation, 1.0, 1.0));
-		pb.addPoint(FPoint(  0.0, Height, m_xPos, m_yPos, m_rotation, 1.0, 1.0));
+		pb.addPoint(FPoint(m_width,    0.0, m_xPos, m_yPos, m_rotation, 1.0, 1.0));
+		pb.addPoint(FPoint(m_width, m_height, m_xPos, m_yPos, m_rotation, 1.0, 1.0));
+		pb.addPoint(FPoint(  0.0, m_height, m_xPos, m_yPos, m_rotation, 1.0, 1.0));
 		for (uint pc = 0; pc < 4; ++pc)
 		{
 			minx = qMin(minx, pb.point(pc).x());
@@ -8507,8 +8507,8 @@
 	{
 		*x1 = m_xPos;
 		*y1 = m_yPos;
-		*x2 = m_xPos + qMax(1.0, qMax(Width, m_lineWidth));
-		*y2 = m_yPos + qMax(1.0, qMax(Height, m_lineWidth));
+		*x2 = m_xPos + qMax(1.0, qMax(m_width, m_lineWidth));
+		*y2 = m_yPos + qMax(1.0, qMax(m_height, m_lineWidth));
 	}
 	QRectF totalRect = QRectF(QPointF(*x1, *y1), QPointF(*x2, *y2));
 	if (m_startArrowIndex != 0)
@@ -8574,7 +8574,7 @@
 		arrowTrans.rotate(m_rotation);
 		if (itemType() == Line)
 		{
-			arrowTrans.translate(Width, 0);
+			arrowTrans.translate(m_width, 0);
 			arrowTrans.scale(m_endArrowScale / 100.0, m_endArrowScale / 100.0);
 			if (NamedLStyle.isEmpty())
 			{
@@ -8748,7 +8748,7 @@
 		arrowTrans.rotate(m_rotation);
 		if (itemType() == Line)
 		{
-			arrowTrans.translate(Width, 0);
+			arrowTrans.translate(m_width, 0);
 			arrowTrans.scale(m_endArrowScale / 100.0, m_endArrowScale / 100.0);
 			if (NamedLStyle.isEmpty())
 			{
@@ -8896,8 +8896,8 @@
 		}
 	}
 	if (isPathText())
-		return qMax(QRectF(Clip.boundingRect()).width(), Width + extraSpace);
-	return Width + extraSpace;
+		return qMax(QRectF(Clip.boundingRect()).width(), m_width + extraSpace);
+	return m_width + extraSpace;
 }
 
 double PageItem::visualHeight() const
@@ -8926,8 +8926,8 @@
 			extraSpace = sl.Width;
 	}
 	if (isPathText())
-		return qMax(QRectF(Clip.boundingRect()).height(), Height + extraSpace);
-	return isLine() ? extraSpace : Height + extraSpace;
+		return qMax(QRectF(Clip.boundingRect()).height(), m_height + extraSpace);
+	return isLine() ? extraSpace : m_height + extraSpace;
 }
 
 double PageItem::visualLineWidth()
@@ -9304,8 +9304,8 @@
 	//TODO: CB clean
 	double scp1 = p->zoomFactor() ;// / ScMW->view->scale();
 	double ofwh = 6 * scp1;
-	double ofx = Width - ofwh/2;
-	double ofy = Height - ofwh*1.5;
+	double ofx = m_width - ofwh/2;
+	double ofy = m_height - ofwh*1.5;
 	double bx1= ofx+ scp1;
 	double by1= ofy+3 * scp1;
 	double bw= 4*scp1;
@@ -9427,16 +9427,16 @@
 //	LocalX = 0;
 //	LocalY = 0;
 //	LocalRot = 0;
-	double xs = Width / static_cast<double>(OrigW);
-	double ys = Height / static_cast<double>(OrigH);
+	double xs = m_width / static_cast<double>(OrigW);
+	double ys = m_height / static_cast<double>(OrigH);
 	if (m_imageRotation != 0.0)
 	{
 		QRectF br = QRectF(0, 0, OrigW, OrigH);
 		QTransform m;
 		m.rotate(m_imageRotation);
 		br = m.mapRect(br);
-		xs = Width / br.width();
-		ys = Height / br.height();
+		xs = m_width / br.width();
+		ys = m_height / br.height();
 		QLineF wL = QLineF(0, 0, OrigW, 0);
 		wL.setAngle(-m_imageRotation);
 		QLineF hL = QLineF(0, 0, 0, OrigH);
@@ -9579,40 +9579,40 @@
 		case 0:
 		case 1:
 			setGradientStartX(0);
-			setGradientStartY(Height / 2.0);
-			setGradientEndX(Width);
-			setGradientEndY(Height / 2.0);
+			setGradientStartY(m_height / 2.0);
+			setGradientEndX(m_width);
+			setGradientEndY(m_height / 2.0);
 			break;
 		case 2:
-			setGradientStartX(Width / 2.0);
+			setGradientStartX(m_width / 2.0);
 			setGradientStartY(0);
-			setGradientEndX(Width / 2.0);
-			setGradientEndY(Height);
+			setGradientEndX(m_width / 2.0);
+			setGradientEndY(m_height);
 			break;
 		case 3:
 			setGradientStartX(0);
 			setGradientStartY(0);
-			setGradientEndX(Width);
-			setGradientEndY(Height);
+			setGradientEndX(m_width);
+			setGradientEndY(m_height);
 			break;
 		case 4:
 			setGradientStartX(0);
-			setGradientStartY(Height);
-			setGradientEndX(Width);
+			setGradientStartY(m_height);
+			setGradientEndX(m_width);
 			setGradientEndY(0);
 			break;
 		case 5:
-			setGradientStartX(Width / 2.0);
-			setGradientStartY(Height / 2.0);
-			if (Width >= Height)
+			setGradientStartX(m_width / 2.0);
+			setGradientStartY(m_height / 2.0);
+			if (m_width >= m_height)
 			{
-				setGradientEndX(Width);
-				setGradientEndY(Height / 2.0);
+				setGradientEndX(m_width);
+				setGradientEndY(m_height / 2.0);
 			}
 			else
 			{
-				setGradientEndX(Width / 2.0);
-				setGradientEndY(Height);
+				setGradientEndX(m_width / 2.0);
+				setGradientEndY(m_height);
 			}
 			break;
 		default:
@@ -9840,8 +9840,8 @@
 		m_Doc->constants().insert("margintop", m_Doc->Pages->at(OwnPage)->Margins.Top);
 		m_Doc->constants().insert("marginbottom", m_Doc->Pages->at(OwnPage)->height() - m_Doc->Pages->at(OwnPage)->Margins.Bottom);
 	}
-	m_Doc->constants().insert("width", Width);
-	m_Doc->constants().insert("height", Height);
+	m_Doc->constants().insert("width", m_width);
+	m_Doc->constants().insert("height", m_height);
 }
 
 //CB Old ScribusView MoveItemI

Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18095&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Tue Jan 15 22:03:04 2013
@@ -54,30 +54,32 @@
 #include "scconfig.h"
 #endif
 
+class QFrame;
+class QGridLayout;
+class ResourceCollection;
 class ScPainter;
 class ScribusDoc;
 class SimpleState;
 class UndoManager;
 class UndoState;
-class ResourceCollection;
-class QFrame;
-class QGridLayout;
+
 
 class PageItem_Arc;
 class PageItem_Group;
 class PageItem_ImageFrame;
+class PageItem_LatexFrame;
 class PageItem_Line;
+class PageItem_NoteFrame;
 class PageItem_OSGFrame;
+class PageItem_PathText;
+class PageItem_PolyLine;
 class PageItem_Polygon;
-class PageItem_PolyLine;
 class PageItem_RegularPolygon;
+class PageItem_Spiral;
+class PageItem_Symbol;
 class PageItem_Table;
 class PageItem_TextFrame;
-class PageItem_NoteFrame;
-class PageItem_PathText;
-class PageItem_LatexFrame;
-class PageItem_Spiral;
-class PageItem_Symbol;
+
 /**
   *@author Franz Schmid
   */
@@ -185,11 +187,11 @@
 	 * Describe if and how text flow around object
 	 */
 	enum TextFlowMode {
-		TextFlowDisabled = 0,
-		TextFlowUsesFrameShape  = 1,
-		TextFlowUsesBoundingBox = 2,
-		TextFlowUsesContourLine = 3,
-		TextFlowUsesImageClipping = 4
+		TextFlowDisabled			= 0,
+		TextFlowUsesFrameShape		= 1,
+		TextFlowUsesBoundingBox		= 2,
+		TextFlowUsesContourLine		= 3,
+		TextFlowUsesImageClipping	= 4
 	};
 
 	/** @brief Frame Type
@@ -209,83 +211,48 @@
 	~PageItem();
 
 	/* these do essentially the same as a dynamic cast but might be more readable */
-	virtual PageItem_ImageFrame * asImageFrame() { return NULL; }
-	virtual PageItem_Line * asLine() { return NULL; }
-	virtual PageItem_PathText * asPathText() { return NULL; }
-	virtual PageItem_Polygon * asPolygon() { return NULL; }
-	virtual PageItem_PolyLine * asPolyLine() { return NULL; }
-	virtual PageItem_TextFrame * asTextFrame() { return NULL; }
-	virtual PageItem_NoteFrame * asNoteFrame() { return NULL; }
-	virtual PageItem_LatexFrame * asLatexFrame() { return NULL; }
-
-	virtual PageItem_OSGFrame * asOSGFrame() { return NULL; }
-	virtual PageItem_Symbol * asSymbolFrame() { return NULL; }
-	virtual PageItem_Group * asGroupFrame() { return NULL; }
-	virtual PageItem_RegularPolygon * asRegularPolygon() { return NULL; }
-	virtual PageItem_Arc * asArc() { return NULL; }
-	virtual PageItem_Spiral * asSpiral() { return NULL; }
-	virtual PageItem_Table * asTable() { return NULL; }
-
-	virtual bool isImageFrame()		const { return false; }
-	virtual bool isLine()			const { return false; }
-	virtual bool isPathText()		const { return false; }
-	virtual bool isPolygon()		const { return false; }
-	virtual bool isPolyLine()		const { return false; }
-	virtual bool isTextFrame()		const { return false; }
-	virtual bool isLatexFrame()		const { return false; }
-	virtual bool isOSGFrame()		const { return false; }
-	virtual bool isSymbol()			const { return false; }
-	virtual bool isGroup()			const { return false; }
-	virtual bool isRegularPolygon()	const { return false; }
-	virtual bool isArc()			const { return false; }
-	virtual bool isSpiral()			const { return false; }
-	virtual bool isTable()			const { return false; }
-	virtual bool isNoteFrame()		const { return false; }
-	virtual bool isAutoNoteFrame()	const { return false; }
-
-
-	int level(); ///< Get item level relative to its parent doc or group
-	void saxx(SaxHandler& handler, const Xml_string& elemtag) const {}
-	void saxx(SaxHandler& handler) const {}
-	/**
-	 * @brief Clear the contents of a frame.
-	 * WARNING: Currently *they* do not check if the user wants this.
-	 * The view does when these are called.
-	 */
-	virtual void clearContents() {}
-
-	/**
-	 * @brief Adjust the picture scale, moved from the view, no view code here
-	 * FIXME: Move to PageItem_TextFrame
-	 */
-	void AdjustPictScale();
-
-	/**
-	 * @brief Set or get the redraw bounding box of the item, moved from the View
-	 */
-	QRect getRedrawBounding(const double);
-	void setRedrawBounding();
-
-	void updateGradientVectors(); //!< Update the gradient vectors, moved from the View
-	/**
-	 * @brief Move the image within the frame
-	 * Old ScribusView::MoveItemI
-	 * @todo Move to PageItem_ImageFrame
-	 */
-	void moveImageInFrame(double newX, double newY);
-	ObjAttrVector* getObjectAttributes();
-	/*!
-	 * brief Returns a list of attributes with specified name
-	 */
-	QList<ObjectAttribute> getObjectAttributes(QString attributeName) const;
-	/*!
-	 * brief Returns a complete ObjectAttribute struct if 1 is found, or ObjectAttribute.name will be QString::null if 0 or >1 are found
-	 */
-	ObjectAttribute getObjectAttribute(QString) const;
-	void setObjectAttributes(ObjAttrVector*);
-
+	virtual PageItem_Arc * asArc()					{ return NULL; } ///< Return self if Arc item, otherwise null
+	virtual PageItem_Group * asGroupFrame()			{ return NULL; } ///< Return self if Group item, otherwise null
+	virtual PageItem_ImageFrame * asImageFrame()	{ return NULL; } ///< Return self if Image item, otherwise null
+	virtual PageItem_LatexFrame * asLatexFrame()	{ return NULL; } ///< Return self if Render frame item, otherwise null
+	virtual PageItem_Line * asLine()				{ return NULL; } ///< Return self if Line item, otherwise null
+	virtual PageItem_NoteFrame * asNoteFrame()		{ return NULL; } ///< Return self if Note item, otherwise null
+	virtual PageItem_OSGFrame * asOSGFrame()		{ return NULL; } ///< Return self if OSG item, otherwise null
+	virtual PageItem_PathText * asPathText()		{ return NULL; } ///< Return self if Path Text item, otherwise null
+	virtual PageItem_PolyLine * asPolyLine()		{ return NULL; } ///< Return self if Poly Line item, otherwise null
+	virtual PageItem_Polygon * asPolygon()			{ return NULL; } ///< Return self if Polygon item, otherwise null
+	virtual PageItem_RegularPolygon * asRegularPolygon() { return NULL; } ///< Return self if Regular Polygon item, otherwise null
+	virtual PageItem_Spiral * asSpiral()			{ return NULL; } ///< Return self if Spiral item, otherwise null
+	virtual PageItem_Symbol * asSymbolFrame()		{ return NULL; } ///< Return self if Symbol item, otherwise null
+	virtual PageItem_Table * asTable()				{ return NULL; } ///< Return self if Table item, otherwise null
+	virtual PageItem_TextFrame * asTextFrame()		{ return NULL; } ///< Return self if Text item, otherwise null
+
+	virtual bool isArc()			const { return false; } ///< Return true if Arc item, otherwise false
+	virtual bool isAutoNoteFrame()	const { return false; } ///< Return true if Auto Note item, otherwise false
+	virtual bool isGroup()			const { return false; } ///< Return true if Group item, otherwise false
+	virtual bool isImageFrame()		const { return false; } ///< Return true if Image item, otherwise false
+	virtual bool isLatexFrame()		const { return false; } ///< Return true if Render frame item, otherwise false
+	virtual bool isLine()			const { return false; } ///< Return true if Line item, otherwise false
+	virtual bool isNoteFrame()		const { return false; } ///< Return true if Note item, otherwise false
+	virtual bool isOSGFrame()		const { return false; } ///< Return true if OSG item, otherwise false
+	virtual bool isPathText()		const { return false; } ///< Return true if Text Path Text, otherwise false
+	virtual bool isPolyLine()		const { return false; } ///< Return true if Poly Line item, otherwise false
+	virtual bool isPolygon()		const { return false; } ///< Return true if Polygon item, otherwise false
+	virtual bool isRegularPolygon()	const { return false; } ///< Return true if Regular Polygon item, otherwise false
+	virtual bool isSpiral()			const { return false; } ///< Return true if Spiral item, otherwise false
+	virtual bool isSymbol()			const { return false; } ///< Return true if Symbol item, otherwise false
+	virtual bool isTable()			const { return false; } ///< Return true if Table item, otherwise false
+	virtual bool isTextFrame()		const { return false; } ///< Return true if Text item, otherwise false
+
+
+	virtual void applicableActions(QStringList& actionList) = 0;
+	virtual QString infoDescription();
 	virtual bool createInfoGroup(QFrame *, QGridLayout *) {return false;}
-	/** Zeichnet das Item */
+
+
+
+	//<< ********* Functions related to drawing the item *********
+
 	void DrawObj(ScPainter *p, QRectF e);
 	void DrawObj_Pre(ScPainter *p);
 	virtual void DrawObj_Post(ScPainter *p);
@@ -293,15 +260,13 @@
 	virtual void DrawObj_Item(ScPainter *p, QRectF e) = 0;
 	QImage DrawObj_toImage(double maxSize);
 	QImage DrawObj_toImage(QList<PageItem*> &emG, double scaling);
-
-	virtual void applicableActions(QStringList& actionList) = 0;
-	virtual QString infoDescription();
 	void DrawObj_Embedded(ScPainter *p, QRectF e, const CharStyle& style, PageItem* cembedded);
 	void DrawStrokePattern(ScPainter *p, QPainterPath &path);
-	void SetFrameShape(int count, double *vals);
-	void SetRectFrame();
-	void SetOvalFrame();
-	void SetFrameRound();
+	/**
+	 * @brief Set or get the redraw bounding box of the item, moved from the View
+	 */
+	QRect getRedrawBounding(const double);
+	void setRedrawBounding();
 	void setPolyClip(int up, int down = 0);
 	void updatePolyClip();
 	//added switch for not updating welded items - used by notes frames with automatic size adjusted
@@ -312,10 +277,25 @@
 	QRectF getBoundingRect() const;
 	QRectF getCurrentBoundingRect(double moreSpace = 0.0) const;
 	QRectF getVisualBoundingRect() const;
-	QTransform getGroupTransform() const;
-	void getTransform(QTransform& mat) const;
-	QTransform getTransform() const;
-	QTransform getCombinedTransform() const;
+
+
+	//>> ********* Functions related to drawing the item *********
+
+
+
+	//<< ********* Functions to work on the contents of the items *********
+
+	/**
+	 * @brief Clear the contents of a frame.
+	 * WARNING: Currently *they* do not check if the user wants this.
+	 * The view does when these are called.
+	 */
+	virtual void clearContents() {}
+
+	//>> ********* Functions to work on the contents of the items *********
+
+	//<< ********* Functions for user interaction with the item **********
+
 	/**
 	   * @brief Check if a QPoint is within the items boundaries
 	   * No coordinates transformation is performed
@@ -335,6 +315,52 @@
 	bool mouseWithinItem(const int x, const int y, double scale) const;
 
 	virtual void handleModeEditKey(QKeyEvent *k, bool &keyRepeat);
+
+	//>> ********* Functions for user interaction with the item **********
+
+
+	int level(); ///< Get item level relative to its parent doc or group
+	void saxx(SaxHandler& handler, const Xml_string& elemtag) const {}
+	void saxx(SaxHandler& handler) const {}
+
+
+	/**
+	 * @brief Adjust the picture scale, moved from the view, no view code here
+	 * FIXME: Move to PageItem_TextFrame
+	 */
+	void AdjustPictScale();
+
+
+
+	void updateGradientVectors(); //!< Update the gradient vectors, moved from the View
+	/**
+	 * @brief Move the image within the frame
+	 * Old ScribusView::MoveItemI
+	 * @todo Move to PageItem_ImageFrame
+	 */
+	void moveImageInFrame(double newX, double newY);
+	ObjAttrVector* getObjectAttributes();
+	/*!
+	 * brief Returns a list of attributes with specified name
+	 */
+	QList<ObjectAttribute> getObjectAttributes(QString attributeName) const;
+	/*!
+	 * brief Returns a complete ObjectAttribute struct if 1 is found, or ObjectAttribute.name will be QString::null if 0 or >1 are found
+	 */
+	ObjectAttribute getObjectAttribute(QString) const;
+	void setObjectAttributes(ObjAttrVector*);
+
+
+
+	void SetFrameShape(int count, double *vals);
+	void SetRectFrame();
+	void SetOvalFrame();
+	void SetFrameRound();
+	QTransform getGroupTransform() const;
+	void getTransform(QTransform& mat) const;
+	QTransform getTransform() const;
+	QTransform getCombinedTransform() const;
+
 
 	/// invalidates current layout information
 	virtual void invalidateLayout() { invalid = true; }
@@ -421,6 +447,8 @@
 	double dashOffset() const { return DashOffset; }
 	void setDashOffset(double val) { DashOffset = val; }
 	virtual QList<PageItem*> getItemList();
+
+	//<< ********* Attributes of the item *********
 	//Position
 	double xPos() const { return m_xPos; }
 	double yPos() const { return m_yPos; }
@@ -432,8 +460,8 @@
 	void setXYPos(const double, const double, bool drawingOnly=false);
 	void moveBy(const double, const double, bool drawingOnly=false);
 	//Size
-	double width() const { return Width; }
-	double height() const { return Height; }
+	double width() const { return m_width; }
+	double height() const { return m_height; }
 	double visualWidth() const;
 	double visualHeight() const;
 	double visualLineWidth();
@@ -566,6 +594,11 @@
 	void setGradientColor3(QColor val);
 	QColor gradientColor4() const { return GrColorP4QColor; }
 	void setGradientColor4(QColor val);
+
+	//>> ********* Attributes of the item *********
+
+
+
 	bool getSnapToPatchGrid() const { return snapToPatchGrid; }
 	void setSnapToPatchGrid(bool val);
 	void setMaskGradient(VGradient grad);
@@ -1108,11 +1141,8 @@
 	void moveWelded(double DX, double DY, int weld);
 	void moveWelded(double DX, double DY, PageItem* except = NULL);
 	void rotateWelded(double dR, double oldRot);
-	//added for autowelding feature of notes frames
-	//setting welding point with given pItem to given coords
-	void setWeldPoint(double DX, double DY, PageItem *pItem);
-	//used by notes frames to get content of notes from itemText
-	QString getItemTextSaxed(int selStart, int selLength);
+	void setWeldPoint(double DX, double DY, PageItem *pItem); 	///< added for autowelding feature of notes frames, setting welding point with given pItem to given coords
+	QString getItemTextSaxed(int selStart, int selLength); ///< used by notes frames to get content of notes from itemText
 
 		// End public functions
 
@@ -1123,7 +1153,7 @@
 	double gYpos;
 	double gWidth;
 	double gHeight;
-	int GrType;			///< used values 6 = linear, 7 = radial, 8 = pattern, 9 = 4 color gradient, 10 = diamond, 11 = mesh gradient
+	int GrType; ///< used values 6 = linear, 7 = radial, 8 = pattern, 9 = 4 color gradient, 10 = diamond, 11 = mesh gradient
 	double GrStartX;
 	double GrStartY;
 	double GrEndX;
@@ -1218,7 +1248,6 @@
 	double OldB2;
 	double OldH2;
 	bool Sizing;
-//	bool toPixmap;
 	int  LayerID;
 	bool ScaleType;
 	bool AspectRatio;
@@ -1260,37 +1289,25 @@
 		double m_roundedCorderRadius;
 
 		//Undo Data
-		/** @brief Stores the old X-position for undo action. Is used to detect move actions.*/
-		double oldXpos;
-		/** @brief Stores the old Y-position for undo action. Is used to detect move actions. */
-		double oldYpos;
-		/** @brief Stores the old width for undo action. Is used to detect resize actions. */
-		double oldWidth;
-		/** @brief Stores the old height for undo action. Is used to detect resize actions. */
-		double oldHeight;
-		/** @brief Stores the old rotation value for undo action. Is used to detect rotation actions. */
-		double oldRot;
-		/** @brief Stores the old LocalScX value for undo action. Is used to detect image scale actions. */
-		double oldLocalScX;
-		/** @brief Stores the old LocalScY value for undo action. Is used to detect image scale actions. */
-		double oldLocalScY;
-		/** @brief Stores the old LocalX value for undo action. Is used to detect image offset actions. */
-		double oldLocalX;
-		/** @brief Stores the old LocalY value for undo action. Is used to detect image offset actions. */
-		double oldLocalY;
-
-		/** Document this item belongs to */
-		ScribusDoc *m_Doc;
-
-		/** Flags and data for PDF Annotations */
-		bool m_isAnnotation;
-		Annotation m_annotation;
-
-		/** Darstellungsart Bild/Titel */
-		bool PicArt;
-
-		 /** Line width */
-		double m_lineWidth;
+		double oldXpos; ///< Stores the old X-position for undo action. Is used to detect move actions.
+		double oldYpos; ///< Stores the old Y-position for undo action. Is used to detect move actions.
+		double oldWidth; ///< Stores the old width for undo action. Is used to detect resize actions.
+		double oldHeight; ///< Stores the old height for undo action. Is used to detect resize actions.
+		double oldRot; ///< Stores the old rotation value for undo action. Is used to detect rotation actions.
+		double oldLocalScX; ///< Stores the old LocalScX value for undo action. Is used to detect image scale actions.
+		double oldLocalScY; ///< Stores the old LocalScY value for undo action. Is used to detect image scale actions.
+		double oldLocalX; ///< Stores the old LocalX value for undo action. Is used to detect image offset actions.lo j
+		double oldLocalY; ///< Stores the old LocalY value for undo action. Is used to detect image offset actions.
+
+
+		ScribusDoc *m_Doc; ///< Document this item belongs to
+
+		bool m_isAnnotation; ///< Flag to tell if this item is a PDF annotation item
+		Annotation m_annotation; ///< PDF annotation data
+
+		bool PicArt; ///< Darstellungsart Bild/Titel
+
+		double m_lineWidth; //< Line width
 		double Oldm_lineWidth;
 
 		/**
@@ -1394,138 +1411,135 @@
 	 * @author Riku Leino
 	 */
 	/*@{*/
-	void restoreConnectPath(SimpleState *state, bool isUndo);
-	void restoreSpiral(SimpleState *state, bool isUndo);
 	void restoreAppMode(SimpleState *state, bool isUndo);
 	void restoreArc(SimpleState *state,bool isUndo);
-	void restorePolygon(SimpleState *state,bool isUndo);
-	void restoreImageNbr(SimpleState *state,bool isUndo);
-	void restoreTransform(SimpleState *state,bool isUndo);
-	void restoreMaskType(SimpleState *state,bool isUndo);
+	void restoreArrow(SimpleState *state, bool isUndo, bool isStart);
+	void restoreBottomTextFrameDist(SimpleState *state, bool isUndo);
+	void restoreCharStyle(SimpleState *state, bool isUndo);
+	void restoreClearImage(UndoState *state, bool isUndo);
+	void restoreColumns(SimpleState *state, bool isUndo);
+	void restoreColumnsGap(SimpleState *state, bool isUndo);
+	void restoreConnectPath(SimpleState *state, bool isUndo);
+	void restoreContourLine(SimpleState *state, bool isUndo);
+	void restoreCornerRadius(SimpleState *state, bool isUndo);
+	void restoreCreateMeshGrad(SimpleState *state, bool isUndo);
+	void restoreCustomLineStyle(SimpleState *state, bool isUndo);
+	void restoreDefaultParagraphStyle(SimpleState *state, bool isUndo);
+	void restoreDeleteFrameText(SimpleState *state, bool isUndo);
+	void restoreEndArrowScale(SimpleState *state, bool isUndo);
+	void restoreFill(SimpleState *state, bool isUndo);
+	void restoreFillGradient(SimpleState *state, bool isUndo);
+	void restoreFillTP(SimpleState *state, bool isUndo);
+	void restoreFirstLineOffset(SimpleState *state, bool isUndo);
+	void restoreGetImage(UndoState *state, bool isUndo);
 	void restoreGradPos(SimpleState *state,bool isUndo);
-	void restoreSnapToPatchGrid(SimpleState *state, bool isUndo);
-	void restoreRemoveMeshPatch(SimpleState *state, bool isUndo);
-	void restoreCreateMeshGrad(SimpleState *state, bool isUndo);
-	void restoreMoveMeshGrad(SimpleState *state, bool isUndo);
-	void restoreResetMeshGrad(SimpleState *state, bool isUndo);
+	void restoreGradientCol1(SimpleState *state, bool isUndo);
+	void restoreGradientCol2(SimpleState *state, bool isUndo);
+	void restoreGradientCol3(SimpleState *state, bool isUndo);
+	void restoreGradientCol4(SimpleState *state, bool isUndo);
 	void restoreGradientColor1(SimpleState *state, bool isUndo);
 	void restoreGradientColor2(SimpleState *state, bool isUndo);
 	void restoreGradientColor3(SimpleState *state, bool isUndo);
 	void restoreGradientColor4(SimpleState *state, bool isUndo);
-	void restoreGradientCol1(SimpleState *state, bool isUndo);
-	void restoreGradientCol2(SimpleState *state, bool isUndo);
-	void restoreGradientCol3(SimpleState *state, bool isUndo);
-	void restoreGradientCol4(SimpleState *state, bool isUndo);
-	void restoreGradientShade1(SimpleState *state, bool isUndo);
-	void restoreGradientShade2(SimpleState *state, bool isUndo);
-	void restoreGradientShade3(SimpleState *state, bool isUndo);
-	void restoreGradientShade4(SimpleState *state, bool isUndo);
-	void restoreGradientTrans1(SimpleState *state, bool isUndo);
-	void restoreGradientTrans2(SimpleState *state, bool isUndo);
-	void restoreGradientTrans3(SimpleState *state, bool isUndo);
-	void restoreGradientTrans4(SimpleState *state, bool isUndo);
-	void restoreMoveMeshPatch(SimpleState *state, bool isUndo);
-	void restoreMaskGradient(SimpleState *state, bool isUndo);
-	void restoreFillGradient(SimpleState *state, bool isUndo);
-	void restoreStrokeGradient(SimpleState *state, bool isUndo);
-	void restoreGradientMeshColor(SimpleState *state, bool isUndo);
-	void restoreGradientStartX(SimpleState *state, bool isUndo);
-	void restoreGradientStartY(SimpleState *state, bool isUndo);
+	void restoreGradientControl1(SimpleState *state, bool isUndo);
+	void restoreGradientControl2(SimpleState *state, bool isUndo);
+	void restoreGradientControl3(SimpleState *state, bool isUndo);
+	void restoreGradientControl4(SimpleState *state, bool isUndo);
+	void restoreGradientControl5(SimpleState *state, bool isUndo);
 	void restoreGradientEndX(SimpleState *state, bool isUndo);
 	void restoreGradientEndY(SimpleState *state, bool isUndo);
 	void restoreGradientFocalX(SimpleState *state, bool isUndo);
 	void restoreGradientFocalY(SimpleState *state, bool isUndo);
-	void restoreGradientScale(SimpleState *state, bool isUndo);
-	void restoreGradientSkew(SimpleState *state, bool isUndo);
-	void restoreGradientMaskStartX(SimpleState *state, bool isUndo);
-	void restoreGradientMaskStartY(SimpleState *state, bool isUndo);
 	void restoreGradientMaskEndX(SimpleState *state, bool isUndo);
 	void restoreGradientMaskEndY(SimpleState *state, bool isUndo);
 	void restoreGradientMaskFocalX(SimpleState *state, bool isUndo);
 	void restoreGradientMaskFocalY(SimpleState *state, bool isUndo);
 	void restoreGradientMaskScale(SimpleState *state, bool isUndo);
 	void restoreGradientMaskSkew(SimpleState *state, bool isUndo);
-	void restoreGradientControl1(SimpleState *state, bool isUndo);
-	void restoreGradientControl2(SimpleState *state, bool isUndo);
-	void restoreGradientControl3(SimpleState *state, bool isUndo);
-	void restoreGradientControl4(SimpleState *state, bool isUndo);
-	void restoreGradientControl5(SimpleState *state, bool isUndo);
+	void restoreGradientMaskStartX(SimpleState *state, bool isUndo);
+	void restoreGradientMaskStartY(SimpleState *state, bool isUndo);
+	void restoreGradientMeshColor(SimpleState *state, bool isUndo);
+	void restoreGradientScale(SimpleState *state, bool isUndo);
+	void restoreGradientShade1(SimpleState *state, bool isUndo);
+	void restoreGradientShade2(SimpleState *state, bool isUndo);
+	void restoreGradientShade3(SimpleState *state, bool isUndo);
+	void restoreGradientShade4(SimpleState *state, bool isUndo);
+	void restoreGradientSkew(SimpleState *state, bool isUndo);
+	void restoreGradientStartX(SimpleState *state, bool isUndo);
+	void restoreGradientStartY(SimpleState *state, bool isUndo);
+	void restoreGradientStrokeEndX(SimpleState *state, bool isUndo);
+	void restoreGradientStrokeEndY(SimpleState *state, bool isUndo);
+	void restoreGradientStrokeFocalX(SimpleState *state, bool isUndo);
+	void restoreGradientStrokeFocalY(SimpleState *state, bool isUndo);
 	void restoreGradientStrokeScale(SimpleState *state, bool isUndo);
 	void restoreGradientStrokeSkew(SimpleState *state, bool isUndo);
-	void restoreGradientStrokeFocalX(SimpleState *state, bool isUndo);
-	void restoreGradientStrokeFocalY(SimpleState *state, bool isUndo);
 	void restoreGradientStrokeStartX(SimpleState *state, bool isUndo);
 	void restoreGradientStrokeStartY(SimpleState *state, bool isUndo);
-	void restoreGradientStrokeEndX(SimpleState *state, bool isUndo);
-	void restoreGradientStrokeEndY(SimpleState *state, bool isUndo);
+	void restoreGradientTrans1(SimpleState *state, bool isUndo);
+	void restoreGradientTrans2(SimpleState *state, bool isUndo);
+	void restoreGradientTrans3(SimpleState *state, bool isUndo);
+	void restoreGradientTrans4(SimpleState *state, bool isUndo);
 	void restoreGradientType(SimpleState *state, bool isUndo);
 	void restoreGradientTypeStroke(SimpleState *state, bool isUndo);
-	void restoreStartArrowScale(SimpleState *state, bool isUndo);
-	void restoreEndArrowScale(SimpleState *state, bool isUndo);
+	void restoreImageEffects(UndoState *state, bool isUndo);
+	void restoreImageNbr(SimpleState *state,bool isUndo);
+	void restoreImageOffsetChange(SimpleState *state, bool isUndo);
 	void restoreImageRotation(SimpleState *state, bool isUndo);
+	void restoreImageScaleChange(SimpleState *state, bool isUndo);
+	void restoreImageScaleMode(SimpleState *state, bool isUndo);
+	void restoreInsertFrameText(SimpleState *state, bool isUndo);
+	void restoreLayer(SimpleState *state, bool isUndo);
+	void restoreLeftTextFrameDist(SimpleState *state, bool isUndo);
+	void restoreLineColor(SimpleState *state, bool isUndo);
+	void restoreLineEnd(SimpleState *state, bool isUndo);
+	void restoreLineJoin(SimpleState *state, bool isUndo);
+	void restoreLineShade(SimpleState *state, bool isUndo);
+	void restoreLineStyle(SimpleState *state, bool isUndo);
+	void restoreLineTP(SimpleState *state, bool isUndo);
+	void restoreLineWidth(SimpleState *state, bool isUndo);
+	void restoreLinkTextFrame(UndoState *state, bool isUndo);
+	void restoreLoremIpsum(SimpleState *state, bool isUndo);
+	void restoreMarkString(SimpleState *state, bool isUndo);
+	void restoreMaskGradient(SimpleState *state, bool isUndo);
+	void restoreMaskType(SimpleState *state,bool isUndo);
+	void restoreMove(SimpleState *state, bool isUndo);
+	void restoreMoveMeshGrad(SimpleState *state, bool isUndo);
+	void restoreMoveMeshPatch(SimpleState *state, bool isUndo);
+	void restoreName(SimpleState *state, bool isUndo);
+	void restorePStyle(SimpleState *state, bool isUndo);
+	void restoreParagraphStyle(SimpleState *state, bool isUndo);
 	void restorePasteInline(SimpleState *state, bool isUndo);
 	void restorePasteText(SimpleState *state, bool isUndo);
-	void restoreFirstLineOffset(SimpleState *state, bool isUndo);
-	void restoreParagraphStyle(SimpleState *state, bool isUndo);
-	void restoreDefaultParagraphStyle(SimpleState *state, bool isUndo);
-	void restoreCharStyle(SimpleState *state, bool isUndo);
-	void restoreLeftTextFrameDist(SimpleState *state, bool isUndo);
+	void restorePathOperation(UndoState *state, bool isUndo);
+	void restorePoly(SimpleState *state, bool isUndo, bool isContour);
+	void restorePolygon(SimpleState *state,bool isUndo);
+	void restoreRemoveMeshPatch(SimpleState *state, bool isUndo);
+	void restoreResTyp(SimpleState *state, bool isUndo);
+	void restoreResetMeshGrad(SimpleState *state, bool isUndo);
+	void restoreResize(SimpleState *state, bool isUndo);
+	void restoreReverseText(UndoState *state, bool isUndo);
 	void restoreRightTextFrameDist(SimpleState *state, bool isUndo);
+	void restoreRotate(SimpleState *state, bool isUndo);
+	void restoreSetCharStyle(SimpleState *state, bool isUndo);
+	void restoreSetParagraphStyle(SimpleState *state, bool isUndo);
+	void restoreShade(SimpleState *state, bool isUndo);
+	void restoreShapeContour(UndoState *state, bool isUndo);
+	void restoreShapeType(SimpleState *state, bool isUndo);
+	void restoreShowImage(SimpleState *state, bool isUndo);
+	void restoreSnapToPatchGrid(SimpleState *state, bool isUndo);
+	void restoreSpiral(SimpleState *state, bool isUndo);
+	void restoreSplitItem(SimpleState *state, bool isUndo);
+	void restoreStartArrowScale(SimpleState *state, bool isUndo);
+	void restoreStrokeGradient(SimpleState *state, bool isUndo);
+	void restoreTextFlowing(SimpleState *state, bool isUndo);
 	void restoreTopTextFrameDist(SimpleState *state, bool isUndo);
-	void restoreBottomTextFrameDist(SimpleState *state, bool isUndo);
-	void restoreSetCharStyle(SimpleState *state, bool isUndo);
-	void restoreColumns(SimpleState *state, bool isUndo);
-	void restoreColumnsGap(SimpleState *state, bool isUndo);
-	void restoreSetParagraphStyle(SimpleState *state, bool isUndo);
-	void restoreLoremIpsum(SimpleState *state, bool isUndo);
-	void restoreDeleteFrameText(SimpleState *state, bool isUndo);
-	void restoreInsertFrameText(SimpleState *state, bool isUndo);
-	void restoreCornerRadius(SimpleState *state, bool isUndo);
-	void restoreShowImage(SimpleState *state, bool isUndo);
-	void restoreResTyp(SimpleState *state, bool isUndo);
-	void restoreMove(SimpleState *state, bool isUndo);
-	void restoreResize(SimpleState *state, bool isUndo);
-	void restoreRotate(SimpleState *state, bool isUndo);
-	void restoreFill(SimpleState *state, bool isUndo);
-	void restoreShade(SimpleState *state, bool isUndo);
-	void restoreLineColor(SimpleState *state, bool isUndo);
-	void restoreLineShade(SimpleState *state, bool isUndo);
-	void restoreName(SimpleState *state, bool isUndo);
-	void restoreFillTP(SimpleState *state, bool isUndo);
-	void restoreLineTP(SimpleState *state, bool isUndo);
-	void restoreLineStyle(SimpleState *state, bool isUndo);
-	void restoreLineEnd(SimpleState *state, bool isUndo);
-	void restoreLineJoin(SimpleState *state, bool isUndo);
-	void restoreLineWidth(SimpleState *state, bool isUndo);
-	void restoreCustomLineStyle(SimpleState *state, bool isUndo);
-	void restoreArrow(SimpleState *state, bool isUndo, bool isStart);
-
-	void restorePStyle(SimpleState *state, bool isUndo);
-
+	void restoreTransform(SimpleState *state,bool isUndo);
 	void restoreType(SimpleState *state, bool isUndo);
-	void restoreTextFlowing(SimpleState *state, bool isUndo);
-	void restoreImageScaleMode(SimpleState *state, bool isUndo);
-	void restoreImageScaleChange(SimpleState *state, bool isUndo);
-	void restoreImageOffsetChange(SimpleState *state, bool isUndo);
-	void restoreClearImage(UndoState *state, bool isUndo);
-	void restoreGetImage(UndoState *state, bool isUndo);
-	void restorePoly(SimpleState *state, bool isUndo, bool isContour);
+	void restoreUnWeldItem(SimpleState *state, bool isUndo);
 	void restoreUniteItem(SimpleState *state, bool isUndo);
-	void restoreSplitItem(SimpleState *state, bool isUndo);
-	void restoreContourLine(SimpleState *state, bool isUndo);
-	void restoreShapeType(SimpleState *state, bool isUndo);
-	void restoreLayer(SimpleState *state, bool isUndo);
-
-	void restoreShapeContour(UndoState *state, bool isUndo);
-	void restoreImageEffects(UndoState *state, bool isUndo);
-	void restoreLinkTextFrame(UndoState *state, bool isUndo);
 	void restoreUnlinkTextFrame(UndoState *state, bool isUndo);
-	void restoreReverseText(UndoState *state, bool isUndo);
-	void restorePathOperation(UndoState *state, bool isUndo);
-
 	void restoreWeldItems(SimpleState *state, bool isUndo);
-	void restoreUnWeldItem(SimpleState *state, bool isUndo);
-	void restoreMarkString(SimpleState *state, bool isUndo);
+
 
 	/*@}*/
 
@@ -1539,8 +1553,7 @@
 	 * state of arrow keys and mouse buttons else returns false.
 	 */
 	bool shouldCheck();
-	/** @brief Clears the current selection and selects this PageItem. */
-	void select();
+	void select(); ///< Clears the current selection and selects this PageItem.
 
 		// End protected functions
 
@@ -1703,30 +1716,18 @@
 	QColor GrColorP3QColor;
 	QColor GrColorP4QColor;
 
-	/** X position on the page */
-	double m_xPos;
-	/** Y position on the page */
-	double m_yPos;
-	/** Width of the item */
-	double Width;
-	/** Height of the item */
-	double Height;
-	/** Rotation of the item */
-	double m_rotation;
-	/** Element selected? */
-	bool m_isSelected;
-	/** Scaling X Factor for images */
-	double m_imageXScale;
-	/** Scaling Y Factor for images*/
-	double m_imageYScale;
-	/** Image X Offset to frame */
-	double m_imageXOffset;
-	/** Image Y Offset to frame */
-	double m_imageYOffset;
-	/** Image rotation in frame */
-	double m_imageRotation;
-	/** If the frame is reversed */
-	bool m_isReversed;
+	double m_xPos; ///< X position on the page
+	double m_yPos; ///< Y position on the page
+	double m_width; ///< Width of the item
+	double m_height; ///<  Height of the item
+	double m_rotation; ///< Rotation of the item
+	bool m_isSelected; ///< Is the item selected?
+	double m_imageXScale; ///< Scaling X Factor for images
+	double m_imageYScale; ///< Scaling Y Factor for images
+	double m_imageXOffset; ///< Image X Offset to frame
+	double m_imageYOffset; ///< Image Y Offset to frame
+	double m_imageRotation; ///< Image rotation in frame
+	bool m_isReversed; ///< Is the frame is reversed?
 	FirstLineOffsetPolicy firstLineOffsetP;
 
 			// End protected variables
@@ -1748,11 +1749,11 @@
 signals:
 	//Frame signals
 	void myself(PageItem *);
-	void frameType(int);   // not related to Frametype but to m_itemIype :-/
-	//void frameLocked(bool); //Frame lock
-	//void frameSizeLocked(bool); //Frame size lock
+	void frameType(int);   ///< not related to Frametype but to m_itemIype
+	//void frameLocked(bool); ///< Frame lock
+	//void frameSizeLocked(bool); ///< Frame size lock
 	//Shape signals
-	//void cornerRadius(double); //Corner radius of the shape
+	//void cornerRadius(double); ///< Corner radius of the shape
 	//Frame text signals
 	//void lineSpacing(double);
 	//void textKerning(double);

Modified: trunk/Scribus/scribus/pageitem_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18095&path=/trunk/Scribus/scribus/pageitem_group.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_group.cpp (original)
+++ trunk/Scribus/scribus/pageitem_group.cpp Tue Jan 15 22:03:04 2013
@@ -121,16 +121,16 @@
 		{
 			p->save();
 			p->setPen(Qt::black, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			p->drawLine(FPoint(0, 0), FPoint(Width, Height));
-			p->drawLine(FPoint(0, Height), FPoint(Width, 0));
+			p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
+			p->drawLine(FPoint(0, m_height), FPoint(m_width, 0));
 			p->setFont(QApplication::font());
-			p->drawLine(FPoint(0, 0), FPoint(Width, 0));
-			p->drawLine(FPoint(Width, 0), FPoint(Width, Height));
-			p->drawLine(FPoint(Width, Height), FPoint(0, Height));
-			p->drawLine(FPoint(0, Height), FPoint(0, 0));
+			p->drawLine(FPoint(0, 0), FPoint(m_width, 0));
+			p->drawLine(FPoint(m_width, 0), FPoint(m_width, m_height));
+			p->drawLine(FPoint(m_width, m_height), FPoint(0, m_height));
+			p->drawLine(FPoint(0, m_height), FPoint(0, 0));
 			p->setBrush(QColor(255, 255, 255));
 			p->setBrushOpacity(0.0);
-			p->drawText(QRectF(0.0, 0.0, Width, Height), "Empty Group");
+			p->drawText(QRectF(0.0, 0.0, m_width, m_height), "Empty Group");
 			p->restore();
 		}
 		return;
@@ -139,12 +139,12 @@
 	p->save();
 	if (imageFlippedH())
 	{
-		p->translate(Width, 0);
+		p->translate(m_width, 0);
 		p->scale(-1, 1);
 	}
 	if (imageFlippedV())
 	{
-		p->translate(0, Height);
+		p->translate(0, m_height);
 		p->scale(1, -1);
 	}
 	if ((maskType() == 1) || (maskType() == 2) || (maskType() == 4) || (maskType() == 5))
@@ -169,8 +169,8 @@
 			p->setMaskMode(0);
 		else
 		{
-			double scw = Width / groupWidth;
-			double sch = Height / groupHeight;
+			double scw = m_width / groupWidth;
+			double sch = m_height / groupHeight;
 			p->setPatternMask(&m_Doc->docPatterns[patternMask()], patternMaskScaleX * scw, patternMaskScaleY * sch, patternMaskOffsetX, patternMaskOffsetY, patternMaskRotation, patternMaskSkewX, patternMaskSkewY, patternMaskMirrorX, patternMaskMirrorY);
 			if (maskType() == 3)
 				p->setMaskMode(2);
@@ -187,7 +187,7 @@
 	p->setFillRule(fillRule);
 	p->beginLayer(1.0 - fillTransparency(), fillBlendmode(), &PoLine);
 	p->setMaskMode(0);
-	p->scale(Width / groupWidth, Height / groupHeight);
+	p->scale(m_width / groupWidth, m_height / groupHeight);
 	for (int em = 0; em < groupItemList.count(); ++em)
 	{
 		PageItem* embedded = groupItemList.at(em);

Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18095&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp Tue Jan 15 22:03:04 2013
@@ -85,8 +85,8 @@
 		if ((drawFrame()) && (m_Doc->guidesPrefs().framesShown))
 		{
 			p->setPen(Qt::black, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			p->drawLine(FPoint(0, 0), FPoint(Width, Height));
-			p->drawLine(FPoint(0, Height), FPoint(Width, 0));
+			p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
+			p->drawLine(FPoint(0, m_height), FPoint(m_width, 0));
 		}
 	}
 	else
@@ -130,10 +130,10 @@
 					p->setPen(Qt::red, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 					htmlText = fi.fileName();
 				}
-				p->drawLine(FPoint(0, 0), FPoint(Width, Height));
-				p->drawLine(FPoint(0, Height), FPoint(Width, 0));
+				p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
+				p->drawLine(FPoint(0, m_height), FPoint(m_width, 0));
 				p->setFont(QApplication::font());
-				p->drawText(QRectF(0.0, 0.0, Width, Height), htmlText);
+				p->drawText(QRectF(0.0, 0.0, m_width, m_height), htmlText);
 			}
 		}
 		else
@@ -142,12 +142,12 @@
 			p->setClipPath();
 			if (imageFlippedH())
 			{
-				p->translate(Width, 0);
+				p->translate(m_width, 0);
 				p->scale(-1, 1);
 			}
 			if (imageFlippedV())
 			{
-				p->translate(0, Height);
+				p->translate(0, m_height);
 				p->scale(1, -1);
 			}
 			if (imageClip.size() != 0)

Modified: trunk/Scribus/scribus/pageitem_latexframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18095&path=/trunk/Scribus/scribus/pageitem_latexframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_latexframe.cpp Tue Jan 15 22:03:04 2013
@@ -125,17 +125,17 @@
 		//Draw indicator that latex is running
 		p->setBrush(Qt::white);
 		p->setPen(Qt::green, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-		p->drawLine(FPoint(0, 0), FPoint(Width, Height));
-		p->drawText(QRectF(0.0, 0.0, Width, Height), tr("Rendering..."));
+		p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
+		p->drawText(QRectF(0.0, 0.0, m_width, m_height), tr("Rendering..."));
 	}
 	else if (err)
 	{
 		//Draw error indicator
 		p->setBrush(Qt::white);
 		p->setPen(Qt::blue, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-		p->drawLine(FPoint(0, 0), FPoint(Width, Height));
-		p->drawLine(FPoint(0, Height), FPoint(Width, 0));
-		p->drawText(QRectF(0.0, 0.0, Width, Height), tr("Render Error"));
+		p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
+		p->drawLine(FPoint(0, m_height), FPoint(m_width, 0));
+		p->drawText(QRectF(0.0, 0.0, m_width, m_height), tr("Render Error"));
 	}
 	else
 	{
@@ -283,8 +283,8 @@
 	latex->setWorkingDirectory(QDir::tempPath());
 
 	double lDpi = realDpi()/72.0;
-	full_command.replace("$scribus_height_px$", QString::number(qRound(Height*lDpi)));
-	full_command.replace("$scribus_width_px$",  QString::number(qRound(Width*lDpi)));
+	full_command.replace("$scribus_height_px$", QString::number(qRound(m_height*lDpi)));
+	full_command.replace("$scribus_width_px$",  QString::number(qRound(m_width*lDpi)));
 	QMapIterator<QString, QString> i(editorProperties);
 	while (i.hasNext())
 	{
@@ -340,17 +340,17 @@
 	scaleY = m_imageYScale*lDpi;
 	offsetX = m_imageXOffset*m_imageXScale;
 	offsetY = m_imageYOffset*m_imageYScale;
-	realW = Width/scaleX - m_imageXOffset/lDpi;
-	realH = Height/scaleY - m_imageYOffset/lDpi;
+	realW = m_width/scaleX - m_imageXOffset/lDpi;
+	realH = m_height/scaleY - m_imageYOffset/lDpi;
 	if (!tmp.contains("$scribus_noprepost$") && m_usePreamble) {
 		tmp = config->preamble() + tmp + config->postamble();
 	}
-	tmp.replace(QString("$scribus_width$"), QString::number(Width));
-	tmp.replace(QString("$scribus_width_px$"), QString::number(qRound(Width*lDpi)));
-	tmp.replace(QString("$scribus_width_inch$"), QString::number(Width/72.0));
-	tmp.replace(QString("$scribus_height$"), QString::number(Height));
-	tmp.replace(QString("$scribus_height_px$"), QString::number(qRound(Height*lDpi)));
-	tmp.replace(QString("$scribus_height_inch$"), QString::number(Height/72.0));
+	tmp.replace(QString("$scribus_width$"), QString::number(m_width));
+	tmp.replace(QString("$scribus_width_px$"), QString::number(qRound(m_width*lDpi)));
+	tmp.replace(QString("$scribus_width_inch$"), QString::number(m_width/72.0));
+	tmp.replace(QString("$scribus_height$"), QString::number(m_height));
+	tmp.replace(QString("$scribus_height_px$"), QString::number(qRound(m_height*lDpi)));
+	tmp.replace(QString("$scribus_height_inch$"), QString::number(m_height/72.0));
 	tmp.replace(QString("$scribus_realwidth$"), QString::number(realW));
 	tmp.replace(QString("$scribus_realwidth_px$"), QString::number(qRound(realW*lDpi)));
 	tmp.replace(QString("$scribus_realheight$"), QString::number(realH));
@@ -535,9 +535,9 @@
 	if (!invalid) return;
 	invalid = false;
 	
-	if (Width == lastWidth && Height == lastHeight) return;
-	lastWidth = Width;
-	lastHeight = Height;
+	if (m_width == lastWidth && m_height == lastHeight) return;
+	lastWidth = m_width;
+	lastHeight = m_height;
 	
 	rerunApplication(false);
 }

Modified: trunk/Scribus/scribus/pageitem_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18095&path=/trunk/Scribus/scribus/pageitem_line.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_line.cpp (original)
+++ trunk/Scribus/scribus/pageitem_line.cpp Tue Jan 15 22:03:04 2013
@@ -56,7 +56,7 @@
 		return;
 
 	if (m_Doc->layerOutline(LayerID))
-		p->drawLine(FPoint(0, 0), FPoint(Width, 0));
+		p->drawLine(FPoint(0, 0), FPoint(m_width, 0));
 	else
 	{
 		if (NamedLStyle.isEmpty())
@@ -67,14 +67,14 @@
 				{
 					QPainterPath guidePath;
 					guidePath.moveTo(0, 0);
-					guidePath.lineTo(Width, 0);
+					guidePath.lineTo(m_width, 0);
 					DrawStrokePattern(p, guidePath);
 				}
 				else
 				{
 					p->setPattern(&m_Doc->docPatterns[patternStrokeVal], patternStrokeScaleX, patternStrokeScaleY, patternStrokeOffsetX, patternStrokeOffsetY, patternStrokeRotation, patternStrokeSkewX, patternStrokeSkewY, patternStrokeMirrorX, patternStrokeMirrorY);
 					p->setStrokeMode(ScPainter::Pattern);
-					p->drawLine(FPoint(0, 0), FPoint(Width, 0));
+					p->drawLine(FPoint(0, 0), FPoint(m_width, 0));
 				}
 			}
 			else if (GrTypeStroke > 0)
@@ -105,12 +105,12 @@
 					else
 						p->setGradient(VGradient::radial, FPoint(GrStrokeStartX, GrStrokeStartY), FPoint(GrStrokeEndX, GrStrokeEndY), FPoint(GrStrokeFocalX, GrStrokeFocalY), GrStrokeScale, GrStrokeSkew);
 				}
-				p->drawLine(FPoint(0, 0), FPoint(Width, 0));
+				p->drawLine(FPoint(0, 0), FPoint(m_width, 0));
 			}
 			else if (lineColor() != CommonStrings::None)
 			{
 				p->setStrokeMode(ScPainter::Solid);
-				p->drawLine(FPoint(0, 0), FPoint(Width, 0));
+				p->drawLine(FPoint(0, 0), FPoint(m_width, 0));
 			}
 			else
 				no_stroke = true;
@@ -126,7 +126,7 @@
 				{
 					SetQColor(&tmp, ml[it].Color, ml[it].Shade);
 					p->setPen(tmp, ml[it].Width, static_cast<Qt::PenStyle>(ml[it].Dash), static_cast<Qt::PenCapStyle>(ml[it].LineEnd), static_cast<Qt::PenJoinStyle>(ml[it].LineJoin));
-					p->drawLine(FPoint(0, 0), FPoint(Width, 0));
+					p->drawLine(FPoint(0, 0), FPoint(m_width, 0));
 				}
 			}
 		}
@@ -142,7 +142,7 @@
 	if (m_endArrowIndex != 0)
 	{
 		QTransform arrowTrans;
-		arrowTrans.translate(Width, 0);
+		arrowTrans.translate(m_width, 0);
 		arrowTrans.scale(m_endArrowScale / 100.0, m_endArrowScale / 100.0);
 		drawArrow(p, arrowTrans, m_endArrowIndex);
 	}
@@ -166,7 +166,7 @@
 QPointF PageItem_Line::endPoint()
 {
 	double rot = this->rotation();
-	double x = m_xPos + Width * cos(rot * M_PI / 180.0);
-	double y = m_yPos + Width * sin(rot * M_PI / 180.0);
+	double x = m_xPos + m_width * cos(rot * M_PI / 180.0);
+	double y = m_yPos + m_width * sin(rot * M_PI / 180.0);
 	return QPointF(x, y);
 }

Modified: trunk/Scribus/scribus/pageitem_noteframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18095&path=/trunk/Scribus/scribus/pageitem_noteframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_noteframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_noteframe.cpp Tue Jan 15 22:03:04 2013
@@ -99,8 +99,8 @@
 	double frameHeight = calculateLineSpacing(newStyle, this);
 	if (frameHeight == 0.0 && !m_nstyle->isAutoNotesHeight())
 		frameHeight = newStyle.charStyle().fontSize()/10;
-	Height = oldHeight = frameHeight;
-	oldWidth = Width;
+	m_height = oldHeight = frameHeight;
+	oldWidth = m_width;
 	oldRot = m_rotation;
 	oldXpos = m_xPos;
 	m_yPos = oldYpos =m_masterFrame->yPos() + m_masterFrame->height();
@@ -190,9 +190,9 @@
 	//while layouting notes frames undo should be disabled
 	UndoManager::instance()->setUndoEnabled(false);
 
-	if (m_nstyle->isAutoNotesWidth() && (Width != m_masterFrame->width()))
-	{
-		oldWidth = Width = m_masterFrame->width();
+	if (m_nstyle->isAutoNotesWidth() && (m_width != m_masterFrame->width()))
+	{
+		oldWidth = m_width = m_masterFrame->width();
 		updateClip();
 	}
 
@@ -200,7 +200,7 @@
 		updateNotesText();
 
 	PageItem_TextFrame::layout();
-	int oldH = Height;
+	int oldH = m_height;
 	if (notesStyle()->isAutoNotesHeight())
 	{
 		if (frameOverflows())
@@ -209,16 +209,16 @@
 			double maxH = m_Doc->currentPage()->height() - m_xPos;
 			while (frameOverflows())
 			{
-				oldHeight = Height += 8;
+				oldHeight = m_height += 8;
 				updateClip(false);
 				invalid = true;
 				PageItem_TextFrame::layout();
-				if (Height >= maxH)
+				if (m_height >= maxH)
 					break;
 			}
 		}
 		double hackValue = 0.5;
-		oldHeight = Height = ceil(maxY) + m_textDistanceMargins.Bottom + hackValue;
+		oldHeight = m_height = ceil(maxY) + m_textDistanceMargins.Bottom + hackValue;
 		updateConstants();
 		updateClip();
 		invalid = true;

Modified: trunk/Scribus/scribus/pageitem_symbol.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18095&path=/trunk/Scribus/scribus/pageitem_symbol.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_symbol.cpp (original)
+++ trunk/Scribus/scribus/pageitem_symbol.cpp Tue Jan 15 22:03:04 2013
@@ -62,16 +62,16 @@
 		{
 			p->save();
 			p->setPen(Qt::black, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
-			p->drawLine(FPoint(0, 0), FPoint(Width, Height));
-			p->drawLine(FPoint(0, Height), FPoint(Width, 0));
+			p->drawLine(FPoint(0, 0), FPoint(m_width, m_height));
+			p->drawLine(FPoint(0, m_height), FPoint(m_width, 0));
 			p->setFont(QApplication::font());
-			p->drawLine(FPoint(0, 0), FPoint(Width, 0));
-			p->drawLine(FPoint(Width, 0), FPoint(Width, Height));
-			p->drawLine(FPoint(Width, Height), FPoint(0, Height));
-			p->drawLine(FPoint(0, Height), FPoint(0, 0));
+			p->drawLine(FPoint(0, 0), FPoint(m_width, 0));
+			p->drawLine(FPoint(m_width, 0), FPoint(m_width, m_height));
+			p->drawLine(FPoint(m_width, m_height), FPoint(0, m_height));
+			p->drawLine(FPoint(0, m_height), FPoint(0, 0));
 			p->setBrush(QColor(255, 255, 255));
 			p->setBrushOpacity(0.0);
-			p->drawText(QRectF(0.0, 0.0, Width, Height), "Empty Symbol");
+			p->drawText(QRectF(0.0, 0.0, m_width, m_height), "Empty Symbol");
 			p->restore();
 		}
 		return;
@@ -80,12 +80,12 @@
 	p->save();
 	if (imageFlippedH())
 	{
-		p->translate(Width, 0);
+		p->translate(m_width, 0);
 		p->scale(-1, 1);
 	}
 	if (imageFlippedV())
 	{
-		p->translate(0, Height);
+		p->translate(0, m_height);
 		p->scale(1, -1);
 	}
 	if ((maskType() == 1) || (maskType() == 2) || (maskType() == 4) || (maskType() == 5))
@@ -110,8 +110,8 @@
 			p->setMaskMode(0);
 		else
 		{
-			double scw = Width / groupWidth;
-			double sch = Height / groupHeight;
+			double scw = m_width / groupWidth;
+			double sch = m_height / groupHeight;
 			p->setPatternMask(&m_Doc->docPatterns[patternMask()], patternMaskScaleX * scw, patternMaskScaleY * sch, patternMaskOffsetX, patternMaskOffsetY, patternMaskRotation, patternMaskSkewX, patternMaskSkewY, patternMaskMirrorX, patternMaskMirrorY);
 			if (maskType() == 3)
 				p->setMaskMode(2);
@@ -129,7 +129,7 @@
 	p->beginLayer(1.0 - fillTransparency(), fillBlendmode(), &PoLine);
 	p->setMaskMode(0);
 	ScPattern pat = m_Doc->docPatterns[patternVal];
-	p->scale(Width / pat.width, Height / pat.height);
+	p->scale(m_width / pat.width, m_height / pat.height);
 //		p->translate(pat.items.at(0)->gXpos, pat.items.at(0)->gYpos);
 	for (int em = 0; em < pat.items.count(); ++em)
 	{

Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18095&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Tue Jan 15 22:03:04 2013
@@ -1375,7 +1375,7 @@
 	MarginStruct savedTextDistanceMargins(m_textDistanceMargins);
 
 	LineControl current;
-	current.init(Width, Height, m_textDistanceMargins, lineCorr);
+	current.init(m_width, m_height, m_textDistanceMargins, lineCorr);
 	current.initColumns(columnWidth(), ColGap);
 	current.hyphenCount = 0;
 
@@ -1438,12 +1438,12 @@
 			QTransform matrix;
 			if (imageFlippedH())
 			{
-				matrix.translate(Width, 0);
+				matrix.translate(m_width, 0);
 				matrix.scale(-1, 1);
 			}
 			if (imageFlippedV())
 			{
-				matrix.translate(0, Height);
+				matrix.translate(0, m_height);
 				matrix.scale(1, -1);
 			}
 			m_availableRegion = matrix.map(m_availableRegion);
@@ -3222,7 +3222,7 @@
 				if ((BStyle == 0) || (BStyle == 1))
 				{
 					QPainterPath clp;
-					clp.addEllipse(QRectF(bwh, bwh, Width - annotation().Bwid(), Height - annotation().Bwid()));
+					clp.addEllipse(QRectF(bwh, bwh, m_width - annotation().Bwid(), m_height - annotation().Bwid()));
 					FPointArray clpArr;
 					clpArr.fromQPainterPath(clp);
 					p->setupPolygon(&clpArr);
@@ -3232,9 +3232,9 @@
 					p->strokePath();
 				}
 				else if (BStyle == 3)
-					p->drawShadeCircle(QRectF(0, 0, Width, Height), tmp, false, annotation().Bwid());
+					p->drawShadeCircle(QRectF(0, 0, m_width, m_height), tmp, false, annotation().Bwid());
 				else if (BStyle == 4)
-					p->drawShadeCircle(QRectF(0, 0, Width, Height), tmp, true, annotation().Bwid());
+					p->drawShadeCircle(QRectF(0, 0, m_width, m_height), tmp, true, annotation().Bwid());
 			}
 			else
 			{
@@ -3246,14 +3246,14 @@
 						BStyle = 4;
 				}
 				if (BStyle == 3)
-					p->drawShadePanel(QRectF(0, 0, Width, Height), tmp, false, annotation().Bwid());
+					p->drawShadePanel(QRectF(0, 0, m_width, m_height), tmp, false, annotation().Bwid());
 				else if (BStyle == 4)
-					p->drawShadePanel(QRectF(0, 0, Width, Height), tmp, true, annotation().Bwid());
+					p->drawShadePanel(QRectF(0, 0, m_width, m_height), tmp, true, annotation().Bwid());
 				else
 				{
 					p->setPen(tmp, annotation().Bwid(), BStyle == 0 ? Qt::SolidLine : Qt::DashLine, Qt::FlatCap, Qt::MiterJoin);
 					p->setStrokeMode(ScPainter::Solid);
-					p->drawRect(0, 0, Width, Height);
+					p->drawRect(0, 0, m_width, m_height);
 				}
 			}
 		}
@@ -3261,7 +3261,7 @@
 		{
 			int wdt = annotation().Bwid();
 			QPainterPath clp;
-			clp.addRect(QRectF(wdt, wdt, Width - (2 * wdt), Height - (2 * wdt)));
+			clp.addRect(QRectF(wdt, wdt, m_width - (2 * wdt), m_height - (2 * wdt)));
 			FPointArray clpArr;
 			clpArr.fromQPainterPath(clp);
 			p->setupPolygon(&clpArr);
@@ -3273,7 +3273,7 @@
 				else
 					p->setPen(fontColor);
 				p->setFont(QFont(fontName, fontSize));
-				p->drawText(QRectF(wdt, wdt, Width - (2 * wdt), Height - (2 * wdt)), bmUtf16, false);
+				p->drawText(QRectF(wdt, wdt, m_width - (2 * wdt), m_height - (2 * wdt)), bmUtf16, false);
 			}
 			if ((!Pfile.isEmpty()) && (PictureIsAvailable) && (PicArt) && (annotation().UseIcons()))
 			{
@@ -3422,7 +3422,7 @@
 					mm.scale(fontSize / 10.0, fontSize / 10.0);
 					chkPath = mm.map(chkPath);
 					QRectF bb = chkPath.boundingRect();
-					QRectF bi = QRectF(0.0, 0.0, Width, Height);
+					QRectF bi = QRectF(0.0, 0.0, m_width, m_height);
 					double dx = bi.center().x() - (bb.width() / 2.0);
 					double dy = bi.center().y() - (bb.height() / 2.0);
 					p->translate(dx, dy);
@@ -3439,13 +3439,13 @@
 		else if (annotation().Type() == Annotation::Combobox)
 		{
 			int wdt = annotation().Bwid();
-			if (Width > 2 * wdt + 15)
+			if (m_width > 2 * wdt + 15)
 			{
 				if (!bmUtf16.isEmpty())
 				{
 					p->save();
 					QPainterPath clp;
-					clp.addRect(QRectF(wdt + 1, wdt + 1, Width - (2 * wdt) - 17, Height - (2 * wdt) - 2));
+					clp.addRect(QRectF(wdt + 1, wdt + 1, m_width - (2 * wdt) - 17, m_height - (2 * wdt) - 2));
 					FPointArray clpArr;
 					clpArr.fromQPainterPath(clp);
 					p->setupPolygon(&clpArr);
@@ -3453,7 +3453,7 @@
 					p->setPen(fontColor);
 					p->setFont(QFont(fontName, fontSize));
 					QStringList textList = bmUtf16.split("\n");
-					p->drawText(QRectF(wdt + 1, wdt + 1, Width - (2 * wdt) - 17, Height - (2 * wdt) - 2), textList[0], false, 1);
+					p->drawText(QRectF(wdt + 1, wdt + 1, m_width - (2 * wdt) - 17, m_height - (2 * wdt) - 2), textList[0], false, 1);
 					p->restore();
 				}
 				p->setFillMode(ScPainter::Solid);
@@ -3461,9 +3461,9 @@
 				p->setBrush(QColor(200, 200, 200));
 				QRectF bi;
 				if ((annotation().Bsty() == 3) || (annotation().Bsty() == 4))
-					bi = QRectF(Width - wdt - 15, wdt, 15, Height - (2 * wdt));
+					bi = QRectF(m_width - wdt - 15, wdt, 15, m_height - (2 * wdt));
 				else
-					bi = QRectF(Width - (wdt / 2.0) - 15, wdt / 2.0, 15, Height - wdt);
+					bi = QRectF(m_width - (wdt / 2.0) - 15, wdt / 2.0, 15, m_height - wdt);
 				p->drawRect(bi.x(), bi.y(), bi.width(), bi.height());
 				QPainterPath chkPath;
 				chkPath.moveTo(bi.center().x() - 3, bi.center().y());
@@ -3483,20 +3483,20 @@
 		else if (annotation().Type() == Annotation::Listbox)
 		{
 			int wdt = annotation().Bwid();
-			if (Width > 2 * wdt + 15)
+			if (m_width > 2 * wdt + 15)
 			{
 				if (!bmUtf16.isEmpty())
 				{
 					p->save();
 					QPainterPath clp;
-					clp.addRect(QRectF(wdt + 1, wdt + 1, Width - (2 * wdt) - 17, Height - (2 * wdt) - 2));
+					clp.addRect(QRectF(wdt + 1, wdt + 1, m_width - (2 * wdt) - 17, m_height - (2 * wdt) - 2));
 					FPointArray clpArr;
 					clpArr.fromQPainterPath(clp);
 					p->setupPolygon(&clpArr);
 					p->setClipPath();
 					p->setPen(fontColor);
 					p->setFont(QFont(fontName, fontSize));
-					p->drawText(QRectF(wdt + 1, wdt + 1, Width - (2 * wdt) - 17, Height - (2 * wdt) - 2), bmUtf16, false, 2);
+					p->drawText(QRectF(wdt + 1, wdt + 1, m_width - (2 * wdt) - 17, m_height - (2 * wdt) - 2), bmUtf16, false, 2);
 					p->restore();
 				}
 				p->restore();
@@ -3594,16 +3594,16 @@
 		//		qDebug("drawing textframe: len=%d", itemText.length());
 		if (imageFlippedH())
 		{
-			p->translate(Width, 0);
+			p->translate(m_width, 0);
 			p->scale(-1, 1);
-			pf2.translate(Width, 0);
+			pf2.translate(m_width, 0);
 			pf2.scale(-1, 1);
 		}
 		if (imageFlippedV())
 		{
-			p->translate(0, Height);
+			p->translate(0, m_height);
 			p->scale(1, -1);
-			pf2.translate(0, Height);
+			pf2.translate(0, m_height);
 			pf2.scale(1, -1);
 		}
 		assert( firstInFrame() >= 0 );
@@ -3971,8 +3971,8 @@
 			p->setBrushOpacity(1.0);
 			p->setFillMode(ScPainter::Solid);
 			double ofwh = 10;
-			double ofx = Width - ofwh/2;
-			double ofy = Height - ofwh*3;
+			double ofx = m_width - ofwh/2;
+			double ofy = m_height - ofwh*3;
 			p->drawSharpRect(ofx, ofy, ofwh, ofwh);
 		}
 		if (no_fill && no_stroke && m_Doc->guidesPrefs().framesShown)
@@ -3981,7 +3981,7 @@
 			if (m_Locked)
 				p->setPen(PrefsManager::instance()->appPrefs.displayPrefs.frameLockColor, scpInv, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin);
 			p->setFillMode(ScPainter::None);
-			p->drawSharpRect(0, 0, Width, Height);
+			p->drawSharpRect(0, 0, m_width, m_height);
 			no_fill = false;
 			no_stroke = false;
 		}
@@ -5052,7 +5052,7 @@
 		lineCorr = m_lineWidth / 2.0;
 	else
 		lineCorr = 0;
-	return (Width - (ColGap * (Cols - 1)) - m_textDistanceMargins.Left - m_textDistanceMargins.Right - 2 * lineCorr) / Cols;
+	return (m_width - (ColGap * (Cols - 1)) - m_textDistanceMargins.Left - m_textDistanceMargins.Right - 2 * lineCorr) / Cols;
 //	return (Width - (ColGap * (Cols - 1)) - m_textDistanceMargins.Left - m_textDistanceMargins.Right - lineCorr) / Cols;
 }
 
@@ -5102,16 +5102,16 @@
 	if (lineColor() != CommonStrings::None)
 		lineCorr = m_lineWidth / 2.0;
 	if (m_textDistanceMargins.Top + lineCorr!=0.0)
-		p->drawSharpLine(FPoint(0, m_textDistanceMargins.Top + lineCorr), FPoint(Width, m_textDistanceMargins.Top + lineCorr));
+		p->drawSharpLine(FPoint(0, m_textDistanceMargins.Top + lineCorr), FPoint(m_width, m_textDistanceMargins.Top + lineCorr));
 	if (m_textDistanceMargins.Bottom + lineCorr!=0.0)
-		p->drawSharpLine(FPoint(0, Height - m_textDistanceMargins.Bottom - lineCorr), FPoint(Width, Height - m_textDistanceMargins.Bottom - lineCorr));
+		p->drawSharpLine(FPoint(0, m_height - m_textDistanceMargins.Bottom - lineCorr), FPoint(m_width, m_height - m_textDistanceMargins.Bottom - lineCorr));
 	while(curCol < Cols)
 	{
 		colLeft=(colWidth + ColGap) * curCol + m_textDistanceMargins.Left + lineCorr;
 		if (colLeft != 0.0)
-			p->drawSharpLine(FPoint(colLeft, 0), FPoint(colLeft, 0+Height));
-		if (colLeft + colWidth != Width)
-			p->drawSharpLine(FPoint(colLeft+colWidth, 0), FPoint(colLeft+colWidth, 0+Height));
+			p->drawSharpLine(FPoint(colLeft, 0), FPoint(colLeft, 0 + m_height));
+		if (colLeft + colWidth != m_width)
+			p->drawSharpLine(FPoint(colLeft + colWidth, 0), FPoint(colLeft + colWidth, 0 + m_height));
 		++curCol;
 	}
 	




More information about the scribus-commit mailing list