r23919 by jghali - Add some C++11 overrides to text box classes
scribus-commit
scribus-commit at lists.scribus.net
Wed Jul 15 21:19:40 UTC 2020
Author: jghali
Date: Wed Jul 15 21:19:39 2020
New Revision: 23919
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23919
Log:
Add some C++11 overrides to text box classes
Modified:
trunk/Scribus/scribus/text/boxes.h
Modified: trunk/Scribus/scribus/text/boxes.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23919&path=/trunk/Scribus/scribus/text/boxes.h
==============================================================================
--- trunk/Scribus/scribus/text/boxes.h (original)
+++ trunk/Scribus/scribus/text/boxes.h Wed Jul 15 21:19:39 2020
@@ -179,16 +179,15 @@
m_naturalWidth = m_naturalHeight = 0;
}
- int pointToPosition(QPointF coord, const StoryText &story) const;
- QLineF positionToPoint(int pos, const StoryText& story) const;
-
- void render(TextLayoutPainter *p) const;
- void render(ScreenPainter *p, ITextContext *ctx) const;
- void drawSelection(ScreenPainter *p, ITextContext *ctx) const;
-
-
- double naturalWidth() const { return m_naturalWidth; }
- double naturalHeight() const;
+ int pointToPosition(QPointF coord, const StoryText &story) const override;
+ QLineF positionToPoint(int pos, const StoryText& story) const override;
+
+ void render(TextLayoutPainter *p) const override;
+ void render(ScreenPainter *p, ITextContext *ctx) const override;
+ void drawSelection(ScreenPainter *p, ITextContext *ctx) const override;
+
+ double naturalWidth() const override { return m_naturalWidth; }
+ double naturalHeight() const override;
// void justify(const ParagraphStyle& style);
@@ -216,17 +215,17 @@
m_type = T_Line;
}
- int pointToPosition(QPointF coord, const StoryText &story) const;
- QLineF positionToPoint(int pos, const StoryText& story) const;
-
- bool containsPoint(QPointF coord) const;
-
- void render(TextLayoutPainter *p) const;
- void render(ScreenPainter *p, ITextContext *ctx) const;
- void drawSelection(ScreenPainter *p, ITextContext *ctx) const;
-
- double naturalWidth() const { return m_naturalWidth; }
- double naturalHeight() const { return height(); }
+ int pointToPosition(QPointF coord, const StoryText &story) const override;
+ QLineF positionToPoint(int pos, const StoryText& story) const override;
+
+ bool containsPoint(QPointF coord) const override;
+
+ void render(TextLayoutPainter *p) const override;
+ void render(ScreenPainter *p, ITextContext *ctx) const override;
+ void drawSelection(ScreenPainter *p, ITextContext *ctx) const override;
+
+ double naturalWidth() const override{ return m_naturalWidth; }
+ double naturalHeight() const override{ return height(); }
// void justify(const ParagraphStyle& style);
@@ -249,7 +248,7 @@
protected:
void update();
- void drawBackGround(TextLayoutPainter *p) const;
+ void drawBackGround(TextLayoutPainter *p) const override;
};
class GlyphBox: public Box
@@ -268,12 +267,12 @@
m_naturalDescent = run.descent();
}
- int pointToPosition(QPointF coord, const StoryText &story) const;
- QLineF positionToPoint(int pos, const StoryText& story) const;
-
- void render(TextLayoutPainter *p) const;
- void render(ScreenPainter *p, ITextContext *ctx) const;
- void drawSelection(ScreenPainter *p, ITextContext *ctx) const;
+ int pointToPosition(QPointF coord, const StoryText &story) const override;
+ QLineF positionToPoint(int pos, const StoryText& story) const override;
+
+ void render(TextLayoutPainter *p) const override;
+ void render(ScreenPainter *p, ITextContext *ctx) const override;
+ void drawSelection(ScreenPainter *p, ITextContext *ctx) const override;
GlyphCluster glyphRun() const { return m_glyphRun; }
@@ -295,8 +294,8 @@
m_type = T_Object;
}
- void render(TextLayoutPainter *p) const;
- void render(ScreenPainter*, ITextContext *ctx) const;
+ void render(TextLayoutPainter *p) const override;
+ void render(ScreenPainter*, ITextContext *ctx) const override;
private:
/* const */ PageItem* m_object;
More information about the scribus-commit
mailing list