All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TextModel.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 TextModel.h
22 
23  \brief Class that represents a "Model" part of Text MVC component.
24  Its coordinate system is the same of scene (millimeters).
25  This is also son of ItemModelObservable, so it can become observable.
26 
27  \ingroup layout
28 */
29 
30 #ifndef __TERRALIB_LAYOUT_INTERNAL_TEXT_MODEL_H
31 #define __TERRALIB_LAYOUT_INTERNAL_TEXT_MODEL_H
32 
33 // TerraLib
34 #include "../core/pattern/mvc/ItemModelObservable.h"
35 #include "../core/ContextItem.h"
36 #include "../core/pattern/derivativevisitor/AbstractVisitor.h"
37 #include "../../maptools/Canvas.h"
38 #include "../core/Utils.h"
39 #include "../core/Font.h"
40 #include "../core/Config.h"
41 
42 // STL
43 #include <string>
44 
45 namespace te
46 {
47  namespace layout
48  {
49  /*!
50  \brief Class that represents a "Model" part of Text MVC component.
51  Its coordinate system is the same of scene (millimeters).
52  This is also son of ItemModelObservable, so it can become observable.
53 
54  \ingroup layout
55 
56  \sa te::layout::ItemModelObservable
57  */
59  {
60  public:
61 
62  /*!
63  \brief Constructor
64  */
65  TextModel();
66 
67  /*!
68  \brief Destructor
69  */
70  virtual ~TextModel();
71 
72  virtual te::layout::Properties* getProperties() const;
73 
74  virtual void updateProperties(te::layout::Properties* properties);
75 
76  virtual void setText(std::string txt);
77 
78  virtual std::string getText();
79 
80  virtual Font getFont();
81 
82  virtual void setFont(Font ft);
83 
84  protected:
85 
86  std::string m_text;
88  };
89  }
90 }
91 
92 #endif
Class specifies a font.
Definition: Font.h:46
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:99
Abstract class to represent an observable. "Model" part of MVC component. All classes representing th...
The Properties class represents a persistent set of properties. The Properties can be saved to a file...
Definition: Properties.h:52
Class that represents a "Model" part of Text MVC component. Its coordinate system is the same of scen...
Definition: TextModel.h:58
std::string m_text
Definition: TextModel.h:86