comparison layer/ShowLayerCommand.h @ 1414:fa986b91d77f

Merge from branch fix-static-analysis
author Chris Cannam
date Wed, 09 Jan 2019 15:24:51 +0000
parents 05d614f6e46d
children
comparison
equal deleted inserted replaced
1413:0930a27ebea2 1414:fa986b91d77f
11 published by the Free Software Foundation; either version 2 of the 11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version. See the file 12 License, or (at your option) any later version. See the file
13 COPYING included with this distribution for more information. 13 COPYING included with this distribution for more information.
14 */ 14 */
15 15
16 #ifndef _SHOW_LAYER_COMMAND_H_ 16 #ifndef SV_SHOW_LAYER_COMMAND_H
17 #define _SHOW_LAYER_COMMAND_H_ 17 #define SV_SHOW_LAYER_COMMAND_H
18 18
19 #include "base/Command.h" 19 #include "base/Command.h"
20 20
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;