All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BuildGraphicsItem.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2014 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 BuildGraphicsItem.h
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 #ifndef __TERRALIB_LAYOUT_INTERNAL_BUILD_GRAPHICS_ITEM_H
29 #define __TERRALIB_LAYOUT_INTERNAL_BUILD_GRAPHICS_ITEM_H
30 
31 //TerraLib
32 #include "../../../../geometry/Envelope.h"
33 #include "../../../../geometry/Coord2D.h"
34 #include "EnumMode.h"
35 #include "Properties.h"
36 #include "AbstractType.h"
37 
38 class QGraphicsItem;
39 
40 namespace te
41 {
42  namespace layout
43  {
44  class SharedProperties;
45 
47  {
48  public:
49 
51  virtual ~BuildGraphicsItem();
52 
53  QGraphicsItem* rebuildItem(te::layout::Properties* props, bool draw = true);
54  QGraphicsItem* createItem(te::layout::LayoutMode mode, const te::gm::Coord2D& coordinate, bool draw = true);
55 
56  protected:
57 
58  QGraphicsItem* createPaper();
59  QGraphicsItem* createMap();
60  QGraphicsItem* createMapGrid();
61  QGraphicsItem* createText();
62  QGraphicsItem* createRectangle();
63  QGraphicsItem* createLegend();
64  QGraphicsItem* createScale();
65  QGraphicsItem* createItemGroup();
66 
68 
70 
71  std::string nameItem(std::string name, te::layout::LayoutAbstractObjectType type);
72 
73  void clear();
74 
75  protected:
76 
79  int m_zValue;
80  int m_id;
81  std::string m_name;
83  std::string m_paperItem;
84  std::string m_mapItem;
85  std::string m_mapGridItem;
86  std::string m_textItem;
87  std::string m_rectangleItem;
88  std::string m_legendItem;
89  std::string m_scaleItem;
90  std::string m_horizontalRuler;
91  std::string m_verticalRuler;
92  std::string m_groupItem;
93  bool m_redraw;
94  };
95  }
96 }
97 
98 #endif
te::layout::Properties * m_props
std::string nameItem(std::string name, te::layout::LayoutAbstractObjectType type)
SharedProperties * m_sharedProps
An utility struct for representing 2D coordinates.
Definition: Coord2D.h:40
LayoutMode
Enum LayoutMode. This is the enumeration of the components types.
Definition: EnumMode.h:38
QGraphicsItem * rebuildItem(te::layout::Properties *props, bool draw=true)
te::gm::Coord2D findCoordinate(te::layout::Properties *props)
QGraphicsItem * createItem(te::layout::LayoutMode mode, const te::gm::Coord2D &coordinate, bool draw=true)
LayoutAbstractObjectType
Enum TdkAbstractComponentType. This is the enumeration of the components types.
Definition: AbstractType.h:38
int findZValue(te::layout::Properties *props)