TimeSeriesPropertiesWizardPage.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/st/ TimeSeriesPropertiesWIzardPage.cpp
22 
23  \brief A wizardPage used to configure the generaç properties of a new TimeSeries layer.
24 */
25 
26 // TerraLib
27 #include "../../../st/core/timeseries/TimeSeriesDataSetInfo.h"
31 #include "ui_TemporalPropertiesWidgetForm.h"
32 #include "ui_TimeSeriesPropertiesWidgetForm.h"
33 
35  : QWizardPage(parent)
36 {
39 
40  // Adjusting...
41  QGridLayout* propLayout = new QGridLayout(this);
42  propLayout->addWidget(m_propWidget.get());
43 
44  // Adjusting the properties widget
45  QGridLayout* tempPropLayout = new QGridLayout(m_propWidget->getForm()->m_temporalPropertiesFrame);
46  tempPropLayout->setContentsMargins(0, 0, 0, 0);
47  tempPropLayout->addWidget(m_tempPropWidget.get());
48 }
49 
52 
54 {
55  te::st::TimeSeriesDataSetInfo* timeSeriesInfo;
56  timeSeriesInfo = new te::st::TimeSeriesDataSetInfo(*dsInfo.get(), m_dataType->getName(), m_tempPropWidget->getPhenomenonTime(), m_propWidget->getValuePropName(), m_propWidget->getGeometryPropName(), m_propWidget->getIdPropName(), "");
57  return timeSeriesInfo;
58 }
59 
61 {
62  m_dataType = dataType;
63  m_tempPropWidget->setUp(dataType);
64  m_propWidget->setUp(dataType);
65 }
66 
boost::shared_ptr< DataSetType > DataSetTypePtr
Definition: DataSetType.h:653
te::da::DataSetTypePtr m_dataType
The list of datasettypes used to configure the time series.
A widget used to adjust a time series layer&#39;s properties.
A widget used to adjust a temporal layer&#39;s properties.
std::unique_ptr< TimeSeriesPropertiesWidget > m_propWidget
The widget used to configure the general spatio-temporal layer&#39;s properties.
A widget used to adjust a time series layer&#39;s properties.
std::unique_ptr< TemporalPropertiesWidget > m_tempPropWidget
The widget used to configure the general TrajectoryLayer&#39;s properties.
te::st::TimeSeriesDataSetInfo * getInfo(const te::da::DataSourceInfoPtr dsInfo)
A class that contains infos about a DataSet that contains observations of one or more time series...
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr