All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PageSetupOutside.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2001-2014 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 PageSetupOutside.cpp
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 // TerraLib
29 #include "PageSetupOutside.h"
30 #include "ui_PageSetup.h"
31 #include "OutsideObserver.h"
32 #include "OutsideController.h"
33 
34 // STL
35 #include <string>
36 #include <sstream>
37 
38 // Qt
39 #include <QColorDialog>
40 #include <QFrame>
41 #include <QLineEdit>
42 #include <QValidator>
43 #include <QComboBox>
44 #include <QCheckBox>
45 #include <QMessageBox>
46 #include <QObjectList>
47 
49  QDialog(0),
50  OutsideObserver(controller, o),
51  m_ui(new Ui::PageSetup)
52 {
53  m_ui->setupUi(this);
54 
55  setWindowFlags( Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint
56  | Qt::WindowTitleHint | Qt::WindowStaysOnTopHint );
57 
58  init();
59 }
60 
62 {
63 
64 }
65 
67 {
68  m_ui->lneCustomWidth->setValidator(new QDoubleValidator(this));
69  m_ui->lneCustomHeight->setValidator(new QDoubleValidator(this));
70 }
71 
73 {
74  setVisible(context.getShow());
75  if(context.getShow() == true)
76  show();
77  else
78  hide();
79 }
80 
81 void te::layout::PageSetupOutside::setPosition( const double& x, const double& y )
82 {
83  move(x,y);
84  refresh();
85 }
86 
88 {
89  QPointF posF = pos();
90  qreal valuex = posF.x();
91  qreal valuey = posF.y();
92 
93  te::gm::Coord2D coordinate;
94  coordinate.x = valuex;
95  coordinate.y = valuey;
96 
97  return coordinate;
98 }
99 
101 {
102 
103 }
double y
y-coordinate.
Definition: Coord2D.h:87
double x
x-coordinate.
Definition: Coord2D.h:86
An utility struct for representing 2D coordinates.
Definition: Coord2D.h:40
virtual te::gm::Coord2D getPosition()
virtual void updateObserver(ContextItem context)
std::auto_ptr< Ui::PageSetup > m_ui
virtual void setPosition(const double &x, const double &y)
PageSetupOutside(OutsideController *controller, Observable *o)