All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TemporalPropertiesWidget.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2010-2013 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/tempoal/TimePropertiesWidget.cpp
22 
23  \brief A widget used to adjust a temporal layer's properties
24 */
25 
26 //Terralib
27 #include "../../../dataaccess.h"
28 #include "../../../datatype/Property.h"
30 #include "ui_TemporalPropertiesWidgetForm.h"
31 
32 //QT
33 #include <QWidget>
34 
36 : QWidget(parent, f),
37  m_ui(new Ui::TemporalPropertiesWidgetForm),
38  m_dataSet (dataSet)
39 
40 {
41  m_ui->setupUi(this);
42  QString item;
43 
44  for (std::size_t i = 0; i < dataSet->getNumProperties(); i++)
45  {
47  {
48  item = QString::fromStdString(dataSet->getPropertyName(i));
49  m_ui->m_phenomenomComboBox->addItem(item);
50  m_ui->m_resultComboBox->addItem(item);
51  m_ui->m_validComboBox->addItem(item);
52  }
53  }
54 
55 // connect signal and slots
56  connect(m_ui->m_phenomenomComboBox, SIGNAL(currentIndexChanged(QString)), this, SLOT(onPropertyComboBoxIndexChanged(QString)));
57 }
58 
60 {
61 }
62 
63 Ui::TemporalPropertiesWidgetForm* te::qt::widgets::TemporalPropertiesWidget::getForm()
64 {
65  return m_ui.get();
66 }
67 
69 {
70 
71 }
TemporalPropertiesWidget(te::da::DataSet *dataSet, QWidget *parent=0, Qt::WindowFlags f=0)
Constructor.
Ui::TemporalPropertiesWidgetForm * getForm()
Returns a pointer to the widget's form.
virtual std::string getPropertyName(std::size_t i) const =0
It returns the property name at position pos.
virtual std::size_t getNumProperties() const =0
It returns the number of properties that composes an item of the dataset.
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:112
std::auto_ptr< Ui::TemporalPropertiesWidgetForm > m_ui
The widget's form.
virtual int getPropertyDataType(std::size_t i) const =0
It returns the underlying data type of the property at position pos.