r19864 by craig - Fix some welding var names and capitalisation
scribus-commit
scribus-commit at lists.scribus.net
Mon Feb 23 19:00:36 UTC 2015
Author: craig
Date: Mon Feb 23 19:00:36 2015
New Revision: 19864
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19864
Log:
Fix some welding var names and capitalisation
Modified:
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem.h
trunk/Scribus/scribus/pageitem_noteframe.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19864&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Mon Feb 23 19:00:36 2015
@@ -458,7 +458,7 @@
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);
+ PageItem::WeldingInfo wInf = currItem->weldList.at(i);
psx->drawPoint(QPointF(wInf.weldPoint.x(), wInf.weldPoint.y()));
}
}
Modified: trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19864&path=/trunk/Scribus/scribus/canvasmode_editweldpoint.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editweldpoint.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_editweldpoint.cpp Mon Feb 23 19:00:36 2015
@@ -102,7 +102,7 @@
psx->setBrush(Qt::NoBrush);
for (int i = 0 ; i < currItem->weldList.count(); i++)
{
- PageItem::weldingInfo wInf = currItem->weldList.at(i);
+ PageItem::WeldingInfo wInf = currItem->weldList.at(i);
if (i == selectedPoint)
psx->setPen(QPen(Qt::red, 8.0 / m_canvas->scale(), Qt::SolidLine, Qt::RoundCap, Qt::MiterJoin));
else
@@ -413,7 +413,7 @@
selectedPoint = -1;
for (int i = 0 ; i < currItem->weldList.count(); i++)
{
- PageItem::weldingInfo wInf = currItem->weldList.at(i);
+ PageItem::WeldingInfo wInf = currItem->weldList.at(i);
if (m_canvas->hitsCanvasPoint(mousePointDoc, itemMatrix.map(QPointF(wInf.weldPoint.x(), wInf.weldPoint.y()))))
{
selectedPoint = i;
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19864&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Mon Feb 23 19:00:36 2015
@@ -5423,14 +5423,14 @@
ScItemState<PageItem*> *is = dynamic_cast<ScItemState<PageItem*>*>(state);
PageItem* wIt = is->getItem();
{
- weldingInfo wInf;
+ WeldingInfo wInf;
wInf.weldItem = wIt;
wInf.weldID = is->getInt("thisID");
wInf.weldPoint = FPoint(is->getDouble("thisPoint_x"), is->getDouble("thisPoint_y"));
weldList.append(wInf);
}
{
- weldingInfo wInf;
+ WeldingInfo wInf;
wInf.weldItem = this;
wInf.weldID = is->getInt("ID");
wInf.weldPoint = FPoint(is->getDouble("Point_x"), is->getDouble("Point_y"));
@@ -10283,7 +10283,7 @@
{
for (int i = 0 ; i < weldList.count(); i++)
{
- weldingInfo wInf = weldList.at(i);
+ WeldingInfo wInf = weldList.at(i);
if (wInf.weldItem->isNoteFrame())
{
PageItem_NoteFrame* noteFrame = wInf.weldItem->asNoteFrame();
@@ -10418,7 +10418,7 @@
{
for (int i = 0 ; i < weldList.count(); i++)
{
- weldingInfo wInf = weldList.at(i);
+ WeldingInfo wInf = weldList.at(i);
if (wInf.weldItem->isNoteFrame())
{
PageItem_NoteFrame* noteFrame = wInf.weldItem->asNoteFrame();
@@ -10540,18 +10540,18 @@
}
}
-void PageItem::addWelded(PageItem* iPt)
+void PageItem::addWelded(PageItem* item)
{
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;
+ FPoint centerP = FPoint(item->xPos() + (item->width() / 2.0), item->yPos() + (item->height() / 2.0));
+ WeldingInfo wInf;
+ wInf.weldItem = item;
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)
+void PageItem::weldTo(PageItem* item)
{
UndoTransaction activeTransaction;
if (undoManager->undoEnabled())
@@ -10559,54 +10559,54 @@
Um::WeldItems, "", Um::IGroup);
for (int i = 0 ; i < weldList.count(); i++)
{
- PageItem::weldingInfo wInf = weldList.at(i);
- if (wInf.weldItem == pIt)
+ PageItem::WeldingInfo wInf = weldList.at(i);
+ if (wInf.weldItem == item)
return;
}
- QList<PageItem*> ret = pIt->itemsWeldedTo();
- if (ret.contains(this))
- return;
- addWelded(pIt);
- pIt->addWelded(this);
+ QList<PageItem*> weldItems = item->itemsWeldedTo();
+ if (weldItems.contains(this))
+ return;
+ addWelded(item);
+ item->addWelded(this);
if (undoManager->undoEnabled())
{
ScItemState<PageItem*> *is = new ScItemState<PageItem*>(Um::WeldItems,"",Um::IGroup);
is->set("WELD_ITEMS", "weld_items");
- is->setItem(pIt);
+ is->setItem(item);
undoManager->action(this, is, getUPixmap());
}
update();
- pIt->update();
+ item->update();
if (activeTransaction)
activeTransaction.commit();
}
-void PageItem::moveWelded(double DX, double DY, int weld)
-{
- weldingInfo wInf = weldList.at(weld);
+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->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)
-{
- if ((DX == 0) && (DY == 0))
+ pIt->moveWelded(dX, dY, this);
+}
+
+void PageItem::moveWelded(double dX, double dY, PageItem* except)
+{
+ if ((dX == 0) && (dY == 0))
return;
//do not save undo for auto-welded notes frames
UndoManager::instance()->setUndoEnabled(false);
for (int i = 0 ; i < weldList.count(); i++)
{
- weldingInfo wInf = weldList.at(i);
+ WeldingInfo wInf = weldList.at(i);
PageItem *pIt = wInf.weldItem;
if (pIt != except)
{
- pIt->setXPos(pIt->xPos() + DX);
- pIt->setYPos(pIt->yPos() + DY);
+ pIt->setXPos(pIt->xPos() + dX);
+ pIt->setYPos(pIt->yPos() + dY);
pIt->update();
- pIt->moveWelded(DX, DY, this);
+ pIt->moveWelded(dX, dY, this);
}
}
UndoManager::instance()->setUndoEnabled(true);
@@ -10653,7 +10653,7 @@
ret.clear();
for (int i = 0 ; i < weldList.count(); i++)
{
- weldingInfo wInf = weldList.at(i);
+ WeldingInfo wInf = weldList.at(i);
PageItem *pIt = wInf.weldItem;
if (pIt != except)
{
@@ -10665,14 +10665,14 @@
return ret;
}
-void PageItem::setWeldPoint(double DX, double DY, PageItem *pItem)
+void PageItem::setWeldPoint(double dX, double dY, PageItem *pItem)
{
for (int i = 0 ; i < weldList.count(); i++)
{
PageItem *pIt = weldList[i].weldItem;
if (pIt == pItem)
{
- weldList[i].weldPoint = FPoint(DX, DY);
+ weldList[i].weldPoint = FPoint(dX, dY);
return;
}
}
@@ -10686,25 +10686,25 @@
Um::UnweldItems, "", Um::IDelete);
for (int a = 0 ; a < weldList.count(); a++)
{
- weldingInfo wInf = weldList.at(a);
- PageItem *pIt = wInf.weldItem;
- if (pIt == NULL)
+ WeldingInfo wInf = weldList.at(a);
+ PageItem *item = wInf.weldItem;
+ if (item == NULL)
{
qDebug() << "unWeld - null pointer in weldList";
continue;
}
- for (int b = 0 ; b < pIt->weldList.count(); b++)
- {
- weldingInfo wInf2 = pIt->weldList.at(b);
+ for (int b = 0 ; b < item->weldList.count(); b++)
+ {
+ WeldingInfo wInf2 = item->weldList.at(b);
PageItem *pIt2 = wInf2.weldItem;
if (pIt2 == this)
{
- pIt->weldList.removeAt(b);
+ item->weldList.removeAt(b);
if (undoManager->undoEnabled())
{
ScItemState<PageItem*> *is = new ScItemState<PageItem*>(Um::UnweldItems,"",Um::IGroup);
is->set("UNWELD_ITEM", "unweld_item");
- is->setItem(pIt);
+ is->setItem(item);
is->set("thisPoint_x", wInf.weldPoint.x());
is->set("thisPoint_y", wInf.weldPoint.y());
is->set("thisID", wInf.weldID);
Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19864&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Mon Feb 23 19:00:36 2015
@@ -1183,14 +1183,14 @@
void updateConstants();
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);
+ void weldTo(PageItem* item);
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 addWelded(PageItem* item);
+ void moveWelded(double dX, double dY, int weld);
+ void moveWelded(double dX, double dY, PageItem* except = NULL);
void rotateWelded(double dR, double oldRot);
- void setWeldPoint(double DX, double DY, PageItem *pItem); ///< added for autowelding feature of notes frames, setting welding point with given pItem to given coords
+ 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
bool groupClipping() { return m_groupClips; }
void setGroupClipping(bool val) { m_groupClips = val; }
@@ -1442,13 +1442,13 @@
bool isInlineImage;
bool isTempFile;
//items welding (item follows while item moves which they are connected with)
- struct weldingInfo
+ struct WeldingInfo
{
PageItem *weldItem;
FPoint weldPoint;
int weldID;
};
- QList<weldingInfo> weldList;
+ QList<WeldingInfo> weldList;
double hatchAngle;
double hatchDistance;
int hatchType; // 0 = single 1 = double 2 = triple
Modified: trunk/Scribus/scribus/pageitem_noteframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19864&path=/trunk/Scribus/scribus/pageitem_noteframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_noteframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_noteframe.cpp Mon Feb 23 19:00:36 2015
@@ -395,11 +395,11 @@
{
for (int a = 0 ; a < weldList.count(); a++)
{
- weldingInfo wInf = weldList.at(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);
+ WeldingInfo wInf2 = pIt->weldList.at(b);
PageItem *pIt2 = wInf2.weldItem;
if (pIt2 == this)
{
@@ -419,10 +419,10 @@
return -1;
for (int pos=0; pos < itemText.length(); ++pos)
{
- Mark* mark = itemText.mark(pos);
- if (itemText.hasMark(pos) && mark->isType(MARKNoteFrameType))
- {
- if (mark->getNotePtr() == note)
+ Mark* mark = itemText.mark(pos);
+ if (itemText.hasMark(pos) && mark->isType(MARKNoteFrameType))
+ {
+ if (mark->getNotePtr() == note)
return (pos);
}
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19864&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Mon Feb 23 19:00:36 2015
@@ -450,7 +450,7 @@
PageItem* ta = WeldItems.at(ttc);
for (int i = 0; i < ta->weldList.count(); ++i)
{
- PageItem::weldingInfo wInf = ta->weldList.at(i);
+ PageItem::WeldingInfo wInf = ta->weldList.at(i);
ta->weldList[i].weldItem = LinkID.value(wInf.weldID, 0);
if (ta->weldList[i].weldItem == NULL)
ta->weldList.removeAt(i--);
@@ -554,7 +554,7 @@
PageItem* ta = WeldItems.at(ttc);
for (int i = 0 ; i < ta->weldList.count(); ++i)
{
- PageItem::weldingInfo wInf = ta->weldList.at(i);
+ PageItem::WeldingInfo wInf = ta->weldList.at(i);
ta->weldList[i].weldItem = WeldID.value(wInf.weldID, 0);
if (ta->weldList[i].weldItem == NULL)
ta->weldList.removeAt(i--);
@@ -954,7 +954,7 @@
PageItem* ta = WeldItems.at(ttc);
for (int i = 0 ; i < ta->weldList.count(); ++i)
{
- PageItem::weldingInfo wInf = ta->weldList.at(i);
+ PageItem::WeldingInfo wInf = ta->weldList.at(i);
ta->weldList[i].weldItem = LinkID.value(wInf.weldID, 0);
if (ta->weldList[i].weldItem == NULL)
ta->weldList.removeAt(i--);
@@ -1058,7 +1058,7 @@
PageItem* ta = WeldItems.at(ttc);
for (int i = 0 ; i < ta->weldList.count(); ++i)
{
- PageItem::weldingInfo wInf = ta->weldList.at(i);
+ PageItem::WeldingInfo wInf = ta->weldList.at(i);
ta->weldList[i].weldItem = WeldID.value(wInf.weldID, 0);
if (ta->weldList[i].weldItem == NULL)
ta->weldList.removeAt(i--);
@@ -1635,7 +1635,7 @@
PageItem* ta = WeldItems.at(ttc);
for (int i = 0 ; i < ta->weldList.count(); ++i)
{
- PageItem::weldingInfo wInf = ta->weldList.at(i);
+ PageItem::WeldingInfo wInf = ta->weldList.at(i);
ta->weldList[i].weldItem = LinkID.value(wInf.weldID, 0);
if (ta->weldList[i].weldItem == NULL)
ta->weldList.removeAt(i--);
@@ -1739,7 +1739,7 @@
PageItem* ta = WeldItems.at(ttc);
for (int i = 0 ; i < ta->weldList.count(); ++i)
{
- PageItem::weldingInfo wInf = ta->weldList.at(i);
+ PageItem::WeldingInfo wInf = ta->weldList.at(i);
ta->weldList[i].weldItem = WeldID.value(wInf.weldID, 0);
if (ta->weldList[i].weldItem == NULL)
ta->weldList.removeAt(i--);
@@ -4008,7 +4008,7 @@
}
if (tName == "WeldEntry")
{
- PageItem::weldingInfo wInf;
+ 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);
@@ -4224,7 +4224,7 @@
PageItem* ta = WeldItems.at(ttc);
for (int i = 0 ; i < ta->weldList.count(); ++i)
{
- PageItem::weldingInfo wInf = ta->weldList.at(i);
+ PageItem::WeldingInfo wInf = ta->weldList.at(i);
ta->weldList[i].weldItem = LinkID.value(wInf.weldID, 0);
if (ta->weldList[i].weldItem == NULL)
ta->weldList.removeAt(i--);
@@ -4264,7 +4264,7 @@
PageItem* ta = WeldItems.at(ttc);
for (int i = 0 ; i < ta->weldList.count(); ++i)
{
- PageItem::weldingInfo wInf = ta->weldList.at(i);
+ PageItem::WeldingInfo wInf = ta->weldList.at(i);
ta->weldList[i].weldItem = WeldID.value(wInf.weldID, 0);
if (ta->weldList[i].weldItem == NULL)
ta->weldList.removeAt(i--);
@@ -6203,7 +6203,7 @@
PageItem* ta = WeldItems.at(ttc);
for (int i = 0 ; i < ta->weldList.count(); ++i)
{
- PageItem::weldingInfo wInf = ta->weldList.at(i);
+ PageItem::WeldingInfo wInf = ta->weldList.at(i);
ta->weldList[i].weldItem = LinkID.value(wInf.weldID, 0);
if (ta->weldList[i].weldItem == NULL)
ta->weldList.removeAt(i--);
@@ -6261,7 +6261,7 @@
PageItem* ta = WeldItems.at(ttc);
for (int i = 0 ; i < ta->weldList.count(); ++i)
{
- PageItem::weldingInfo wInf = ta->weldList.at(i);
+ PageItem::WeldingInfo wInf = ta->weldList.at(i);
ta->weldList[i].weldItem = WeldID.value(wInf.weldID, 0);
if (ta->weldList[i].weldItem == NULL)
ta->weldList.removeAt(i--);
@@ -6737,7 +6737,7 @@
item->asNoteFrame()->setMaster(master);
master->asTextFrame()->setNoteFrame(item->asNoteFrame());
//FIX welding with note frame
- PageItem::weldingInfo wInf;
+ PageItem::WeldingInfo wInf;
for (int i = 0 ; i < master->weldList.count(); i++)
{
wInf = master->weldList.at(i);
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19864&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Mon Feb 23 19:00:36 2015
@@ -1950,7 +1950,7 @@
// bool isWelded = false;
for (int i = 0 ; i < item->weldList.count(); i++)
{
- PageItem::weldingInfo wInf = item->weldList.at(i);
+ PageItem::WeldingInfo wInf = item->weldList.at(i);
PageItem *pIt = wInf.weldItem;
if (pIt == NULL)
{
@@ -2453,7 +2453,7 @@
bool isWelded = false;
for (int i = 0 ; i < item->weldList.count(); i++)
{
- PageItem::weldingInfo wInf = item->weldList.at(i);
+ PageItem::WeldingInfo wInf = item->weldList.at(i);
PageItem *pIt = wInf.weldItem;
if (pIt != NULL && !pIt->isAutoNoteFrame())
{
More information about the scribus-commit
mailing list