Main Page
Modules
Namespaces
Classes
Files
File List
File Members
ScatterStyleWidget.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 terralib/qt/widgets/charts/scatterStyleWidget.cpp
22
23
\brief A widget used to adjust a scatter's style.
24
*/
25
26
//Terralib
27
#include "../../../se/Graphic.h"
28
#include "../se/GraphicDialog.h"
29
#include "
ScatterStyle.h
"
30
#include "
ScatterStyleWidget.h
"
31
#include "ui_ScatterStyleWidgetForm.h"
32
33
// STL
34
#include <memory>
35
36
//QT
37
#include <QDialog>
38
39
te::qt::widgets::ScatterStyleWidget::ScatterStyleWidget
(
te::qt::widgets::ScatterStyle
* initial,
QWidget
* parent, Qt::WindowFlags f)
40
:
QWidget
(parent, f),
41
m_ui(new
Ui
::ScatterStyleWidgetForm),
42
m_scatterStyle(initial)
43
{
44
m_ui
->setupUi(
this
);
45
46
if
(!
m_scatterStyle
)
47
m_scatterStyle
=
new
te::qt::widgets::ScatterStyle
();
48
49
// connect signal and slots
50
connect(
m_ui
->m_plotStylePushButton, SIGNAL(clicked()),
this
, SLOT(
onPlotStylePushButtonClicked
()));
51
}
52
53
te::qt::widgets::ScatterStyleWidget::~ScatterStyleWidget
()
54
{
55
delete
m_scatterStyle
;
56
}
57
58
te::qt::widgets::ScatterStyle
*
te::qt::widgets::ScatterStyleWidget::getScatterStyle
()
59
{
60
return
m_scatterStyle
->
clone
();
61
}
62
63
void
te::qt::widgets::ScatterStyleWidget::onPlotStylePushButtonClicked
()
64
{
65
std::unique_ptr<te::se::Graphic> graphic(
te::qt::widgets::GraphicDialog::getGraphic
(
m_scatterStyle
->
getGraphic
(),
nullptr
,
"Scatter Style"
));
66
if
(graphic.get())
67
m_scatterStyle
->
setGraphic
(graphic->clone());
68
}
te::qt::widgets::ScatterStyleWidget::ScatterStyleWidget
ScatterStyleWidget(te::qt::widgets::ScatterStyle *initial=0, QWidget *parent=0, Qt::WindowFlags f=0)
Constructor.
Definition:
ScatterStyleWidget.cpp:39
te::qt::widgets::ScatterStyle::setGraphic
void setGraphic(te::se::Graphic *newGraphic)
It sets the he scatter's graphic.
Definition:
ScatterStyle.cpp:74
te::qt::widgets::ScatterStyle::getGraphic
te::se::Graphic * getGraphic()
Returns a pointer to the scatter's graphic.
Definition:
ScatterStyle.cpp:69
ScatterStyle.h
QWidget
Ui
Definition:
attic/src/qt/plugins/datasource/wcs/WCSConnectorDialog.h:41
te::qt::widgets::ScatterStyle
Definition:
ScatterStyle.h:49
te::qt::widgets::ScatterStyleWidget::getScatterStyle
te::qt::widgets::ScatterStyle * getScatterStyle()
Returns a pointer to the ScatterStyle being configured.
Definition:
ScatterStyleWidget.cpp:58
te::qt::widgets::GraphicDialog::getGraphic
te::se::Graphic * getGraphic() const
Gets the configured graphic element.
Definition:
GraphicDialog.cpp:69
te::qt::widgets::ScatterStyleWidget::m_ui
std::unique_ptr< Ui::ScatterStyleWidgetForm > m_ui
The iwdget form.
Definition:
ScatterStyleWidget.h:90
te::qt::widgets::ScatterStyleWidget::~ScatterStyleWidget
~ScatterStyleWidget()
Destructor.
Definition:
ScatterStyleWidget.cpp:53
te::qt::widgets::ScatterStyle::clone
ScatterStyle * clone()
Returns a pointer to a clone of this ScatterStyle.
Definition:
ScatterStyle.cpp:62
ScatterStyleWidget.h
te::qt::widgets::ScatterStyleWidget::m_scatterStyle
ScatterStyle * m_scatterStyle
The scatter's chart style that will be configured by this widget.
Definition:
ScatterStyleWidget.h:91
te::qt::widgets::ScatterStyleWidget::onPlotStylePushButtonClicked
void onPlotStylePushButtonClicked()
Definition:
ScatterStyleWidget.cpp:63
terralib5_src
src
terralib
qt
widgets
charts
ScatterStyleWidget.cpp
Generated on Wed Jun 6 2018 12:16:14 for TerraLib by
1.8.11