NewPropertyWidget.h
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/property/NewPropertyWidget.h
22 
23  \brief A class used to define the NewPropertyWidget class.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_PROPERTY_INTERNAL_NEWPROPERTYWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_PROPERTY_INTERNAL_NEWPROPERTYWIDGET_H
28 
29 // TerraLib
30 #include "../Config.h"
31 
32 
33 // Qt
34 #include <QWidget>
35 #include <QGridLayout>
36 
37 #include <memory>
38 
39 namespace Ui { class NewPropertyWidgetForm; }
40 
41 namespace te
42 {
43  namespace dt { class SimpleProperty; }
44 
45  namespace qt
46  {
47  namespace widgets
48  {
49  class SimplePropertyWidget;
50 
51  /*!
52  \class NewPropertyDialog
53 
54  \brief A dialog for creating a new property
55  */
56  class TEQTWIDGETSEXPORT NewPropertyWidget : public QWidget
57  {
58  Q_OBJECT
59 
60  public:
61 
62  NewPropertyWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
63 
65 
66  public:
67 
68  /*!
69  \brief Used to get all data types supported by this data source.
70 
71  \param id String used to define the data source id
72  */
73  void setDataSourceId(std::string id);
74 
75  /*!
76  \brief It returns a simple property class object.
77 
78  \return The caller of this method will TAKE the ownership of the returned SimpleProperty pointer.
79  */
80  te::dt::SimpleProperty* getProperty();
81 
82  bool buildProperty();
83 
84  public slots:
85 
86  void onDataTypeComboBoxActivated(int index);
87 
88  private:
89 
90  std::auto_ptr<Ui::NewPropertyWidgetForm> m_ui;
93 
94  QGridLayout* m_layout; //!< Qt Layout object
95  };
96  } // end namespace widgets
97  } // end namespace qt
98 } // end namespace te
99 
100 #endif // __TERRALIB_QT_WIDGETS_PROPERTY_INTERNAL_NEWPROPERTYDIALOG_H
101 
std::auto_ptr< Ui::NewPropertyWidgetForm > m_ui
A base widget for simple properties.
An atomic property like an integer or double.
QGridLayout * m_layout
Qt Layout object.
URI C++ Library.
te::dt::SimpleProperty * m_simpleProperty
te::qt::widgets::SimplePropertyWidget * m_spWidget
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63