r23662 by craig - Code cleanup
scribus-commit
scribus-commit at lists.scribus.net
Sun Apr 26 20:19:15 UTC 2020
Author: craig
Date: Sun Apr 26 20:19:15 2020
New Revision: 23662
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23662
Log:
Code cleanup
Modified:
trunk/Scribus/scribus/canvasgesture.h
trunk/Scribus/scribus/canvasgesture_linemove.h
trunk/Scribus/scribus/canvasgesture_pan.h
trunk/Scribus/scribus/canvasgesture_rectselect.h
trunk/Scribus/scribus/canvasgesture_resize.h
trunk/Scribus/scribus/canvasmode_copyproperties.h
trunk/Scribus/scribus/canvasmode_drawbezier.h
trunk/Scribus/scribus/canvasmode_drawcalligraphic.h
trunk/Scribus/scribus/canvasmode_drawfreehand.h
trunk/Scribus/scribus/canvasmode_editgradient.h
trunk/Scribus/scribus/canvasmode_editmeshgradient.h
trunk/Scribus/scribus/canvasmode_editmeshpatch.h
trunk/Scribus/scribus/canvasmode_magnifier.h
trunk/Scribus/scribus/canvasmode_nodeedit.h
trunk/Scribus/scribus/canvasmode_panning.h
trunk/Scribus/scribus/canvasmode_rotate.h
trunk/Scribus/scribus/colormgmt/sclcms2colormgmtengineimpl.cpp
trunk/Scribus/scribus/fonts/scface_ps.cpp
trunk/Scribus/scribus/fonts/scfontmetrics.cpp
trunk/Scribus/scribus/pagesize.cpp
trunk/Scribus/scribus/plugins/export/pixmapexport/export.cpp
trunk/Scribus/scribus/scmimedata.cpp
trunk/Scribus/scribus/scribusapp.cpp
trunk/Scribus/scribus/scribusview.cpp
trunk/Scribus/scribus/ui/tabmanager.h
Modified: trunk/Scribus/scribus/canvasgesture.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasgesture.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture.h (original)
+++ trunk/Scribus/scribus/canvasgesture.h Sun Apr 26 20:19:15 2020
@@ -48,34 +48,34 @@
{
Q_OBJECT
-protected:
- explicit CanvasGesture (CanvasMode* parent) : CanvasMode(parent->view()), m_delegate(parent) {};
- explicit CanvasGesture (ScribusView* view) : CanvasMode(view) {};
-
-public:
- ~CanvasGesture() override = default;
- void enterEvent(QEvent * e) override { m_delegate->enterEvent(e); }
- void leaveEvent(QEvent * e) override { m_delegate->leaveEvent(e); }
+ protected:
+ explicit CanvasGesture (CanvasMode* parent) : CanvasMode(parent->view()), m_delegate(parent) {};
+ explicit CanvasGesture (ScribusView* view) : CanvasMode(view) {};
- void dragEnterEvent(QDragEnterEvent *e) override { m_delegate->dragEnterEvent(e); }
- void dragMoveEvent(QDragMoveEvent *e) override { m_delegate->dragMoveEvent(e); }
- void dragLeaveEvent(QDragLeaveEvent *e) override { m_delegate->dragLeaveEvent(e); }
- void dropEvent(QDropEvent *e) override { m_delegate->dropEvent(e); }
-
- void mouseDoubleClickEvent(QMouseEvent *m) override { m_delegate->mouseDoubleClickEvent(m); }
- void mouseReleaseEvent(QMouseEvent *m) override { m_delegate->mouseReleaseEvent(m); }
- void mouseMoveEvent(QMouseEvent *m) override { m_delegate->mouseMoveEvent(m); }
- void mousePressEvent(QMouseEvent *m) override { m_delegate->mousePressEvent(m); }
+ public:
+ ~CanvasGesture() override = default;
+ void enterEvent(QEvent * e) override { m_delegate->enterEvent(e); }
+ void leaveEvent(QEvent * e) override { m_delegate->leaveEvent(e); }
- void keyPressEvent(QKeyEvent *e) override { m_delegate->keyPressEvent(e); }
- void keyReleaseEvent(QKeyEvent *e) override { m_delegate->keyReleaseEvent(e); }
- void inputMethodEvent(QInputMethodEvent *e) override { m_delegate->inputMethodEvent(e); }
-
- CanvasMode* delegate() override { return m_delegate; }
- void setDelegate(CanvasMode* delegate) { if (delegate) m_delegate = delegate; }
-
-protected:
- CanvasMode* m_delegate {nullptr};
+ void dragEnterEvent(QDragEnterEvent *e) override { m_delegate->dragEnterEvent(e); }
+ void dragMoveEvent(QDragMoveEvent *e) override { m_delegate->dragMoveEvent(e); }
+ void dragLeaveEvent(QDragLeaveEvent *e) override { m_delegate->dragLeaveEvent(e); }
+ void dropEvent(QDropEvent *e) override { m_delegate->dropEvent(e); }
+
+ void mouseDoubleClickEvent(QMouseEvent *m) override { m_delegate->mouseDoubleClickEvent(m); }
+ void mouseReleaseEvent(QMouseEvent *m) override { m_delegate->mouseReleaseEvent(m); }
+ void mouseMoveEvent(QMouseEvent *m) override { m_delegate->mouseMoveEvent(m); }
+ void mousePressEvent(QMouseEvent *m) override { m_delegate->mousePressEvent(m); }
+
+ void keyPressEvent(QKeyEvent *e) override { m_delegate->keyPressEvent(e); }
+ void keyReleaseEvent(QKeyEvent *e) override { m_delegate->keyReleaseEvent(e); }
+ void inputMethodEvent(QInputMethodEvent *e) override { m_delegate->inputMethodEvent(e); }
+
+ CanvasMode* delegate() override { return m_delegate; }
+ void setDelegate(CanvasMode* delegate) { if (delegate) m_delegate = delegate; }
+
+ protected:
+ CanvasMode* m_delegate {nullptr};
};
Modified: trunk/Scribus/scribus/canvasgesture_linemove.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasgesture_linemove.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_linemove.h (original)
+++ trunk/Scribus/scribus/canvasgesture_linemove.h Sun Apr 26 20:19:15 2020
@@ -49,8 +49,10 @@
*/
class SCRIBUS_API LineMove : public CanvasGesture
{
+ Q_OBJECT
+
public:
- explicit LineMove (CanvasMode* parent): CanvasGesture(parent), m_haveLineItem(false), m_useOriginAsEndpoint(false), m_bounds(0,0,0,0), m_line(nullptr) {}
+ explicit LineMove (CanvasMode* parent): CanvasGesture(parent), m_bounds(0,0,0,0) {}
~LineMove() override = default;
/**
@@ -85,11 +87,11 @@
bool haveLineItem() const { return m_haveLineItem; }
private:
- bool m_haveLineItem;
- bool m_useOriginAsEndpoint;
+ bool m_haveLineItem {false};
+ bool m_useOriginAsEndpoint {false};
QRectF m_bounds;
QRectF m_initialBounds;
- PageItem* m_line;
+ PageItem* m_line {nullptr};
UndoTransaction m_transaction;
void adjustBounds(QMouseEvent* m, bool updateCanvas = true);
Modified: trunk/Scribus/scribus/canvasgesture_pan.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasgesture_pan.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_pan.h (original)
+++ trunk/Scribus/scribus/canvasgesture_pan.h Sun Apr 26 20:19:15 2020
@@ -25,21 +25,22 @@
class SCRIBUS_API PanGesture : public CanvasGesture
{
-public:
- explicit PanGesture (CanvasMode* parent);
- ~PanGesture() override = default;
-
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
+ Q_OBJECT
+ public:
+ explicit PanGesture (CanvasMode* parent);
+ ~PanGesture() override = default;
- void mousePressEvent(QMouseEvent *m) override;
- void drawControls(QPainter*) override;
-
-private:
- QCursor m_cursor;
- QPointF m_canvasRefPoint;
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+
+ void mousePressEvent(QMouseEvent *m) override;
+ void drawControls(QPainter*) override;
+
+ private:
+ QCursor m_cursor;
+ QPointF m_canvasRefPoint;
};
#endif
Modified: trunk/Scribus/scribus/canvasgesture_rectselect.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasgesture_rectselect.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_rectselect.h (original)
+++ trunk/Scribus/scribus/canvasgesture_rectselect.h Sun Apr 26 20:19:15 2020
@@ -47,33 +47,35 @@
*/
class SCRIBUS_API RectSelect : public CanvasGesture
{
-public:
- explicit RectSelect (CanvasMode* parent) : CanvasGesture(parent), m_start(0,0), m_selectionRubberBand(nullptr) {};
- ~RectSelect() override = default;
-
- void prepare(QPoint globalStartPos);
- void clear();
-
- void enterEvent(QEvent * e) override;
- void leaveEvent(QEvent * e) override;
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- /**
+ Q_OBJECT
+
+ public:
+ explicit RectSelect (CanvasMode* parent) : CanvasGesture(parent), m_start(0,0), m_selectionRubberBand(nullptr) {};
+ ~RectSelect() override = default;
+
+ void prepare(QPoint globalStartPos);
+ void clear();
+
+ void enterEvent(QEvent * e) override;
+ void leaveEvent(QEvent * e) override;
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ /**
Prepares rectangle select for the position from 'm'
*/
- void mousePressEvent(QMouseEvent *m) override;
- void drawControls(QPainter*) override;
+ void mousePressEvent(QMouseEvent *m) override;
+ void drawControls(QPainter*) override;
- QRectF result() const ;
+ QRectF result() const ;
-private:
- void setStart(QPoint globalPos);
- void setEnd(QPoint globalPos);
-
- QPoint m_start;
- SelectionRubberBand* m_selectionRubberBand;
+ private:
+ void setStart(QPoint globalPos);
+ void setEnd(QPoint globalPos);
+
+ QPoint m_start;
+ SelectionRubberBand* m_selectionRubberBand;
};
Modified: trunk/Scribus/scribus/canvasgesture_resize.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasgesture_resize.h
==============================================================================
--- trunk/Scribus/scribus/canvasgesture_resize.h (original)
+++ trunk/Scribus/scribus/canvasgesture_resize.h Sun Apr 26 20:19:15 2020
@@ -46,49 +46,51 @@
*/
class SCRIBUS_API ResizeGesture : public CanvasGesture
{
-public:
- explicit ResizeGesture (CanvasMode* parent);
- ~ResizeGesture() override = default;
-
- /**
+ Q_OBJECT
+
+ public:
+ explicit ResizeGesture (CanvasMode* parent);
+ ~ResizeGesture() override = default;
+
+ /**
Prepares the gesture for resizing the selection
*/
- void prepare(Canvas::FrameHandle framehandle = Canvas::SOUTHEAST);
- void clear();
-
- void drawControls(QPainter* p) override;
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- /**
+ void prepare(Canvas::FrameHandle framehandle = Canvas::SOUTHEAST);
+ void clear();
+
+ void drawControls(QPainter* p) override;
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ /**
This method only sets the m_handle field.
- If the correct value is set by prepare() (default = SOUTHEAST),
+ If the correct value is set by prepare() (default = SOUTHEAST),
it's not necessary to call this method.
*/
- void mousePressEvent(QMouseEvent *m) override;
-
- Canvas::FrameHandle frameHandle() const { return m_handle; }
-
-private:
- void adjustBounds(QMouseEvent *m);
- void doResize(bool scaleContent);
+ void mousePressEvent(QMouseEvent *m) override;
- FPoint applyGrid(const FPoint& docPoint);
- FPoint applyGuides(const FPoint& docPoint);
+ Canvas::FrameHandle frameHandle() const { return m_handle; }
- Canvas::FrameHandle m_handle {Canvas::INSIDE};
- QPoint m_mousePressPoint;
- QRectF m_bounds;
- QRectF m_mousePressBounds;
- QRectF m_origBounds;
- UndoTransaction m_transaction;
- double m_extraHeight {0.0};
- double m_extraWidth {0.0};
- double m_extraX {0.0};
- double m_extraY {0.0};
- double m_origRatio {1.0};
- double m_rotation {0.0};
+ private:
+ void adjustBounds(QMouseEvent *m);
+ void doResize(bool scaleContent);
+
+ FPoint applyGrid(const FPoint& docPoint);
+ FPoint applyGuides(const FPoint& docPoint);
+
+ Canvas::FrameHandle m_handle {Canvas::INSIDE};
+ QPoint m_mousePressPoint;
+ QRectF m_bounds;
+ QRectF m_mousePressBounds;
+ QRectF m_origBounds;
+ UndoTransaction m_transaction;
+ double m_extraHeight {0.0};
+ double m_extraWidth {0.0};
+ double m_extraX {0.0};
+ double m_extraY {0.0};
+ double m_origRatio {1.0};
+ double m_rotation {0.0};
};
Modified: trunk/Scribus/scribus/canvasmode_copyproperties.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_copyproperties.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_copyproperties.h (original)
+++ trunk/Scribus/scribus/canvasmode_copyproperties.h Sun Apr 26 20:19:15 2020
@@ -28,35 +28,35 @@
class CanvasMode_CopyProperties : public CanvasMode
{
-public:
- explicit CanvasMode_CopyProperties(ScribusView* view);
- ~CanvasMode_CopyProperties() override = default;
+ public:
+ explicit CanvasMode_CopyProperties(ScribusView* view);
+ ~CanvasMode_CopyProperties() override = default;
- void enterEvent(QEvent *) override ;
- void leaveEvent(QEvent *) override ;
-
- void activate(bool) override;
- void deactivate(bool) override ;
- void mouseDoubleClickEvent(QMouseEvent *m) override ;
- void mouseReleaseEvent(QMouseEvent *m) override ;
- void mouseMoveEvent(QMouseEvent *m) override ;
- void mousePressEvent(QMouseEvent *m) override ;
- void drawControls(QPainter* p) override ;
+ void enterEvent(QEvent *) override ;
+ void leaveEvent(QEvent *) override ;
-// protected:
-// void setResizeCursor(int);
+ void activate(bool) override;
+ void deactivate(bool) override ;
+ void mouseDoubleClickEvent(QMouseEvent *m) override ;
+ void mouseReleaseEvent(QMouseEvent *m) override ;
+ void mouseMoveEvent(QMouseEvent *m) override ;
+ void mousePressEvent(QMouseEvent *m) override ;
+ void drawControls(QPainter* p) override ;
-private:
- inline bool GetItem(PageItem** pi);
- bool SeleItem(QMouseEvent *m);
- void createContextMenu(PageItem *currItem, double mx, double my);
+ // protected:
+ // void setResizeCursor(int);
- int frameResizeHandle {-1};
- double Mxp {-1.0};
- double Myp {-1.0};
- double Dxp {-1.0};
- double Dyp {-1.0};
- ScribusMainWindow* m_ScMW;
+ private:
+ inline bool GetItem(PageItem** pi);
+ bool SeleItem(QMouseEvent *m);
+ void createContextMenu(PageItem *currItem, double mx, double my);
+
+ int frameResizeHandle {-1};
+ double Mxp {-1.0};
+ double Myp {-1.0};
+ double Dxp {-1.0};
+ double Dyp {-1.0};
+ ScribusMainWindow* m_ScMW;
};
Modified: trunk/Scribus/scribus/canvasmode_drawbezier.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_drawbezier.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawbezier.h (original)
+++ trunk/Scribus/scribus/canvasmode_drawbezier.h Sun Apr 26 20:19:15 2020
@@ -31,32 +31,32 @@
*/
class BezierMode : public CanvasMode
{
-public:
- explicit BezierMode(ScribusView* view);
- ~BezierMode() override = default;
+ public:
+ explicit BezierMode(ScribusView* view);
+ ~BezierMode() override = default;
- void enterEvent(QEvent *) override;
- void leaveEvent(QEvent *) override;
-
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseDoubleClickEvent(QMouseEvent *m) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- void mousePressEvent(QMouseEvent *m) override;
- void drawControls(QPainter* p) override;
+ void enterEvent(QEvent *) override;
+ void leaveEvent(QEvent *) override;
+
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseDoubleClickEvent(QMouseEvent *m) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ void mousePressEvent(QMouseEvent *m) override;
+ void drawControls(QPainter* p) override;
-private:
- inline bool GetItem(PageItem** pi);
+ private:
+ inline bool GetItem(PageItem** pi);
- void finalizeItem(PageItem* item);
- void selectPage(QMouseEvent *m);
+ void finalizeItem(PageItem* item);
+ void selectPage(QMouseEvent *m);
- bool m_inItemCreation {false};
- bool m_firstPoly {false};
- bool m_mouseButtonPressed {false};
- double m_xp {-1.0};
- double m_yp {-1.0};
+ bool m_inItemCreation {false};
+ bool m_firstPoly {false};
+ bool m_mouseButtonPressed {false};
+ double m_xp {-1.0};
+ double m_yp {-1.0};
};
Modified: trunk/Scribus/scribus/canvasmode_drawcalligraphic.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_drawcalligraphic.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawcalligraphic.h (original)
+++ trunk/Scribus/scribus/canvasmode_drawcalligraphic.h Sun Apr 26 20:19:15 2020
@@ -31,29 +31,29 @@
*/
class CalligraphicMode : public CanvasMode
{
-public:
- explicit CalligraphicMode(ScribusView* view);
- ~CalligraphicMode() override = default;
+ public:
+ explicit CalligraphicMode(ScribusView* view);
+ ~CalligraphicMode() override = default;
- void enterEvent(QEvent *) override;
- void leaveEvent(QEvent *) override;
-
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseDoubleClickEvent(QMouseEvent *m) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- void mousePressEvent(QMouseEvent *m) override;
- void drawControls(QPainter* p) override;
-
-private:
- inline bool GetItem(PageItem** pi);
- void selectPage(QMouseEvent *m);
+ void enterEvent(QEvent *) override;
+ void leaveEvent(QEvent *) override;
- FPointArray m_poly;
- bool m_mouseButtonPressed {false};
- double m_xp {-1.0};
- double m_yp {-1.0};
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseDoubleClickEvent(QMouseEvent *m) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ void mousePressEvent(QMouseEvent *m) override;
+ void drawControls(QPainter* p) override;
+
+ private:
+ inline bool GetItem(PageItem** pi);
+ void selectPage(QMouseEvent *m);
+
+ FPointArray m_poly;
+ bool m_mouseButtonPressed {false};
+ double m_xp {-1.0};
+ double m_yp {-1.0};
};
Modified: trunk/Scribus/scribus/canvasmode_drawfreehand.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_drawfreehand.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_drawfreehand.h (original)
+++ trunk/Scribus/scribus/canvasmode_drawfreehand.h Sun Apr 26 20:19:15 2020
@@ -31,29 +31,29 @@
*/
class FreehandMode : public CanvasMode
{
-public:
- explicit FreehandMode(ScribusView* view);
- ~FreehandMode() override = default;
+ public:
+ explicit FreehandMode(ScribusView* view);
+ ~FreehandMode() override = default;
- void enterEvent(QEvent *) override;
- void leaveEvent(QEvent *) override;
-
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseDoubleClickEvent(QMouseEvent *m) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- void mousePressEvent(QMouseEvent *m) override;
- void drawControls(QPainter* p) override;
-
-private:
- inline bool GetItem(PageItem** pi);
- void selectPage(QMouseEvent *m);
+ void enterEvent(QEvent *) override;
+ void leaveEvent(QEvent *) override;
- FPointArray m_poly;
- bool m_mouseButtonPressed {false};
- double m_xp {-1.0};
- double m_yp {-1.0};
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseDoubleClickEvent(QMouseEvent *m) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ void mousePressEvent(QMouseEvent *m) override;
+ void drawControls(QPainter* p) override;
+
+ private:
+ inline bool GetItem(PageItem** pi);
+ void selectPage(QMouseEvent *m);
+
+ FPointArray m_poly;
+ bool m_mouseButtonPressed {false};
+ double m_xp {-1.0};
+ double m_yp {-1.0};
};
Modified: trunk/Scribus/scribus/canvasmode_editgradient.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_editgradient.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editgradient.h (original)
+++ trunk/Scribus/scribus/canvasmode_editgradient.h Sun Apr 26 20:19:15 2020
@@ -33,76 +33,76 @@
// This class encapsulate the old code for mouse interaction from scribusview.cpp
class CanvasMode_EditGradient : public CanvasMode
-{
-public:
- explicit CanvasMode_EditGradient(ScribusView* view);
- ~CanvasMode_EditGradient() override = default;
+{
+ public:
+ explicit CanvasMode_EditGradient(ScribusView* view);
+ ~CanvasMode_EditGradient() override = default;
- void enterEvent(QEvent *) override;
- void leaveEvent(QEvent *) override;
-
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseDoubleClickEvent(QMouseEvent *m) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- void mousePressEvent(QMouseEvent *m) override;
- void drawControls(QPainter* p) override;
- void drawControlsGradientVectors(QPainter* psx, PageItem *currItem);
+ void enterEvent(QEvent *) override;
+ void leaveEvent(QEvent *) override;
-private:
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseDoubleClickEvent(QMouseEvent *m) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ void mousePressEvent(QMouseEvent *m) override;
+ void drawControls(QPainter* p) override;
+ void drawControlsGradientVectors(QPainter* psx, PageItem *currItem);
- typedef enum
- {
- noPointDefined,
- useGradientStart,
- useGradientEnd,
- useGradientFocal,
- useGradientSkew,
- useControl1,
- useControl2,
- useControl3,
- useControl4,
- useControl5
- } eGradientPoint;
+ private:
- inline bool GetItem(PageItem** pi);
+ typedef enum
+ {
+ noPointDefined,
+ useGradientStart,
+ useGradientEnd,
+ useGradientFocal,
+ useGradientSkew,
+ useControl1,
+ useControl2,
+ useControl3,
+ useControl4,
+ useControl5
+ } eGradientPoint;
+
+ inline bool GetItem(PageItem** pi);
- //save of previous state
- FPoint OldGrControl1;
- FPoint OldGrControl2;
- FPoint OldGrControl3;
- FPoint OldGrControl4;
- FPoint OldGrControl5;
- ScribusMainWindow* m_ScMW {nullptr};
- double OldGrEndX {0.0};
- double OldGrEndY {0.0};
- double OldGrFocalX {0.0};
- double OldGrFocalY {0.0};
- double OldGrMaskEndX {0.0};
- double OldGrMaskEndY {0.0};
- double OldGrMaskFocalX {0.0};
- double OldGrMaskFocalY {0.0};
- double OldGrMaskScale {0.0};
- double OldGrMaskSkew {0.0};
- double OldGrMaskStartX {0.0};
- double OldGrMaskStartY {0.0};
- double OldGrScale {0.0};
- double OldGrSkew {0.0};
- double OldGrStartX {0.0};
- double OldGrStartY {0.0};
- double OldGrStrokeEndX {0.0};
- double OldGrStrokeEndY {0.0};
- double OldGrStrokeFocalX {0.0};
- double OldGrStrokeFocalY {0.0};
- double OldGrStrokeScale {0.0};
- double OldGrStrokeSkew {0.0};
- double OldGrStrokeStartX {0.0};
- double OldGrStrokeStartY {0.0};
- double m_Mxp {-1.0};
- double m_Myp {-1.0};
- eGradientPoint m_gradientPoint {noPointDefined};
+ //save of previous state
+ FPoint OldGrControl1;
+ FPoint OldGrControl2;
+ FPoint OldGrControl3;
+ FPoint OldGrControl4;
+ FPoint OldGrControl5;
+ ScribusMainWindow* m_ScMW {nullptr};
+ double OldGrEndX {0.0};
+ double OldGrEndY {0.0};
+ double OldGrFocalX {0.0};
+ double OldGrFocalY {0.0};
+ double OldGrMaskEndX {0.0};
+ double OldGrMaskEndY {0.0};
+ double OldGrMaskFocalX {0.0};
+ double OldGrMaskFocalY {0.0};
+ double OldGrMaskScale {0.0};
+ double OldGrMaskSkew {0.0};
+ double OldGrMaskStartX {0.0};
+ double OldGrMaskStartY {0.0};
+ double OldGrScale {0.0};
+ double OldGrSkew {0.0};
+ double OldGrStartX {0.0};
+ double OldGrStartY {0.0};
+ double OldGrStrokeEndX {0.0};
+ double OldGrStrokeEndY {0.0};
+ double OldGrStrokeFocalX {0.0};
+ double OldGrStrokeFocalY {0.0};
+ double OldGrStrokeScale {0.0};
+ double OldGrStrokeSkew {0.0};
+ double OldGrStrokeStartX {0.0};
+ double OldGrStrokeStartY {0.0};
+ double m_Mxp {-1.0};
+ double m_Myp {-1.0};
+ eGradientPoint m_gradientPoint {noPointDefined};
};
Modified: trunk/Scribus/scribus/canvasmode_editmeshgradient.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_editmeshgradient.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshgradient.h (original)
+++ trunk/Scribus/scribus/canvasmode_editmeshgradient.h Sun Apr 26 20:19:15 2020
@@ -39,45 +39,45 @@
// This class encapsulate the old code for mouse interaction from scribusview.cpp
class CanvasMode_EditMeshGradient : public CanvasMode
-{
-public:
- explicit CanvasMode_EditMeshGradient(ScribusView* view);
- ~CanvasMode_EditMeshGradient() override;
+{
+ public:
+ explicit CanvasMode_EditMeshGradient(ScribusView* view);
+ ~CanvasMode_EditMeshGradient() override;
- void enterEvent(QEvent *) override;
- void leaveEvent(QEvent *) override;
-
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseDoubleClickEvent(QMouseEvent *m) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- void mousePressEvent(QMouseEvent *m) override;
- void keyPressEvent(QKeyEvent *e) override;
- bool handleKeyEvents() const override { return true; }
- void drawControls(QPainter* p) override;
- void drawControlsMeshGradient(QPainter* psx, PageItem* currItem);
+ void enterEvent(QEvent *) override;
+ void leaveEvent(QEvent *) override;
-private:
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseDoubleClickEvent(QMouseEvent *m) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ void mousePressEvent(QMouseEvent *m) override;
+ void keyPressEvent(QKeyEvent *e) override;
+ bool handleKeyEvents() const override { return true; }
+ void drawControls(QPainter* p) override;
+ void drawControlsMeshGradient(QPainter* psx, PageItem* currItem);
- typedef enum
- {
- noPointDefined,
- useControlT,
- useControlB,
- useControlL,
- useControlR
- } eMGradientPoint;
+ private:
- inline bool GetItem(PageItem** pi);
+ typedef enum
+ {
+ noPointDefined,
+ useControlT,
+ useControlB,
+ useControlL,
+ useControlR
+ } eMGradientPoint;
- MeshPoint *m_old_mesh {nullptr};
- QList<QPair<int, int> > m_selectedMeshPoints;
- ScribusMainWindow* m_ScMW {nullptr};
- bool m_keyRepeat {false};
- double m_Mxp {-1.0};
- double m_Myp {-1.0};
- eMGradientPoint m_gradientPoint {noPointDefined};
+ inline bool GetItem(PageItem** pi);
+
+ MeshPoint *m_old_mesh {nullptr};
+ QList<QPair<int, int> > m_selectedMeshPoints;
+ ScribusMainWindow* m_ScMW {nullptr};
+ bool m_keyRepeat {false};
+ double m_Mxp {-1.0};
+ double m_Myp {-1.0};
+ eMGradientPoint m_gradientPoint {noPointDefined};
};
Modified: trunk/Scribus/scribus/canvasmode_editmeshpatch.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_editmeshpatch.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_editmeshpatch.h (original)
+++ trunk/Scribus/scribus/canvasmode_editmeshpatch.h Sun Apr 26 20:19:15 2020
@@ -41,59 +41,59 @@
class CanvasMode_EditMeshPatch : public CanvasMode
{
-public:
- explicit CanvasMode_EditMeshPatch(ScribusView* view);
- ~CanvasMode_EditMeshPatch() override;
+ public:
+ explicit CanvasMode_EditMeshPatch(ScribusView* view);
+ ~CanvasMode_EditMeshPatch() override;
- void enterEvent(QEvent *) override;
- void leaveEvent(QEvent *) override;
+ void enterEvent(QEvent *) override;
+ void leaveEvent(QEvent *) override;
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseDoubleClickEvent(QMouseEvent *m) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- void mousePressEvent(QMouseEvent *m) override;
- void keyPressEvent(QKeyEvent *e) override;
- bool handleKeyEvents() const override { return true; }
- void drawControls(QPainter* p) override;
- void drawControlsMeshPoint(QPainter* psx, const MeshPoint& mp, bool isSelected);
- void drawControlsMeshPatch(QPainter* psx, PageItem* currItem);
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseDoubleClickEvent(QMouseEvent *m) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ void mousePressEvent(QMouseEvent *m) override;
+ void keyPressEvent(QKeyEvent *e) override;
+ bool handleKeyEvents() const override { return true; }
+ void drawControls(QPainter* p) override;
+ void drawControlsMeshPoint(QPainter* psx, const MeshPoint& mp, bool isSelected);
+ void drawControlsMeshPatch(QPainter* psx, PageItem* currItem);
-private:
- void snapToOtherPatch(double &x, double &y);
- typedef enum
- {
- noPointDefined,
- useTL,
- useTR,
- useBR,
- useBL
- } eMPatchPoint;
+ private:
+ void snapToOtherPatch(double &x, double &y);
+ typedef enum
+ {
+ noPointDefined,
+ useTL,
+ useTR,
+ useBR,
+ useBL
+ } eMPatchPoint;
- typedef enum
- {
- noControlPointDefined,
- useControlT,
- useControlB,
- useControlL,
- useControlR,
- useControlC
- } eMGradientPoint;
+ typedef enum
+ {
+ noControlPointDefined,
+ useControlT,
+ useControlB,
+ useControlL,
+ useControlR,
+ useControlC
+ } eMGradientPoint;
- inline bool GetItem(PageItem** pi);
+ inline bool GetItem(PageItem** pi);
- MeshPoint* m_old_mesh {nullptr};
- PageItem *m_currItem {nullptr};
- QPointF m_currentPoint;
- QPolygonF m_clickPointPolygon;
- ScribusMainWindow* m_ScMW {nullptr};
- bool m_keyRepeat {false};
- double m_Mxp {-1.0};
- double m_Myp {-1.0};
- eMGradientPoint m_gradientPoint {noControlPointDefined};
- eMPatchPoint m_patchPoint {noPointDefined};
- int m_click_count {0};
+ MeshPoint* m_old_mesh {nullptr};
+ PageItem *m_currItem {nullptr};
+ QPointF m_currentPoint;
+ QPolygonF m_clickPointPolygon;
+ ScribusMainWindow* m_ScMW {nullptr};
+ bool m_keyRepeat {false};
+ double m_Mxp {-1.0};
+ double m_Myp {-1.0};
+ eMGradientPoint m_gradientPoint {noControlPointDefined};
+ eMPatchPoint m_patchPoint {noPointDefined};
+ int m_click_count {0};
};
#endif
Modified: trunk/Scribus/scribus/canvasmode_magnifier.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_magnifier.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_magnifier.h (original)
+++ trunk/Scribus/scribus/canvasmode_magnifier.h Sun Apr 26 20:19:15 2020
@@ -36,31 +36,30 @@
class CanvasMode_Magnifier : public CanvasMode
{
-public:
- explicit CanvasMode_Magnifier(ScribusView* view);
- ~CanvasMode_Magnifier() override = default;
+ public:
+ explicit CanvasMode_Magnifier(ScribusView* view);
+ ~CanvasMode_Magnifier() override = default;
- void enterEvent(QEvent *) override;
- void leaveEvent(QEvent *) override;
-
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseDoubleClickEvent(QMouseEvent *m) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- void mousePressEvent(QMouseEvent *m) override;
- void drawControls(QPainter* p) override;
+ void enterEvent(QEvent *) override;
+ void leaveEvent(QEvent *) override;
-// protected:
-// void setResizeCursor(int);
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseDoubleClickEvent(QMouseEvent *m) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ void mousePressEvent(QMouseEvent *m) override;
+ void drawControls(QPainter* p) override;
-private:
+ // protected:
+ // void setResizeCursor(int);
- double m_Mxp {-1.0};
- double m_Myp {-1.0};
- double m_SeRx {0.0};
- double m_SeRy {0.0};
- bool m_lastPosWasOverGuide {false};
+ private:
+ double m_Mxp {-1.0};
+ double m_Myp {-1.0};
+ double m_SeRx {0.0};
+ double m_SeRy {0.0};
+ bool m_lastPosWasOverGuide {false};
};
Modified: trunk/Scribus/scribus/canvasmode_nodeedit.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_nodeedit.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_nodeedit.h (original)
+++ trunk/Scribus/scribus/canvasmode_nodeedit.h Sun Apr 26 20:19:15 2020
@@ -31,48 +31,48 @@
class SCRIBUS_API CanvasMode_NodeEdit : public CanvasMode
{
-public:
- explicit CanvasMode_NodeEdit (ScribusView* view);
- ~CanvasMode_NodeEdit() override = default;
-
- void activate(bool fromgesture) override;
- void deactivate(bool forGesture) override;
-
- void enterEvent(QEvent *) override;
- void leaveEvent(QEvent *) override;
-
- void mouseDoubleClickEvent(QMouseEvent *m) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- void mousePressEvent(QMouseEvent *m) override;
+ public:
+ explicit CanvasMode_NodeEdit (ScribusView* view);
+ ~CanvasMode_NodeEdit() override = default;
- void keyPressEvent(QKeyEvent *e) override;
- void keyReleaseEvent(QKeyEvent *e) override;
+ void activate(bool fromgesture) override;
+ void deactivate(bool forGesture) override;
- bool handleKeyEvents() const override { return true; }
+ void enterEvent(QEvent *) override;
+ void leaveEvent(QEvent *) override;
- /**
+ void mouseDoubleClickEvent(QMouseEvent *m) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ void mousePressEvent(QMouseEvent *m) override;
+
+ void keyPressEvent(QKeyEvent *e) override;
+ void keyReleaseEvent(QKeyEvent *e) override;
+
+ bool handleKeyEvents() const override { return true; }
+
+ /**
Draws the controls for this mode
*/
- void drawControls(QPainter* p) override;
-
-private:
- inline bool GetItem(PageItem** pi);
- void handleNodeEditPress(QMouseEvent*, QRect);
- void handleNodeEditDrag(QMouseEvent*, PageItem*);
- bool handleNodeEditMove(QMouseEvent*, QRect, PageItem*, const QTransform&);
-
- ScribusMainWindow* m_ScMW;
-
- RectSelect* m_rectangleSelect {nullptr};
- int m_Mxp {-1}; // last mouse position
- int m_Myp {-1};
- int m_Dxp {-1}; // last mouse press position for rectangle select
- int m_Dyp {-1};
- int m_GxM {-1}; // guide position
- int m_GyM {-1};
- bool m_MoveGX {false};
- bool m_MoveGY {false};
+ void drawControls(QPainter* p) override;
+
+ private:
+ inline bool GetItem(PageItem** pi);
+ void handleNodeEditPress(QMouseEvent*, QRect);
+ void handleNodeEditDrag(QMouseEvent*, PageItem*);
+ bool handleNodeEditMove(QMouseEvent*, QRect, PageItem*, const QTransform&);
+
+ ScribusMainWindow* m_ScMW;
+
+ RectSelect* m_rectangleSelect {nullptr};
+ int m_Mxp {-1}; // last mouse position
+ int m_Myp {-1};
+ int m_Dxp {-1}; // last mouse press position for rectangle select
+ int m_Dyp {-1};
+ int m_GxM {-1}; // guide position
+ int m_GyM {-1};
+ bool m_MoveGX {false};
+ bool m_MoveGY {false};
};
Modified: trunk/Scribus/scribus/canvasmode_panning.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_panning.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_panning.h (original)
+++ trunk/Scribus/scribus/canvasmode_panning.h Sun Apr 26 20:19:15 2020
@@ -33,18 +33,18 @@
class CanvasMode_Panning : public CanvasMode
{
-public:
- explicit CanvasMode_Panning(ScribusView* view);
- ~CanvasMode_Panning() override = default;
+ public:
+ explicit CanvasMode_Panning(ScribusView* view);
+ ~CanvasMode_Panning() override = default;
- void enterEvent(QEvent *) override;
- void leaveEvent(QEvent *) override;
-
- void activate(bool) override;
- void deactivate(bool) override;
- void mouseDoubleClickEvent(QMouseEvent *m) override;
- void mousePressEvent(QMouseEvent *m) override;
- void drawControls(QPainter* p) override;
+ void enterEvent(QEvent *) override;
+ void leaveEvent(QEvent *) override;
+
+ void activate(bool) override;
+ void deactivate(bool) override;
+ void mouseDoubleClickEvent(QMouseEvent *m) override;
+ void mousePressEvent(QMouseEvent *m) override;
+ void drawControls(QPainter* p) override;
};
Modified: trunk/Scribus/scribus/canvasmode_rotate.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/canvasmode_rotate.h
==============================================================================
--- trunk/Scribus/scribus/canvasmode_rotate.h (original)
+++ trunk/Scribus/scribus/canvasmode_rotate.h Sun Apr 26 20:19:15 2020
@@ -34,42 +34,42 @@
class SCRIBUS_API CanvasMode_Rotate : public CanvasMode
{
-public:
- explicit CanvasMode_Rotate(ScribusView* view);
- ~CanvasMode_Rotate() override = default;
+ public:
+ explicit CanvasMode_Rotate(ScribusView* view);
+ ~CanvasMode_Rotate() override = default;
- void enterEvent(QEvent *) override;
- void leaveEvent(QEvent *) override;
+ void enterEvent(QEvent *) override;
+ void leaveEvent(QEvent *) override;
- void drawControls(QPainter* p) override;
- void activate(bool) override;
- void deactivate(bool) override;
+ void drawControls(QPainter* p) override;
+ void activate(bool) override;
+ void deactivate(bool) override;
- void mousePressEvent(QMouseEvent *m) override;
- void mouseReleaseEvent(QMouseEvent *m) override;
- void mouseMoveEvent(QMouseEvent *m) override;
- void keyReleaseEvent(QKeyEvent *e) override;
- void keyPressEvent(QKeyEvent *e) override;
+ void mousePressEvent(QMouseEvent *m) override;
+ void mouseReleaseEvent(QMouseEvent *m) override;
+ void mouseMoveEvent(QMouseEvent *m) override;
+ void keyReleaseEvent(QKeyEvent *e) override;
+ void keyPressEvent(QKeyEvent *e) override;
- bool handleKeyEvents() const override { return true; }
+ bool handleKeyEvents() const override { return true; }
-private:
- inline bool GetItem(PageItem** pi);
-
- void createContextMenu(PageItem *currItem, double mx, double my);
- void drawItemOutlines(QPainter*);
- void getNewItemPosition(PageItem* item, FPoint& pos, double& rotation);
-// void setResizeCursor(int how);
+ private:
+ inline bool GetItem(PageItem** pi);
- FPoint m_canvasCurrCoord;
- FPoint m_canvasPressCoord;
- FPoint m_oldRotCenter;
- FPoint m_rotCenter;
- bool m_angleConstrained {false};
- bool m_inItemRotation {false};
- double m_startAngle {0.0};
- int m_oldRotMode {0};
- int m_rotMode {0};
+ void createContextMenu(PageItem *currItem, double mx, double my);
+ void drawItemOutlines(QPainter*);
+ void getNewItemPosition(PageItem* item, FPoint& pos, double& rotation);
+ // void setResizeCursor(int how);
+
+ FPoint m_canvasCurrCoord;
+ FPoint m_canvasPressCoord;
+ FPoint m_oldRotCenter;
+ FPoint m_rotCenter;
+ bool m_angleConstrained {false};
+ bool m_inItemRotation {false};
+ double m_startAngle {0.0};
+ int m_oldRotMode {0};
+ int m_rotMode {0};
};
#endif
Modified: trunk/Scribus/scribus/colormgmt/sclcms2colormgmtengineimpl.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/colormgmt/sclcms2colormgmtengineimpl.cpp
==============================================================================
--- trunk/Scribus/scribus/colormgmt/sclcms2colormgmtengineimpl.cpp (original)
+++ trunk/Scribus/scribus/colormgmt/sclcms2colormgmtengineimpl.cpp Sun Apr 26 20:19:15 2020
@@ -153,7 +153,7 @@
ScLcms2ColorProfileImpl* profData = new ScLcms2ColorProfileImpl(engine, lcmsProf);
profData->m_profileData = data;
profData->m_profilePath = filePath;
- profile = ScColorProfile(dynamic_cast<ScColorProfileData*>(profData));
+ profile = ScColorProfile(profData);
m_profileCache->addProfile(profile);
}
if (profile.isNull() && lcmsProf)
@@ -178,7 +178,7 @@
if (!desc.isEmpty())
profData->m_profilePath = QString("memprofile://%1").arg(desc);
profData->m_profileData = data;
- profile = ScColorProfile(dynamic_cast<ScColorProfileData*>(profData));
+ profile = ScColorProfile(profData);
}
if (profile.isNull() && lcmsProf)
{
@@ -299,7 +299,7 @@
{
ScLcms2ColorTransformImpl* newTrans = new ScLcms2ColorTransformImpl(engine, hTransform);
newTrans->setTransformInfo(transInfo);
- transform = ScColorTransform(dynamic_cast<ScColorTransformData*>(newTrans));
+ transform = ScColorTransform(newTrans);
m_transformPool->addTransform(transform, true);
}
}
@@ -368,7 +368,7 @@
{
ScLcms2ColorTransformImpl* newTrans = new ScLcms2ColorTransformImpl(engine, hTransform);
newTrans->setTransformInfo(transInfo);
- transform = ScColorTransform(dynamic_cast<ScColorTransformData*>(newTrans));
+ transform = ScColorTransform(newTrans);
m_transformPool->addTransform(transform, true);
}
}
@@ -402,7 +402,7 @@
{
ScLcms2ColorTransformImpl* newTrans = new ScLcms2ColorTransformImpl(engine, hTransform);
newTrans->setTransformInfo(transInfo);
- transform = ScColorTransform(dynamic_cast<ScColorTransformData*>(newTrans));
+ transform = ScColorTransform(newTrans);
m_transformPool->addTransform(transform, true);
}
}
Modified: trunk/Scribus/scribus/fonts/scface_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/fonts/scface_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/scface_ps.cpp (original)
+++ trunk/Scribus/scribus/fonts/scface_ps.cpp Sun Apr 26 20:19:15 2020
@@ -240,7 +240,6 @@
str += bb[j];
}
str += "\n";
- cxxc = 0;
return true;
}
else
Modified: trunk/Scribus/scribus/fonts/scfontmetrics.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/fonts/scfontmetrics.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/scfontmetrics.cpp (original)
+++ trunk/Scribus/scribus/fonts/scfontmetrics.cpp Sun Apr 26 20:19:15 2020
@@ -249,8 +249,7 @@
// m_height = (face->bbox.yMax - face->bbox.yMin) / uniEM;
int h = qRound(m_height * s) + 1;
- qreal a = m_descent * s + 1;
- a = 0;
+ qreal a = 0;//m_descent * s + 1;
int w = qRound((face->bbox.xMax - face->bbox.xMin) / uniEM) * s * (ts.length()+1);
if (w < 1)
w = s * (ts.length()+1);
Modified: trunk/Scribus/scribus/pagesize.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/pagesize.cpp
==============================================================================
--- trunk/Scribus/scribus/pagesize.cpp (original)
+++ trunk/Scribus/scribus/pagesize.cpp Sun Apr 26 20:19:15 2020
@@ -177,13 +177,13 @@
};
*/
- double width, height, tmp;
+// double width, height, tmp;
int format;
QString name;
struct PageSizeInfo info;
/* A series */
- width = floor(1000.0 / sqrt(sqrt(2.0)) + 0.5);
- height = floor(sqrt(sqrt(2.0))*1000.0 + 0.5);
+// width = floor(1000.0 / sqrt(sqrt(2.0)) + 0.5);
+// height = floor(sqrt(sqrt(2.0))*1000.0 + 0.5);
//4A0
info.width = mm2pts(1682.0);
info.height = mm2pts(2378.0);
@@ -289,9 +289,11 @@
}
*/
/* PA series */
- width = 840;
- height = 1120;
- for (format = 0; format <= 10; format++) {
+ double tmp;
+ double width = 840;
+ double height = 1120;
+ for (format = 0; format <= 10; format++)
+ {
info.width=mm2pts(width);
info.height=mm2pts(height);
info.pageUnitIndex=SC_MM;
Modified: trunk/Scribus/scribus/plugins/export/pixmapexport/export.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/plugins/export/pixmapexport/export.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/export/pixmapexport/export.cpp (original)
+++ trunk/Scribus/scribus/plugins/export/pixmapexport/export.cpp Sun Apr 26 20:19:15 2020
@@ -37,7 +37,7 @@
void scribusexportpixmap_freePlugin(ScPlugin* plugin)
{
- PixmapExportPlugin* plug = dynamic_cast<PixmapExportPlugin*>(plugin);
+ PixmapExportPlugin* plug = qobject_cast<PixmapExportPlugin*>(plugin);
Q_ASSERT(plug);
delete plug;
}
Modified: trunk/Scribus/scribus/scmimedata.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/scmimedata.cpp
==============================================================================
--- trunk/Scribus/scribus/scmimedata.cpp (original)
+++ trunk/Scribus/scribus/scmimedata.cpp Sun Apr 26 20:19:15 2020
@@ -130,7 +130,7 @@
QString ScMimeData::clipboardScribusElem()
{
const QMimeData* mimeData = QApplication::clipboard()->mimeData();
- const ScElemMimeData* elemData = dynamic_cast<const ScElemMimeData*>(mimeData);
+ const ScElemMimeData* elemData = qobject_cast<const ScElemMimeData*>(mimeData);
if (elemData)
return elemData->scribusElem();
QByteArray data = QApplication::clipboard()->mimeData()->data(ScribusElemMimeType);
Modified: trunk/Scribus/scribus/scribusapp.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/scribusapp.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusapp.cpp (original)
+++ trunk/Scribus/scribus/scribusapp.cpp Sun Apr 26 20:19:15 2020
@@ -281,7 +281,7 @@
}
else
{ //argument is not a known option, but either positional parameter or invalid.
- if (arg.left(1) == "-")
+ if (arg.at(0) == "-")
{
std::cout << tr("Invalid argument: %1").arg(arg).toLocal8Bit().data() << std::endl;
std::exit(EXIT_FAILURE);
Modified: trunk/Scribus/scribus/scribusview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/scribusview.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusview.cpp (original)
+++ trunk/Scribus/scribus/scribusview.cpp Sun Apr 26 20:19:15 2020
@@ -385,7 +385,7 @@
bool ScribusView::handleObjectImport(QMimeData* mimeData, TransactionSettings* trSettings)
{
requestMode(modeImportObject);
- CanvasMode_ObjImport* objImport = dynamic_cast<CanvasMode_ObjImport*>(m_canvasMode);
+ CanvasMode_ObjImport* objImport = qobject_cast<CanvasMode_ObjImport*>(m_canvasMode);
if (objImport)
{
objImport->setMimeData(mimeData);
@@ -632,7 +632,7 @@
{
QString text;
bool /* dataFound = false, */ fromFile = false;
- const ScElemMimeData* elemData = dynamic_cast<const ScElemMimeData*>(e->mimeData());
+ const ScElemMimeData* elemData = qobject_cast<const ScElemMimeData*>(e->mimeData());
if (elemData)
text = elemData->scribusElem();
else if (e->mimeData()->hasUrls())
@@ -858,7 +858,7 @@
}
else if (e->mimeData()->hasFormat("application/x-scribus-elem"))
{
- const ScElemMimeData* scMimeData = dynamic_cast<const ScElemMimeData*>(e->mimeData());
+ const ScElemMimeData* scMimeData = qobject_cast<const ScElemMimeData*>(e->mimeData());
if (scMimeData)
text = scMimeData->scribusElem();
}
Modified: trunk/Scribus/scribus/ui/tabmanager.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23662&path=/trunk/Scribus/scribus/ui/tabmanager.h
==============================================================================
--- trunk/Scribus/scribus/ui/tabmanager.h (original)
+++ trunk/Scribus/scribus/ui/tabmanager.h Sun Apr 26 20:19:15 2020
@@ -25,10 +25,10 @@
TabManager( QWidget* parent, int dEin, QList<ParagraphStyle::TabRecord> inTab, double wid);
~TabManager() = default;
+ QList<ParagraphStyle::TabRecord> tabList() const;
+
public slots:
void exitOK();
-
- QList<ParagraphStyle::TabRecord> tabList() const;
void setTabList(const QList<ParagraphStyle::TabRecord>& tabList);
private:
More information about the scribus-commit
mailing list