ZoomInMapDisplayWidget.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/canvas/ZoomInMapDisplayWidget.h
22 
23  \brief This file has the ZoomInMapDisplayWidget class.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_ZOOMINMAPDISPLAYWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_ZOOMINMAPDISPLAYWIDGET_H
28 
29 // TerraLib
30 #include "../../../color/RGBAColor.h"
31 #ifndef Q_MOC_RUN
32 #include "../../../maptools/AbstractLayer.h"
33 #endif
34 #include "../Config.h"
35 
36 // STL
37 #include <memory>
38 
39 // Qt
40 #include <QSlider>
41 #include <QWidget>
42 
43 namespace te
44 {
45  namespace gm { class Envelope; }
46 
47  namespace se { class Mark; }
48 
49  namespace qt
50  {
51  namespace widgets
52  {
53  class MapDisplay;
54 
55  /*!
56  \class ZoomInMapDisplayWidget
57 
58  \brief This class defines the map display ZoomIn, this component is only a specific
59  map that shows the current extent in a larger scale.
60  */
62  {
63  Q_OBJECT
64 
65  public:
66 
67  ZoomInMapDisplayWidget(te::qt::widgets::MapDisplay* mapParent, QWidget* parent = 0, Qt::WindowFlags f = 0);
68 
70 
71  public:
72 
73  /*!
74  \brief This method is used to set the selected layer for mixture model operation
75 
76  \param layer The layer ptr
77 
78  \note This layer MUST HAVE a valid raster object.
79  */
80  void setList(std::list<te::map::AbstractLayerPtr>& layerList, int srid);
81 
82  te::gm::Envelope getCurrentExtent();
83 
84  void drawCursorPosition(double x, double y);
85 
86  void setEnabled(bool status);
87 
88  protected slots:
89 
90  void onMapDisplayExtentChanged();
91 
92  void onParentMapDisplayExtentChanged();
93 
94  void onZoomFactorChanged();
95 
96  protected:
97 
98  te::gm::Envelope calculateExtent(te::gm::Envelope& e);
99 
100  private:
101 
103 
105 
106  te::color::RGBAColor** m_rgbaMark; //!< Represents the pattern of cursor point
107  te::se::Mark* m_mark; //!< Represents the mark of a cursor point
108 
109  bool m_itsMe;
111 
113  };
114 
115  } // end namespace widgets
116  } // end namespace qt
117 } // end namespace te
118 
119 #endif // __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_ZOOMINMAPDISPLAYWIDGET_H
120 
This class defines the map display ZoomIn, this component is only a specific map that shows the curre...
A Mark specifies a geometric shape and applies coloring to it.
Definition: Mark.h:84
A widget to control the display of a set of layers.
Definition: MapDisplay.h:69
te::qt::widgets::MapDisplay * m_mapDisplay
te::se::Mark * m_mark
Represents the mark of a cursor point.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
URI C++ Library.
te::qt::widgets::MapDisplay * m_parentMapDisplay
te::color::RGBAColor ** m_rgbaMark
Represents the pattern of cursor point.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:57
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63