Skip to content

Commit

Permalink
Rename PageItem::AdjustPictScale() to adjustPictScale()
Browse files Browse the repository at this point in the history
git-svn-id: svn://scribus.net/trunk/Scribus@22821 11d20701-8431-0410-a711-e3c959e3b870
  • Loading branch information
Jean Ghali committed Jan 23, 2019
1 parent 1dae5e4 commit 1ed8577
Show file tree
Hide file tree
Showing 21 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion scribus/canvasgesture_resize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void ResizeGesture::mouseReleaseEvent(QMouseEvent *m)
doResize(m->modifiers() & Qt::AltModifier);
m_doc->setRedrawBounding(currItem);
if (currItem->asImageFrame())
currItem->AdjustPictScale();
currItem->adjustPictScale();
}
//add action itemResizeToMargin for right click on item`s handlers
else if (m->button() == Qt::RightButton)
Expand Down
6 changes: 3 additions & 3 deletions scribus/pageitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4256,7 +4256,7 @@ void PageItem::setImageScalingMode(bool freeScale, bool keepRatio)
}
ScaleType = freeScale;
AspectRatio = keepRatio;
AdjustPictScale();
adjustPictScale();
update();
}

Expand Down Expand Up @@ -9423,7 +9423,7 @@ bool PageItem::loadImage(const QString& filename, const bool reload, const int g
else
IProfile = pixm.imgInfo.profileName;

AdjustPictScale();
adjustPictScale();

// #12408 : we set the old* variables to avoid creation of unwanted undo states
// when user perform actions such as double clicking image. We might want to
Expand Down Expand Up @@ -9726,7 +9726,7 @@ void PageItem::drawArrow(ScPainter *p, QTransform &arrowTrans, int arrowIndex)
}
}

void PageItem::AdjustPictScale()
void PageItem::adjustPictScale()
{
if (itemType() != PageItem::ImageFrame)
return;
Expand Down
2 changes: 1 addition & 1 deletion scribus/pageitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class SCRIBUS_API PageItem : public QObject, public UndoObject, public SaxIO, pu
* @brief Adjust the picture scale, moved from the view, no view code here
* FIXME: Move to PageItem_TextFrame
*/
void AdjustPictScale();
void adjustPictScale();



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ void Scribus12Format::PasteItem(struct CopyPasteBuffer *Buffer, bool drag, bool
currItem->ClipEdited = true;
}
if (currItem->asImageFrame())
currItem->AdjustPictScale();
currItem->adjustPictScale();
if (currItem->asPathText())
{
currItem->ClipEdited = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1946,7 +1946,7 @@ PageItem* Scribus13Format::PasteItem(QDomElement *obj, ScribusDoc *doc, const QS
currItem->setHeight(1.0);
}
if (currItem->asImageFrame())
currItem->AdjustPictScale();
currItem->adjustPictScale();
if (currItem->asPathText())
currItem->updatePolyClip();
currItem->GrType = obj->attribute("GRTYP", "0").toInt();
Expand Down
2 changes: 1 addition & 1 deletion scribus/plugins/import/cgm/importcgm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1579,7 +1579,7 @@ void CgmPlug::decodeClass4(QDataStream &ts, quint16 elemID, quint16 paramLen)
ite->setImageFlippedH(flipX);
ite->setImageFlippedV(flipY);
ite->setImageScalingMode(false, false);
ite->AdjustPictScale();
ite->adjustPictScale();
colorPrecision = t_colorPrecision;
colorIndexPrecision = t_colorIndexPrecision;
}
Expand Down
2 changes: 1 addition & 1 deletion scribus/plugins/import/emf/importemf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2976,7 +2976,7 @@ void EmfPlug::handleImage(qint32 dstX, qint32 dstY, qint32 dstW, qint32 dstH, co
ite->updateClip();
}
m_Doc->loadPict(fileName, ite);
ite->AdjustPictScale();
ite->adjustPictScale();
}
}
delete tempFile;
Expand Down
4 changes: 2 additions & 2 deletions scribus/plugins/import/idml/importidml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2614,7 +2614,7 @@ QList<PageItem*> IdmlPlug::parseItemXML(const QDomElement& itElem, const QTransf
item->setImageXYScale(scXi / item->pixm.imgInfo.xres * 72, scYi / item->pixm.imgInfo.xres * 72);
item->setImageXYOffset(-imageDX * scXi / item->imageXScale(), -imageDY * scXi / item->imageYScale());
item->setImageRotation(-roti);
item->AdjustPictScale();
item->adjustPictScale();
}
}
delete tempFile;
Expand Down Expand Up @@ -2650,7 +2650,7 @@ QList<PageItem*> IdmlPlug::parseItemXML(const QDomElement& itElem, const QTransf
item->setImageXYOffset(-imageDX * scXi / item->imageXScale(), -imageDY * scXi / item->imageYScale());
item->setImageRotation(-roti);
if (imageFit != "None")
item->AdjustPictScale();
item->adjustPictScale();
}
}
GElements.append(m_Doc->Items->takeAt(z));
Expand Down
4 changes: 2 additions & 2 deletions scribus/plugins/import/odg/importodg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ PageItem* OdgPlug::parseFrame(QDomElement &e)
retObj->AspectRatio = false;
retObj->ScaleType = false;
m_Doc->loadPict(fileName, retObj);
retObj->AdjustPictScale();
retObj->adjustPictScale();
}
}
delete tempFile;
Expand Down Expand Up @@ -1658,7 +1658,7 @@ PageItem* OdgPlug::parseFrame(QDomElement &e)
retObj->AspectRatio = false;
retObj->ScaleType = false;
m_Doc->loadPict(fileName, retObj);
retObj->AdjustPictScale();
retObj->adjustPictScale();
}
}
delete tempFile;
Expand Down
2 changes: 1 addition & 1 deletion scribus/plugins/import/pages/importpages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@ PageItem* PagesPlug::parseObjReference(QDomElement &draw)
retObj->AspectRatio = false;
retObj->ScaleType = false;
m_Doc->loadPict(fileName, retObj);
retObj->AdjustPictScale();
retObj->adjustPictScale();
}
}
delete tempFile;
Expand Down
4 changes: 2 additions & 2 deletions scribus/plugins/import/revenge/rawpainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3605,14 +3605,14 @@ void RawPainter::insertImage(PageItem* ite, const QString& imgExt, QByteArray &i
{
int rot = QString(m_style["librevenge:rotate"]->getStr().cstr()).toInt();
ite->setImageRotation(rot);
ite->AdjustPictScale();
ite->adjustPictScale();
}
#else
if (m_style["libwpg:rotate"])
{
int rot = QString(m_style["libwpg:rotate"]->getStr().cstr()).toInt();
ite->setImageRotation(rot);
ite->AdjustPictScale();
ite->adjustPictScale();
}
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions scribus/plugins/import/svm/importsvm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2057,7 +2057,7 @@ void SvmPlug::handleImage(QDataStream &ds, qint64 posi, quint32 totalSize)
ite->AspectRatio = false;
ite->ScaleType = false;
m_Doc->loadPict(fileName, ite);
ite->AdjustPictScale();
ite->adjustPictScale();
}
}
delete tempFile;
Expand Down Expand Up @@ -2113,7 +2113,7 @@ void SvmPlug::handleImageEX(QDataStream &ds, qint64 posi, quint32 totalSize)
ite->AspectRatio = false;
ite->ScaleType = false;
m_Doc->loadPict(fileName, ite);
ite->AdjustPictScale();
ite->adjustPictScale();
}
}
delete tempFile;
Expand Down
2 changes: 1 addition & 1 deletion scribus/plugins/import/xps/importxps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,7 @@ PageItem* XpsPlug::createItem(QDomElement &dpg, ObjState &obState)
retObj->AspectRatio = false;
retObj->ScaleType = false;
m_Doc->loadPict(fileName, retObj);
retObj->AdjustPictScale();
retObj->adjustPictScale();
}
}
delete tempFile;
Expand Down
4 changes: 2 additions & 2 deletions scribus/plugins/scripter/api_imageitem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ void ImageAPI::scaleToFrame(bool scaleToFrame, bool proportional)

//FIXME emit or something so we dont need this
ScCore->primaryMainWindow()->propertiesPalette->imagePal->showScaleAndOffset(item->imageXScale(), item->imageYScale(), item->imageXOffset(), item->imageYOffset());
item->AdjustPictScale();
//ScCore->primaryMainWindow()->view->AdjustPictScale(item);
item->adjustPictScale();
//ScCore->primaryMainWindow()->view->adjustPictScale(item);

item->update();
}
Expand Down
2 changes: 1 addition & 1 deletion scribus/plugins/scriptplugin/cmdmani.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ PyObject *scribus_setscaleimagetoframe(PyObject* /* self */, PyObject* args, PyO
if (proportional != -1)
item->AspectRatio = proportional > 0;

item->AdjustPictScale();
item->adjustPictScale();
item->update();

Py_RETURN_NONE;
Expand Down
2 changes: 1 addition & 1 deletion scribus/scribus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3087,7 +3087,7 @@ void ScribusMainWindow::doPasteRecent(const QString& data)
b->OldB2 = b->width();
b->OldH2 = b->height();
b->updateClip();
b->AdjustPictScale();
b->adjustPictScale();
}
else
{
Expand Down
12 changes: 6 additions & 6 deletions scribus/scribusdoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10192,7 +10192,7 @@ void ScribusDoc::recalcPicturesRes(bool applyNewRes)
currItem->setImageFlippedV(fvo);
currItem->setImageXOffset(imgX);
currItem->setImageYOffset(imgY);
currItem->AdjustPictScale();
currItem->adjustPictScale();
ca++;
m_ScMW->mainWindowProgressBar->setValue(ca);
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
Expand Down Expand Up @@ -10226,7 +10226,7 @@ void ScribusDoc::recalcPicturesRes(bool applyNewRes)
currItem->setImageFlippedV(fvo);
currItem->setImageXOffset(imgX);
currItem->setImageYOffset(imgY);
currItem->AdjustPictScale();
currItem->adjustPictScale();
ca++;
m_ScMW->mainWindowProgressBar->setValue(ca);
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
Expand Down Expand Up @@ -10261,7 +10261,7 @@ void ScribusDoc::recalcPicturesRes(bool applyNewRes)
currItem->setImageFlippedV(fvo);
currItem->setImageXOffset(imgX);
currItem->setImageYOffset(imgY);
currItem->AdjustPictScale();
currItem->adjustPictScale();
ca++;
m_ScMW->mainWindowProgressBar->setValue(ca);
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
Expand Down Expand Up @@ -10300,7 +10300,7 @@ void ScribusDoc::recalcPicturesRes(bool applyNewRes)
currItem->setImageFlippedV(fvo);
currItem->setImageXOffset(imgX);
currItem->setImageYOffset(imgY);
currItem->AdjustPictScale();
currItem->adjustPictScale();
ca++;
m_ScMW->mainWindowProgressBar->setValue(ca);
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
Expand Down Expand Up @@ -14229,7 +14229,7 @@ bool ScribusDoc::sizeItem(double newX, double newY, PageItem *pi, bool fromMP, b
}
if ((currItem->asImageFrame()) && (!currItem->Sizing) && (appMode != modeEditClip))
{
currItem->AdjustPictScale();
currItem->adjustPictScale();
}
if (currItem->asLine())
{
Expand Down Expand Up @@ -15248,7 +15248,7 @@ void ScribusDoc::removeFromGroup(PageItem* item)
item->rotateBy(-gRot);
item->setLineWidth(item->lineWidth() * qMax(grScXi, grScYi));
if (!item->ScaleType)
item->AdjustPictScale();
item->adjustPictScale();
else
{
item->setImageXScale(item->imageXScale() * grScXi);
Expand Down
2 changes: 1 addition & 1 deletion scribus/scribusdoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ class SCRIBUS_API ScribusDoc : public QObject, public UndoObject, public Observa
item->loadImage(item->Pfile, true, -1, false);
item->setImageFlippedH(fho);
item->setImageFlippedV(fvo);
item->AdjustPictScale();
item->adjustPictScale();
}
}
allItems.clear();
Expand Down
4 changes: 2 additions & 2 deletions scribus/scribusview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ void ScribusView::contentsDropEvent(QDropEvent *e)
item->OldB2 = item->width();
item->OldH2 = item->height();
item->updateClip();
item->AdjustPictScale();
item->adjustPictScale();
item->update();
dropOffsetX += Doc->opToolPrefs().dispX;
dropOffsetY += Doc->opToolPrefs().dispY;
Expand Down Expand Up @@ -1011,7 +1011,7 @@ void ScribusView::contentsDropEvent(QDropEvent *e)
item->OldB2 = item->width();
item->OldH2 = item->height();
item->updateClip();
item->AdjustPictScale();
item->adjustPictScale();
item->update();
emit DocChanged();
update();
Expand Down
2 changes: 1 addition & 1 deletion scribus/ui/propertiespalette_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ void PropertiesPalette_Image::handleLocalRotation()
{
m_doc->itemSelection_SetImageRotation(360 - imageRotation->value());
if (frameScale->isChecked())
m_item->AdjustPictScale();
m_item->adjustPictScale();
}
}

Expand Down
2 changes: 1 addition & 1 deletion scribus/ui/propertiespalette_xyz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ void PropertiesPalette_XYZ::handleBasePoint(int m)
// FIXME
if (false /*!FreeScale->isChecked()*/)
{
m_item->AdjustPictScale();
m_item->adjustPictScale();
m_item->update();
}
}
Expand Down

0 comments on commit 1ed8577

Please sign in to comment.