All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
QueryDataSourceDialog.h
Go to the documentation of this file.
1 /* Copyright (C) 2011-2012 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/QueryDataSourceDialog.h
22 
23  \brief This file defines a class for a Query DataSource Dialog Dialog.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYDATASOURCEDIALOG_H
27 #define __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYDATASOURCEDIALOG_H
28 
29 // TerraLib
30 #include "../../../dataaccess/query/Where.h"
31 #include "../../../maptools/AbstractLayer.h"
32 #include "../table/DataSetTableModel.h"
33 #include "../mapdisplay/DataSetDisplay.h"
34 #include "../Config.h"
35 
36 // STL
37 #include <memory>
38 
39 // Qt
40 #include <QColor>
41 #include <QDialog>
42 #include <QListWidgetItem>
43 
44 namespace Ui { class QueryDataSourceDialogForm; }
45 
46 namespace te
47 {
48 // Forward declaration
49  namespace da
50  {
51  class DataSet;
52  }
53 
54  namespace qt
55  {
56  namespace widgets
57  {
58  /*!
59  \class QueryDataSourceDialog
60 
61  \brief This file defines a class for a Query Data Source Dialog Dialog.
62  */
64  {
65  Q_OBJECT
66 
67  public:
68 
69  QueryDataSourceDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
70 
72 
73  public:
74 
75  /*!
76  \brief This method is used to set the list of layers
77 
78  */
79  void setLayerList(std::list<te::map::AbstractLayerPtr> layerList);
80 
81  protected:
82 
83  void loadDataSourcesInformation();
84 
85  void buildMap();
86 
87  protected slots:
88 
89  void onDataSourceSelected(int index);
90 
91  void onBaseDataSetSelected(int index);
92 
93  void onDataSetItemClicked(QListWidgetItem* item);
94 
95  void onApplyPushButtonClicked();
96 
97  void onClearPushButtonClicked();
98 
99  void onSQLEditorTextChanged();
100 
101  void onSaveSqlToolButtonClicked();
102 
103  void onOpenSqlToolButtonClicked();
104 
105  void onApplySelToolButtonClicked();
106 
107  signals:
108 
109  /*! This signal is emitted when the layer objects must be highlighted. */
110  void highlightLayerObjects(const te::map::AbstractLayerPtr& layer, te::da::DataSet* dataset, const QColor& color);
111 
112  private:
113 
114  std::auto_ptr<Ui::QueryDataSourceDialogForm> m_ui;
115 
116  std::list<te::map::AbstractLayerPtr> m_layerList;
117 
119 
121 
122  std::map<std::string, Qt::GlobalColor> m_keyWords;
123  };
124 
125  } // end namespace widgets
126  } // end namespace qt
127 } // end namespace te
128 
129 #endif // __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYDIALOG_H
This file defines a class for a Query Data Source Dialog Dialog.
te::qt::widgets::DataSetDisplay * m_dataSetDisplay
std::list< te::map::AbstractLayerPtr > m_layerList
std::auto_ptr< Ui::QueryDataSourceDialogForm > m_ui
te::qt::widgets::DataSetTableModel * m_tableModel
A map display for a dataset.
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:112
std::map< std::string, Qt::GlobalColor > m_keyWords
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:66
A table model representing a te::da::DataSet.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr