Mercurial > hg > svgui
comparison layer/ShowLayerCommand.h @ 1406:a18e78b9c78b fix-static-analysis
Use override throughout
author | Chris Cannam |
---|---|
date | Mon, 26 Nov 2018 13:52:27 +0000 |
parents | 558c71a802d4 |
children | 05d614f6e46d |
comparison
equal
deleted
inserted
replaced
1405:4c359c2b220c | 1406:a18e78b9c78b |
---|---|
21 class ShowLayerCommand : public Command | 21 class ShowLayerCommand : public Command |
22 { | 22 { |
23 public: | 23 public: |
24 ShowLayerCommand(View *view, Layer *layer, bool show, QString commandName) : | 24 ShowLayerCommand(View *view, Layer *layer, bool show, QString commandName) : |
25 m_view(view), m_layer(layer), m_show(show), m_name(commandName) { } | 25 m_view(view), m_layer(layer), m_show(show), m_name(commandName) { } |
26 void execute() { | 26 void execute() override { |
27 m_layer->showLayer(m_view, m_show); | 27 m_layer->showLayer(m_view, m_show); |
28 } | 28 } |
29 void unexecute() { | 29 void unexecute() override { |
30 m_layer->showLayer(m_view, !m_show); | 30 m_layer->showLayer(m_view, !m_show); |
31 } | 31 } |
32 QString getName() const { | 32 QString getName() const override { |
33 return m_name; | 33 return m_name; |
34 } | 34 } |
35 protected: | 35 protected: |
36 View *m_view; | 36 View *m_view; |
37 Layer *m_layer; | 37 Layer *m_layer; |