zoomcanvascommand.h
Go to the documentation of this file.
1 #ifndef ZOOMCANVASCOMMAND_H
2 #define ZOOMCANVASCOMMAND_H
3 
4 #include <QQuickItem>
5 
6 #include "command.h"
8 
9 namespace dnai
10 {
11  namespace commands
12  {
13  class ZoomCanvasCommand : public Command
14  {
15  public:
16  ZoomCanvasCommand(views::CanvasNode * c, const double& scale, const QPointF &offset);
17 
21  void execute() const override;
22  void executeSave() override;
23 
27  void unExcute() const override;
28 
29  QString infos() const override;
30 
31  private:
33  double m_scale;
34  QPointF m_offset;
35  };
36  }
37 }
38 
39 #endif // ZOOMCANVASCOMMAND_H
ZoomCanvasCommand(views::CanvasNode *c, const double &scale, const QPointF &offset)
Definition: zoomcanvascommand.cpp:5
Definition: zoomcanvascommand.h:13
QPointF m_offset
Definition: zoomcanvascommand.h:34
void executeSave() override
Save current state of the command for the reverse unExcute()
Definition: zoomcanvascommand.cpp:15
void unExcute() const override
Reverse the command.
Definition: zoomcanvascommand.cpp:20
double m_scale
Definition: zoomcanvascommand.h:33
Definition: command.h:11
Definition: api.h:13
Definition: canvasnode.h:13
views::CanvasNode * m_canvas
Definition: zoomcanvascommand.h:32
void execute() const override
Execute the command.
Definition: zoomcanvascommand.cpp:10
QString infos() const override
Get display info for this command.
Definition: zoomcanvascommand.cpp:24