Loading...
Searching...
No Matches
PostGISDataSetSelectorDialog.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/plugins/datasource/pgis/PostGISDataSetSelectorDialog.h
22
23\brief A dialog window for showing the PostGIS data set selector widget.
24*/
25
26#ifndef __TERRALIB_QT_PLUGINS_DATASOURCE_PGISRASTER_INTERNAL_POSTGISDATASETSELECTORDIALOG_H
27#define __TERRALIB_QT_PLUGINS_DATASOURCE_PGISRASTER_INTERNAL_POSTGISDATASETSELECTORDIALOG_H
28
29// TerraLib
30#ifndef Q_MOC_RUN
31#include "../../../../dataaccess/dataset/DataSetType.h"
32#include "../../../../dataaccess/datasource/DataSourceInfo.h"
33#endif
34
36#include "Utils.h"
37
38// Qt
39#include <QDialog>
40#include <QGridLayout>
41#include <QTimer>
42#include <QTreeWidgetItem>
43
44// QtPropertyBrowser
45#include <QtPropertyBrowser/QtTreePropertyBrowser>
46
47namespace Ui { class PostGISDataSetSelectorDialogForm; }
48
49namespace te
50{
51 namespace rst
52 {
53 class Raster;
54 }
55
56 namespace qt
57 {
58 namespace widgets
59 {
60 class DataSetDisplay;
61 }
62
63 namespace plugins
64 {
65 namespace pgisRaster
66 {
67
68 /*!
69 \class PostGISDataSetSelectorDialog
70
71 \brief ....
72
73 \ingroup plugins
74 */
75 class PostGISDataSetSelectorDialog : public QDialog
76 {
77 Q_OBJECT
78
80 {
83 };
84
85 public:
86
87 PostGISDataSetSelectorDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
88
90
92
94
95 protected:
96
98
99 void drawDataSet(std::string dataSetName, std::string schema);
100
101 void getDataSetInfo(std::string dataSetName, std::string schema);
102
104
105 void resizeEvent(QResizeEvent* e);
106
107 std::string getGDALURI(std::string dataSetName, std::string schema);
108
109 protected slots:
110
111 void onMapPreviewToggled(bool on);
112
113 void onItemPressed(QTreeWidgetItem* item, int column);
114
116
117 private:
118
119 std::unique_ptr<Ui::PostGISDataSetSelectorDialogForm> m_ui;
120 std::unique_ptr<te::qt::widgets::DataSetDisplay> m_mapPreview;
121
123
124 QTreeWidgetItem* m_rootItem;
125
126 QtTreePropertyBrowser* m_propertyBrowser;
128 QGridLayout* m_propertyLayout;
129
130 QTimer* m_timer; //!< Timer to execute redraw on resize action.
131 };
132
133 } // end namespace pgis
134 } // end namespace plugins
135 } // end namespace qt
136} // end namespace te
137
138#endif // __TERRALIB_QT_PLUGINS_DATASOURCE_PGISRASTER_INTERNAL_POSTGISDATASETSELECTORDIALOG_H
139
void set(const te::da::DataSourceInfoPtr &ds)
PostGISDataSetSelectorDialog(QWidget *parent=0, Qt::WindowFlags f=0)
std::unique_ptr< Ui::PostGISDataSetSelectorDialogForm > m_ui
void drawDataSet(std::string dataSetName, std::string schema)
std::unique_ptr< te::qt::widgets::DataSetDisplay > m_mapPreview
void onItemPressed(QTreeWidgetItem *item, int column)
std::string getGDALURI(std::string dataSetName, std::string schema)
void getDataSetInfo(std::string dataSetName, std::string schema)
QTimer * m_timer
Timer to execute redraw on resize action.
An abstract class for raster data strucutures.
Definition: Raster.h:72
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
std::vector< PostGISRasterInfo > PostGISRasterInfoVec
Definition: Utils.h:50
TerraLib.
#define slots