All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DeleteCommand.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file DeleteCommand.h
22 
23  \brief Undo/Redo for delete one or more components.
24 
25  \ingroup layout
26 */
27 
28 #ifndef __TERRALIB_LAYOUT_INTERNAL_DELETE_COMMAND_H
29 #define __TERRALIB_LAYOUT_INTERNAL_DELETE_COMMAND_H
30 
31 // TerraLib
32 #include "../../../../core/Config.h"
33 
34 // Qt
35 #include <QUndoCommand>
36 #include <QString>
37 #include <QPointF>
38 
39 class QGraphicsItem;
40 class QGraphicsScene;
41 
42 namespace te
43 {
44  namespace layout
45  {
46  /*!
47  \brief Undo/Redo for delete one or more components.
48 
49  \ingroup layout
50  */
51  class TELAYOUTEXPORT DeleteCommand : public QUndoCommand
52  {
53  public:
54 
55  /*!
56  \brief Constructor
57 
58  \param scene
59  \param parent
60  */
61  DeleteCommand(QGraphicsScene* scene, QUndoCommand *parent = 0);
62 
63  /*!
64  \brief Destructor
65  */
66  virtual ~DeleteCommand();
67 
68  /*!
69  \brief Reimplemented from QUndoCommand
70  */
71  virtual void undo();
72 
73  /*!
74  \brief Reimplemented from QUndoCommand
75  */
76  virtual void redo();
77 
78  protected:
79 
80  virtual QString createCommandString(int totalItems);
81 
82  QGraphicsScene* m_scene;
83  QList<QGraphicsItem*> m_items;
84  };
85  }
86 }
87 
88 #endif
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:99
QGraphicsScene * m_scene
Definition: DeleteCommand.h:82
Undo/Redo for delete one or more components.
Definition: DeleteCommand.h:51
QList< QGraphicsItem * > m_items
Definition: DeleteCommand.h:83