Seamly2D
Code documentation
showoperationpointname.h
Go to the documentation of this file.
1 /***************************************************************************
2  * @file showoperationpointname.h *
3  * *
4  * Copyright (C) 2017 Seamly, LLC *
5  * *
6  * https://github.com/fashionfreedom/seamly2d *
7  * *
8  ***************************************************************************
9  **
10  ** Seamly2D is free software: you can redistribute it and/or modify
11  ** it under the terms of the GNU General Public License as published by
12  ** the Free Software Foundation, either version 3 of the License, or
13  ** (at your option) any later version.
14  **
15  ** Seamly2D is distributed in the hope that it will be useful,
16  ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17  ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  ** GNU General Public License for more details.
19  **
20  ** You should have received a copy of the GNU General Public License
21  ** along with Seamly2D. If not, see <http://www.gnu.org/licenses/>.
22  **
23  **************************************************************************/
24 
25 
26  #ifndef SHOW_OPERATION_POINTNAME_H
27  #define SHOW_OPERATION_POINTNAME_H
28 
29  #include "../vundocommand.h"
30 
31  class QGraphicsScene;
32 
34  {
35  public:
36  ShowOperationPointName(VAbstractPattern *doc, quint32 idTool, quint32 idPoint,
37  bool visible, QUndoCommand *parent = nullptr);
38  virtual ~ShowOperationPointName()=default;
39 
40  virtual void undo() Q_DECL_OVERRIDE;
41  virtual void redo() Q_DECL_OVERRIDE;
42 
43  private:
44  Q_DISABLE_COPY(ShowOperationPointName)
45  bool m_visible;
47  QGraphicsScene *m_scene; //Need for resizing scene rect
48  quint32 m_idTool;
49 
50  void Do(bool visible);
51  };
52 
53  #endif // SHOW_OPERATION_POINTNAME_H
virtual ~ShowOperationPointName()=default
ShowOperationPointName(VAbstractPattern *doc, quint32 idTool, quint32 idPoint, bool visible, QUndoCommand *parent=nullptr)
virtual void redo() Q_DECL_OVERRIDE
virtual void undo() Q_DECL_OVERRIDE
VAbstractPattern * doc
Definition: vundocommand.h:106