r22716 by jghali - make PageItem's getRedrawBounding() and infoDescription() const
scribus-commit
scribus-commit at lists.scribus.net
Sun Sep 30 22:45:05 UTC 2018
Author: jghali
Date: Sun Sep 30 22:45:05 2018
New Revision: 22716
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22716
Log:
make PageItem's getRedrawBounding() and infoDescription() const
Modified:
trunk/Scribus/scribus/pageitem.cpp
trunk/Scribus/scribus/pageitem.h
trunk/Scribus/scribus/pageitem_arc.cpp
trunk/Scribus/scribus/pageitem_arc.h
trunk/Scribus/scribus/pageitem_group.cpp
trunk/Scribus/scribus/pageitem_group.h
trunk/Scribus/scribus/pageitem_imageframe.cpp
trunk/Scribus/scribus/pageitem_imageframe.h
trunk/Scribus/scribus/pageitem_latexframe.cpp
trunk/Scribus/scribus/pageitem_latexframe.h
trunk/Scribus/scribus/pageitem_line.cpp
trunk/Scribus/scribus/pageitem_line.h
trunk/Scribus/scribus/pageitem_pathtext.cpp
trunk/Scribus/scribus/pageitem_pathtext.h
trunk/Scribus/scribus/pageitem_polygon.cpp
trunk/Scribus/scribus/pageitem_polygon.h
trunk/Scribus/scribus/pageitem_polyline.cpp
trunk/Scribus/scribus/pageitem_polyline.h
trunk/Scribus/scribus/pageitem_regularpolygon.cpp
trunk/Scribus/scribus/pageitem_regularpolygon.h
trunk/Scribus/scribus/pageitem_spiral.cpp
trunk/Scribus/scribus/pageitem_spiral.h
trunk/Scribus/scribus/pageitem_symbol.cpp
trunk/Scribus/scribus/pageitem_symbol.h
trunk/Scribus/scribus/pageitem_table.h
trunk/Scribus/scribus/pageitem_textframe.cpp
trunk/Scribus/scribus/pageitem_textframe.h
Modified: trunk/Scribus/scribus/pageitem.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem.cpp (original)
+++ trunk/Scribus/scribus/pageitem.cpp Sun Sep 30 22:45:05 2018
@@ -9882,7 +9882,7 @@
return last;
}
-QRect PageItem::getRedrawBounding(const double viewScale)
+QRect PageItem::getRedrawBounding(const double viewScale) const
{
int x = qRound(floor(BoundingX - Oldm_lineWidth / 2.0 - 5) * viewScale);
int y = qRound(floor(BoundingY - Oldm_lineWidth / 2.0 - 5) * viewScale);
@@ -10492,7 +10492,7 @@
updateGradientVectors();
}
-QString PageItem::infoDescription()
+QString PageItem::infoDescription() const
{
QString htmlText;
htmlText.append(ScribusView::tr("Print: "));
Modified: trunk/Scribus/scribus/pageitem.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem.h
==============================================================================
--- trunk/Scribus/scribus/pageitem.h (original)
+++ trunk/Scribus/scribus/pageitem.h Sun Sep 30 22:45:05 2018
@@ -274,7 +274,7 @@
PageItem_Table* parentTable() const { return (Parent ? Parent->asTable() : nullptr); }
virtual void applicableActions(QStringList& actionList) = 0;
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
virtual bool createInfoGroup(QFrame *, QGridLayout *) {return false;}
//<< ********* Functions related to drawing the item *********
@@ -292,7 +292,7 @@
/**
* @brief Set or get the redraw bounding box of the item, moved from the View
*/
- QRect getRedrawBounding(const double);
+ QRect getRedrawBounding(const double viewScale) const;
void setRedrawBounding();
void setPolyClip(int up, int down = 0);
void updatePolyClip();
Modified: trunk/Scribus/scribus/pageitem_arc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_arc.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_arc.cpp (original)
+++ trunk/Scribus/scribus/pageitem_arc.cpp Sun Sep 30 22:45:05 2018
@@ -84,7 +84,7 @@
actionList << "itemConvertToTextFrame";
}
-QString PageItem_Arc::infoDescription()
+QString PageItem_Arc::infoDescription() const
{
return QString();
}
Modified: trunk/Scribus/scribus/pageitem_arc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_arc.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_arc.h (original)
+++ trunk/Scribus/scribus/pageitem_arc.h Sun Sep 30 22:45:05 2018
@@ -44,7 +44,7 @@
virtual bool isArc() const { return true; }
virtual ItemType realItemType() const { return PageItem::Arc; }
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
void recalcPath();
double arcHeight; //! height of the circumfering ellipse
double arcWidth; //! width of the circumfering ellipse
Modified: trunk/Scribus/scribus/pageitem_group.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_group.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_group.cpp (original)
+++ trunk/Scribus/scribus/pageitem_group.cpp Sun Sep 30 22:45:05 2018
@@ -273,7 +273,7 @@
{
}
-QString PageItem_Group::infoDescription()
+QString PageItem_Group::infoDescription() const
{
return QString();
}
Modified: trunk/Scribus/scribus/pageitem_group.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_group.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_group.h (original)
+++ trunk/Scribus/scribus/pageitem_group.h Sun Sep 30 22:45:05 2018
@@ -50,7 +50,7 @@
virtual void getNamedResources(ResourceCollection& lists) const;
virtual void replaceNamedResources(ResourceCollection& newNames);
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
/// Retrieve child items of this item
virtual QList<PageItem*> getChildren() const { return groupItemList; }
Modified: trunk/Scribus/scribus/pageitem_imageframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_imageframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_imageframe.cpp Sun Sep 30 22:45:05 2018
@@ -480,7 +480,7 @@
}
}
-QString PageItem_ImageFrame::infoDescription()
+QString PageItem_ImageFrame::infoDescription() const
{
QString htmlText;
htmlText.append( tr("Image") + "<br/>");
Modified: trunk/Scribus/scribus/pageitem_imageframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_imageframe.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_imageframe.h (original)
+++ trunk/Scribus/scribus/pageitem_imageframe.h Sun Sep 30 22:45:05 2018
@@ -48,7 +48,7 @@
virtual bool createInfoGroup(QFrame *, QGridLayout *);
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
protected:
virtual void DrawObj_Item(ScPainter *p, QRectF e);
Modified: trunk/Scribus/scribus/pageitem_latexframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_latexframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_latexframe.cpp Sun Sep 30 22:45:05 2018
@@ -578,7 +578,7 @@
}
}
-QString PageItem_LatexFrame::infoDescription()
+QString PageItem_LatexFrame::infoDescription() const
{
QString htmlText;
htmlText.append("<h2>"+tr("Render Frame") + "</h2><table>");
Modified: trunk/Scribus/scribus/pageitem_latexframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_latexframe.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_latexframe.h (original)
+++ trunk/Scribus/scribus/pageitem_latexframe.h Sun Sep 30 22:45:05 2018
@@ -54,7 +54,7 @@
virtual void clearContents();
virtual ItemType realItemType() const { return PageItem::LatexFrame; }
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
void layout();
/** @brief Perform undo/redo action */
Modified: trunk/Scribus/scribus/pageitem_line.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_line.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_line.cpp (original)
+++ trunk/Scribus/scribus/pageitem_line.cpp Sun Sep 30 22:45:05 2018
@@ -156,7 +156,7 @@
actionList << "itemConvertToBezierCurve";
}
-QString PageItem_Line::infoDescription()
+QString PageItem_Line::infoDescription() const
{
return QString();
}
Modified: trunk/Scribus/scribus/pageitem_line.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_line.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_line.h (original)
+++ trunk/Scribus/scribus/pageitem_line.h Sun Sep 30 22:45:05 2018
@@ -44,7 +44,7 @@
virtual bool isLine() const { return true; }
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
QPointF startPoint();
QPointF endPoint();
Modified: trunk/Scribus/scribus/pageitem_pathtext.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_pathtext.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_pathtext.cpp (original)
+++ trunk/Scribus/scribus/pageitem_pathtext.cpp Sun Sep 30 22:45:05 2018
@@ -380,7 +380,7 @@
actionList << "itemConvertToOutlines";
}
-QString PageItem_PathText::infoDescription()
+QString PageItem_PathText::infoDescription() const
{
return QString();
}
Modified: trunk/Scribus/scribus/pageitem_pathtext.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_pathtext.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_pathtext.h (original)
+++ trunk/Scribus/scribus/pageitem_pathtext.h Sun Sep 30 22:45:05 2018
@@ -45,7 +45,7 @@
virtual void layout();
virtual bool createInfoGroup(QFrame *, QGridLayout *);
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
virtual void getVisualBoundingRect(double *x1, double *y1, double *x2, double *y2) const;
Modified: trunk/Scribus/scribus/pageitem_polygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_polygon.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_polygon.cpp (original)
+++ trunk/Scribus/scribus/pageitem_polygon.cpp Sun Sep 30 22:45:05 2018
@@ -64,7 +64,7 @@
actionList << "itemConvertToTextFrame";
}
-QString PageItem_Polygon::infoDescription()
+QString PageItem_Polygon::infoDescription() const
{
return QString();
}
Modified: trunk/Scribus/scribus/pageitem_polygon.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_polygon.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_polygon.h (original)
+++ trunk/Scribus/scribus/pageitem_polygon.h Sun Sep 30 22:45:05 2018
@@ -43,7 +43,7 @@
virtual PageItem_Polygon * asPolygon() { return this; }
virtual bool isPolygon() const { return true; }
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
protected:
virtual void DrawObj_Item(ScPainter *p, QRectF e);
Modified: trunk/Scribus/scribus/pageitem_polyline.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_polyline.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_polyline.cpp (original)
+++ trunk/Scribus/scribus/pageitem_polyline.cpp Sun Sep 30 22:45:05 2018
@@ -210,7 +210,7 @@
actionList << "itemConvertToPolygon";
}
-QString PageItem_PolyLine::infoDescription()
+QString PageItem_PolyLine::infoDescription() const
{
return QString();
}
Modified: trunk/Scribus/scribus/pageitem_polyline.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_polyline.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_polyline.h (original)
+++ trunk/Scribus/scribus/pageitem_polyline.h Sun Sep 30 22:45:05 2018
@@ -43,7 +43,7 @@
virtual bool isPolyLine() const { return true; }
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
virtual void getBoundingRect(double *x1, double *y1, double *x2, double *y2) const;
virtual void getVisualBoundingRect(double *x1, double *y1, double *x2, double *y2) const;
Modified: trunk/Scribus/scribus/pageitem_regularpolygon.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_regularpolygon.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_regularpolygon.cpp (original)
+++ trunk/Scribus/scribus/pageitem_regularpolygon.cpp Sun Sep 30 22:45:05 2018
@@ -86,7 +86,7 @@
actionList << "itemConvertToTextFrame";
}
-QString PageItem_RegularPolygon::infoDescription()
+QString PageItem_RegularPolygon::infoDescription() const
{
return QString();
}
Modified: trunk/Scribus/scribus/pageitem_regularpolygon.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_regularpolygon.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_regularpolygon.h (original)
+++ trunk/Scribus/scribus/pageitem_regularpolygon.h Sun Sep 30 22:45:05 2018
@@ -44,7 +44,8 @@
virtual bool isRegularPolygon() const { return true; }
virtual ItemType realItemType() const { return PageItem::RegularPolygon; }
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
+
void recalcPath();
/* Regular Polygon Tool */
int polyCorners; //! Number of corners for a polygon
Modified: trunk/Scribus/scribus/pageitem_spiral.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_spiral.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.cpp (original)
+++ trunk/Scribus/scribus/pageitem_spiral.cpp Sun Sep 30 22:45:05 2018
@@ -345,7 +345,7 @@
actionList << "itemConvertToPolygon";
}
-QString PageItem_Spiral::infoDescription()
+QString PageItem_Spiral::infoDescription() const
{
return QString();
}
Modified: trunk/Scribus/scribus/pageitem_spiral.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_spiral.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_spiral.h (original)
+++ trunk/Scribus/scribus/pageitem_spiral.h Sun Sep 30 22:45:05 2018
@@ -44,7 +44,7 @@
virtual bool isSpiral() const { return true; }
virtual ItemType realItemType() const { return PageItem::Spiral; }
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
void recalcPath();
double spiralStartAngle; //! angle where the spiral starts
double spiralEndAngle; //! angle the spiral spans
Modified: trunk/Scribus/scribus/pageitem_symbol.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_symbol.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_symbol.cpp (original)
+++ trunk/Scribus/scribus/pageitem_symbol.cpp Sun Sep 30 22:45:05 2018
@@ -162,7 +162,7 @@
{
}
-QString PageItem_Symbol::infoDescription()
+QString PageItem_Symbol::infoDescription() const
{
return QString();
}
Modified: trunk/Scribus/scribus/pageitem_symbol.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_symbol.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_symbol.h (original)
+++ trunk/Scribus/scribus/pageitem_symbol.h Sun Sep 30 22:45:05 2018
@@ -44,7 +44,7 @@
virtual bool isSymbol() const { return true; }
virtual ItemType realItemType() const { return PageItem::Symbol; }
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
protected:
virtual void DrawObj_Item(ScPainter *p, QRectF e);
Modified: trunk/Scribus/scribus/pageitem_table.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_table.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_table.h (original)
+++ trunk/Scribus/scribus/pageitem_table.h Sun Sep 30 22:45:05 2018
@@ -498,7 +498,7 @@
virtual void applicableActions(QStringList& actionList);
/// Returns a textual description of this item.
- virtual QString infoDescription() { return QString(); }
+ virtual QString infoDescription() const { return QString(); }
/// Returns the Cell Areas from this table
const QList<CellArea>& cellAreas() const { return m_cellAreas; }
Modified: trunk/Scribus/scribus/pageitem_textframe.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_textframe.cpp
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.cpp (original)
+++ trunk/Scribus/scribus/pageitem_textframe.cpp Sun Sep 30 22:45:05 2018
@@ -5507,7 +5507,7 @@
}
}
-QString PageItem_TextFrame::infoDescription()
+QString PageItem_TextFrame::infoDescription() const
{
return QString();
}
Modified: trunk/Scribus/scribus/pageitem_textframe.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22716&path=/trunk/Scribus/scribus/pageitem_textframe.h
==============================================================================
--- trunk/Scribus/scribus/pageitem_textframe.h (original)
+++ trunk/Scribus/scribus/pageitem_textframe.h Sun Sep 30 22:45:05 2018
@@ -100,7 +100,7 @@
void drawNoteIcon(ScPainter *p);
virtual bool createInfoGroup(QFrame *, QGridLayout *);
virtual void applicableActions(QStringList& actionList);
- virtual QString infoDescription();
+ virtual QString infoDescription() const;
// Move incomplete lines from the previous frame if needed.
bool moveLinesFromPreviousFrame ();
void adjustParagraphEndings ();
More information about the scribus-commit
mailing list