All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
VisitorUtils.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 VisitorUtils.h
22 
23  \brief Utility class for visitor.
24 
25  \ingroup layout
26 */
27 
28 #ifndef __TERRALIB_LAYOUT_INTERNAL_VISITOR_UTILS_H
29 #define __TERRALIB_LAYOUT_INTERNAL_VISITOR_UTILS_H
30 
31 // TerraLib
32 #include "../../Config.h"
33 #include "Visitable.h"
34 #include "../../../../common/Singleton.h"
35 
36 // Qt
37 #include <QGraphicsItem>
38 #include <QList>
39 
40 namespace te
41 {
42  namespace layout
43  {
44  /*!
45  \brief Utility class for visitor.
46 
47  \ingroup layout
48  */
49  class TELAYOUTEXPORT VisitorUtils : public te::common::Singleton<VisitorUtils>
50  {
52 
53  public:
54 
55  /*!
56  \brief Destructor
57  */
58  virtual ~VisitorUtils();
59 
60  /*!
61  \brief Sets the other map (MapModel) for visitable.
62 
63  \param graphicsItems items that are visitors
64  \param visitable other map (MapModel)
65  \return true if changed, false otherwise
66  */
67  bool changeMapVisitable(QList<QGraphicsItem*> graphicsItems, Visitable* visitable);
68 
69  protected:
70 
71  /*!
72  \brief Constructor
73  */
74  VisitorUtils();
75 
76  private:
77 
78  /*!
79  \brief Copy constructor not allowed.
80 
81  \param rhs The right-hand-side copy that would be used to copy from.
82  */
83  VisitorUtils(const VisitorUtils& rhs);
84 
85  /*!
86  \brief Assignment operator not allowed.
87 
88  \param rhs The right-hand-side copy that would be used to copy from.
89 
90  \return A reference to this object.
91  */
92  VisitorUtils& operator=(const VisitorUtils& rhs);
93  };
94  }
95 }
96 
97 #endif
Class to represent a visitable. All classes representing a visitable must inherit from this class...
Definition: Visitable.h:45
Class to represent a visitable. All classes representing a visitable must inherit from this class...
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:99
Utility class for visitor.
Definition: VisitorUtils.h:49
Template support for singleton pattern.
Definition: Singleton.h:100