All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
LegendModel.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 LegendModel.h
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 #ifndef __TERRALIB_LAYOUT_INTERNAL_LEGEND_MODEL_H
29 #define __TERRALIB_LAYOUT_INTERNAL_LEGEND_MODEL_H
30 
31 // TerraLib
32 #include "ItemModelObservable.h"
33 #include "ContextItem.h"
34 #include "AbstractVisitor.h"
35 #include "../../../maptools/AbstractLayer.h"
36 #include "../../../maptools/Canvas.h"
37 #include "Utils.h"
38 
39 namespace te
40 {
41  namespace layout
42  {
44  {
45  public:
46 
47  LegendModel();
48  virtual ~LegendModel();
49 
50  virtual void draw( ContextItem context );
51 
52  virtual Properties* getProperties() const;
53 
54  virtual void updateProperties(te::layout::Properties* properties);
55 
56  virtual void visitDependent();
57 
58  virtual void setBorderDisplacement(double value);
59 
60  virtual double getBorderDisplacement();
61 
62  virtual void setDisplacementBetweenSymbols(double value);
63 
64  virtual double getDisplacementBetweenSymbols();
65 
66  virtual void setDisplacementBetweenTitleAndSymbols(double value);
67 
69 
70  virtual void setDisplacementBetweenSymbolAndText(double value);
71 
72  virtual double getDisplacementBetweenSymbolAndText();
73 
74  protected:
75 
76  virtual void drawLegend(te::map::Canvas* canvas, Utils* utils);
77 
78  std::string m_mapName;
84  };
85  }
86 }
87 
88 #endif //__TERRALIB_LAYOUT_INTERNAL_MAPLAYOUT_MODEL_H
virtual double getDisplacementBetweenTitleAndSymbols()
double m_displacementBetweenTitleAndSymbols
Definition: LegendModel.h:82
virtual void setDisplacementBetweenTitleAndSymbols(double value)
te::map::AbstractLayerPtr m_layer
Definition: LegendModel.h:79
virtual double getDisplacementBetweenSymbols()
virtual Properties * getProperties() const
double m_displacementBetweenSymbolsAndText
Definition: LegendModel.h:83
virtual void setDisplacementBetweenSymbolAndText(double value)
virtual void draw(ContextItem context)
Definition: LegendModel.cpp:59
virtual void setDisplacementBetweenSymbols(double value)
A canvas is an abstraction of a drawing area.
Definition: Canvas.h:91
virtual void drawLegend(te::map::Canvas *canvas, Utils *utils)
Definition: LegendModel.cpp:88
virtual double getBorderDisplacement()
virtual void visitDependent()
double m_displacementBetweenSymbols
Definition: LegendModel.h:81
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
virtual double getDisplacementBetweenSymbolAndText()
virtual void setBorderDisplacement(double value)
virtual void updateProperties(te::layout::Properties *properties)