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  Q_OBJECT
56 
57  public:
58 
59  QueryLayerBuilderWizard(QWidget* parent);
60 
62 
63  virtual bool validateCurrentPage();
64 
65  void setDataSource(const te::da::DataSourcePtr& ds);
66 
67  void setLayerList(std::list<te::map::AbstractLayerPtr>& layerList);
68 
69  te::da::Select getSelectQuery();
70 
71  te::map::AbstractLayerPtr getQueryLayer();
72 
73  protected:
74 
75  void addPages();
76 
77  void getDataSets();
78 
79  void getProperties();
80 
81  void getQueryCapabilities();
82 
83  private:
84 
85  std::unique_ptr<te::qt::widgets::DataSourceSelectorWizardPage> m_dataSourcePage;
86  std::unique_ptr<te::qt::widgets::DataSetWizardPage> m_dataSetPage;
87  std::unique_ptr<te::qt::widgets::FieldsWizardPage> m_fieldPage;
88  std::unique_ptr<te::qt::widgets::GroupByWizardPage> m_groupByPage;
89  std::unique_ptr<te::qt::widgets::LayerAttributesWizardPage> m_layerAttrPage;
90  std::unique_ptr<te::qt::widgets::OrderByWizardPage> m_orderByPage;
91  std::unique_ptr<te::qt::widgets::WhereClauseWizardPage> m_whereClausePage;
92 
94  };
95  } // end namespace widgets
96  } // end namespace qt
97 } // end namespace te
98 
99 #endif // __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYLAYERBUILDERWIZARD_H
std::unique_ptr< te::qt::widgets::WhereClauseWizardPage > m_whereClausePage
std::unique_ptr< te::qt::widgets::FieldsWizardPage > m_fieldPage
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1440
std::unique_ptr< te::qt::widgets::LayerAttributesWizardPage > m_layerAttrPage
std::unique_ptr< te::qt::widgets::DataSetWizardPage > m_dataSetPage
std::unique_ptr< te::qt::widgets::DataSourceSelectorWizardPage > m_dataSourcePage
URI C++ Library.
std::unique_ptr< te::qt::widgets::GroupByWizardPage > m_groupByPage
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
std::unique_ptr< te::qt::widgets::OrderByWizardPage > m_orderByPage
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr