All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AbstractBuildGraphicsItem.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 AbstractBuildGraphicsItem.h
22 
23  \brief Abstract class for build graphics MVC components.
24 
25  \ingroup layout
26 */
27 
28 #ifndef __TERRALIB_LAYOUT_INTERNAL_ABSTRACT_BUILD_GRAPHICS_ITEM_H
29 #define __TERRALIB_LAYOUT_INTERNAL_ABSTRACT_BUILD_GRAPHICS_ITEM_H
30 
31 // TerraLib
32 #include "../../geometry/Coord2D.h"
33 #include "Config.h"
34 
35 // STL
36 #include <string>
37 #include <vector>
38 
39 namespace te
40 {
41  namespace layout
42  {
43  class Properties;
44  class EnumType;
45  class SharedProperties;
46 
47  /*!
48  \class AbstractBuildGraphicsItem
49 
50  \brief Abstract class for build graphics MVC components.
51 
52  \ingroup layout
53  */
54 
56  {
57  public:
58 
59  /*!
60  \brief Constructor
61  */
63 
64  /*!
65  \brief Destructor
66  */
67  virtual ~AbstractBuildGraphicsItem();
68 
69  /*!
70  \brief Clear all configuration for create or build a graphic object.
71  */
72  virtual void clear();
73 
74  protected:
75 
76  /*!
77  \brief Search for property of a graphic object that represent the x,y coordinate.
78 
79  \param props properties
80 
81  \return coordinate
82  */
83  virtual te::gm::Coord2D findCoordinate(te::layout::Properties* props);
84 
85  /*!
86  \brief Search for property of a graphic object that represent Z Value.
87 
88  \param props properties
89 
90  \return z value
91  */
92  virtual int findZValue(te::layout::Properties* props);
93 
94  /*!
95  \brief Creates the name of the new graphic object. Adds the number that corresponds to how many objects of this type have already been created.
96 
97  \param name name of the class type of the graphic object
98  \param type type of the object
99 
100  \return name
101  */
102  virtual std::string nameItem(te::layout::EnumType* type) = 0;
103 
104  protected:
105 
106  SharedProperties* m_sharedProps; //!< Default properties of all graphics objects.
107  te::layout::Properties* m_props; //!< Properties of a graphic object.
108  te::gm::Coord2D m_coord; //!< Coordinate of a graphic object.
109  int m_zValue; //!< Z Value of a graphic object.
110  int m_id; //!< Id of a graphic object.
111  };
112  }
113 }
114 
115 #endif
te::gm::Coord2D m_coord
Coordinate of a graphic object.
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:99
The Properties class represents a persistent set of properties. The Properties can be saved to a file...
Definition: Properties.h:52
An utility struct for representing 2D coordinates.
Definition: Coord2D.h:40
SharedProperties * m_sharedProps
Default properties of all graphics objects.
int m_zValue
Z Value of a graphic object.
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
Definition: EnumType.h:48
te::layout::Properties * m_props
Properties of a graphic object.
Configuration flags for the Terrralib Layout module.
Abstract class for build graphics MVC components.