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 #include "../../../maptools/AbstractLayer.h"
32 #include "../Config.h"
33 
34 // STL
35 #include <memory>
36 
37 // Qt
38 #include <QSlider>
39 #include <QWidget>
40 
41 namespace te
42 {
43  namespace gm { class Envelope; }
44 
45  namespace se { class Mark; }
46 
47  namespace qt
48  {
49  namespace widgets
50  {
51  class MapDisplay;
52 
53  /*!
54  \class ZoomInMapDisplayWidget
55 
56  \brief This class defines the map display ZoomIn, this component is only a specific
57  map that shows the current extent in a larger scale.
58  */
60  {
61  Q_OBJECT
62 
63  public:
64 
65  ZoomInMapDisplayWidget(te::qt::widgets::MapDisplay* mapParent, QWidget* parent = 0, Qt::WindowFlags f = 0);
66 
68 
69  public:
70 
71  /*!
72  \brief This method is used to set the selected layer for mixture model operation
73 
74  \param layer The layer ptr
75 
76  \note This layer MUST HAVE a valid raster object.
77  */
78  void setList(std::list<te::map::AbstractLayerPtr>& layerList, int srid);
79 
80  te::gm::Envelope getCurrentExtent();
81 
82  void drawCursorPosition(double x, double y);
83 
84  void setEnabled(bool status);
85 
86  protected slots:
87 
88  void onMapDisplayExtentChanged();
89 
90  void onParentMapDisplayExtentChanged();
91 
92  void onZoomFactorChanged();
93 
94  protected:
95 
96  te::gm::Envelope calculateExtent(te::gm::Envelope& e);
97 
98  private:
99 
101 
103 
104  te::color::RGBAColor** m_rgbaMark; //!< Represents the pattern of cursor point
105  te::se::Mark* m_mark; //!< Represents the mark of a cursor point
106 
107  bool m_itsMe;
109 
111  };
112 
113  } // end namespace widgets
114  } // end namespace qt
115 } // end namespace te
116 
117 #endif // __TERRALIB_QT_WIDGETS_CANVAS_INTERNAL_ZOOMINMAPDISPLAYWIDGET_H
118 
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:66
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