Loading...
Searching...
No Matches
QueryDataSourceDialog.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/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#ifndef Q_MOC_RUN
31#include "../../../dataaccess/datasource/DataSourceInfo.h"
32#include "../../../dataaccess/query/Where.h"
33#include "../../../maptools/AbstractLayer.h"
34#include "../table/DataSetTableModel.h"
35#include "../canvas/MapDisplay.h"
36#include "../mapdisplay/DataSetDisplay.h"
37#endif
38#include "../Config.h"
39
40// STL
41#include <memory>
42
43// Qt
44#include <QColor>
45#include <QCompleter>
46#include <QDialog>
47#include <QListWidgetItem>
48
49namespace Ui { class QueryDataSourceDialogForm; }
50
51namespace te
52{
53// Forward declaration
54 namespace da
55 {
56 class DataSet;
57 }
58
59 namespace qt
60 {
61 namespace widgets
62 {
63 /*!
64 \class QueryDataSourceDialog
65
66 \brief This file defines a class for a Query Data Source Dialog Dialog.
67 */
69 {
70 Q_OBJECT
71
72 public:
73
74 QueryDataSourceDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
75
77
78 public:
79
80 /*!
81 \brief This method is used to set the list of layers
82
83 */
84 void setLayerList(std::list<te::map::AbstractLayerPtr> layerList);
85
87
88 protected:
89
91
92 void loadDataSourcesInformation(std::string dsType);
93
94 void buildMap();
95
96 protected slots:
97
98 void onDataSourceTypeSelected(int index);
99
100 void onDataSourceSelected(int index);
101
102 void onBaseDataSetSelected(int index);
103
104 void onDataSetItemClicked(QListWidgetItem* item);
105
107
109
111
113
115
117
119
121
123
125
127
129
131
132 void onListWidgetDoubleClicked(QListWidgetItem* item);
133
134 signals:
135
136 /*! This signal is emitted when the layer objects must be highlighted. */
137 //void highlightLayerObjects(const te::map::AbstractLayerPtr& layer, te::da::DataSet* dataset, const QColor& color);
138
140
141 private:
142
143 std::unique_ptr<Ui::QueryDataSourceDialogForm> m_ui;
144
145 std::list<te::map::AbstractLayerPtr> m_layerList;
146
148
150
152
154
156
157 std::map<std::string, Qt::GlobalColor> m_keyWords;
158
159 QCompleter* m_completer;
160 };
161
162 } // end namespace widgets
163 } // end namespace qt
164} // end namespace te
165
166#endif // __TERRALIB_QT_WIDGETS_QUERY_INTERNAL_QUERYDIALOG_H
A map display for a dataset.
A table model representing a te::da::DataSet.
A widget to control the display of a set of layers.
Definition: MapDisplay.h:72
This file defines a class for a Query Data Source Dialog Dialog.
te::qt::widgets::DataSetTableModel * m_tableModel
void onListWidgetDoubleClicked(QListWidgetItem *item)
void loadDataSourcesInformation(std::string dsType)
void setLayerList(std::list< te::map::AbstractLayerPtr > layerList)
This method is used to set the list of layers.
void setAppMapDisplay(te::qt::widgets::MapDisplay *appMapDisplay)
void onDataSetItemClicked(QListWidgetItem *item)
QueryDataSourceDialog(QWidget *parent=0, Qt::WindowFlags f=0)
std::map< std::string, Qt::GlobalColor > m_keyWords
std::unique_ptr< Ui::QueryDataSourceDialogForm > m_ui
te::qt::widgets::MapDisplay * m_appMapDisplay
void createNewLayer(te::map::AbstractLayerPtr layer)
te::qt::widgets::DataSetDisplay * m_dataSetDisplay
std::list< te::map::AbstractLayerPtr > m_layerList
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63