Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
EditTemplateOutside.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 EditTemplateOutside.cpp
22
23
\brief
24
25
\ingroup layout
26
*/
27
28
// TerraLib
29
#include "
EditTemplateOutside.h
"
30
#include "ui_EditTemplate.h"
31
#include "../../core/pattern/mvc/OutsideObserver.h"
32
#include "../../core/pattern/mvc/OutsideController.h"
33
#include "../../core/pattern/singleton/Context.h"
34
35
// STL
36
#include <string>
37
#include <sstream>
38
39
te::layout::EditTemplateOutside::EditTemplateOutside
(
OutsideController
* controller,
Observable
* o ) :
40
QWidget(0),
41
OutsideObserver
(controller, o),
42
m_ui(new Ui::EditTemplate)
43
{
44
m_ui
->setupUi(
this
);
45
46
init
();
47
}
48
49
te::layout::EditTemplateOutside::~EditTemplateOutside
()
50
{
51
52
}
53
54
void
te::layout::EditTemplateOutside::init
()
55
{
56
57
}
58
59
void
te::layout::EditTemplateOutside::updateObserver
(
ContextItem
context )
60
{
61
setVisible(context.
isShow
());
62
if
(context.
isShow
() ==
true
)
63
show();
64
else
65
hide();
66
}
67
68
void
te::layout::EditTemplateOutside::setPosition
(
const
double
& x,
const
double
& y )
69
{
70
move(x,y);
71
refresh();
72
}
73
74
te::gm::Coord2D
te::layout::EditTemplateOutside::getPosition
()
75
{
76
QPointF posF = pos();
77
qreal valuex = posF.x();
78
qreal valuey = posF.y();
79
80
te::gm::Coord2D
coordinate;
81
coordinate.
x
= valuex;
82
coordinate.
y
= valuey;
83
84
return
coordinate;
85
}
86
87
void
te::layout::EditTemplateOutside::load
()
88
{
89
90
}
91
92
void
te::layout::EditTemplateOutside::on_pbApply_clicked
()
93
{
94
95
}
te::layout::Observable
Abstract class to represent an observable. "Model" part of MVC component.
Definition:
Observable.h:56
te::layout::EditTemplateOutside::~EditTemplateOutside
virtual ~EditTemplateOutside()
Definition:
EditTemplateOutside.cpp:49
te::layout::ContextItem
Class responsible for maintaining the drawing context of a MVC component. It is always used by the "M...
Definition:
ContextItem.h:49
te::layout::EditTemplateOutside::updateObserver
virtual void updateObserver(ContextItem context)
Reimplemented from Observer.
Definition:
EditTemplateOutside.cpp:59
te::gm::Coord2D::y
double y
y-coordinate.
Definition:
Coord2D.h:114
EditTemplateOutside.h
te::gm::Coord2D::x
double x
x-coordinate.
Definition:
Coord2D.h:113
te::layout::EditTemplateOutside::m_ui
std::auto_ptr< Ui::EditTemplate > m_ui
Definition:
EditTemplateOutside.h:82
te::layout::OutsideObserver
Abstract class to represent an observer. "View" part of MVC widget. All classes representing the grap...
Definition:
OutsideObserver.h:52
te::layout::ContextItem::isShow
virtual bool isShow()
Definition:
ContextItem.cpp:150
te::gm::Coord2D
An utility struct for representing 2D coordinates.
Definition:
Coord2D.h:40
te::layout::EditTemplateOutside::load
virtual void load()
Definition:
EditTemplateOutside.cpp:87
te::layout::EditTemplateOutside::on_pbApply_clicked
virtual void on_pbApply_clicked()
Definition:
EditTemplateOutside.cpp:92
te::layout::EditTemplateOutside::setPosition
virtual void setPosition(const double &x, const double &y)
Change coordinate llx,lly of the MVC widget. Reimplement this function in a ItemController subclass t...
Definition:
EditTemplateOutside.cpp:68
te::layout::EditTemplateOutside::getPosition
virtual te::gm::Coord2D getPosition()
Method that returns the position llx, lly Reimplement this function in a ItemObserver subclass to pro...
Definition:
EditTemplateOutside.cpp:74
te::layout::EditTemplateOutside::init
virtual void init()
Definition:
EditTemplateOutside.cpp:54
te::layout::OutsideController
Abstract class to represent a controller. "Controller" part of MVC widget. All classes representing t...
Definition:
OutsideController.h:48
te::layout::EditTemplateOutside::EditTemplateOutside
EditTemplateOutside(OutsideController *controller, Observable *o)
Definition:
EditTemplateOutside.cpp:39
TL5_2015_release
terralib5
src
terralib
layout
qt
outside
EditTemplateOutside.cpp
Generated on Wed Jun 3 2015 10:23:06 for TerraLib by
1.8.7