r15736 by jghali - remove lot of PageItem signals unused, or not to be used anymore

scribus-commit scribus-commit at lists.scribus.net
Wed Nov 3 00:31:33 CET 2010


Author: jghali
Date: Tue Nov  2 23:31:32 2010
New Revision: 15736

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15736
Log:
remove lot of PageItem signals unused, or not to be used anymore

Modified:
    branches/ScribusOIF/scribus/pageitem.cpp
    branches/ScribusOIF/scribus/pageitem.h
    branches/ScribusOIF/scribus/pageitem_latexframe.cpp

Modified: branches/ScribusOIF/scribus/pageitem.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15736&path=/branches/ScribusOIF/scribus/pageitem.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem.cpp Tue Nov  2 23:31:32 2010
@@ -846,7 +846,6 @@
 	if (drawingOnly || m_Doc->isLoading())
 		return;
 	checkChanges();
-	//emit position(Xpos, Ypos);
 }
 
 void PageItem::setYPos(const double newYPos, bool drawingOnly)
@@ -855,7 +854,6 @@
 	if (drawingOnly || m_Doc->isLoading())
 		return;
 	checkChanges();
-	//emit position(Xpos, Ypos);
 }
 
 void PageItem::setXYPos(const double newXPos, const double newYPos, bool drawingOnly)
@@ -865,7 +863,6 @@
 	if (drawingOnly || m_Doc->isLoading())
 		return;
 	checkChanges();
-	//emit position(Xpos, Ypos);
 }
 
 void PageItem::moveBy(const double dX, const double dY, bool drawingOnly)
@@ -880,7 +877,6 @@
 	if (drawingOnly || m_Doc->isLoading())
 		return;
 	checkChanges();
-	//emit position(Xpos, Ypos);
 }
 
 void PageItem::setWidth(const double newWidth)
@@ -890,7 +886,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	//emit widthAndHeight(Width, Height);
 }
 
 void PageItem::setHeight(const double newHeight)
@@ -900,7 +895,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	//emit widthAndHeight(Width, Height);
 }
 
 void PageItem::setWidthHeight(const double newWidth, const double newHeight, bool drawingOnly)
@@ -911,7 +905,6 @@
 	if (drawingOnly)
 		return;
 	checkChanges();
-	//emit widthAndHeight(Width, Height);
 }
 
 void PageItem::setWidthHeight(const double newWidth, const double newHeight)
@@ -922,7 +915,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	//emit widthAndHeight(Width, Height);
 }
 
 void PageItem::resizeBy(const double dH, const double dW)
@@ -937,7 +929,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	//emit widthAndHeight(Width, Height);
 }
 
 void PageItem::setRotation(const double newRotation, bool drawingOnly)
@@ -946,7 +937,6 @@
 	if (drawingOnly || m_Doc->isLoading())
 		return;
 	checkChanges();
-	//emit rotation(Rot);
 }
 
 void PageItem::rotateBy(const double dR)
@@ -957,7 +947,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	//emit rotation(Rot);
 }
 
 void PageItem::setSelected(const bool toSelect)
@@ -971,7 +960,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY);
 }
 
 void PageItem::setImageYScale(const double newImageYScale)
@@ -980,7 +968,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY);
 }
 
 void PageItem::setImageXYScale(const double newImageXScale, const double newImageYScale)
@@ -990,7 +977,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY);
 }
 
 void PageItem::setImageXOffset(const double newImageXOffset)
@@ -999,7 +985,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY);
 }
 
 void PageItem::setImageYOffset(const double newImageYOffset)
@@ -1008,7 +993,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY);
 }
 
 void PageItem::setImageXYOffset(const double newImageXOffset, const double newImageYOffset)
@@ -1018,7 +1002,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY);
 }
 
 void PageItem::moveImageXYOffsetBy(const double dX, const double dY)
@@ -1032,7 +1015,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY);
 }
 
 void PageItem::setImageRotation(const double newRotation)
@@ -1041,7 +1023,6 @@
 	if (m_Doc->isLoading())
 		return;
 	checkChanges();
-	emit imageRotation(LocalRot);
 }
 
 void PageItem::setReversed(bool newReversed)
@@ -1248,25 +1229,25 @@
 void PageItem::setTextToFrameDistLeft(double newLeft)
 {
 	Extra=newLeft;
-	emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
+	//emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
 }
 
 void PageItem::setTextToFrameDistRight(double newRight)
 {
 	RExtra=newRight;
-	emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
+	//emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
 }
 
 void PageItem::setTextToFrameDistTop(double newTop)
 {
 	TExtra=newTop;
-	emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
+	//emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
 }
 
 void PageItem::setTextToFrameDistBottom(double newBottom)
 {
 	BExtra=newBottom;
-	emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
+	//emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
 }
 
 void PageItem::setTextToFrameDist(double newLeft, double newRight, double newTop, double newBottom)
@@ -1275,7 +1256,7 @@
 	RExtra=newRight;
 	TExtra=newTop;
 	BExtra=newBottom;
-	emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
+	//emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
 }
 
 double PageItem::gridOffset() const { return m_Doc->guidesPrefs().offsetBaselineGrid; }
@@ -3568,7 +3549,6 @@
 	}
 	fillShadeVal = newShade;
 	setFillQColor();
-//CB unused in 135	emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
 }
 
 void PageItem::setFillTransparency(double newTransparency)
@@ -3640,7 +3620,6 @@
 	}
 	lineColorVal = tmp;
 	setLineQColor();
-//CB unused in 135	emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
 }
 
 void PageItem::setLineShade(double newShade)
@@ -3662,7 +3641,6 @@
 	}
 	lineShadeVal = newShade;
 	setLineQColor();
-//CB unused in 135	emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
 }
 
 void PageItem::setStrokePattern(const QString &newPattern)
@@ -3954,7 +3932,6 @@
 		undoManager->action(this, ss);
 	}
 	m_ImageIsFlippedH = !m_ImageIsFlippedH;
-	emit frameFlippedH(m_ImageIsFlippedH);
 }
 
 void PageItem::setImageFlippedV(bool flipped)
@@ -3972,7 +3949,6 @@
 		undoManager->action(this, ss);
 	}
 	m_ImageIsFlippedV = !m_ImageIsFlippedV;
-	emit frameFlippedV(m_ImageIsFlippedV);
 }
 
 void PageItem::setImageScalingMode(bool freeScale, bool keepRatio)
@@ -4076,7 +4052,6 @@
 		undoManager->action(this, ss);
 	}
 	m_PrintEnabled=!m_PrintEnabled;
-	emit printEnabled(m_PrintEnabled);
 }
 
 void PageItem::setTextFlowMode(TextFlowMode mode)
@@ -6630,8 +6605,6 @@
 		cl.scale(LocalScX, LocalScY);
 		imageClip.map(cl);
 	}
-	emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY );
-	emit imageRotation(LocalRot);
 }
 
 void PageItem::setExternalFile(QString val)
@@ -6743,7 +6716,6 @@
 	//	ScMW->propertiesPalette->updateColorSpecialGradient();
 	//CB Will only emit if connected, ie is first in GUI selection
 	double dur=m_Doc->unitRatio();
-	emit gradientColorUpdate(GrStartX*dur, GrStartY*dur, GrEndX*dur, GrEndY*dur, Width*dur, Height*dur);
 }
 
 void PageItem::setPolyClip(int up, int down)
@@ -6828,46 +6800,20 @@
 	connect(this, SIGNAL(frameType(int)), pp, SLOT(NewSel(int)));
 	connect(this, SIGNAL(frameLocked(bool)), pp, SLOT(setLocked(bool)));
 	connect(this, SIGNAL(frameSizeLocked(bool)), pp, SLOT(setSizeLocked(bool)));
-	connect(this, SIGNAL(frameFlippedH(bool)), pp, SLOT(setFlippedH(bool)));
-	connect(this, SIGNAL(frameFlippedV(bool)), pp, SLOT(setFlippedV(bool)));
-	connect(this, SIGNAL(printEnabled(bool)), pp, SLOT(setPrintingEnabled(bool)));
-//	connect(this, SIGNAL(position(double, double)), pp, SLOT(setXY(double, double)));
-//	connect(this, SIGNAL(widthAndHeight(double, double)), pp, SLOT(setBH(double, double)));
-//CB unused in 135 connect(this, SIGNAL(colors(QString, QString, double, double)), m_Doc->scMW(), SLOT(setCSMenu()));
-//	connect(this, SIGNAL(colors(QString, QString, double, double)), pp->Cpal, SLOT(setActFarben(QString, QString, int, int)));
-//	connect(this, SIGNAL(gradientType(int)), pp->Cpal, SLOT(setActGradient(int)));
-	connect(this, SIGNAL(patternFill(QString, double, double, double, double, double, double, double, bool, bool)), pp->Cpal, SLOT(setActPattern(QString, double, double, double, double, double, double, double, bool, bool)));
-//	connect(this, SIGNAL(gradientColorUpdate(double, double, double, double, double, double)), pp->Cpal, SLOT(setSpecialGradient(double, double, double, double, double, double)));
-//	connect(this, SIGNAL(rotation(double)), pp, SLOT(setR(double)));
-//	connect(this, SIGNAL(transparency(double, double)), pp->Cpal, SLOT(setActTrans(double, double)));
-//	connect(this, SIGNAL(blendmode(int, int)), pp->Cpal, SLOT(setActBlend(int, int)));
 	//Shape signals
-	//Not connected when transferring code: void columns(int, double); //Number, gap
 	connect(this, SIGNAL(cornerRadius(double)), pp, SLOT(setRR(double)));
 	//	connect(view, SIGNAL(ItemTextCols(int, double)), propertiesPalette, SLOT(setCols(int, double)));
 	//Line signals
-	connect(this, SIGNAL(lineWidth(double)), pp, SLOT(setLineWidth(double)));
-	connect(this, SIGNAL(imageOffsetScale(double, double, double, double)), pp, SLOT(setScaleAndOffset(double, double, double, double)));
-	connect(this, SIGNAL(imageRotation(double)), pp, SLOT(setImgRotation(double)));
-	connect(this, SIGNAL(lineStyleCapJoin(Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle)), pp, SLOT( setLIvalue(Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle)));
+	//connect(this, SIGNAL(lineWidth(double)), pp, SLOT(setLineWidth(double)));
+	//connect(this, SIGNAL(lineStyleCapJoin(Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle)), pp, SLOT( setLIvalue(Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle)));
 	//Frame text signals
 	connect(this, SIGNAL(lineSpacing(double)), pp, SLOT(setLsp(double)));
-	connect(this, SIGNAL(textToFrameDistances(double, double, double, double)), pp, SLOT(setTextToFrameDistances(double, double, double, double)));
+	//connect(this, SIGNAL(textToFrameDistances(double, double, double, double)), pp, SLOT(setTextToFrameDistances(double, double, double, double)));
 	connect(this, SIGNAL(textKerning(double)), pp, SLOT(setExtra(double)));
 	connect(this, SIGNAL(textStyle(int)), pp, SLOT(setStil(int)));
 	connect(this, SIGNAL(textStyle(int)), m_Doc->scMW(), SLOT(setStilvalue(int)));
 	connect(this, SIGNAL(textFont(const QString&)), pp, SLOT(setFontFace(const QString&)));
 	connect(this, SIGNAL(textSize(double)), pp, SLOT(setSize(double)));
-	connect(this, SIGNAL(textWidthScale(double)), pp, SLOT(setTScale(double)));
-	connect(this, SIGNAL(textHeightScale(double)), pp, SLOT(setTScaleV(double)));
-	connect(this, SIGNAL(textBaseLineOffset(double)), pp, SLOT(setTBase(double)));
-	connect(this, SIGNAL(textOutline(double)), pp, SLOT(setOutlineW(double)));
-	connect(this, SIGNAL(textShadow(double, double )), pp, SLOT(setShadowOffs(double, double )));
-	connect(this, SIGNAL(textUnderline(double, double)), pp, SLOT(setUnderline(double, double)));
-	connect(this, SIGNAL(textStrike(double, double)), pp, SLOT(setStrike(double, double)));
-	connect(this, SIGNAL(textColor(QString, QString, double, double)), pp, SLOT(setActFarben(QString, QString, double, double)));
-//	connect(this, SIGNAL(textFormatting(int)), pp, SLOT(setAli(int)));
-//	connect(this, SIGNAL(textFormatting(int)), ScMW, SLOT(setAbsValue(int)));
 
 	return true;
 }
@@ -6890,42 +6836,14 @@
 
 	emit myself(this);
 	emit frameType(m_ItemType);
-/*CB using the emit myself* instead of all of these
-	emit position(Xpos, Ypos);
-	emit widthAndHeight(Width, Height);
-	emit rotation(Rot);
-	emit frameLocked(m_Locked);
-	emit frameSizeLocked(m_SizeLocked);
-	emit frameFlippedH(m_ImageIsFlippedH);
-	emit frameFlippedV(m_ImageIsFlippedV);
-	emit printEnabled(m_PrintEnabled);
-	emit lineWidth(m_lineWidth);
-	emit lineStyleCapJoin(PLineArt, PLineEnd, PLineJoin);
-	emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY);
-*/
-//CB unused in 135 emit colors(lineColorVal, fillColorVal, lineShadeVal, fillShadeVal);
-//	emit gradientType(GrType);
+
+//CB unused in 135
 //	double dur=m_Doc->unitRatio();
-//	emit gradientColorUpdate(GrStartX*dur, GrStartY*dur, GrEndX*dur, GrEndY*dur, Width*dur, Height*dur);
-//	emit transparency(fillTransparencyVal, lineTransparencyVal);
 //	emit blendmode(fillBlendmodeVal, lineBlendmodeVal);
 /*CB using the emit myself* instead of all of these
-	emit patternFill(patternVal, patternScaleX, patternScaleY, patternOffsetX, patternOffsetY, patternRotation);
 	emit textToFrameDistances(Extra, TExtra, BExtra, RExtra);
-	emit columns(Cols, ColGap);
 */
-	if (m_Doc->appMode == modeEdit)
-	{
-/* maybe already done elsewhere? -- av
-		emit lineSpacing(currentStyle().lineSpacing());
-		emit textKerning(currentCharStyle().tracking());
-		emit textStyle(currentCharStyle().effects());
-		emit textFont(currentCharStyle().font()->scName());
-		emit textSize(currentCharStyle().fontSize());
-*/
-		//		emit textFormatting(currentStyle().alignment());
-	}
-	else
+	if (m_Doc->appMode != modeEdit)
 	{
 //TODO remove and use the emit myself
 		emit lineSpacing(itemText.defaultStyle().lineSpacing());

Modified: branches/ScribusOIF/scribus/pageitem.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15736&path=/branches/ScribusOIF/scribus/pageitem.h
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.h (original)
+++ branches/ScribusOIF/scribus/pageitem.h Tue Nov  2 23:31:32 2010
@@ -1531,46 +1531,18 @@
 	//Frame signals
 	void myself(PageItem *);
 	void frameType(int);   // not related to Frametype but to m_itemIype :-/
-	//void position(double, double); //X,Y
-	//void widthAndHeight(double, double); //W,H
-	//void rotation(double); //Degrees rotation	
-	void colors(QString, QString, double, double); //lineColor, fillColor, lineShade, fillShade
-	void gradientType(int); //Normal, horizontal, vertical, etc.
-	void patternFill(QString, double, double, double, double, double, double, double, bool, bool);
-	void gradientColorUpdate(double, double, double, double, double, double); //Cpal updatespecialgradient
-	void transparency(double, double); //fillTransparency, lineTransparency
-	void blendmode(int, int); //fillBlendmode, lineBlendmode
 	void frameLocked(bool); //Frame lock
 	void frameSizeLocked(bool); //Frame size lock
-	void frameFlippedH(bool); //Frame flipped horizontally
-	void frameFlippedV(bool); //Frame flipped vertically
-	void printEnabled(bool); //Frame is set to print or not
 	//Shape signals
-	void columns(int, double); //Number, gap
 	void cornerRadius(double); //Corner radius of the shape
-	//Line signals
-	void lineWidth(double);
-	void lineStyleCapJoin(Qt::PenStyle, Qt::PenCapStyle, Qt::PenJoinStyle);
 	//Frame text signals
 	void lineSpacing(double);
 	void textKerning(double);
 	void textStyle(int);
 	void textFont(const QString&);
 	void textSize(double);
-	void textWidthScale(double);
-	void textHeightScale(double);
-	void textBaseLineOffset(double);
-	void textOutline(double);
-	void textShadow(double, double);
-	void textUnderline(double, double);
-	void textStrike(double, double);
-	void textColor(QString, QString, double, double);
-	void textFormatting(int);
-	void textToFrameDistances(double, double, double, double); //left, top, bottom, right: Extra, TExtra, BExtra, RExtra
+	//void textToFrameDistances(double, double, double, double); //left, top, bottom, right: Extra, TExtra, BExtra, RExtra
 	//FIXME: columns, grid ?
-	//Frame image signals
-	void imageOffsetScale(double, double, double, double);
-	void imageRotation(double);
 };
 
 Q_DECLARE_METATYPE(PageItem*);

Modified: branches/ScribusOIF/scribus/pageitem_latexframe.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15736&path=/branches/ScribusOIF/scribus/pageitem_latexframe.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem_latexframe.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem_latexframe.cpp Tue Nov  2 23:31:32 2010
@@ -217,7 +217,9 @@
 		LocalScX = 72.0/pixm.imgInfo.xres;
 		LocalScY = 72.0/pixm.imgInfo.yres;
 	}
-	emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY );
+
+	//FIXME
+	//emit imageOffsetScale(LocalScX, LocalScY, LocalX, LocalY );
 	
 	update();
 }




More information about the scribus-commit mailing list