r16937 by jghali - merge trunk revisions up to r16934

scribus-commit scribus-commit at lists.scribus.net
Fri Oct 28 18:44:51 UTC 2011


Author: jghali
Date: Fri Oct 28 18:44:51 2011
New Revision: 16937

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=16937
Log:
merge trunk revisions up to r16934

Added:
    branches/ScribusOIF/scribus/canvasmode_editweldpoint.cpp
      - copied unchanged from r16934, trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
    branches/ScribusOIF/scribus/canvasmode_editweldpoint.h
      - copied unchanged from r16934, trunk/Scribus/scribus/canvasmode_editweldpoint.h
Modified:
    branches/ScribusOIF/CMakeLists.txt
    branches/ScribusOIF/scribus/CMakeLists.txt
    branches/ScribusOIF/scribus/actionmanager.cpp
    branches/ScribusOIF/scribus/canvas.h
    branches/ScribusOIF/scribus/canvasmode.cpp
    branches/ScribusOIF/scribus/pageitem.cpp
    branches/ScribusOIF/scribus/pageitem.h
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.h
    branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    branches/ScribusOIF/scribus/scribus.cpp
    branches/ScribusOIF/scribus/scribusdoc.cpp
    branches/ScribusOIF/scribus/scribusdoc.h
    branches/ScribusOIF/scribus/scribusstructs.h
    branches/ScribusOIF/scribus/scribusview.h
    branches/ScribusOIF/scribus/ui/contextmenu.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
    branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h
    branches/ScribusOIF/scribus/ui/propertiespalette_xyzbase.ui
    branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj

Modified: branches/ScribusOIF/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/CMakeLists.txt (original)
+++ branches/ScribusOIF/CMakeLists.txt Fri Oct 28 18:44:51 2011
@@ -449,9 +449,12 @@
 #<< Qt
 SET (QT_MT_REQUIRED TRUE)
 SET (QT_MIN_VERSION "4.6.0")
-IF (WANT_QT4MAC_COCOA)
-  SET (QT_MAC_USE_COCOA TRUE)
-ENDIF (WANT_QT4MAC_COCOA)
+IF (APPLE)
+  IF (WANT_QT4MAC_COCOA)
+    SET (QT_MAC_USE_COCOA TRUE)
+  ENDIF (WANT_QT4MAC_COCOA)
+  SET( QT_USE_QTSQL TRUE )
+ENDIF (APPLE)
 IF (WANT_QT3SUPPORT)
   SET (QT_USE_QT3SUPPORT TRUE)
 ELSE (WANT_QT3SUPPORT)
@@ -460,9 +463,6 @@
 SET (QT_USE_QTXML TRUE )
 SET (QT_USE_QTWEBKIT TRUE )
 SET (QT_USE_QTOPENGL TRUE )
-IF (APPLE)
-  SET( QT_USE_QTSQL TRUE )
-ENDIF (APPLE)
 SET( QT_USE_QTNETWORK TRUE )
 FIND_PACKAGE(Qt4 REQUIRED)
 INCLUDE( ${QT_USE_FILE} )

Modified: branches/ScribusOIF/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/CMakeLists.txt
==============================================================================
--- branches/ScribusOIF/scribus/CMakeLists.txt (original)
+++ branches/ScribusOIF/scribus/CMakeLists.txt Fri Oct 28 18:44:51 2011
@@ -508,6 +508,7 @@
   canvasmode_editpolygon.cpp
   canvasmode_editspiral.cpp
   canvasmode_edittable.cpp
+  canvasmode_editweldpoint.cpp
   canvasmode_magnifier.cpp
   canvasmode_measurements.cpp
   canvasmode_nodeedit.cpp

Modified: branches/ScribusOIF/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/actionmanager.cpp
==============================================================================
--- branches/ScribusOIF/scribus/actionmanager.cpp (original)
+++ branches/ScribusOIF/scribus/actionmanager.cpp Fri Oct 28 18:44:51 2011
@@ -504,6 +504,11 @@
 	name="itemConvertToPolygon";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	name="itemConvertToTextFrame";
+	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+
+	name="itemsUnWeld";
+	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+	name="itemWeld";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 
 	connect( (*scrActions)["itemDuplicate"], SIGNAL(triggered()), mainWindow, SLOT(duplicateItem()) );
@@ -1117,6 +1122,9 @@
 	disconnect( (*scrActions)["itemDelete"], 0, 0, 0);
 	disconnect( (*scrActions)["extrasHyphenateText"], 0, 0, 0 );
 	disconnect( (*scrActions)["extrasDeHyphenateText"], 0, 0, 0 );
+	disconnect( (*scrActions)["itemsUnWeld"], 0, 0, 0);
+	disconnect( (*scrActions)["itemWeld"], 0, 0, 0);
+
 
 }
 
@@ -1149,6 +1157,9 @@
 	connect( (*scrActions)["tableAdjustTableToFrame"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustTableToFrame()));
 	connect( (*scrActions)["itemAdjustFrameToImage"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustFrametoImageSize()) );
 	connect( (*scrActions)["itemAdjustImageToFrame"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustImagetoFrameSize()) );
+	connect( (*scrActions)["itemsUnWeld"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_UnWeld()) );
+	connect( (*scrActions)["itemWeld"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_Weld()) );
+
 }
 
 void ActionManager::disconnectNewViewActions()
@@ -1471,6 +1482,8 @@
 	(*scrActions)["itemConvertToOutlines"]->setTexts( tr("&Outlines", "Convert to oulines"));
 	(*scrActions)["itemConvertToPolygon"]->setTexts( tr("&Polygon"));
 	(*scrActions)["itemConvertToTextFrame"]->setTexts( tr("&Text Frame"));
+	(*scrActions)["itemsUnWeld"]->setTexts( tr("Unweld items"));
+	(*scrActions)["itemWeld"]->setTexts( tr("Weld items"));
 
 	//Insert Menu
 	(*scrActions)["insertFrame"]->setTexts( tr("&Frames..."));
@@ -1949,7 +1962,9 @@
 		<< "itemAttachTextToPath" 
 		<< "itemDetachTextFromPath" 
 		<< "itemCombinePolygons" 
-		<< "itemSplitPolygons";
+		<< "itemSplitPolygons"
+		<< "itemsUnWeld"
+		<< "itemWeld";
 	//Insert
 	++itmenu;
 	itmenu->second

Modified: branches/ScribusOIF/scribus/canvas.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/canvas.h
==============================================================================
--- branches/ScribusOIF/scribus/canvas.h (original)
+++ branches/ScribusOIF/scribus/canvas.h Fri Oct 28 18:44:51 2011
@@ -94,6 +94,7 @@
 	friend class CanvasMode_EditGradient;
 	friend class CanvasMode_EditMeshGradient;
 	friend class CanvasMode_EditMeshPatch;
+	friend class CanvasMode_EditWeldPoint;
 	friend class CanvasMode_EditPolygon;
 	friend class CanvasMode_EditSpiral;
 	friend class CanvasMode_EditTable;

Modified: branches/ScribusOIF/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/canvasmode.cpp
==============================================================================
--- branches/ScribusOIF/scribus/canvasmode.cpp (original)
+++ branches/ScribusOIF/scribus/canvasmode.cpp Fri Oct 28 18:44:51 2011
@@ -31,6 +31,7 @@
 #include "canvasmode_editpolygon.h"
 #include "canvasmode_editspiral.h"
 #include "canvasmode_edittable.h"
+#include "canvasmode_editweldpoint.h"
 #include "canvasmode_eyedropper.h"
 #include "canvasmode_framelinks.h"
 #include "canvasmode_magnifier.h"
@@ -131,6 +132,9 @@
 		case modeEditMeshPatch:
 			result = new CanvasMode_EditMeshPatch(view);
 			break;
+		case modeEditWeldPoint:
+			result = new CanvasMode_EditWeldPoint(view);
+			break;
 		case modeDrawBezierLine:
 			result = new BezierMode(view);
 			break;
@@ -369,6 +373,29 @@
 					psx->drawRect(QRectF(x, y+h-markWidth, markWidth, markWidth));
 				}
 			}
+			if (currItem->isWelded())
+			{
+				psx->setPen(QPen(Qt::yellow, 8.0 / m_canvas->scale(), Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin));
+				for (int i = 0 ; i <  currItem->weldList.count(); i++)
+				{
+					PageItem::weldingInfo wInf =  currItem->weldList.at(i);
+					psx->drawPoint(QPointF(wInf.weldPoint.x(), wInf.weldPoint.y()));
+				}
+				//draw marker for weld point
+			/*	psx->setBrush(m_brush["outline"]);
+				psx->setPen(m_pen["outline"]);
+				double weldX = x, weldY = y;
+				if (currItem->myWeldPoint == topCenter || currItem->myWeldPoint == centerCenter || currItem->myWeldPoint == bottomCenter)
+					weldX += w /2 - halfMarkWidth;
+				else if (currItem->myWeldPoint == topRight  || currItem->myWeldPoint == centerRight || currItem->myWeldPoint == bottomRight)
+					weldX += w - markWidth;
+
+				if (currItem->myWeldPoint == centerLeft  || currItem->myWeldPoint == centerCenter || currItem->myWeldPoint == centerRight)
+					weldY += h/2 - halfMarkWidth;
+				else if (currItem->myWeldPoint == bottomLeft  || currItem->myWeldPoint == bottomCenter || currItem->myWeldPoint == bottomRight)
+					weldY += h - markWidth;
+				psx->drawRect(QRectF(weldX, weldY, markWidth, markWidth));*/
+			}
 			
 			psx->restore();
 		}
@@ -652,6 +679,7 @@
 		case modeEditGradientVectors:
 		case modeEditMeshGradient:
 		case modeEditMeshPatch:
+		case modeEditWeldPoint:
 		case modeInsertPDFButton:
 		case modeInsertPDFTextfield:
 		case modeInsertPDFCheckbox:

Modified: branches/ScribusOIF/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/pageitem.cpp
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.cpp (original)
+++ branches/ScribusOIF/scribus/pageitem.cpp Fri Oct 28 18:44:51 2011
@@ -356,6 +356,7 @@
 	}
 
 	textLayout = new TextLayout(&itemText, this);
+	unWeld();
 }
 
 
@@ -521,6 +522,7 @@
 	m_PrintEnabled = true;
 	isBookmark = false;
 	m_isAnnotation = false;
+	weldList.clear();
 	
 	switch (m_ItemType)
 	{
@@ -824,14 +826,6 @@
 	textLayout = 0;
 }
 
-PageItem::~PageItem()
-{
-	if (tempImageFile != NULL)
-		delete tempImageFile;
-	if(textLayout)
-		delete textLayout;
-}
-
 void PageItem::setXPos(const double newXPos, bool drawingOnly)
 {
 	Xpos = newXPos;
@@ -875,6 +869,7 @@
 	if (drawingOnly || m_Doc->isLoading())
 		return;
 	checkChanges();
+	moveWelded(dX, dY);
 }
 
 void PageItem::setWidth(const double newWidth)
@@ -931,10 +926,13 @@
 
 void PageItem::setRotation(const double newRotation, bool drawingOnly)
 {
-	Rot=newRotation;
+	double dR = newRotation - Rot;
+	double oldRot = Rot;
+	Rot = newRotation;
 	if (drawingOnly || m_Doc->isLoading())
 		return;
 	checkChanges();
+	rotateWelded(dR, oldRot);
 }
 
 void PageItem::rotateBy(const double dR)
@@ -6896,6 +6894,19 @@
 					else
 						Clip = FlattenPath(PoLine, Segments);
 				}
+				for (int i = 0 ; i < weldList.count(); i++)
+				{
+					weldingInfo wInf = weldList.at(i);
+					FPointArray gr4;
+					FPoint wp = wInf.weldPoint;
+					gr4.addPoint(wp);
+					gr4.map(ma);
+					double dx = gr4.point(0).x() - wp.x();
+					double dy = gr4.point(0).y() - wp.y();
+					moveWelded(dx, dy, i);
+					wInf.weldPoint = gr4.point(0);
+					weldList[i] = wInf;
+				}
 			}
 			OldB2 = width();
 			OldH2 = height();
@@ -6996,6 +7007,19 @@
 				Clip = FlattenPath(PoLine, Segments);
 			OldB2 = width();
 			OldH2 = height();
+			for (int i = 0 ; i < weldList.count(); i++)
+			{
+				weldingInfo wInf = weldList.at(i);
+				FPointArray gr4;
+				FPoint wp = wInf.weldPoint;
+				gr4.addPoint(wp);
+				gr4.map(ma);
+				double dx = gr4.point(0).x() - wp.x();
+				double dy = gr4.point(0).y() - wp.y();
+				moveWelded(dx, dy, i);
+				wInf.weldPoint = gr4.point(0);
+				weldList[i] = wInf;
+			}
 		}
 		break;
 	}
@@ -7073,3 +7097,128 @@
 		tempImageFile = NULL;
 	}
 }
+
+void PageItem::addWelded(PageItem* iPt)
+{
+	FPoint centerI = FPoint(xPos() + (width() / 2.0), yPos() + (height() / 2.0));
+	FPoint centerP = FPoint(iPt->xPos() + (iPt->width() / 2.0), iPt->yPos() + (iPt->height() / 2.0));
+	weldingInfo wInf;
+	wInf.weldItem = iPt;
+	wInf.weldPoint = FPoint((width() / 2.0) + ((centerP.x() - centerI.x()) / 2.0), (height() / 2.0) + ((centerP.y() - centerI.y()) / 2.0));
+	weldList.append(wInf);
+}
+
+//welded frames
+void PageItem::weldTo(PageItem* pIt)
+{
+	for (int i = 0 ; i <  weldList.count(); i++)
+	{
+		PageItem::weldingInfo wInf = weldList.at(i);
+		if (wInf.weldItem == pIt)
+			return;
+	}
+	QList<PageItem*> ret = pIt->itemsWeldedTo();
+	if (ret.contains(this))
+		return;
+	addWelded(pIt);
+	pIt->addWelded(this);
+	update();
+	pIt->update();
+}
+
+void PageItem::moveWelded(double DX, double DY, int weld)
+{
+	weldingInfo wInf = weldList.at(weld);
+	PageItem *pIt = wInf.weldItem;
+	pIt->setXPos(pIt->xPos() + DX);
+	pIt->setYPos(pIt->yPos() + DY);
+	pIt->update();
+	pIt->moveWelded(DX, DY, this);
+}
+
+void PageItem::moveWelded(double DX, double DY, PageItem* except)
+{
+	for (int i = 0 ; i < weldList.count(); i++)
+	{
+		weldingInfo wInf = weldList.at(i);
+		PageItem *pIt = wInf.weldItem;
+		if (pIt != except)
+		{
+			pIt->setXPos(pIt->xPos() + DX);
+			pIt->setYPos(pIt->yPos() + DY);
+			pIt->update();
+			pIt->moveWelded(DX, DY, this);
+		}
+	}
+}
+
+void PageItem::rotateWelded(double dR, double oldRot)
+{
+	QTransform ma;
+	ma.translate(xPos(), yPos());
+	ma.scale(1, 1);
+	ma.rotate(oldRot);
+	switch (m_Doc->RotMode())
+	{
+		case 2:
+			ma.translate(width()/2.0, height()/2.0);
+			break;
+		case 4:
+			ma.translate(width(), height());
+			break;
+		case 3:
+			ma.translate(0, height());
+			break;
+		case 1:
+			ma.translate(width(), 0);
+			break;
+	}
+	QPointF rotCenter = ma.map(QPointF(0,0));
+	QList<PageItem*> itemList = itemsWeldedTo(this);
+	for (int a = 0; a < itemList.count(); a++)
+	{
+		PageItem *pIt = itemList.at(a);
+		QLineF lin = QLineF(rotCenter, QPointF(pIt->xPos(), pIt->yPos()));
+		lin.setAngle(lin.angle() - dR);
+		pIt->setXYPos(lin.p2().x(), lin.p2().y());
+		pIt->rotateBy(dR);
+	}
+}
+
+QList<PageItem*> PageItem::itemsWeldedTo(PageItem* except)
+{
+	QList<PageItem*> ret;
+	ret.clear();
+	for (int i = 0 ; i < weldList.count(); i++)
+	{
+		weldingInfo wInf = weldList.at(i);
+		PageItem *pIt = wInf.weldItem;
+		if (pIt != except)
+		{
+			ret.append(pIt);
+			if (pIt->isWelded())
+				ret.append(pIt->itemsWeldedTo(this));
+		}
+	}
+	return ret;
+}
+
+void PageItem::unWeld()
+{
+	for (int a = 0 ; a < weldList.count(); a++)
+	{
+		weldingInfo wInf = weldList.at(a);
+		PageItem *pIt = wInf.weldItem;
+		for (int b = 0 ; b < pIt->weldList.count(); b++)
+		{
+			weldingInfo wInf2 = pIt->weldList.at(b);
+			PageItem *pIt2 = wInf2.weldItem;
+			if (pIt2 == this)
+			{
+				pIt->weldList.removeAt(b);
+				break;
+			}
+		}
+	}
+	weldList.clear();
+}

Modified: branches/ScribusOIF/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/pageitem.h
==============================================================================
--- branches/ScribusOIF/scribus/pageitem.h (original)
+++ branches/ScribusOIF/scribus/pageitem.h Fri Oct 28 18:44:51 2011
@@ -242,9 +242,17 @@
 	
 public:
 	PageItem(ScribusDoc *pa, ItemType newType, double x, double y, double w, double h, double w2, QString fill, QString outline);
-	~PageItem();
-
-	void saxx(SaxHandler& handler, const Xml_string& elemtag) const {};
+	~PageItem()
+	{
+		if (tempImageFile != NULL)
+			delete tempImageFile;
+//		if (isWeld())
+//			unWeldFromMaster(true);
+//		if (isWelded())
+//			unWeldChild();
+	}
+
+	void saxx(SaxHandler& handler, const Xml_string& elemtag) const {}
 	void saxx(SaxHandler& handler) const {};
 	
 	/**
@@ -252,7 +260,7 @@
 	 * WARNING: Currently *they* do not check if the user wants this.
 	 * The view does when these are called.
 	 */	
-	virtual void clearContents() {};
+	virtual void clearContents() {}
 	
 	/**
 	 * @brief Adjust the picture scale, moved from the view, no view code here
@@ -1565,8 +1573,26 @@
 	//void textSize(double);
 	//void textToFrameDistances(double, double, double, double); //left, top, bottom, right: Extra, TExtra, BExtra, RExtra
 	//FIXME: columns, grid ?
+	
+	//items welding (item follows while item moves which they are connected with)
+public:
+	struct weldingInfo
+	{
+		PageItem *weldItem;
+		FPoint weldPoint;
+		int weldID;
+	};
+	QList<weldingInfo> weldList;
+	bool isWelded()  {return !weldList.isEmpty(); }  //true if to this item some other items are welded (weldList is list of these items)
+	void weldTo(PageItem* pIt);
+	QList<PageItem*> itemsWeldedTo(PageItem* except = NULL);
+	void unWeld();
+	void addWelded(PageItem* iPt);
+	void moveWelded(double DX, double DY, int weld);
+	void moveWelded(double DX, double DY, PageItem* except = NULL);
+	void rotateWelded(double dR, double oldRot);
 };
 
-Q_DECLARE_METATYPE(PageItem*);
+Q_DECLARE_METATYPE(PageItem*)
 
 #endif

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Fri Oct 28 18:44:51 2011
@@ -192,6 +192,8 @@
 	QList<PageItem*> TableItems;
 	QList<PageItem*> TableItemsM;
 	QList<PageItem*> TableItemsF;
+	QMap<int,PageItem*> WeldID;
+	QList<PageItem*> WeldItems;
 	QStack< QList<PageItem*> > groupStack;
 	QStack< QList<PageItem*> > groupStackF;
 	QStack< QList<PageItem*> > groupStackM;
@@ -215,6 +217,8 @@
 	TableIDM.clear();
 	TableItemsF.clear();
 	TableIDF.clear();
+	WeldItems.clear();
+	WeldID.clear();
 
 	bool firstElement = true;
 	bool success = true;
@@ -313,6 +317,14 @@
 				{
 					TableItems.append(itemInfo.item);
 					TableID.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
+				}
+			}
+			if (itemInfo.isWeldFlag)
+			{
+				if (tagName == "ITEM")
+				{
+					WeldItems.append(itemInfo.item);
+					WeldID.insert(itemInfo.ownWeld, itemInfo.item);
 				}
 			}
 			if (groupStack.count() > 0)
@@ -419,6 +431,18 @@
 				ta->BottomLink = 0;
 		}
 	}
+	if (WeldItems.count() != 0)
+	{
+		for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+		{
+			PageItem* ta = WeldItems.at(ttc);
+			for (int i = 0 ; i < ta->weldList.count(); i++)
+			{
+				PageItem::weldingInfo wInf = ta->weldList.at(i);
+				ta->weldList[i].weldItem = WeldID[wInf.weldID];
+			}
+		}
+	}
 	// reestablish textframe links
 	if (itemNext.count() != 0)
 	{
@@ -536,6 +560,12 @@
 	QList<PageItem*> TableItems;
 	QList<PageItem*> TableItemsM;
 	QList<PageItem*> TableItemsF;
+	QMap<int,PageItem*> WeldID;
+//	QMap<int,PageItem*> WeldIDM;
+//	QMap<int,PageItem*> WeldIDF;
+	QList<PageItem*> WeldItems;
+//	QList<PageItem*> WeldItemsM;
+//	QList<PageItem*> WeldItemsF;
 	QStack< QList<PageItem*> > groupStack;
 	QStack< QList<PageItem*> > groupStackF;
 	QStack< QList<PageItem*> > groupStackM;
@@ -574,6 +604,12 @@
 	TableIDM.clear();
 	TableItemsF.clear();
 	TableIDF.clear();
+	WeldItems.clear();
+	WeldID.clear();
+//	WeldItemsM.clear();
+//	WeldIDM.clear();
+//	WeldItemsF.clear();
+//	WeldIDF.clear();
 
 	m_Doc->GroupCounter = 1;
 	m_Doc->LastAuto = 0;
@@ -688,6 +724,11 @@
 					TableIDM.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
 				}
 			}
+			if (itemInfo.isWeldFlag)
+			{
+				WeldItems.append(itemInfo.item);
+				WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+			}
 			if (groupStack.count() > 0)
 			{
 				groupStack.top().append(itemInfo.item);
@@ -793,6 +834,18 @@
 				ta->BottomLink = 0;
 		}
 	}
+	if (WeldItems.count() != 0)
+	{
+		for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+		{
+			PageItem* ta = WeldItems.at(ttc);
+			for (int i = 0 ; i < ta->weldList.count(); i++)
+			{
+				PageItem::weldingInfo wInf = ta->weldList.at(i);
+				ta->weldList[i].weldItem = WeldID[wInf.weldID];
+			}
+		}
+	}
 	// reestablish textframe links
 	if (itemNext.count() != 0)
 	{
@@ -940,6 +993,8 @@
 	QList<PageItem*> TableItems;
 	QList<PageItem*> TableItemsM;
 	QList<PageItem*> TableItemsF;
+	QMap<int,PageItem*> WeldID;
+	QList<PageItem*> WeldItems;
 	QStack< QList<PageItem*> > groupStack;
 	QStack< QList<PageItem*> > groupStackF;
 	QStack< QList<PageItem*> > groupStackM;
@@ -981,6 +1036,8 @@
 	TableIDM.clear();
 	TableItemsF.clear();
 	TableIDF.clear();
+	WeldItems.clear();
+	WeldID.clear();
 
 	m_Doc->GroupCounter = 1;
 	m_Doc->LastAuto = 0;
@@ -1201,6 +1258,11 @@
 					TableIDM.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
 				}
 			}
+			if (itemInfo.isWeldFlag)
+			{
+				WeldItems.append(itemInfo.item);
+				WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+			}
 			if (groupStack.count() > 0)
 			{
 				groupStack.top().append(itemInfo.item);
@@ -1318,6 +1380,18 @@
 				ta->BottomLink = m_Doc->Items->at(TableID[ta->BottomLinkID]);
 			else
 				ta->BottomLink = 0;
+		}
+	}
+	if (WeldItems.count() != 0)
+	{
+		for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+		{
+			PageItem* ta = WeldItems.at(ttc);
+			for (int i = 0 ; i < ta->weldList.count(); i++)
+			{
+				PageItem::weldingInfo wInf = ta->weldList.at(i);
+				ta->weldList[i].weldItem = WeldID[wInf.weldID];
+			}
 		}
 	}
 	//CB Add this in to set this in the file in memory. Its saved, why not load it.
@@ -1994,6 +2068,7 @@
 	if (attrs.hasAttribute(LANGUAGE))
 		newStyle.setLanguage(attrs.valueAsString(LANGUAGE));
 
+
 	static const QString SHORTCUT("SHORTCUT");
 	if (attrs.hasAttribute(SHORTCUT))
 		newStyle.setShortcut(attrs.valueAsString(SHORTCUT));
@@ -2648,10 +2723,11 @@
 	info.nextItem = attrs.valueAsInt("NEXTITEM", -1);
 	info.ownLink  = newItem->isTableItem ? attrs.valueAsInt("OwnLINK", 0) : 0;
 	info.groupLastItem = 0;
-
 	info.isGroupFlag = attrs.valueAsBool("isGroupControl", 0);
 	if (info.isGroupFlag)
 		info.groupLastItem = attrs.valueAsInt("groupsLastItem", 0);
+	info.isWeldFlag = attrs.valueAsBool("isWeldItem", 0);
+	info.ownWeld = attrs.valueAsInt("WeldSource", 0);
 
 	struct ImageLoadRequest loadingInfo;
 #ifdef HAVE_OSG
@@ -2904,6 +2980,14 @@
 				doc->Items = DItems;
 			}
 		}
+		if (tName == "WeldEntry")
+		{
+			PageItem::weldingInfo wInf;
+			wInf.weldItem = NULL;
+			wInf.weldPoint = FPoint(tAtt.valueAsDouble("WX", 0.0), tAtt.valueAsDouble("WY", 0.0));
+			wInf.weldID = tAtt.valueAsInt("Target", 0);
+			newItem->weldList.append(wInf);
+		}
 	}
 	delete lastStyle;
 
@@ -2997,6 +3081,8 @@
 	QStack<int> groupStack2;
 	QMap<int,int> TableID2;
 	QList<PageItem*> TableItems2;
+	QMap<int,PageItem*> WeldID;
+	QList<PageItem*> WeldItems;
 
 	pat.setDoc(doc);
 	pat.width   = attrs.valueAsDouble("width", 0.0);
@@ -3039,6 +3125,11 @@
 			TableItems2.append(itemInfo.item);
 			TableID2.insert(itemInfo.ownLink, itemInfo.item->ItemNr);
 		}
+		if (itemInfo.isWeldFlag)
+		{
+			WeldItems.append(itemInfo.item);
+			WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+		}
 		if (groupStack.count() > 0)
 		{
 			groupStack.top().append(itemInfo.item);
@@ -3086,6 +3177,18 @@
 				ta->BottomLink = m_Doc->Items->at(TableID2[ta->BottomLinkID]);
 			else
 				ta->BottomLink = 0;
+		}
+	}
+	if (WeldItems.count() != 0)
+	{
+		for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+		{
+			PageItem* ta = WeldItems.at(ttc);
+			for (int i = 0 ; i < ta->weldList.count(); i++)
+			{
+				PageItem::weldingInfo wInf = ta->weldList.at(i);
+				ta->weldList[i].weldItem = WeldID[wInf.weldID];
+			}
 		}
 	}
 	if (groupStackP.count() > 0)
@@ -4114,6 +4217,8 @@
 	QString tmp;
 	QMap<int,int> TableID;
 	QList<PageItem*> TableItems;
+	QMap<int,PageItem*> WeldID;
+	QList<PageItem*> WeldItems;
 	QStack< QList<PageItem*> > groupStack;
 	QStack< QList<PageItem*> > groupStackF;
 	QStack< QList<PageItem*> > groupStackP;
@@ -4139,6 +4244,8 @@
 	itemCountM = 0;
 	itemRemapF.clear();
 	itemNextF.clear();
+	WeldItems.clear();
+	WeldID.clear();
 
  	QString f(readSLA(fileName));
 	if (f.isEmpty())
@@ -4346,6 +4453,11 @@
 					TableItems.append(newItem);
 					TableID.insert(itemInfo.ownLink, newItem->ItemNr);
 				}
+				if (itemInfo.isWeldFlag)
+				{
+					WeldItems.append(itemInfo.item);
+					WeldID.insert(itemInfo.ownWeld, itemInfo.item);
+				}
 				if (tagName == "FRAMEOBJECT")
 				{
 					m_Doc->FrameItems.append(m_Doc->Items->takeAt(newItem->ItemNr));
@@ -4419,6 +4531,19 @@
 				ta->BottomLink = 0;
 		}
 	}
+	if (WeldItems.count() != 0)
+	{
+//		QList<PageItem*> docList = m_Doc->getAllItems(*m_Doc->Items);
+		for (int ttc = 0; ttc < WeldItems.count(); ++ttc)
+		{
+			PageItem* ta = WeldItems.at(ttc);
+			for (int i = 0 ; i < ta->weldList.count(); i++)
+			{
+				PageItem::weldingInfo wInf = ta->weldList.at(i);
+				ta->weldList[i].weldItem = WeldID[wInf.weldID];
+			}
+		}
+	}
 	// reestablish textframe links
 	if (itemNext.count() != 0 && !Mpage)
 	{

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.h
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.h (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format.h Fri Oct 28 18:44:51 2011
@@ -68,18 +68,20 @@
 			ItemSelectionFrame  = 2,
 			ItemSelectionPattern= 3,
 			ItemSelectionGroup  = 4,
-			ItemSelectionElements = 5,
+			ItemSelectionElements = 5
 		};
 
 		class ItemInfo
 		{
 		public:
-			ItemInfo(void) { groupLastItem = nextItem = ownLink = 0; item = NULL; isGroupFlag = false; };
+			ItemInfo(void) { groupLastItem = nextItem = ownLink = ownWeld = 0; item = NULL; isGroupFlag = isWeldFlag = false; };
 			PageItem* item;
 			int groupLastItem;
 			int nextItem;
 			int ownLink;
+			int ownWeld;
 			bool isGroupFlag;
+			bool isWeldFlag;
 		};
 
 		void registerFormats();
@@ -159,6 +161,7 @@
 		QMap<int, int> itemNextF;
 		QMap<int, int> itemRemapM;
 		QMap<int, int> itemNextM;
+		QMap<PageItem*, QString> itemsWeld;  //item* and master name
 
 		int itemCount;
 		int itemCountM;

Modified: branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ branches/ScribusOIF/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Fri Oct 28 18:44:51 2011
@@ -2002,7 +2002,20 @@
 			}
 			docu.writeEndElement();
 		}
-
+		//write weld parameter
+		if (item->isWelded())
+		{
+			docu.writeAttribute("isWeldItem", 1);
+			docu.writeAttribute("WeldSource", item->uniqueNr);
+			for (int i = 0 ; i <  item->weldList.count(); i++)
+			{
+				PageItem::weldingInfo wInf = item->weldList.at(i);
+				docu.writeEmptyElement("WeldEntry");
+				docu.writeAttribute("Target", wInf.weldItem->uniqueNr);
+				docu.writeAttribute("WX", wInf.weldPoint.x());
+				docu.writeAttribute("WY", wInf.weldPoint.y());
+			}
+		}
 		docu.writeEndElement();
 	}
 }

Modified: branches/ScribusOIF/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/scribus.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribus.cpp (original)
+++ branches/ScribusOIF/scribus/scribus.cpp Fri Oct 28 18:44:51 2011
@@ -840,6 +840,8 @@
 	scrActions["itemPrintingEnabled"]->setEnabled(false);
 	scrMenuMgr->setMenuEnabled("ItemConvertTo", false);
 
+	scrMenuMgr->addMenuItem(scrActions["itemsUnWeld"], "Item", false);
+	scrMenuMgr->addMenuItem(scrActions["itemWeld"], "Item", false);
 
 	//Insert menu
 	scrMenuMgr->createMenu("Insert", ActionManager::defaultMenuNameEntryTranslated("Insert"));
@@ -3051,8 +3053,17 @@
 	}
 	doc->CurrentSel = SelectedType;
 	propertiesPalette->xyzPal->basePointWidget->setCheckedId(doc->RotMode());
+	if (docSelectionCount == 1)
+	{
+		PageItem* bx = doc->m_Selection->itemAt(0);
+		if (bx->isWelded())
+			scrActions["itemsUnWeld"]->setEnabled(true);
+		else
+			scrActions["itemsUnWeld"]->setEnabled(false);
+	}
 	if (docSelectionCount > 1)
 	{
+//		scrMenuMgr->setMenuEnabled("ItemWeld", true);
 		if (!doc->m_Selection->itemsAreSameType())
 		{
 			scrActions["itemConvertToBezierCurve"]->setEnabled(false);
@@ -3078,6 +3089,7 @@
 		scrActions["itemCombinePolygons"]->setEnabled(hPoly);
 		if (docSelectionCount == 2)
 		{
+			scrActions["itemWeld"]->setEnabled(true);
 			//CB swap bx around if currItem is not at 0 index from the lastItem loop at start of havenewsel
 			PageItem* bx=doc->m_Selection->itemAt(1);
 			if (currItem==bx)
@@ -3090,9 +3102,12 @@
 			}
 
 		}
+		else
+			scrActions["itemWeld"]->setEnabled(false);
 	}
 	else
 	{
+		scrActions["itemWeld"]->setEnabled(false);
 		scrActions["itemGroup"]->setEnabled(false);
 		scrActions["itemAttachTextToPath"]->setEnabled(false);
 		scrActions["itemCombinePolygons"]->setEnabled(false);

Modified: branches/ScribusOIF/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/scribusdoc.cpp
==============================================================================
--- branches/ScribusOIF/scribus/scribusdoc.cpp (original)
+++ branches/ScribusOIF/scribus/scribusdoc.cpp Fri Oct 28 18:44:51 2011
@@ -4742,6 +4742,16 @@
 	return ret;
 }
 
+PageItem* ScribusDoc::getItemFromName(QString name)
+{
+	PageItem* ret = NULL;
+	for (int a = 0; a < Items->count(); ++a)
+	{
+		if (Items->at(a)->itemName() == name)
+			return Items->at(a);
+	}
+	return ret;
+}
 
 void ScribusDoc::updateFrameItems()
 {
@@ -9676,6 +9686,8 @@
 			}
 			*/
 		}
+		if (currItem->isWelded())
+			currItem->unWeld();
 		if (currItem->isBookmark)
 			//CB From view   emit DelBM(currItem);
 			m_ScMW->DelBookMark(currItem);
@@ -12231,7 +12243,9 @@
 		double y = ma.m22() * n.y() + ma.m12() * n.x() + ma.dy();
 		bool oldS = currItem->Sizing;
 		currItem->Sizing = true;
-		MoveItem(x - currItem->xPos(), y - currItem->yPos(), currItem);
+		currItem->moveBy(x - currItem->xPos(), y - currItem->yPos(), true);
+		setRedrawBounding(currItem);
+		currItem->OwnPage = OnPage(currItem);
 		currItem->Sizing = oldS;
 	}
 	else
@@ -12525,7 +12539,7 @@
 	double Scale = 1; //FIXME:av should all be in doc coordinates
 	Selection* itemSelection = (customSelection!=0) ? customSelection : m_Selection;
 	Q_ASSERT(itemSelection!=0);
-	uint selectedItemCount=itemSelection->count();
+	uint selectedItemCount = itemSelection->count();
 	if (selectedItemCount == 0)
 		return;
 	if (x == 0.0 && y == 0.0)
@@ -12539,10 +12553,16 @@
 	//in -= QPoint(qRound(Doc->minCanvasCoordinate.x() * Scale), qRound(Doc->minCanvasCoordinate.y() * Scale));
 	//QPoint out = in;//contentsToViewport(in);
 	QRectF OldRect = QRectF(gx, gy, gw, gh); //out.x(), out.y(), qRound(gw*Scale), qRound(gh*Scale));
+	QList<PageItem*> weldL;
 	for (uint a = 0; a < selectedItemCount; ++a)
 	{
 		currItem = itemSelection->itemAt(a);
-		MoveItem(x, y, currItem, fromMP);
+		if (!weldL.contains(currItem))
+		{
+			if (currItem->isWelded())
+				weldL.append(currItem->itemsWeldedTo());
+			MoveItem(x, y, currItem, fromMP);
+		}
 	}
 	itemSelection->setGroupRect();
 	itemSelection->getGroupRect(&gx, &gy, &gw, &gh);
@@ -14267,3 +14287,29 @@
 	}
 }
 
+void ScribusDoc::itemSelection_UnWeld()
+{
+	PageItem *currItem;
+	for (int a = 0; a < m_Selection->count(); ++a)
+	{
+		currItem = m_Selection->itemAt(a);
+		if (currItem->isWelded())
+		{
+			currItem->unWeld();
+			changed();
+		}
+	}
+	regionsChanged()->update(QRectF());
+}
+
+void ScribusDoc::itemSelection_Weld()
+{
+	if (m_Selection->count() != 2)
+		return;
+	PageItem * master = m_Selection->itemAt(1);
+	PageItem * selItem = m_Selection->itemAt(0);
+	selItem->weldTo(master);
+	changed();
+	regionsChanged()->update(QRectF());
+}
+

Modified: branches/ScribusOIF/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/scribusdoc.h
==============================================================================
--- branches/ScribusOIF/scribus/scribusdoc.h (original)
+++ branches/ScribusOIF/scribus/scribusdoc.h Fri Oct 28 18:44:51 2011
@@ -775,6 +775,8 @@
 	void itemAddDetails(const PageItem::ItemType itemType, const PageItem::ItemFrameType frameType, const int itemNumber);
 
 	uint getItemNrfromUniqueID(uint unique);
+	//return pointer to item
+	PageItem* getItemFromName(QString name);
 	//itemDelete
 	//itemBlah...
 	
@@ -1529,6 +1531,10 @@
 	void updatePict(QString name);
 	void updatePictDir(QString name);
 	void removePict(QString name);
+//welding two items
+public slots:
+	void itemSelection_UnWeld();
+	void itemSelection_Weld();
 };
 
 Q_DECLARE_METATYPE(ScribusDoc*);

Modified: branches/ScribusOIF/scribus/scribusstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/scribusstructs.h
==============================================================================
--- branches/ScribusOIF/scribus/scribusstructs.h (original)
+++ branches/ScribusOIF/scribus/scribusstructs.h Fri Oct 28 18:44:51 2011
@@ -319,7 +319,8 @@
 	modeDrawSpiral,
 	modeEditSpiral,
 	modeEditTable,
-	modeEditMeshPatch
+	modeEditMeshPatch,
+	modeEditWeldPoint
 };
 
 struct AlignObjs

Modified: branches/ScribusOIF/scribus/scribusview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/scribusview.h
==============================================================================
--- branches/ScribusOIF/scribus/scribusview.h (original)
+++ branches/ScribusOIF/scribus/scribusview.h Fri Oct 28 18:44:51 2011
@@ -102,6 +102,7 @@
 	friend class CanvasMode_EditGradient;
 	friend class CanvasMode_EditMeshGradient;
 	friend class CanvasMode_EditMeshPatch;
+	friend class CanvasMode_EditWeldPoint;
 	friend class CanvasMode_EditPolygon;
 	friend class CanvasMode_EditArc;
 	friend class CanvasMode_EditSpiral;

Modified: branches/ScribusOIF/scribus/ui/contextmenu.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/ui/contextmenu.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/contextmenu.cpp (original)
+++ branches/ScribusOIF/scribus/ui/contextmenu.cpp Fri Oct 28 18:44:51 2011
@@ -95,6 +95,7 @@
 	QMenu *menuLevel = new QMenu(this);
 	QMenu *menuPDF = new QMenu(this);
 	QMenu *menuResolution = new QMenu(this);
+	QMenu *menuWeld = new QMenu(this);
 	
 	//<-- Add Info
 	//Test new method with image frames first
@@ -424,6 +425,32 @@
 	}
 	//-->
 	
+	//<-- Add Welding Menu
+	addSeparator();
+	if (selectedItemCount > 0 && m_doc->appMode != modeEdit)
+	{
+		PageItem *currItem;
+		for (int a = 0; a < m_Sel.count(); ++a)
+		{
+			currItem = m_Sel.itemAt(a);
+			if (currItem->isWelded())
+			{
+				addAction(m_AP->scrActions["itemsUnWeld"]);
+				break;
+			}
+		}
+	}
+	if (selectedItemCount == 2 && m_doc->appMode != modeEdit)
+	{
+		menuWeld->addAction(m_AP->scrActions["itemWeld17"]);
+		menuWeld->addAction(m_AP->scrActions["itemWeld71"]);
+		menuWeld->addAction(m_AP->scrActions["itemWeld13"]);
+		menuWeld->addAction(m_AP->scrActions["itemWeld31"]);
+		QAction *act = addMenu(menuWeld);
+		act->setText( ScribusView::tr("Weld to last..."));
+	}
+	//-->
+	
 	//<-- Add Properties
 	addSeparator();
 	addAction(m_AP->scrActions["toolsProperties"]);

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_xyz.cpp Fri Oct 28 18:44:51 2011
@@ -134,6 +134,7 @@
 	connect(noResize , SIGNAL(clicked()), this, SLOT(handleLockSize()));
 	connect(doGroup  , SIGNAL(clicked()), this, SLOT(handleGrouping()) );
 	connect(doUnGroup, SIGNAL(clicked()), this, SLOT(handleUngrouping()) );
+	connect(buttonEditWeldPoint, SIGNAL(clicked()), this, SLOT(handleEditWeldPoint()));
 
 	m_haveItem = false;
 	xposSpin->showValue(0);
@@ -141,6 +142,7 @@
 	widthSpin->showValue(0);
 	heightSpin->showValue(0);
 	rotationSpin->showValue(0);
+	buttonEditWeldPoint->setEnabled(false);
 }
 
 void PropertiesPalette_XYZ::setMainWindow(ScribusMainWindow* mw)
@@ -409,6 +411,7 @@
 		setEnabled(true);
 	}
 	updateSpinBoxConstants();
+	buttonEditWeldPoint->setEnabled(m_item->isWelded());
 }
 
 void PropertiesPalette_XYZ::handleSelectionChanged()
@@ -514,6 +517,7 @@
 			heightSpin->showValue(0);
 			rotationSpin->showValue(0);
 			levelLabel->setText("  ");
+			buttonEditWeldPoint->setEnabled(false);
 			setEnabled(false);
 			break;
 		case PageItem::ImageFrame:
@@ -1413,6 +1417,7 @@
 	doLock->setToolTip( tr("Lock or unlock the object"));
 	noResize->setToolTip( tr("Lock or unlock the size of the object"));
 	noPrint->setToolTip( tr("Enable or disable exporting of the object"));
+	buttonEditWeldPoint->setToolTip( tr("Edit the welding point of the object"));
 
 	keepFrameWHRatioButton->setToolTip( tr("Keep the aspect ratio"));
 }
@@ -1498,3 +1503,11 @@
 	m_ScMW->UnGroupObj();
 }
 
+
+void PropertiesPalette_XYZ::handleEditWeldPoint()
+{
+	if (buttonEditWeldPoint->isChecked())
+		m_ScMW->view->requestMode(modeEditWeldPoint);
+	else
+		m_ScMW->view->requestMode(modeNormal);
+}

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_xyz.h Fri Oct 28 18:44:51 2011
@@ -87,6 +87,7 @@
 	void handleNewName();
 	void handleGrouping();
 	void handleUngrouping();
+	void handleEditWeldPoint();
 
 protected slots:
 	//virtual void reject();

Modified: branches/ScribusOIF/scribus/ui/propertiespalette_xyzbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/scribus/ui/propertiespalette_xyzbase.ui
==============================================================================
--- branches/ScribusOIF/scribus/ui/propertiespalette_xyzbase.ui (original)
+++ branches/ScribusOIF/scribus/ui/propertiespalette_xyzbase.ui Fri Oct 28 18:44:51 2011
@@ -1,353 +1,380 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>PropertiesPalette_XYZBase</class>
- <widget class="QWidget" name="PropertiesPalette_XYZBase">
-  <property name="geometry">
-   <rect>
-    <x>0</x>
-    <y>0</y>
-    <width>280</width>
-    <height>300</height>
-   </rect>
-  </property>
-  <property name="windowTitle">
-   <string>Form</string>
-  </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <property name="spacing">
-    <number>2</number>
-   </property>
-   <property name="margin">
-    <number>2</number>
-   </property>
-   <item>
-    <widget class="QGroupBox" name="nameGroup">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="title">
-      <string>Name</string>
-     </property>
-     <layout class="QHBoxLayout" name="horizontalLayout">
-      <property name="spacing">
-       <number>2</number>
-      </property>
-      <property name="margin">
-       <number>2</number>
-      </property>
-      <item>
-       <widget class="NameWidget" name="nameEdit">
-        <property name="focusPolicy">
-         <enum>Qt::ClickFocus</enum>
-        </property>
-       </widget>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <widget class="QGroupBox" name="geoGroup">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-     <property name="title">
-      <string>Geometry</string>
-     </property>
-     <layout class="QVBoxLayout" name="verticalLayout_2">
-      <property name="margin">
-       <number>2</number>
-      </property>
-      <item>
-       <layout class="QGridLayout" name="geoGroupLayout">
-        <property name="margin">
-         <number>5</number>
-        </property>
-        <property name="spacing">
-         <number>4</number>
-        </property>
-        <item row="0" column="0">
-         <widget class="QLabel" name="xposLabel">
-          <property name="text">
-           <string>&X-Pos:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="ScrSpinBox" name="xposSpin">
-          <property name="sizePolicy">
-           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
-            <horstretch>0</horstretch>
-            <verstretch>0</verstretch>
-           </sizepolicy>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0">
-         <widget class="QLabel" name="widthLabel">
-          <property name="text">
-           <string>&Width:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0">
-         <widget class="QLabel" name="yposLabel">
-          <property name="text">
-           <string>&Y-Pos:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1">
-         <widget class="ScrSpinBox" name="yposSpin"/>
-        </item>
-        <item row="2" column="1">
-         <widget class="ScrSpinBox" name="widthSpin"/>
-        </item>
-        <item row="3" column="0">
-         <widget class="QLabel" name="heightLabel">
-          <property name="text">
-           <string>&Height:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="3" column="1">
-         <widget class="ScrSpinBox" name="heightSpin"/>
-        </item>
-        <item row="4" column="0">
-         <widget class="QLabel" name="rotationLabel">
-          <property name="text">
-           <string>&Rotation:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="4" column="1">
-         <widget class="ScrSpinBox" name="rotationSpin">
-          <property name="wrapping">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="0">
-         <widget class="QLabel" name="basepointLabel">
-          <property name="text">
-           <string>Basepoint:</string>
-          </property>
-         </widget>
-        </item>
-        <item row="5" column="1">
-         <widget class="BasePointWidget" name="basePointWidget" native="true"/>
-        </item>
-        <item row="2" column="2" rowspan="2">
-         <widget class="LinkButton" name="keepFrameWHRatioButton">
-          <property name="maximumSize">
-           <size>
-            <width>15</width>
-            <height>32767</height>
-           </size>
-          </property>
-          <property name="text">
-           <string>...</string>
-          </property>
-          <property name="checkable">
-           <bool>true</bool>
-          </property>
-          <property name="autoRaise">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </widget>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_2">
-     <item>
-      <widget class="QGroupBox" name="levelGroup">
-       <property name="title">
-        <string>Level</string>
-       </property>
-       <layout class="QGridLayout" name="gridLayout">
-        <property name="margin">
-         <number>5</number>
-        </property>
-        <property name="spacing">
-         <number>4</number>
-        </property>
-        <item row="0" column="0">
-         <widget class="QToolButton" name="levelUp">
-          <property name="maximumSize">
-           <size>
-            <width>22</width>
-            <height>22</height>
-           </size>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0">
-         <widget class="QToolButton" name="levelDown">
-          <property name="maximumSize">
-           <size>
-            <width>22</width>
-            <height>22</height>
-           </size>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="1">
-         <widget class="QToolButton" name="levelTop">
-          <property name="maximumSize">
-           <size>
-            <width>22</width>
-            <height>22</height>
-           </size>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1">
-         <widget class="QToolButton" name="levelBottom">
-          <property name="maximumSize">
-           <size>
-            <width>22</width>
-            <height>22</height>
-           </size>
-          </property>
-          <property name="text">
-           <string/>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2" rowspan="2">
-         <widget class="QLabel" name="levelLabel">
-          <property name="text">
-           <string>0</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </widget>
-     </item>
-     <item>
-      <spacer name="horizontalSpacer">
-       <property name="orientation">
-        <enum>Qt::Horizontal</enum>
-       </property>
-       <property name="sizeHint" stdset="0">
-        <size>
-         <width>40</width>
-         <height>20</height>
-        </size>
-       </property>
-      </spacer>
-     </item>
-     <item>
-      <layout class="QGridLayout" name="gridLayout_2">
-       <item row="0" column="0">
-        <widget class="QToolButton" name="doGroup">
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="0">
-        <widget class="QToolButton" name="doUnGroup">
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="1">
-        <widget class="QToolButton" name="flipH">
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="1">
-        <widget class="QToolButton" name="flipV">
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="2">
-        <widget class="QToolButton" name="doLock">
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-       <item row="1" column="2">
-        <widget class="QToolButton" name="noPrint">
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-       <item row="0" column="3">
-        <widget class="QToolButton" name="noResize">
-         <property name="text">
-          <string/>
-         </property>
-        </widget>
-       </item>
-      </layout>
-     </item>
-    </layout>
-   </item>
-   <item>
-    <spacer name="verticalSpacer">
-     <property name="orientation">
-      <enum>Qt::Vertical</enum>
-     </property>
-     <property name="sizeHint" stdset="0">
-      <size>
-       <width>20</width>
-       <height>40</height>
-      </size>
-     </property>
-    </spacer>
-   </item>
-  </layout>
- </widget>
- <customwidgets>
-  <customwidget>
-   <class>NameWidget</class>
-   <extends>QLineEdit</extends>
-   <header>ui/propertiespalette_utils.h</header>
-  </customwidget>
-  <customwidget>
-   <class>ScrSpinBox</class>
-   <extends>QDoubleSpinBox</extends>
-   <header>ui/scrspinbox.h</header>
-  </customwidget>
-  <customwidget>
-   <class>BasePointWidget</class>
-   <extends>QWidget</extends>
-   <header>ui/basepointwidget.h</header>
-   <container>1</container>
-  </customwidget>
-  <customwidget>
-   <class>LinkButton</class>
-   <extends>QToolButton</extends>
-   <header>ui/linkbutton.h</header>
-  </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PropertiesPalette_XYZBase</class>
+ <widget class="QWidget" name="PropertiesPalette_XYZBase">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>280</width>
+    <height>352</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <property name="spacing">
+    <number>5</number>
+   </property>
+   <property name="margin">
+    <number>0</number>
+   </property>
+   <item>
+    <widget class="QGroupBox" name="nameGroup">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Name</string>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout">
+      <property name="spacing">
+       <number>2</number>
+      </property>
+      <property name="margin">
+       <number>2</number>
+      </property>
+      <item>
+       <widget class="NameWidget" name="nameEdit">
+        <property name="focusPolicy">
+         <enum>Qt::ClickFocus</enum>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="geoGroup">
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="title">
+      <string>Geometry</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout_2">
+      <property name="margin">
+       <number>2</number>
+      </property>
+      <item>
+       <layout class="QGridLayout" name="geoGroupLayout">
+        <property name="margin">
+         <number>5</number>
+        </property>
+        <property name="spacing">
+         <number>4</number>
+        </property>
+        <item row="0" column="0">
+         <widget class="QLabel" name="xposLabel">
+          <property name="text">
+           <string>&X-Pos:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1">
+         <widget class="ScrSpinBox" name="xposSpin">
+          <property name="sizePolicy">
+           <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+            <horstretch>0</horstretch>
+            <verstretch>0</verstretch>
+           </sizepolicy>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0">
+         <widget class="QLabel" name="widthLabel">
+          <property name="text">
+           <string>&Width:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QLabel" name="yposLabel">
+          <property name="text">
+           <string>&Y-Pos:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="ScrSpinBox" name="yposSpin"/>
+        </item>
+        <item row="2" column="1">
+         <widget class="ScrSpinBox" name="widthSpin"/>
+        </item>
+        <item row="3" column="0">
+         <widget class="QLabel" name="heightLabel">
+          <property name="text">
+           <string>&Height:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="3" column="1">
+         <widget class="ScrSpinBox" name="heightSpin"/>
+        </item>
+        <item row="4" column="0">
+         <widget class="QLabel" name="rotationLabel">
+          <property name="text">
+           <string>&Rotation:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="4" column="1">
+         <widget class="ScrSpinBox" name="rotationSpin">
+          <property name="wrapping">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="5" column="0">
+         <widget class="QLabel" name="basepointLabel">
+          <property name="text">
+           <string>Basepoint:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="5" column="1">
+         <widget class="BasePointWidget" name="basePointWidget" native="true"/>
+        </item>
+        <item row="2" column="2" rowspan="2">
+         <widget class="LinkButton" name="keepFrameWHRatioButton">
+          <property name="maximumSize">
+           <size>
+            <width>15</width>
+            <height>32767</height>
+           </size>
+          </property>
+          <property name="text">
+           <string>...</string>
+          </property>
+          <property name="checkable">
+           <bool>true</bool>
+          </property>
+          <property name="autoRaise">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
+     <item>
+      <widget class="QGroupBox" name="levelGroup">
+       <property name="title">
+        <string>Level</string>
+       </property>
+       <layout class="QGridLayout" name="gridLayout">
+        <property name="margin">
+         <number>5</number>
+        </property>
+        <property name="spacing">
+         <number>4</number>
+        </property>
+        <item row="0" column="0">
+         <widget class="QToolButton" name="levelUp">
+          <property name="maximumSize">
+           <size>
+            <width>22</width>
+            <height>22</height>
+           </size>
+          </property>
+          <property name="text">
+           <string/>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QToolButton" name="levelDown">
+          <property name="maximumSize">
+           <size>
+            <width>22</width>
+            <height>22</height>
+           </size>
+          </property>
+          <property name="text">
+           <string/>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1">
+         <widget class="QToolButton" name="levelTop">
+          <property name="maximumSize">
+           <size>
+            <width>22</width>
+            <height>22</height>
+           </size>
+          </property>
+          <property name="text">
+           <string/>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="QToolButton" name="levelBottom">
+          <property name="maximumSize">
+           <size>
+            <width>22</width>
+            <height>22</height>
+           </size>
+          </property>
+          <property name="text">
+           <string/>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="2" rowspan="2">
+         <widget class="QLabel" name="levelLabel">
+          <property name="text">
+           <string>0</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <layout class="QGridLayout" name="gridLayout_2">
+       <item row="0" column="0">
+        <widget class="QToolButton" name="doGroup">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="0">
+        <widget class="QToolButton" name="doUnGroup">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1">
+        <widget class="QToolButton" name="flipH">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1">
+        <widget class="QToolButton" name="flipV">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="2">
+        <widget class="QToolButton" name="doLock">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="2">
+        <widget class="QToolButton" name="noPrint">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="3">
+        <widget class="QToolButton" name="noResize">
+         <property name="text">
+          <string/>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout_3">
+     <item>
+      <widget class="QToolButton" name="buttonEditWeldPoint">
+       <property name="text">
+        <string>Edit Weld Point</string>
+       </property>
+       <property name="checkable">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer_2">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>NameWidget</class>
+   <extends>QLineEdit</extends>
+   <header>ui/propertiespalette_utils.h</header>
+  </customwidget>
+  <customwidget>
+   <class>ScrSpinBox</class>
+   <extends>QDoubleSpinBox</extends>
+   <header>ui/scrspinbox.h</header>
+  </customwidget>
+  <customwidget>
+   <class>BasePointWidget</class>
+   <extends>QWidget</extends>
+   <header>ui/basepointwidget.h</header>
+   <container>1</container>
+  </customwidget>
+  <customwidget>
+   <class>LinkButton</class>
+   <extends>QToolButton</extends>
+   <header>ui/linkbutton.h</header>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>

Modified: branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=16937&path=/branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj
==============================================================================
--- branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj (original)
+++ branches/ScribusOIF/win32/vc9/scribus-main/Scribus.vcproj Fri Oct 28 18:44:51 2011
@@ -499,6 +499,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\..\scribus\canvasmode_editweldpoint.cpp"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\scribus\canvasmode_eyedropper.cpp"
 				>
 			</File>
@@ -2946,6 +2950,10 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath="..\..\..\scribus\canvasmode_editweldpoint.h"
+				>
+			</File>
+			<File
 				RelativePath="..\..\..\scribus\canvasmode_eyedropper.h"
 				>
 			</File>




More information about the scribus-commit mailing list