All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Frame.cpp
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/canvas/DataFrame.h
22 
23  \brief The frame data....
24 */
25 
26 // TerraLib
27 #include "Frame.h"
28 #include "LayoutEditor.h"
29 #include <QtGui/QWidget>
30 #include <QtGui/QToolTip>
31 
33  LayoutObject(me, f),
34  m_selected(0),
35  m_dragging(false),
36  m_showToolTip(true),
37  m_new(false)
38 {
39 }
40 
42  LayoutObject(rhs.m_layoutEditor, rhs.windowFlags())
43 {
45  m_recSel1 = rhs.m_recSel1;
46  m_recSel2 = rhs.m_recSel2;
47  m_recSel3 = rhs.m_recSel3;
48  m_recSel4 = rhs.m_recSel4;
49  m_recSel5 = rhs.m_recSel5;
50  m_recSel6 = rhs.m_recSel6;
51  m_recSel7 = rhs.m_recSel7;
52  m_recSel8 = rhs.m_recSel8;
53  m_recSel9 = rhs.m_recSel9;
54  m_recSel10 = rhs.m_recSel10;
55  m_selected = rhs.m_selected;
59  m_dragging = rhs.m_dragging;
61  m_new = rhs.m_new;
62 }
63 
65 {
66  hide();
67 }
68 
69 
71 {
72  if(this != &rhs)
73  {
75  m_frameRect = rhs.m_frameRect;
76  m_recSel1 = rhs.m_recSel1;
77  m_recSel2 = rhs.m_recSel2;
78  m_recSel3 = rhs.m_recSel3;
79  m_recSel4 = rhs.m_recSel4;
80  m_recSel5 = rhs.m_recSel5;
81  m_recSel6 = rhs.m_recSel6;
82  m_recSel7 = rhs.m_recSel7;
83  m_recSel8 = rhs.m_recSel8;
84  m_recSel9 = rhs.m_recSel9;
85  m_recSel10 = rhs.m_recSel10;
86  m_selected = rhs.m_selected;
87  m_auxFrameRect = rhs.m_auxFrameRect;
88  m_copyAuxFrameRect = rhs.m_copyAuxFrameRect;
89  m_pressPoint = rhs.m_pressPoint;
90  m_dragging = rhs.m_dragging;
91  m_showToolTip = rhs.m_showToolTip;
92  m_new = rhs.m_new;
93  }
94 
95  return *this;
96 }
97 
99 {
100  return m_new;
101 }
102 
104 {
105  m_new = b;
106 }
107 
109 {
110  m_showToolTip = b;
111 
112  if(m_showToolTip == false)
113  QToolTip::hideText();
114 }
115 
117 {
118  return m_frameRect;
119 }
QPoint m_pressPoint
Definition: Frame.h:90
void setNew(bool)
Definition: Frame.cpp:103
LayoutObject & operator=(const LayoutObject &rhs)
QRectF m_frameRect
Definition: Frame.h:73
QRectF m_auxFrameRect
Definition: Frame.h:88
void showToolTip(bool b)
Definition: Frame.cpp:108
QRectF m_copyAuxFrameRect
Definition: Frame.h:89
QRectF getFrameRect()
Definition: Frame.cpp:116
virtual ~Frame()
Definition: Frame.cpp:64
Frame & operator=(const Frame &rhs)
Definition: Frame.cpp:70
Frame(te::qt::widgets::LayoutEditor *me, Qt::WindowFlags f=Qt::Widget)
Definition: Frame.cpp:32