Loading...
Searching...
No Matches
SymbologyPreview.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/SymbologyPreview.h
22
23 \brief Static class used to generate preview of Symbology elements.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOLOGYPREVIEW_H
27#define __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOLOGYPREVIEW_H
28
29// TerraLib
30#include "../../../common/Static.h"
31#include "../Config.h"
32
33// Qt
34#include <QPixmap>
35
36// STL
37#include <vector>
38
39namespace te
40{
41// Forward declarations
42 namespace gm
43 {
44 class Geometry;
45 }
46
47 namespace se
48 {
49 class Rule;
50 class Symbolizer;
51 }
52
53 namespace qt
54 {
55 namespace widgets
56 {
57// Forward declaration
58 class Symbol;
59
61 {
62 public:
63
64 /*!
65 \brief Generates the preview of given symbolizer element.
66
67 \param symb A valid symbolizer element.
68 \param size The preview size.
69
70 \return A pixmap that represents the result of symbolizer preview.
71
72 \note A default geometry will be created based on symbolizer type and will be used to draw the preview.
73 */
74 static QPixmap build(const te::se::Symbolizer* symb, const QSize& size);
75
76 /*!
77 \brief Generates the preview of a set of symbolizers elements.
78
79 \param symbs A set of symbolizers elements.
80 \param size The preview size.
81
82 \return A pixmap that represents the composite result of symbolizers preview.
83
84 \note Default geometry will be created based on symbolizers type and will be used to draw the preview.
85 */
86 static QPixmap build(const std::vector<te::se::Symbolizer*>& symbs, const QSize& size);
87
88 /*!
89 \brief Generates the preview of a set of symbolizers elements included in the given rule.
90
91 \param rule A valid rule element that will be used to get the set of symbolizers.
92 \param size The preview size.
93
94 \return A pixmap that represents the composite result of rule's symbolizers preview.
95
96 \note Default geometries will be created based on symbolizers type and will be used to draw the preview.
97 */
98 static QPixmap build(const te::se::Rule* rule, const QSize& size);
99
100 /*!
101 \brief Generates the preview of given symbolizer element.
102
103 \param symb A valid symbolizer element.
104 \param geom The geometry that will be used to draw the preview.
105 \param size The preview size.
106
107 \return A pixmap that represents the result of symbolizer preview.
108 */
109 static QPixmap build(const te::se::Symbolizer* symb, const te::gm::Geometry* geom, const QSize& size);
110
111 /*!
112 \brief Generates the preview of given text symbolizer element.
113
114 \param symb A valid symbolizer element.
115 \param size The preview size.
116
117 \return A pixmap that represents the result of symbolizer preview.
118 */
119 static QPixmap buildText(const te::se::Symbolizer* symb, const QSize& size);
120
121 /*!
122 \brief Generates the preview of a set of symbolizers elements.
123
124 \param symbs A set of symbolizers elements.
125 \param geom The geometry that will be used to draw the preview.
126 \param size The preview size.
127
128 \return A pixmap that represents the composite result of symbolizers preview.
129 */
130 static QPixmap build(const std::vector<te::se::Symbolizer*>& symbs, const te::gm::Geometry* geom, const QSize& size);
131
132 /*!
133 \brief Generates the preview of a set of symbolizers elements included in the given rule.
134
135 \param rule A valid rule element that will be used to get the set of symbolizers.
136 \param geom The geometry that will be used to draw the preview.
137 \param size The preview size.
138
139 \return A pixmap that represents the composite result of rule's symbolizers preview.
140 */
141 static QPixmap build(const te::se::Rule* rule, const te::gm::Geometry* geom, const QSize& size);
142
143 /*!
144 \brief Generates the preview of a symbol.
145
146 \param symbol A valid symbol.
147 \param geom The geometry that will be used to draw the preview.
148 \param size The preview size.
149
150 \return A pixmap that represents the symbol preview.
151 */
152 static QPixmap build(const Symbol* symbol, const te::gm::Geometry* geom, const QSize& size);
153 };
154
155 } // end namespace widgets
156 } // end namespace qt
157} // end namespace te
158
159#endif // __TERRALIB_QT_WIDGETS_SE_INTERNAL_SYMBOLOGYPREVIEW_H
A base type for static classes.
Definition: Static.h:44
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:78
This class represents a symbol. TODO: More description!
Definition: Symbol.h:55
static QPixmap build(const std::vector< te::se::Symbolizer * > &symbs, const te::gm::Geometry *geom, const QSize &size)
Generates the preview of a set of symbolizers elements.
static QPixmap build(const te::se::Rule *rule, const te::gm::Geometry *geom, const QSize &size)
Generates the preview of a set of symbolizers elements included in the given rule.
static QPixmap build(const te::se::Rule *rule, const QSize &size)
Generates the preview of a set of symbolizers elements included in the given rule.
static QPixmap build(const std::vector< te::se::Symbolizer * > &symbs, const QSize &size)
Generates the preview of a set of symbolizers elements.
static QPixmap build(const te::se::Symbolizer *symb, const QSize &size)
Generates the preview of given symbolizer element.
static QPixmap buildText(const te::se::Symbolizer *symb, const QSize &size)
Generates the preview of given text symbolizer element.
static QPixmap build(const te::se::Symbolizer *symb, const te::gm::Geometry *geom, const QSize &size)
Generates the preview of given symbolizer element.
static QPixmap build(const Symbol *symbol, const te::gm::Geometry *geom, const QSize &size)
Generates the preview of a symbol.
A Rule is used to attach property/scale conditions to and group the individual symbols used for rende...
Definition: Rule.h:77
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:81
TerraLib.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63