All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Utils.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2009 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/Utils.h
22 
23  \brief This file contains utility functions for dealing with Symbology Enconding and Qt concepts.
24  */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_UTILS_H
27 #define __TERRALIB_QT_WIDGETS_SE_INTERNAL_UTILS_H
28 
29 // TerraLib
30 #include "../Config.h"
31 
32 // Forward declarations
33 class QBrush;
34 class QPen;
35 
36 namespace te
37 {
38 // Forward declarations
39  namespace se
40  {
41  class Fill;
42  class Stroke;
43  }
44 
45  namespace qt
46  {
47  namespace widgets
48  {
49 
50  /*!
51  \brief It configs the given pen based on Symbology Enconding Stroke element.
52 
53  \param pen The pen that will be configured.
54  \param stroke The Symbology Enconding Stroke element that will be used. If NULL, Qt::transparent color will be setted on pen.
55 
56  \note Warning: It consider that the parameters of Stroke element is enconded using a Literal OGC Filter expression.
57  */
58  void Config(QPen& pen, const te::se::Stroke* stroke);
59 
60  /*!
61  \brief It configs the given brush based on Symbology Enconding Fill element.
62 
63  \param brush The brush that will be configured.
64  \param fill The Symbology Enconding Fill element that will be used. If NULL, Qt::transparent color will be setted on brush.
65 
66  \note Warning: It consider that the parameters of Fill element is enconded using a Literal OGC Filter expression.
67  */
68  void Config(QBrush& brush, const te::se::Fill* fill);
69 
70  } // end namespace widgets
71  } // end namespace qt
72 } // end namespace te
73 
74 #endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_UTILS_H
A Fill specifies the pattern for filling an area geometry.
Definition: Fill.h:59
void Config(QPen &pen, const te::se::Stroke *stroke)
It configs the given pen based on Symbology Enconding Stroke element.
Definition: Utils.cpp:38
A Stroke specifies the appearance of a linear geometry.
Definition: Stroke.h:67