All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FeatureAttributesDialog.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/edit/qt/FeatureAttributesDialog.h
22 
23  \brief A widget used to show and setup feature attributes.
24 */
25 
26 #ifndef __TERRALIB_EDIT_QT_INTERNAL_FEATUREATTRIBUTESDIALOG_H
27 #define __TERRALIB_EDIT_QT_INTERNAL_FEATUREATTRIBUTESDIALOG_H
28 
29 // TerraLib
30 #include "Config.h"
31 
32 // Qt
33 #include <QDialog>
34 
35 // STL
36 #include <memory>
37 
38 // Forward declarations
39 class QTreeWidgetItem;
40 namespace Ui { class FeatureAttributesDialogForm; }
41 
42 namespace te
43 {
44 // Forward declaration
45  namespace da
46  {
47  class DataSetType;
48  }
49 
50  namespace edit
51  {
52 // Forward declaration
53  class Feature;
54 
55  /*!
56  \class FeatureAttributesDialog
57 
58  \brief A widget used to show and setup feature attributes.
59  */
60  class TEEDITQTEXPORT FeatureAttributesDialog : public QDialog
61  {
62  Q_OBJECT
63 
64  public:
65 
66  /** @name Initializer Methods
67  * Methods related to instantiation and destruction.
68  */
69  //@{
70 
71  /*! \brief Constructs the feature attributes dialog which is a child of parent, with widget flags set to f. */
72  FeatureAttributesDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
73 
74  /*! \brief Destructor. */
76 
77  //@}
78 
79  void set(te::da::DataSetType* type, Feature* f);
80 
81  private:
82 
83  /*! \brief Internal method to initialize the dialog. */
84  void initialize();
85 
86  private slots:
87 
88  void onOkPushButtonPressed();
89 
90  void onAttributesTreeWidgetItemDoubleClicked(QTreeWidgetItem* item, int column);
91 
92  private:
93 
94  std::auto_ptr<Ui::FeatureAttributesDialogForm> m_ui; //!< Dialog form.
95  te::da::DataSetType* m_type; //!< The attributes dataset type.
96  Feature* m_feature; //!< The owner feature of the attributes.
97 
98  };
99 
100  } // end namespace edit
101 } // end namespace te
102 
103 #endif // __TERRALIB_EDIT_QT_INTERNAL_FEATUREATTRIBUTESDIALOG_H
#define TEEDITQTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
Configuration flags for the TerraLib Qt Edit module.
A class that models the description of a dataset.
Definition: DataSetType.h:72
Feature * m_feature
The owner feature of the attributes.
te::da::DataSetType * m_type
The attributes dataset type.
A widget used to show and setup feature attributes.
std::auto_ptr< Ui::FeatureAttributesDialogForm > m_ui
Dialog form.