Loading...
Searching...
No Matches
Symbol.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 terralib/qt/widgets/se/Symbol.h
22
23 \brief This class represents a symbol.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOL_H
27#define __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOL_H
28
29// TerraLib
30#include "../Config.h"
31#include "SymbolInfo.h"
32
33// STL
34#include <string>
35#include <vector>
36
37namespace te
38{
39// Forward declarations
40 namespace se
41 {
42 class Symbolizer;
43 }
44
45 namespace qt
46 {
47 namespace widgets
48 {
49 /*!
50 \class Symbol
51
52 \brief This class represents a symbol. TODO: More description!
53 */
55 {
56 public:
57
58 /** @name Initializer Methods
59 * Methods related to instantiation and destruction.
60 */
61 //@{
62
63 /*! \brief Default constructor. */
65
66 /*! \brief Copy constructor. */
67 Symbol(const Symbol& rhs);
68
69 /*! \brief Destructor. */
70 virtual ~Symbol();
71
72 //@}
73
74 public:
75
76 /*!
77 \brief It return the information associated to the symbol.
78
79 \return The information associated to the symbol.
80 */
81 const SymbolInfo& getInfo() const;
82
83 /*!
84 \brief It sets the information associated to the symbol.
85
86 \param info The information that will be associated to this symbol.
87 */
88 void setInfo(const SymbolInfo& info);
89
90 /*!
91 \brief It returns the number of Symbolizers that compose of the symbol.
92
93 \return The number of Symbolizers that compose of the symbol.
94 */
95 std::size_t getSymbolizersCount() const;
96
97 /*!
98 \brief It returns the n-th Symbolizer.
99
100 \param i The Symbolizer index.
101
102 \return It returns a pointer to the specified Symbolizer.
103
104 \note The caller of this method will NOT take the ownership of the symbolizer.
105 */
106 te::se::Symbolizer* getSymbolizer(const std::size_t& i) const;
107
108 /*!
109 \brief It returns the n-th Symbolizer.
110
111 \param i The Symbolizer index.
112
113 \return It returns a pointer to the specified Symbolizer.
114
115 \note The caller of this method will NOT take the ownership of the symbolizer.
116 */
117 te::se::Symbolizer* operator[](const std::size_t& i) const;
118
119 /*!
120 \brief It returns the list of Symbolizers that compose the symbol.
121
122 \return The list of Symbolizers that compose the symbol.
123
124 \note The caller of this method will NOT take the ownership of the symbolizers.
125 */
126 const std::vector<te::se::Symbolizer*>& getSymbolizers() const;
127
128 /*!
129 \brief It adds the given Symbolizer to the list of Symbolizers of the symbol.
130
131 \param symb The Symbolizer that will be added.
132
133 \note The symbol will take the ownership of the given Symbolizer.
134 */
136
137 /*!
138 \brief It sets the given Symbolizer at the given position.
139
140 \param i The Symbolizer position.
141 \param symb The Symbolizer that will be added.
142
143 \note The symbol will take the ownership of the given Symbolizer.
144 */
145 void setSymbolizer(const std::size_t& i, te::se::Symbolizer* symb);
146
147 /*!
148 \brief It removes the specified Symbolizer from the list of Symbolizers of the symbol.
149
150 \param i The Symbolizer index.
151 */
152 void removeSymbolizer(const std::size_t& i);
153
154 /*!
155 \brief It swaps the position of the Symbolizers.
156
157 \param first The first Symbolizer index.
158 \param second The second Symbolizer index.
159 */
160 void swapSymbolizers(const std::size_t& first, const std::size_t& second);
161
162 /*! \brief It creates a new copy of this object. */
163 Symbol* clone() const;
164
165 std::string getFullName();
166
167 private:
168
169 SymbolInfo m_info; //!< Information about the symbol.
170 std::vector<te::se::Symbolizer*> m_symbs; //!< Set of symbolizers that compose the symbol.
171 };
172
173 } // end namespace widgets
174 } // end namespace qt
175} // end namespace te
176
177#endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOL_H
Information about a given Symbol.
This class represents a symbol. TODO: More description!
Definition: Symbol.h:55
void setInfo(const SymbolInfo &info)
It sets the information associated to the symbol.
void setSymbolizer(const std::size_t &i, te::se::Symbolizer *symb)
It sets the given Symbolizer at the given position.
virtual ~Symbol()
Destructor.
std::string getFullName()
SymbolInfo m_info
Information about the symbol.
Definition: Symbol.h:169
void swapSymbolizers(const std::size_t &first, const std::size_t &second)
It swaps the position of the Symbolizers.
std::size_t getSymbolizersCount() const
It returns the number of Symbolizers that compose of the symbol.
Symbol()
Default constructor.
const std::vector< te::se::Symbolizer * > & getSymbolizers() const
It returns the list of Symbolizers that compose the symbol.
te::se::Symbolizer * operator[](const std::size_t &i) const
It returns the n-th Symbolizer.
void removeSymbolizer(const std::size_t &i)
It removes the specified Symbolizer from the list of Symbolizers of the symbol.
te::se::Symbolizer * getSymbolizer(const std::size_t &i) const
It returns the n-th Symbolizer.
Symbol(const Symbol &rhs)
Copy constructor.
const SymbolInfo & getInfo() const
It return the information associated to the symbol.
void addSymbolizer(te::se::Symbolizer *symb)
It adds the given Symbolizer to the list of Symbolizers of the symbol.
std::vector< te::se::Symbolizer * > m_symbs
Set of symbolizers that compose the symbol.
Definition: Symbol.h:170
Symbol * clone() const
It creates a new copy of this object.
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:81
TerraLib.
Information about a given Symbol.
Definition: SymbolInfo.h:61
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63