Seamly2D
Code documentation
showpointname.h
Go to the documentation of this file.
1 /***************************************************************************
2  * @file showpointname.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 SHOWPOINTNAME_H
26 #define SHOWPOINTNAME_H
27 
28 #include "../vundocommand.h"
29 
30 class QGraphicsScene;
31 
33 {
34 public:
35  ShowPointName(VAbstractPattern *doc, quint32 id, bool visible, QUndoCommand *parent = nullptr);
36  virtual ~ShowPointName()=default;
37  virtual void undo() override;
38  virtual void redo() override;
39 
40 private:
41  Q_DISABLE_COPY(ShowPointName)
42  bool m_visible;
44 
45  QGraphicsScene *m_scene; //Need for resizing scene rect
46 
47  void setVisibility(bool visible);
48 };
49 
50 #endif // SHOWPOINTNAME_H
void setVisibility(bool visible)
ShowPointName(VAbstractPattern *doc, quint32 id, bool visible, QUndoCommand *parent=nullptr)
virtual void redo() override
virtual void undo() override
virtual ~ShowPointName()=default
QGraphicsScene * m_scene
Definition: showpointname.h:45
VAbstractPattern * doc
Definition: vundocommand.h:106