diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-14 22:45:10 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2018-06-18 12:27:00 +0000 |
| commit | 7654fc11a6442e6ee2a463d6dee6458c0f53768f (patch) | |
| tree | 7eb16a57b879747842bb0401dfee7fb47cd16f95 /src/ui/tool | |
| parent | Fix build issue caused by f09962028d017896279b717a6621a4de772d1b4f on GTK+ <3... (diff) | |
| download | inkscape-7654fc11a6442e6ee2a463d6dee6458c0f53768f.tar.gz inkscape-7654fc11a6442e6ee2a463d6dee6458c0f53768f.zip | |
Run clang-tidy’s modernize-use-override pass.
This adds the override specifier on all methods which override a virtual
method, whether they were already virtual or missing this specifier.
Diffstat (limited to '')
37 files changed, 209 insertions, 209 deletions
diff --git a/src/ui/tool/control-point-selection.h b/src/ui/tool/control-point-selection.h index d0cfce8d2..ca00800c0 100644 --- a/src/ui/tool/control-point-selection.h +++ b/src/ui/tool/control-point-selection.h @@ -41,7 +41,7 @@ namespace UI { class ControlPointSelection : public Manipulator, public sigc::trackable { public: ControlPointSelection(SPDesktop *d, SPCanvasGroup *th_group); - ~ControlPointSelection(); + ~ControlPointSelection() override; typedef INK_UNORDERED_SET<SelectableControlPoint *> set_type; typedef set_type Set; // convenience alias @@ -91,7 +91,7 @@ public: void invertSelection(); void spatialGrow(SelectableControlPoint *origin, int dir); - virtual bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *); + bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *) override; void transform(Geom::Affine const &m); void align(Geom::Dim2 d); diff --git a/src/ui/tool/curve-drag-point.h b/src/ui/tool/curve-drag-point.h index c1d40575f..925d8d05d 100644 --- a/src/ui/tool/curve-drag-point.h +++ b/src/ui/tool/curve-drag-point.h @@ -37,16 +37,16 @@ public: double getTimeValue() { return _t; } void setIterator(NodeList::iterator i) { first = i; } NodeList::iterator getIterator() { return first; } - virtual bool _eventHandler(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent *event); + bool _eventHandler(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent *event) override; protected: - virtual Glib::ustring _getTip(unsigned state) const; - virtual void dragged(Geom::Point &, GdkEventMotion *); - virtual bool grabbed(GdkEventMotion *); - virtual void ungrabbed(GdkEventButton *); - virtual bool clicked(GdkEventButton *); - virtual bool doubleclicked(GdkEventButton *); + Glib::ustring _getTip(unsigned state) const override; + void dragged(Geom::Point &, GdkEventMotion *) override; + bool grabbed(GdkEventMotion *) override; + void ungrabbed(GdkEventButton *) override; + bool clicked(GdkEventButton *) override; + bool doubleclicked(GdkEventButton *) override; private: double _t; diff --git a/src/ui/tool/manipulator.h b/src/ui/tool/manipulator.h index 66b47ce98..96861e660 100644 --- a/src/ui/tool/manipulator.h +++ b/src/ui/tool/manipulator.h @@ -145,7 +145,7 @@ public: } } - virtual bool event(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent *event) { + bool event(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent *event) override { for (typename MapType::iterator i = _mmap.begin(); i != _mmap.end(); ++i) { if ((*i).second->event(event_context, event)) return true; } diff --git a/src/ui/tool/multi-path-manipulator.h b/src/ui/tool/multi-path-manipulator.h index 742c6d421..46f0d17ba 100644 --- a/src/ui/tool/multi-path-manipulator.h +++ b/src/ui/tool/multi-path-manipulator.h @@ -35,8 +35,8 @@ struct PathSharedData; class MultiPathManipulator : public PointManipulator { public: MultiPathManipulator(PathSharedData &data, sigc::connection &chg); - virtual ~MultiPathManipulator(); - virtual bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *event); + ~MultiPathManipulator() override; + bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *event) override; bool empty() { return _mmap.empty(); } unsigned size() { return _mmap.size(); } diff --git a/src/ui/tool/node.h b/src/ui/tool/node.h index 231f57b7c..6a766125a 100644 --- a/src/ui/tool/node.h +++ b/src/ui/tool/node.h @@ -79,15 +79,15 @@ struct NodeSharedData { class Handle : public ControlPoint { public: - virtual ~Handle(); + ~Handle() override; inline Geom::Point relativePos() const; inline double length() const; bool isDegenerate() const { return _degenerate; } // True if the handle is retracted, i.e. has zero length. - virtual void setVisible(bool); - virtual void move(Geom::Point const &p); + void setVisible(bool) override; + void move(Geom::Point const &p) override; - virtual void setPosition(Geom::Point const &p); + void setPosition(Geom::Point const &p) override; inline void setRelativePos(Geom::Point const &p); void setLength(double len); void retract(); @@ -103,15 +103,15 @@ protected: Handle(NodeSharedData const &data, Geom::Point const &initial_pos, Node *parent); virtual void handle_2button_press(); - virtual bool _eventHandler(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent *event); - virtual void dragged(Geom::Point &new_pos, GdkEventMotion *event); - virtual bool grabbed(GdkEventMotion *event); - virtual void ungrabbed(GdkEventButton *event); - virtual bool clicked(GdkEventButton *event); + bool _eventHandler(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent *event) override; + void dragged(Geom::Point &new_pos, GdkEventMotion *event) override; + bool grabbed(GdkEventMotion *event) override; + void ungrabbed(GdkEventButton *event) override; + bool clicked(GdkEventButton *event) override; - virtual Glib::ustring _getTip(unsigned state) const; - virtual Glib::ustring _getDragTip(GdkEventMotion *event) const; - virtual bool _hasDragTips() const { return true; } + Glib::ustring _getTip(unsigned state) const override; + Glib::ustring _getDragTip(GdkEventMotion *event) const override; + bool _hasDragTips() const override { return true; } private: @@ -146,9 +146,9 @@ public: */ Node(NodeSharedData const &data, Geom::Point const &pos); - virtual void move(Geom::Point const &p); - virtual void transform(Geom::Affine const &m); - virtual Geom::Rect bounds() const; + void move(Geom::Point const &p) override; + void transform(Geom::Affine const &m) override; + Geom::Rect bounds() const override; NodeType type() const { return _type; } @@ -216,20 +216,20 @@ public: // temporarily public /** Customized event handler to catch scroll events needed for selection grow/shrink. */ - virtual bool _eventHandler(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent *event); + bool _eventHandler(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent *event) override; Inkscape::SnapCandidatePoint snapCandidatePoint(); protected: - virtual void dragged(Geom::Point &new_pos, GdkEventMotion *event); - virtual bool grabbed(GdkEventMotion *event); - virtual bool clicked(GdkEventButton *event); + void dragged(Geom::Point &new_pos, GdkEventMotion *event) override; + bool grabbed(GdkEventMotion *event) override; + bool clicked(GdkEventButton *event) override; - virtual void _setState(State state); - virtual Glib::ustring _getTip(unsigned state) const; - virtual Glib::ustring _getDragTip(GdkEventMotion *event) const; - virtual bool _hasDragTips() const { return true; } + void _setState(State state) override; + Glib::ustring _getTip(unsigned state) const override; + Glib::ustring _getDragTip(GdkEventMotion *event) const override; + bool _hasDragTips() const override { return true; } private: diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index 192a02fe2..6582501cb 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -68,13 +68,13 @@ public: _node->addObserver(*this); } - ~PathManipulatorObserver() { + ~PathManipulatorObserver() override { _node->removeObserver(*this); Inkscape::GC::release(_node); } - virtual void notifyAttributeChanged(Inkscape::XML::Node &/*node*/, GQuark attr, - Util::ptr_shared, Util::ptr_shared) + void notifyAttributeChanged(Inkscape::XML::Node &/*node*/, GQuark attr, + Util::ptr_shared, Util::ptr_shared) override { // do nothing if blocked if (_blocked) return; diff --git a/src/ui/tool/path-manipulator.h b/src/ui/tool/path-manipulator.h index 5fa24c23b..cf5142600 100644 --- a/src/ui/tool/path-manipulator.h +++ b/src/ui/tool/path-manipulator.h @@ -54,8 +54,8 @@ public: PathManipulator(MultiPathManipulator &mpm, SPPath *path, Geom::Affine const &edit_trans, guint32 outline_color, Glib::ustring lpe_key); - ~PathManipulator(); - virtual bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *); + ~PathManipulator() override; + bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *) override; bool empty(); void writeXML(); diff --git a/src/ui/tool/selectable-control-point.h b/src/ui/tool/selectable-control-point.h index c16f639b1..b3020b47f 100644 --- a/src/ui/tool/selectable-control-point.h +++ b/src/ui/tool/selectable-control-point.h @@ -22,7 +22,7 @@ class ControlPointSelection; class SelectableControlPoint : public ControlPoint { public: - ~SelectableControlPoint(); + ~SelectableControlPoint() override; bool selected() const; void updateState() { _setState(_state); } virtual Geom::Rect bounds() const { @@ -44,12 +44,12 @@ protected: ControlPointSelection &sel, ColorSet const &cset = _default_scp_color_set, SPCanvasGroup *group = 0); - virtual void _setState(State state); + void _setState(State state) override; - virtual void dragged(Geom::Point &new_pos, GdkEventMotion *event); - virtual bool grabbed(GdkEventMotion *event); - virtual void ungrabbed(GdkEventButton *event); - virtual bool clicked(GdkEventButton *event); + void dragged(Geom::Point &new_pos, GdkEventMotion *event) override; + bool grabbed(GdkEventMotion *event) override; + void ungrabbed(GdkEventButton *event) override; + bool clicked(GdkEventButton *event) override; ControlPointSelection &_selection; diff --git a/src/ui/tool/selector.cpp b/src/ui/tool/selector.cpp index 84e96173d..3444de809 100644 --- a/src/ui/tool/selector.cpp +++ b/src/ui/tool/selector.cpp @@ -42,7 +42,7 @@ public: sp_canvas_item_hide(_rubber); } - ~SelectorPoint() { + ~SelectorPoint() override { sp_canvas_item_destroy(_rubber); } @@ -53,7 +53,7 @@ public: } protected: - virtual bool _eventHandler(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent *event) { + bool _eventHandler(Inkscape::UI::Tools::ToolBase *event_context, GdkEvent *event) override { if (event->type == GDK_KEY_PRESS && shortcut_key(event->key) == GDK_KEY_Escape && sp_canvas_item_is_visible(_rubber)) { @@ -65,27 +65,27 @@ protected: } private: - virtual bool grabbed(GdkEventMotion *) { + bool grabbed(GdkEventMotion *) override { _cancel = false; _start = position(); sp_canvas_item_show(_rubber); return false; } - virtual void dragged(Geom::Point &new_pos, GdkEventMotion *) { + void dragged(Geom::Point &new_pos, GdkEventMotion *) override { if (_cancel) return; Geom::Rect sel(_start, new_pos); _rubber->setRectangle(sel); } - virtual void ungrabbed(GdkEventButton *event) { + void ungrabbed(GdkEventButton *event) override { if (_cancel) return; sp_canvas_item_hide(_rubber); Geom::Rect sel(_start, position()); _selector->signal_area.emit(sel, event); } - virtual bool clicked(GdkEventButton *event) { + bool clicked(GdkEventButton *event) override { if (event->button != 1) return false; _selector->signal_point.emit(position(), event); return true; diff --git a/src/ui/tool/selector.h b/src/ui/tool/selector.h index bd8d3e1aa..450e318f6 100644 --- a/src/ui/tool/selector.h +++ b/src/ui/tool/selector.h @@ -27,8 +27,8 @@ class SelectorPoint; class Selector : public Manipulator { public: Selector(SPDesktop *d); - virtual ~Selector(); - virtual bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *); + ~Selector() override; + bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *) override; virtual bool doubleClicked(); sigc::signal<void, Geom::Rect const &, GdkEventButton*> signal_area; diff --git a/src/ui/tool/transform-handle-set.cpp b/src/ui/tool/transform-handle-set.cpp index 23cd6b79d..bb2e6c861 100644 --- a/src/ui/tool/transform-handle-set.cpp +++ b/src/ui/tool/transform-handle-set.cpp @@ -204,7 +204,7 @@ public: : TransformHandle(th, anchor, pb) {} protected: - virtual Glib::ustring _getTip(unsigned state) const { + Glib::ustring _getTip(unsigned state) const override { if (state_held_control(state)) { if (state_held_shift(state)) { return C_("Transform handle tip", @@ -225,12 +225,12 @@ protected: return C_("Transform handle tip", "<b>Scale handle</b>: drag to scale the selection"); } - virtual Glib::ustring _getDragTip(GdkEventMotion */*event*/) const { + Glib::ustring _getDragTip(GdkEventMotion */*event*/) const override { return format_tip(C_("Transform handle tip", "Scale by %.2f%% x %.2f%%"), _last_scale_x * 100, _last_scale_y * 100); } - virtual bool _hasDragTips() const { return true; } + bool _hasDragTips() const override { return true; } static double _last_scale_x, _last_scale_y; }; @@ -249,13 +249,13 @@ public: {} protected: - virtual void startTransform() { + void startTransform() override { _sc_center = _th.rotationCenter(); _sc_opposite = _th.bounds().corner(_corner + 2); _last_scale_x = _last_scale_y = 1.0; } - virtual Geom::Affine computeTransform(Geom::Point const &new_pos, GdkEventMotion *event) { + Geom::Affine computeTransform(Geom::Point const &new_pos, GdkEventMotion *event) override { Geom::Point scc = held_shift(*event) ? _sc_center : _sc_opposite; Geom::Point vold = _origin - scc, vnew = new_pos - scc; // avoid exploding the selection @@ -300,7 +300,7 @@ protected: return t; } - virtual CommitEvent getCommitEvent() { + CommitEvent getCommitEvent() override { return _last_transform.isUniformScale() ? COMMIT_MOUSE_SCALE_UNIFORM : COMMIT_MOUSE_SCALE; @@ -335,13 +335,13 @@ public: , _side(side) {} protected: - virtual void startTransform() { + void startTransform() override { _sc_center = _th.rotationCenter(); Geom::Rect b = _th.bounds(); _sc_opposite = Geom::middle_point(b.corner(_side + 2), b.corner(_side + 3)); _last_scale_x = _last_scale_y = 1.0; } - virtual Geom::Affine computeTransform(Geom::Point const &new_pos, GdkEventMotion *event) { + Geom::Affine computeTransform(Geom::Point const &new_pos, GdkEventMotion *event) override { Geom::Point scc = held_shift(*event) ? _sc_center : _sc_opposite; Geom::Point vs; Geom::Dim2 d1 = static_cast<Geom::Dim2>((_side + 1) % 2); @@ -386,7 +386,7 @@ protected: * Geom::Translate(scc); return t; } - virtual CommitEvent getCommitEvent() { + CommitEvent getCommitEvent() override { return _last_transform.isUniformScale() ? COMMIT_MOUSE_SCALE_UNIFORM : COMMIT_MOUSE_SCALE; @@ -415,13 +415,13 @@ public: {} protected: - virtual void startTransform() { + void startTransform() override { _rot_center = _th.rotationCenter(); _rot_opposite = _th.bounds().corner(_corner + 2); _last_angle = 0; } - virtual Geom::Affine computeTransform(Geom::Point const &new_pos, GdkEventMotion *event) + Geom::Affine computeTransform(Geom::Point const &new_pos, GdkEventMotion *event) override { Geom::Point rotc = held_shift(*event) ? _rot_opposite : _rot_center; double angle = Geom::angle_between(_origin - rotc, new_pos - rotc); @@ -446,9 +446,9 @@ protected: return t; } - virtual CommitEvent getCommitEvent() { return COMMIT_MOUSE_ROTATE; } + CommitEvent getCommitEvent() override { return COMMIT_MOUSE_ROTATE; } - virtual Glib::ustring _getTip(unsigned state) const { + Glib::ustring _getTip(unsigned state) const override { if (state_held_shift(state)) { if (state_held_control(state)) { return format_tip(C_("Transform handle tip", @@ -465,12 +465,12 @@ protected: "the selection around the rotation center"); } - virtual Glib::ustring _getDragTip(GdkEventMotion */*event*/) const { + Glib::ustring _getDragTip(GdkEventMotion */*event*/) const override { return format_tip(C_("Transform handle tip", "Rotate by %.2f°"), _last_angle * 180.0 / M_PI); } - virtual bool _hasDragTips() const { return true; } + bool _hasDragTips() const override { return true; } private: static Glib::RefPtr<Gdk::Pixbuf> _corner_to_pixbuf(unsigned c) { @@ -498,7 +498,7 @@ public: protected: - virtual void startTransform() { + void startTransform() override { _skew_center = _th.rotationCenter(); Geom::Rect b = _th.bounds(); _skew_opposite = Geom::middle_point(b.corner(_side + 2), b.corner(_side + 3)); @@ -506,7 +506,7 @@ protected: _last_horizontal = _side % 2; } - virtual Geom::Affine computeTransform(Geom::Point const &new_pos, GdkEventMotion *event) + Geom::Affine computeTransform(Geom::Point const &new_pos, GdkEventMotion *event) override { Geom::Point scc = held_shift(*event) ? _skew_center : _skew_opposite; Geom::Dim2 d1 = static_cast<Geom::Dim2>((_side + 1) % 2); @@ -581,13 +581,13 @@ protected: return t; } - virtual CommitEvent getCommitEvent() { + CommitEvent getCommitEvent() override { return (_side % 2) ? COMMIT_MOUSE_SKEW_Y : COMMIT_MOUSE_SKEW_X; } - virtual Glib::ustring _getTip(unsigned state) const { + Glib::ustring _getTip(unsigned state) const override { if (state_held_shift(state)) { if (state_held_control(state)) { return format_tip(C_("Transform handle tip", @@ -605,7 +605,7 @@ protected: "the opposite handle"); } - virtual Glib::ustring _getDragTip(GdkEventMotion */*event*/) const { + Glib::ustring _getDragTip(GdkEventMotion */*event*/) const override { if (_last_horizontal) { return format_tip(C_("Transform handle tip", "Skew horizontally by %.2f°"), _last_angle * 360.0); @@ -615,7 +615,7 @@ protected: } } - virtual bool _hasDragTips() const { return true; } + bool _hasDragTips() const override { return true; } private: @@ -650,7 +650,7 @@ public: } protected: - virtual void dragged(Geom::Point &new_pos, GdkEventMotion *event) { + void dragged(Geom::Point &new_pos, GdkEventMotion *event) override { SnapManager &sm = _th._desktop->namedview->snap_manager; sm.setup(_th._desktop); bool snap = !held_shift(*event) && sm.someSnapperMightSnap(); @@ -667,7 +667,7 @@ protected: } sm.unSetup(); } - virtual Glib::ustring _getTip(unsigned /*state*/) const { + Glib::ustring _getTip(unsigned /*state*/) const override { return C_("Transform handle tip", "<b>Rotation center</b>: drag to change the origin of transforms"); } diff --git a/src/ui/tool/transform-handle-set.h b/src/ui/tool/transform-handle-set.h index 54f81adf5..023e4f855 100644 --- a/src/ui/tool/transform-handle-set.h +++ b/src/ui/tool/transform-handle-set.h @@ -39,8 +39,8 @@ public: }; TransformHandleSet(SPDesktop *d, SPCanvasGroup *th_group); - virtual ~TransformHandleSet(); - virtual bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *); + ~TransformHandleSet() override; + bool event(Inkscape::UI::Tools::ToolBase *, GdkEvent *) override; bool visible() const { return _visible; } Mode mode() const { return _mode; } @@ -117,9 +117,9 @@ protected: std::vector<Inkscape::SnapCandidatePoint>::iterator _all_snap_sources_iter; private: - virtual bool grabbed(GdkEventMotion *); - virtual void dragged(Geom::Point &new_pos, GdkEventMotion *event); - virtual void ungrabbed(GdkEventButton *); + bool grabbed(GdkEventMotion *) override; + void dragged(Geom::Point &new_pos, GdkEventMotion *event) override; + void ungrabbed(GdkEventButton *) override; static ColorSet thandle_cset; }; diff --git a/src/ui/tools/arc-tool.h b/src/ui/tools/arc-tool.h index 55cbaf78c..7232f07af 100644 --- a/src/ui/tools/arc-tool.h +++ b/src/ui/tools/arc-tool.h @@ -39,16 +39,16 @@ namespace Tools { class ArcTool : public ToolBase { public: ArcTool(); - virtual ~ArcTool(); + ~ArcTool() override; static const std::string prefsPath; - virtual void setup(); - virtual void finish(); - virtual bool root_handler(GdkEvent* event); - virtual bool item_handler(SPItem* item, GdkEvent* event); + void setup() override; + void finish() override; + bool root_handler(GdkEvent* event) override; + bool item_handler(SPItem* item, GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: SPGenericEllipse *arc; diff --git a/src/ui/tools/box3d-tool.h b/src/ui/tools/box3d-tool.h index 33ae6d8e7..cbd7dbe08 100644 --- a/src/ui/tools/box3d-tool.h +++ b/src/ui/tools/box3d-tool.h @@ -46,18 +46,18 @@ namespace Tools { class Box3dTool : public ToolBase { public: Box3dTool(); - virtual ~Box3dTool(); + ~Box3dTool() override; Box3D::VPDrag * _vpdrag; static const std::string prefsPath; - virtual void setup(); - virtual void finish(); - virtual bool root_handler(GdkEvent* event); - virtual bool item_handler(SPItem* item, GdkEvent* event); + void setup() override; + void finish() override; + bool root_handler(GdkEvent* event) override; + bool item_handler(SPItem* item, GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: SPBox3D* box3d; diff --git a/src/ui/tools/calligraphic-tool.h b/src/ui/tools/calligraphic-tool.h index 83b4d73ff..ac8a7436b 100644 --- a/src/ui/tools/calligraphic-tool.h +++ b/src/ui/tools/calligraphic-tool.h @@ -44,15 +44,15 @@ namespace Tools { class CalligraphicTool : public DynamicBase { public: CalligraphicTool(); - virtual ~CalligraphicTool(); + ~CalligraphicTool() override; static const std::string prefsPath; - virtual void setup(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); + void setup() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: /** newly created object remain selected */ diff --git a/src/ui/tools/connector-tool.h b/src/ui/tools/connector-tool.h index 8aef637e8..241a59dca 100644 --- a/src/ui/tools/connector-tool.h +++ b/src/ui/tools/connector-tool.h @@ -58,7 +58,7 @@ namespace Tools { class ConnectorTool : public ToolBase { public: ConnectorTool(); - virtual ~ConnectorTool(); + ~ConnectorTool() override; Inkscape::Selection *selection; Geom::Point p[5]; @@ -109,13 +109,13 @@ public: static std::string const prefsPath; - virtual void setup(); - virtual void finish(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); - virtual bool item_handler(SPItem* item, GdkEvent* event); + void setup() override; + void finish() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; + bool item_handler(SPItem* item, GdkEvent* event) override; - virtual std::string const& getPrefsPath(); + std::string const& getPrefsPath() override; void cc_clear_active_shape(); void cc_set_active_conn(SPItem *item); diff --git a/src/ui/tools/dropper-tool.h b/src/ui/tools/dropper-tool.h index 813f68296..049244b66 100644 --- a/src/ui/tools/dropper-tool.h +++ b/src/ui/tools/dropper-tool.h @@ -38,18 +38,18 @@ namespace Tools { class DropperTool : public ToolBase { public: DropperTool(); - virtual ~DropperTool(); + ~DropperTool() override; static const std::string prefsPath; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; guint32 get_color(bool invert=false); protected: - virtual void setup(); - virtual void finish(); - virtual bool root_handler(GdkEvent* event); + void setup() override; + void finish() override; + bool root_handler(GdkEvent* event) override; private: double R; diff --git a/src/ui/tools/dynamic-base.h b/src/ui/tools/dynamic-base.h index b9ffd71ce..4b78ee416 100644 --- a/src/ui/tools/dynamic-base.h +++ b/src/ui/tools/dynamic-base.h @@ -40,9 +40,9 @@ namespace Tools { class DynamicBase : public ToolBase { public: DynamicBase(gchar const *const *cursor_shape); - virtual ~DynamicBase(); + ~DynamicBase() override; - virtual void set(const Inkscape::Preferences::Entry& val); + void set(const Inkscape::Preferences::Entry& val) override; protected: /** accumulated shape which ultimately goes in svg:path */ diff --git a/src/ui/tools/eraser-tool.h b/src/ui/tools/eraser-tool.h index bd0e98057..8a196d360 100644 --- a/src/ui/tools/eraser-tool.h +++ b/src/ui/tools/eraser-tool.h @@ -42,14 +42,14 @@ namespace Tools { class EraserTool : public DynamicBase { public: EraserTool(); - virtual ~EraserTool(); + ~EraserTool() override; static const std::string prefsPath; - virtual void setup(); - virtual bool root_handler(GdkEvent* event); + void setup() override; + bool root_handler(GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: void reset(Geom::Point p); diff --git a/src/ui/tools/flood-tool.h b/src/ui/tools/flood-tool.h index 7eadeea34..f6f49b9c4 100644 --- a/src/ui/tools/flood-tool.h +++ b/src/ui/tools/flood-tool.h @@ -30,7 +30,7 @@ namespace Tools { class FloodTool : public ToolBase { public: FloodTool(); - virtual ~FloodTool(); + ~FloodTool() override; SPItem *item; @@ -38,11 +38,11 @@ public: static const std::string prefsPath; - virtual void setup(); - virtual bool root_handler(GdkEvent* event); - virtual bool item_handler(SPItem* item, GdkEvent* event); + void setup() override; + bool root_handler(GdkEvent* event) override; + bool item_handler(SPItem* item, GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; static void set_channels(gint channels); static const std::vector<Glib::ustring> channel_list; diff --git a/src/ui/tools/freehand-base.h b/src/ui/tools/freehand-base.h index 38b3851ff..ffc4b738f 100644 --- a/src/ui/tools/freehand-base.h +++ b/src/ui/tools/freehand-base.h @@ -45,7 +45,7 @@ namespace Tools { class FreehandBase : public ToolBase { public: FreehandBase(gchar const *const *cursor_shape); - virtual ~FreehandBase(); + ~FreehandBase() override; Inkscape::Selection *selection; SPCanvasItem *grab; @@ -101,13 +101,13 @@ public: bool is_tablet; gdouble pressure; - virtual void set(const Inkscape::Preferences::Entry& val); + void set(const Inkscape::Preferences::Entry& val) override; protected: - virtual void setup(); - virtual void finish(); - virtual bool root_handler(GdkEvent* event); + void setup() override; + void finish() override; + bool root_handler(GdkEvent* event) override; }; /** diff --git a/src/ui/tools/gradient-tool.h b/src/ui/tools/gradient-tool.h index 6fe3bca9f..3b7a646e7 100644 --- a/src/ui/tools/gradient-tool.h +++ b/src/ui/tools/gradient-tool.h @@ -29,7 +29,7 @@ namespace Tools { class GradientTool : public ToolBase { public: GradientTool(); - virtual ~GradientTool(); + ~GradientTool() override; Geom::Point origin; @@ -44,10 +44,10 @@ public: static const std::string prefsPath; - virtual void setup(); - virtual bool root_handler(GdkEvent* event); + void setup() override; + bool root_handler(GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: void selection_changed(Inkscape::Selection*); diff --git a/src/ui/tools/lpe-tool.h b/src/ui/tools/lpe-tool.h index df78c205c..d3a5a056e 100644 --- a/src/ui/tools/lpe-tool.h +++ b/src/ui/tools/lpe-tool.h @@ -48,7 +48,7 @@ namespace Tools { class LpeTool : public PenTool { public: LpeTool(); - virtual ~LpeTool(); + ~LpeTool() override; ShapeEditor* shape_editor; SPCanvasItem *canvas_bbox; @@ -61,13 +61,13 @@ public: static const std::string prefsPath; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; protected: - virtual void setup(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); - virtual bool item_handler(SPItem* item, GdkEvent* event); + void setup() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; + bool item_handler(SPItem* item, GdkEvent* event) override; }; int lpetool_mode_to_index(Inkscape::LivePathEffect::EffectType const type); diff --git a/src/ui/tools/measure-tool.h b/src/ui/tools/measure-tool.h index 42122dca1..519e849c3 100644 --- a/src/ui/tools/measure-tool.h +++ b/src/ui/tools/measure-tool.h @@ -37,12 +37,12 @@ namespace Tools { class MeasureTool : public ToolBase { public: MeasureTool(); - virtual ~MeasureTool(); + ~MeasureTool() override; static const std::string prefsPath; - virtual void finish(); - virtual bool root_handler(GdkEvent* event); + void finish() override; + bool root_handler(GdkEvent* event) override; virtual void showCanvasItems(bool to_guides = false, bool to_item = false, bool to_phantom = false, Inkscape::XML::Node *measure_repr = NULL); virtual void reverseKnots(); virtual void toGuides(); @@ -52,7 +52,7 @@ public: virtual void reset(); virtual void setMarkers(); virtual void setMarker(bool isStart); - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; Geom::Point readMeasurePoint(bool is_start); void showInfoBox(Geom::Point cursor, bool into_groups); void showItemInfoText(Geom::Point pos, gchar *measure_str, double fontsize); diff --git a/src/ui/tools/mesh-tool.h b/src/ui/tools/mesh-tool.h index 9c13ec30e..59c60dad4 100644 --- a/src/ui/tools/mesh-tool.h +++ b/src/ui/tools/mesh-tool.h @@ -33,7 +33,7 @@ namespace Tools { class MeshTool : public ToolBase { public: MeshTool(); - virtual ~MeshTool(); + ~MeshTool() override; Geom::Point origin; @@ -44,11 +44,11 @@ public: static const std::string prefsPath; - virtual void setup(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); + void setup() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: void selection_changed(Inkscape::Selection* sel); diff --git a/src/ui/tools/node-tool.h b/src/ui/tools/node-tool.h index dded2d9bd..a05eb5850 100644 --- a/src/ui/tools/node-tool.h +++ b/src/ui/tools/node-tool.h @@ -45,7 +45,7 @@ namespace Tools { class NodeTool : public ToolBase { public: NodeTool(); - virtual ~NodeTool(); + ~NodeTool() override; Inkscape::UI::ControlPointSelection* _selected_nodes; Inkscape::UI::MultiPathManipulator* _multipath; @@ -56,11 +56,11 @@ public: static const std::string prefsPath; - virtual void setup(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); + void setup() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; boost::ptr_map<SPItem*, ShapeEditor> _shape_editors; private: diff --git a/src/ui/tools/pen-tool.h b/src/ui/tools/pen-tool.h index fe1947f81..7d442bfca 100644 --- a/src/ui/tools/pen-tool.h +++ b/src/ui/tools/pen-tool.h @@ -24,7 +24,7 @@ class PenTool : public FreehandBase { public: PenTool(); PenTool(gchar const *const *cursor_shape); - virtual ~PenTool(); + ~PenTool() override; enum Mode { MODE_CLICK, @@ -68,7 +68,7 @@ public: static const std::string prefsPath; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; int nextParaxialDirection(Geom::Point const &pt, Geom::Point const &origin, guint state) const; void setPolylineMode(); @@ -76,11 +76,11 @@ public: void waitForLPEMouseClicks(Inkscape::LivePathEffect::EffectType effect_type, unsigned int num_clicks, bool use_polylines = true); protected: - virtual void setup(); - virtual void finish(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); - virtual bool item_handler(SPItem* item, GdkEvent* event); + void setup() override; + void finish() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; + bool item_handler(SPItem* item, GdkEvent* event) override; private: bool _handleButtonPress(GdkEventButton const &bevent); diff --git a/src/ui/tools/pencil-tool.h b/src/ui/tools/pencil-tool.h index 24f2c8bfc..58b449c98 100644 --- a/src/ui/tools/pencil-tool.h +++ b/src/ui/tools/pencil-tool.h @@ -37,7 +37,7 @@ enum PencilState { class PencilTool : public FreehandBase { public: PencilTool(); - virtual ~PencilTool(); + ~PencilTool() override; Geom::Point p[16]; std::vector<Geom::Point> ps; std::vector<Geom::Point> points; @@ -47,12 +47,12 @@ public: Geom::Piecewise<Geom::D2<Geom::SBasis> > sketch_interpolation; // the current proposal from the sketched paths unsigned sketch_n; // number of sketches done static const std::string prefsPath; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; protected: - virtual void setup(); - virtual bool root_handler(GdkEvent* event); + void setup() override; + bool root_handler(GdkEvent* event) override; private: bool _handleButtonPress(GdkEventButton const &bevent); diff --git a/src/ui/tools/rect-tool.h b/src/ui/tools/rect-tool.h index ac056668f..4036bf35b 100644 --- a/src/ui/tools/rect-tool.h +++ b/src/ui/tools/rect-tool.h @@ -29,17 +29,17 @@ namespace Tools { class RectTool : public ToolBase { public: RectTool(); - virtual ~RectTool(); + ~RectTool() override; static const std::string prefsPath; - virtual void setup(); - virtual void finish(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); - virtual bool item_handler(SPItem* item, GdkEvent* event); + void setup() override; + void finish() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; + bool item_handler(SPItem* item, GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: SPRect *rect; diff --git a/src/ui/tools/select-tool.h b/src/ui/tools/select-tool.h index 420374661..f198686f2 100644 --- a/src/ui/tools/select-tool.h +++ b/src/ui/tools/select-tool.h @@ -32,7 +32,7 @@ namespace Tools { class SelectTool : public ToolBase { public: SelectTool(); - virtual ~SelectTool(); + ~SelectTool() override; bool dragging; bool moved; @@ -52,12 +52,12 @@ public: static const std::string prefsPath; - virtual void setup(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); - virtual bool item_handler(SPItem* item, GdkEvent* event); + void setup() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; + bool item_handler(SPItem* item, GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: bool sp_select_context_abort(); diff --git a/src/ui/tools/spiral-tool.h b/src/ui/tools/spiral-tool.h index add92342d..ca5acccd2 100644 --- a/src/ui/tools/spiral-tool.h +++ b/src/ui/tools/spiral-tool.h @@ -31,16 +31,16 @@ namespace Tools { class SpiralTool : public ToolBase { public: SpiralTool(); - virtual ~SpiralTool(); + ~SpiralTool() override; static const std::string prefsPath; - virtual void setup(); - virtual void finish(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); + void setup() override; + void finish() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: SPSpiral * spiral; diff --git a/src/ui/tools/spray-tool.h b/src/ui/tools/spray-tool.h index d5504d565..06fba80a9 100644 --- a/src/ui/tools/spray-tool.h +++ b/src/ui/tools/spray-tool.h @@ -56,7 +56,7 @@ enum { class SprayTool : public ToolBase { public: SprayTool(); - virtual ~SprayTool(); + ~SprayTool() override; //ToolBase event_context; //Inkscape::UI::Dialog::Dialog *dialog_option;//Attribut de type SprayOptionClass, localisé dans scr/ui/dialog @@ -114,12 +114,12 @@ public: static const std::string prefsPath; - virtual void setup(); - virtual void set(const Inkscape::Preferences::Entry& val); + void setup() override; + void set(const Inkscape::Preferences::Entry& val) override; virtual void setCloneTilerPrefs(); - virtual bool root_handler(GdkEvent* event); + bool root_handler(GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; void update_cursor(bool /*with_shift*/); diff --git a/src/ui/tools/star-tool.h b/src/ui/tools/star-tool.h index a697582d3..2e973fad5 100644 --- a/src/ui/tools/star-tool.h +++ b/src/ui/tools/star-tool.h @@ -28,16 +28,16 @@ namespace Tools { class StarTool : public ToolBase { public: StarTool(); - virtual ~StarTool(); + ~StarTool() override; static const std::string prefsPath; - virtual void setup(); - virtual void finish(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); + void setup() override; + void finish() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: SPStar* star; diff --git a/src/ui/tools/text-tool.h b/src/ui/tools/text-tool.h index f2e6fea1a..d8968544b 100644 --- a/src/ui/tools/text-tool.h +++ b/src/ui/tools/text-tool.h @@ -34,7 +34,7 @@ namespace Tools { class TextTool : public ToolBase { public: TextTool(); - virtual ~TextTool(); + ~TextTool() override; sigc::connection sel_changed_connection; sigc::connection sel_modified_connection; @@ -77,12 +77,12 @@ public: static const std::string prefsPath; - virtual void setup(); - virtual void finish(); - virtual bool root_handler(GdkEvent* event); - virtual bool item_handler(SPItem* item, GdkEvent* event); + void setup() override; + void finish() override; + bool root_handler(GdkEvent* event) override; + bool item_handler(SPItem* item, GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: void _selectionChanged(Inkscape::Selection *selection); diff --git a/src/ui/tools/tool-base.h b/src/ui/tools/tool-base.h index 945e41a77..cb08e67b4 100644 --- a/src/ui/tools/tool-base.h +++ b/src/ui/tools/tool-base.h @@ -205,7 +205,7 @@ public: { } - virtual void notify(Inkscape::Preferences::Entry const &val) { + void notify(Inkscape::Preferences::Entry const &val) override { ec->set(val); } diff --git a/src/ui/tools/tweak-tool.h b/src/ui/tools/tweak-tool.h index 7fe4b1856..51f32daa9 100644 --- a/src/ui/tools/tweak-tool.h +++ b/src/ui/tools/tweak-tool.h @@ -44,7 +44,7 @@ enum { class TweakTool : public ToolBase { public: TweakTool(); - virtual ~TweakTool(); + ~TweakTool() override; /* extended input data */ gdouble pressure; @@ -76,11 +76,11 @@ public: static const std::string prefsPath; - virtual void setup(); - virtual void set(const Inkscape::Preferences::Entry& val); - virtual bool root_handler(GdkEvent* event); + void setup() override; + void set(const Inkscape::Preferences::Entry& val) override; + bool root_handler(GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; void update_cursor(bool with_shift); diff --git a/src/ui/tools/zoom-tool.h b/src/ui/tools/zoom-tool.h index 6e5cca7aa..6a656eec4 100644 --- a/src/ui/tools/zoom-tool.h +++ b/src/ui/tools/zoom-tool.h @@ -25,15 +25,15 @@ namespace Tools { class ZoomTool : public ToolBase { public: ZoomTool(); - virtual ~ZoomTool(); + ~ZoomTool() override; static const std::string prefsPath; - virtual void setup(); - virtual void finish(); - virtual bool root_handler(GdkEvent* event); + void setup() override; + void finish() override; + bool root_handler(GdkEvent* event) override; - virtual const std::string& getPrefsPath(); + const std::string& getPrefsPath() override; private: SPCanvasItem *grabbed; |
