Seamly2D
Code documentation
showdoublepointname.h
Go to the documentation of this file.
1 /***************************************************************************
2  * @file showdoublepointname.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 #ifndef ShowDoublePointName_H
26 #define ShowDoublePointName_H
27 
28 #include "../vundocommand.h"
29 
30 class QGraphicsScene;
31 
32 enum class ShowDoublePoint: qint8 { FirstPoint, SecondPoint };
33 
35 {
36  Q_OBJECT
37 public:
38  ShowDoublePointName(VAbstractPattern *doc, quint32 toolId, quint32 pointId, bool visible,
39  ShowDoublePoint type, QUndoCommand *parent = nullptr);
40  virtual ~ShowDoublePointName()=default;
41 
42  virtual void undo() override;
43  virtual void redo() override;
44 
45 private:
46  Q_DISABLE_COPY(ShowDoublePointName)
47  bool m_visible;
49  //Need for resizing scene rect
50  QGraphicsScene *m_scene;
52  quint32 m_idTool;
53 
54  void setVisibility(bool visible);
55 };
56 
57 #endif // ShowDoublePointName_H
virtual void undo() override
ShowDoublePoint m_type
void setVisibility(bool visible)
ShowDoublePointName(VAbstractPattern *doc, quint32 toolId, quint32 pointId, bool visible, ShowDoublePoint type, QUndoCommand *parent=nullptr)
virtual void redo() override
virtual ~ShowDoublePointName()=default
QGraphicsScene * m_scene
VAbstractPattern * doc
Definition: vundocommand.h:106
ShowDoublePoint