Commit a53e3315 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECL_OVERRIDE

parent 3b5a0865
......@@ -45,7 +45,7 @@ public:
virtual ~kpEffectBalanceCommand ();
protected:
virtual kpImage applyEffect (const kpImage &image);
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
protected:
int m_channels;
......
......@@ -47,7 +47,7 @@ public:
static QString nameForType (kpEffectBlurSharpen::Type type);
protected:
virtual kpImage applyEffect (const kpImage &image);
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
protected:
kpEffectBlurSharpen::Type m_type;
......
......@@ -44,12 +44,12 @@ public:
kpCommandEnvironment *environ);
virtual ~kpEffectClearCommand ();
virtual QString name () const;
QString name () const Q_DECL_OVERRIDE;
virtual SizeType size () const;
SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
bool m_actOnSelection;
......
......@@ -44,12 +44,12 @@ public:
kpCommandEnvironment *environ);
virtual ~kpEffectCommandBase ();
virtual QString name () const;
virtual SizeType size () const;
QString name () const Q_DECL_OVERRIDE;
SizeType size () const Q_DECL_OVERRIDE;
public:
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
public:
// Return true if applyEffect(applyEffect(image)) == image
......
......@@ -43,7 +43,7 @@ public:
virtual ~kpEffectEmbossCommand ();
protected:
virtual kpImage applyEffect (const kpImage &image);
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
protected:
int m_strength;
......
......@@ -50,7 +50,7 @@ public:
//
protected:
virtual kpImage applyEffect (const kpImage &image);
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
QColor m_color1, m_color2;
};
......
......@@ -47,10 +47,10 @@ public:
//
public:
virtual bool isInvertible () const { return false; }
bool isInvertible () const Q_DECL_OVERRIDE { return false; }
protected:
virtual kpImage applyEffect (const kpImage &image);
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
};
......
......@@ -41,7 +41,7 @@ public:
kpCommandEnvironment *environ);
protected:
virtual kpImage applyEffect (const kpImage &image);
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
protected:
double m_hue, m_saturation, m_value;
......
......@@ -51,10 +51,10 @@ public:
//
public:
virtual bool isInvertible () const { return true; }
bool isInvertible () const Q_DECL_OVERRIDE { return true; }
protected:
virtual kpImage applyEffect (const kpImage &image);
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
int m_channels;
};
......
......@@ -49,7 +49,7 @@ public:
//
protected:
virtual kpImage applyEffect (const kpImage &image);
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
int m_depth;
bool m_dither;
......
......@@ -43,7 +43,7 @@ public:
virtual ~kpEffectToneEnhanceCommand ();
protected:
virtual kpImage applyEffect (const kpImage &image);
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
protected:
double m_granularity, m_amount;
......
......@@ -44,11 +44,11 @@ public:
kpCommandEnvironment *environ);
virtual ~kpDocumentMetaInfoCommand ();
virtual SizeType size () const;
SizeType size () const Q_DECL_OVERRIDE;
public:
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
struct kpDocumentMetaInfoCommandPrivate * const d;
......
......@@ -42,12 +42,12 @@ public:
virtual ~kpTransformFlipCommand ();
virtual QString name () const;
QString name () const Q_DECL_OVERRIDE;
virtual SizeType size () const;
SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
void flip ();
......
......@@ -59,8 +59,8 @@ public:
kpCommandEnvironment *environ);
virtual ~kpTransformResizeScaleCommand ();
virtual QString name () const;
virtual SizeType size () const;
QString name () const Q_DECL_OVERRIDE;
SizeType size () const Q_DECL_OVERRIDE;
public:
int newWidth () const;
......@@ -79,8 +79,8 @@ private:
void scaleSelectionRegionWithDocument ();
public:
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
protected:
bool m_actOnSelection;
......
......@@ -46,12 +46,12 @@ public:
kpCommandEnvironment *environ);
virtual ~kpTransformRotateCommand ();
virtual QString name () const;
QString name () const Q_DECL_OVERRIDE;
virtual SizeType size () const;
SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
bool m_actOnSelection;
......
......@@ -46,12 +46,12 @@ public:
kpCommandEnvironment *environ);
virtual ~kpTransformSkewCommand ();
virtual QString name () const;
QString name () const Q_DECL_OVERRIDE;
virtual SizeType size () const;
SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
bool m_actOnSelection;
......
......@@ -94,8 +94,8 @@ public:
bool execute = true);
public slots:
virtual void undo ();
virtual void redo ();
void undo () Q_DECL_OVERRIDE;
void redo () Q_DECL_OVERRIDE;
protected:
kpMainWindow *m_mainWindow;
......
......@@ -46,10 +46,10 @@ public:
// kpCommand Interface
//
virtual SizeType size () const;
SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
//
......
......@@ -40,7 +40,7 @@ class kpNamedCommand : public kpCommand
public:
kpNamedCommand (const QString &name, kpCommandEnvironment *environ);
virtual QString name () const;
QString name () const Q_DECL_OVERRIDE;
protected:
QString m_name;
......
......@@ -43,10 +43,10 @@ public:
kpToolFlowCommand (const QString &name, kpCommandEnvironment *environ);
virtual ~kpToolFlowCommand ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
// interface for kpToolFlowBase
void updateBoundingRect (const QPoint &point);
......
......@@ -42,12 +42,12 @@ public:
kpCommandEnvironment *environ);
virtual ~kpToolColorPickerCommand ();
virtual QString name () const;
QString name () const Q_DECL_OVERRIDE;
virtual SizeType size () const;
SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
int m_mouseButton;
......
......@@ -48,17 +48,17 @@ public:
kpCommandEnvironment *environ);
virtual ~kpToolFloodFillCommand ();
virtual QString name () const;
QString name () const Q_DECL_OVERRIDE;
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
// Optimization hack: filling a fresh, unmodified document does not require
// reading any pixels - just set the whole document to
// <color>.
void setFillEntireImage (bool yes = true);
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
kpToolFloodFillCommandPrivate * const d;
......
......@@ -54,10 +54,10 @@ public:
kpCommandEnvironment *environ);
virtual ~kpToolPolygonalCommand ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
struct kpToolPolygonalCommandPrivate * const d;
......
......@@ -48,10 +48,10 @@ public:
kpCommandEnvironment *environ);
virtual ~kpToolRectangularCommand ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
struct kpToolRectangularCommandPrivate * const d;
......
......@@ -57,7 +57,7 @@ public:
kpCommandEnvironment *environ);
virtual ~kpAbstractSelectionContentCommand ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
// Note: Returned pointer is only valid for as long as this command is
// alive.
......
......@@ -43,10 +43,10 @@ public:
kpCommandEnvironment *environ);
virtual ~kpToolImageSelectionTransparencyCommand ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
kpImageSelectionTransparency m_st, m_oldST;
......
......@@ -45,13 +45,13 @@ public:
kpCommandEnvironment *environ);
virtual ~kpToolSelectionCreateCommand ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
const kpAbstractSelection *fromSelection () const;
void setFromSelection (const kpAbstractSelection &fromSelection);
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
kpAbstractSelection *m_fromSelection;
......
......@@ -44,10 +44,10 @@ public:
kpCommandEnvironment *environ);
virtual ~kpToolSelectionDestroyCommand ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
bool m_pushOntoDocument;
......
......@@ -49,10 +49,10 @@ public:
kpAbstractSelection *originalSelectionClone () const;
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
void moveTo (const QPoint &point, bool moveLater = false);
void moveTo (int x, int y, bool moveLater = false);
......
......@@ -48,8 +48,8 @@ public:
kpCommandEnvironment *environ);
virtual ~kpToolSelectionPullFromDocumentCommand ();
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
private:
kpColor m_backgroundColor;
......
......@@ -60,7 +60,7 @@ public:
kpToolSelectionResizeScaleCommand (kpCommandEnvironment *environ);
virtual ~kpToolSelectionResizeScaleCommand ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
public:
const kpAbstractSelection *originalSelection () const;
......@@ -91,8 +91,8 @@ public:
void finalize ();
public:
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
protected:
kpAbstractSelection *m_originalSelectionPtr;
......
......@@ -49,10 +49,10 @@ public:
void addBackspace ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
protected:
int m_row, m_col;
......
......@@ -42,10 +42,10 @@ public:
kpCommandEnvironment *environ);
virtual ~kpToolTextChangeStyleCommand ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
protected:
kpTextStyle m_newTextStyle, m_oldTextStyle;
......
......@@ -49,10 +49,10 @@ public:
void addDelete ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
protected:
int m_row, m_col;
......
......@@ -49,10 +49,10 @@ public:
void addEnter ();
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
protected:
int m_row, m_col;
......
......@@ -51,8 +51,8 @@ public:
kpCommandEnvironment *environ);
virtual ~kpToolTextGiveContentCommand ();
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
};
......
......@@ -42,10 +42,10 @@ public:
void addText (const QString &moreText);
virtual kpCommandSize::SizeType size () const;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
virtual void execute ();
virtual void unexecute ();
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
protected:
int m_row, m_col;
......
......@@ -56,13 +56,13 @@ public:
int defaultSelectedEffect = 0);
virtual ~kpEffectsDialog ();
virtual bool isNoOp () const;
bool isNoOp () const Q_DECL_OVERRIDE;
kpEffectCommandBase *createCommand () const;
protected:
virtual QSize newDimensions () const;
virtual QImage transformPixmap (const QImage &pixmap,
int targetWidth, int targetHeight) const;
QSize newDimensions () const Q_DECL_OVERRIDE;
QImage transformPixmap (const QImage &pixmap,
int targetWidth, int targetHeight) const Q_DECL_OVERRIDE;
public:
int selectedEffect () const;
......@@ -70,8 +70,8 @@ public slots:
void selectEffect (int which);
protected slots:
virtual void slotUpdate ();
virtual void slotUpdateWithWaitCursor ();
void slotUpdate () Q_DECL_OVERRIDE;
void slotUpdateWithWaitCursor () Q_DECL_OVERRIDE;
void slotDelayedUpdate ();
......
......@@ -104,7 +104,7 @@ private slots:
void slotFieldsAddRowButtonClicked ();
void slotFieldsDeleteRowButtonClicked ();