QueryLayerBuilderWizard.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/query/QueryLayerBuilderWizard.h
22 
23  \brief A Qt dialog that allows users to create query builder based on TerraLib query framework.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYLAYERBUILDERWIZARD_H
27 #define __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYLAYERBUILDERWIZARD_H
28 
29 // TerraLib
30 #include "../../../maptools/AbstractLayer.h"
31 #include "../../../dataaccess/datasource/DataSource.h"
32 #include "../../../maptools/AbstractLayer.h"
33 #include "../Config.h"
34 
35 // Qt
36 #include <QWizard>
37 
38 namespace te
39 {
40  namespace da { class Select; }
41  namespace qt
42  {
43  namespace widgets
44  {
45  class DataSourceSelectorWizardPage;
46  class DataSetWizardPage;
47  class FieldsWizardPage;
48  class GroupByWizardPage;
49  class LayerAttributesWizardPage;
50  class OrderByWizardPage;
51  class WhereClauseWizardPage;
52 
54  {
55  public:
56 
57  QueryLayerBuilderWizard(QWidget* parent);
58 
60 
61  virtual bool validateCurrentPage();
62 
63  void setDataSource(const te::da::DataSourcePtr& ds);
64 
65  void setLayerList(std::list<te::map::AbstractLayerPtr>& layerList);
66 
67  te::da::Select getSelectQuery();
68 
69  te::map::AbstractLayerPtr getQueryLayer();
70 
71  protected:
72 
73  void addPages();
74 
75  void getDataSets();
76 
77  void getProperties();
78 
79  void getQueryCapabilities();
80 
81  private:
82 
83  std::auto_ptr<te::qt::widgets::DataSourceSelectorWizardPage> m_dataSourcePage;
84  std::auto_ptr<te::qt::widgets::DataSetWizardPage> m_dataSetPage;
85  std::auto_ptr<te::qt::widgets::FieldsWizardPage> m_fieldPage;
86  std::auto_ptr<te::qt::widgets::GroupByWizardPage> m_groupByPage;
87  std::auto_ptr<te::qt::widgets::LayerAttributesWizardPage> m_layerAttrPage;
88  std::auto_ptr<te::qt::widgets::OrderByWizardPage> m_orderByPage;
89  std::auto_ptr<te::qt::widgets::WhereClauseWizardPage> m_whereClausePage;
90 
92  };
93  } // end namespace widgets
94  } // end namespace qt
95 } // end namespace te
96 
97 #endif // __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYLAYERBUILDERWIZARD_H
std::auto_ptr< te::qt::widgets::GroupByWizardPage > m_groupByPage
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1435
std::auto_ptr< te::qt::widgets::DataSetWizardPage > m_dataSetPage
std::auto_ptr< te::qt::widgets::WhereClauseWizardPage > m_whereClausePage
std::auto_ptr< te::qt::widgets::FieldsWizardPage > m_fieldPage
URI C++ Library.
std::auto_ptr< te::qt::widgets::LayerAttributesWizardPage > m_layerAttrPage
std::auto_ptr< te::qt::widgets::DataSourceSelectorWizardPage > m_dataSourcePage
A Select models a query to be used when retrieving data from a DataSource.
Definition: Select.h:65
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
std::auto_ptr< te::qt::widgets::OrderByWizardPage > m_orderByPage