QuickSelectDialog.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/QuickSelectDialog.h
22 
23  \brief This file defines a class for a Select Dialog.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUICKSELECT_H
27 #define __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUICKSELECT_H
28 
29 // TerraLib
30 #ifndef Q_MOC_RUN
31 #include "../../../dataaccess/datasource/DataSource.h"
32 #include "../../../dataaccess/query/Select.h"
33 #include "../../../dataaccess/query/Where.h"
34 #include "QueryBuilderWidget.h"
35 #endif
36 
37 #include "../Config.h"
38 
39 
40 // STL
41 #include <memory>
42 #include <string>
43 #include <set>
44 
45 // Qt
46 #include <QColor>
47 #include <QDialog>
48 #include <QGridLayout>
49 
50 namespace Ui { class QuickSelectDialogForm; }
51 
52 namespace te
53 {
54 // Forward declaration
55 
56  namespace qt
57  {
58  namespace widgets
59  {
60  /*!
61  \class QuickSelectDialog
62 
63  \brief This file defines a class for a Select Dialog.
64  */
65  class TEQTWIDGETSEXPORT QuickSelectDialog : public QDialog
66  {
67  Q_OBJECT
68 
69  public:
70 
71  QuickSelectDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
72 
74 
75  public:
76 
77  void setInputDataSource(te::da::DataSourcePtr dataSource);
78 
79  std::set<std::string> getFunctionsNames();
80 
81  te::da::Select getSelect();
82 
83  std::string getSelectString();
84 
85  protected slots:
86 
87  void onDataSetComboBoxSelected(int index);
88 
89  void onAddAttrToolButtonClicked();
90 
91  void onRemoveAttrToolButtonClicked();
92 
93  void onCheckToolButtonClicked();
94 
95  void onOkPushButtonClicked();
96 
97  protected:
98 
99  std::string setAliasName(std::string value);
100 
101  private:
102 
103  std::unique_ptr<Ui::QuickSelectDialogForm> m_ui;
104 
105  QGridLayout* m_queryLayout;
106 
108 
110  };
111  } // end namespace widgets
112  } // end namespace qt
113 } // end namespace te
114 
115 #endif // __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUICKSELECT_H
#define slots
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
This file has the QueryBuilderWidget class.
This class is used to define the Where Clause object of select operation.
te::qt::widgets::QueryBuilderWidget * m_queryWidget
std::unique_ptr< Ui::QuickSelectDialogForm > m_ui
TerraLib.
A Select models a query to be used when retrieving data from a DataSource.
Definition: Select.h:65
This file defines a class for a Select Dialog.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63