All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
HistogramFrame.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/af/settings/HistogramFrame.cpp
22 
23  \brief A frame used to adjust a histogram's chart parameters, weather it is about it's data or it's visual style.
24 */
25 
26 //Terralib
27 #include "../../../dataaccess.h"
28 #include "ui_HistogramFrameWidgetForm.h"
29 #include "HistogramChart.h"
30 #include "HistogramFrame.h"
31 #include "HistogramStyle.h"
32 #include "HistogramStyleWidget.h"
33 
35  : ChartWidget(parent),
36  m_ui(new Ui::HistogramFrameWidgetForm)
37 {
38  m_ui->setupUi(this);
39  m_label = "Histogram";
40 }
41 
43 {
44  delete m_styleWidget;
45 }
46 
48 {
49  m_chart->setHistogramStyle(m_styleWidget->getHistogramStyle());
50  return m_chart;
51 }
52 
53 void te::qt::widgets::HistogramFrame::setChart(QwtPlotSeriesItem* newChart)
54 {
55  m_chart = static_cast<te::qt::widgets::HistogramChart*>(newChart);
56  m_styleWidget = new te::qt::widgets::HistogramStyleWidget(m_chart->getHistogramStyle());
57  QGridLayout* styleLayout = new QGridLayout(m_ui->m_histogramStyleFrame);
58  styleLayout->addWidget(m_styleWidget);
59 }
60 
A widget used to adjust a histogram's style.
QwtPlotSeriesItem * getChart()
Returns a pointer to the chart being configured.
A class used to define the style of a histogram's chart.
std::auto_ptr< Ui::HistogramFrameWidgetForm > m_ui
The widget Form.
void setChart(QwtPlotSeriesItem *newChart)
It sets the chart being configured.
A widget used to adjust a histogram's style.
std::string m_label
The chart's Label.
Definition: ChartWidget.h:100
A class to represent a histogram chart.
A base widget for settings.
Definition: ChartWidget.h:50
HistogramFrame(QWidget *parent=0)
Constructor.
A frame used to adjust a histogram's chart parameters, weather it is about it's data or it's visual s...