All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrajectoryPropertiesWizardPage.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/TrajectoryPropertiesWIzardPage.cpp
22 
23  \brief A wizardPage used to configure the generaç properties of a new Trajectory layer.
24 */
25 
26 // TerraLib
27 #include "../../../st/core/trajectory/TrajectoryDataSetInfo.h"
31 #include "ui_TrajectoryPropertiesWidgetForm.h"
32 #include "ui_TemporalPropertiesWidgetForm.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 
51 {
52 }
53 
54 std::list<te::st::TrajectoryDataSetInfo*> te::qt::widgets::TrajectoryPropertiesWizardPage::getInfo(const te::da::DataSourceInfoPtr dsInfo)
55 {
56  std::list<te::st::TrajectoryDataSetInfo*> trajInfos;
57 
58  std::list<te::da::DataSetTypePtr>::const_iterator typesItBegin = m_dataTypes.begin();
59  std::list<te::da::DataSetTypePtr>::const_iterator typesItEnd = m_dataTypes.end();
60 
61  while(typesItBegin != typesItEnd)
62  {
63  trajInfos.push_back(new te::st::TrajectoryDataSetInfo(*dsInfo.get(), typesItBegin->get()->getName(), m_tempPropWidget->getPhenomenonTime(), m_propWidget->getGeometryId(), "", typesItBegin->get()->getName()));
64  typesItBegin++;
65  }
66 
67  return trajInfos;
68 }
69 
71 {
72  return true;
73 }
74 
75 void te::qt::widgets::TrajectoryPropertiesWizardPage::set(const std::list<te::da::DataSetTypePtr> dataTypes)
76 {
77  m_dataTypes = dataTypes;
78  m_tempPropWidget->setUp(dataTypes.front());
79  m_propWidget->setUp(dataTypes.front());
80 }
std::auto_ptr< TrajectoryPropertiesWidget > m_propWidget
The widget used to configure the unique TrajectoryLayer's properties.
std::auto_ptr< TemporalPropertiesWidget > m_tempPropWidget
The widget used to configure the general TrajectoryLayer's properties.
std::list< te::st::TrajectoryDataSetInfo * > getInfo(const te::da::DataSourceInfoPtr dsInfo)
void set(const std::list< te::da::DataSetTypePtr > dataTypes)
A widget used to adjust a temporal layer's properties.
A widget used to adjust a Trajectory layer's properties.
A widget used to adjust a Trajectory layer's properties.
A class that contains infos about a DataSet that contains observations of one or more trajectories...
A wizardPage used to configure the generaç properties of a new trajectory layer.
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr