All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
WaitView.cpp
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 WaitView.cpp
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 // TerraLib
29 #include "WaitView.h"
30 #include "View.h"
31 
33 {
34 
35 }
36 
38  m_view(view)
39 {
40 
41 }
42 
44 {
45 
46 }
47 
48 void te::layout::WaitView::addCoord( QPointF point )
49 {
50  if(!m_view)
51  return;
52 
53  QPointF poinT = m_view->mapToScene(point.toPoint());
54  te::gm::Point* p = new te::gm::Point(poinT.x(), poinT.y());
55  m_coords.push_back(p);
56  QPoint received(point.x(), point.y());
57  m_points.push_back(received);
58 
59  m_view->viewport()->update();
60 }
61 
63 {
64  m_coords.clear();
65  m_points.clear();
66 }
67 
69 {
70  return m_points;
71 }
72 
73 std::vector<te::gm::Point*> te::layout::WaitView::getCoordsW()
74 {
75  return m_coords;
76 }
virtual ~WaitView()
Definition: WaitView.cpp:43
A point with x and y coordinate values.
Definition: Point.h:50
Class representing the view. This view is child of QGraphicsView, part of Graphics View Framework...
Definition: View.h:89
Class representing the view. This view is child of QGraphicsView, part of Graphics View Framework...
virtual void addCoord(QPointF point)
Definition: WaitView.cpp:48
virtual void clear()
Definition: WaitView.cpp:62
virtual std::vector< te::gm::Point * > getCoordsW()
Definition: WaitView.cpp:73
virtual QVector< QPoint > getCoords()
Definition: WaitView.cpp:68