All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QueryDialog.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/QueryDialog.h
22 
23  \brief This file defines a class for a Query Dialog Dialog.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYDIALOG_H
27 #define __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYDIALOG_H
28 
29 // TerraLib
30 #include "../../../dataaccess/query/Where.h"
31 #include "../../../maptools/AbstractLayer.h"
32 #include "../Config.h"
33 
34 // STL
35 #include <memory>
36 
37 // Qt
38 #include <QtGui/QColor>
39 #include <QtGui/QDialog>
40 
41 namespace Ui { class QueryDialogForm; }
42 
43 namespace te
44 {
45 // Forward declaration
46  namespace da
47  {
48  class DataSet;
49  }
50 
51  namespace qt
52  {
53  namespace widgets
54  {
55  class ColorPickerToolButton;
56  class WhereClauseWidget;
57 
58  /*!
59  \class QueryDialog
60 
61  \brief This file defines a class for a Query Dialog Dialog.
62  */
63  class TEQTWIDGETSEXPORT QueryDialog : public QDialog
64  {
65  Q_OBJECT
66 
67  public:
68 
69  QueryDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
70 
71  ~QueryDialog();
72 
73  public:
74 
76 
77  /*!
78  \brief This method is used to set the list of layers
79 
80  */
81  void setList(std::list<te::map::AbstractLayerPtr>& layerList);
82 
83  void setCurrentLayer(te::map::AbstractLayerPtr layer);
84 
85  te::da::Where* getWhere();
86 
87 
88  protected slots:
89 
90  void onInputLayerActivated(QString value);
91 
92  void onApplyPushButtonClicked();
93 
94  signals:
95 
96  /*! This signal is emitted when the layer selection changed. */
97  void layerSelectedObjectsChanged(const te::map::AbstractLayerPtr& layer);
98 
99  /*! This signal is emitted when the layer objects must be highlighted. */
100  void highlightLayerObjects(const te::map::AbstractLayerPtr& layer, te::da::DataSet* dataset, const QColor& color);
101 
102  private:
103 
104  std::auto_ptr<Ui::QueryDialogForm> m_ui;
105  std::auto_ptr<te::qt::widgets::WhereClauseWidget> m_whereClauseWidget;
107  };
108 
109  } // end namespace widgets
110  } // end namespace qt
111 } // end namespace te
112 
113 #endif // __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYDIALOG_H
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:101
ColorPickerToolButton * m_colorPicker
Definition: QueryDialog.h:106
This file defines a class for a Query Dialog Dialog.
Definition: QueryDialog.h:63
std::auto_ptr< Ui::QueryDialogForm > m_ui
Definition: QueryDialog.h:104
This class is used to define the WHERE object of select operation.
Custom tool button used to pick a color.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
A class that can be used to model a filter expression that can be applied to a query.
Definition: Where.h:47
std::auto_ptr< te::qt::widgets::WhereClauseWidget > m_whereClauseWidget
Definition: QueryDialog.h:105
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:111