WMSLayerSelectorDialog.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/ws/ogc/wms/qt/WMSLayerSelectorDialog.h
22 
23  \brief A dialog window to show GetCapabilities data from a WMS Server.
24 */
25 
26 #ifndef __TERRALIB_WS_OGC_WMS_QT_WMSLAYERSELECTORDIALOG_H
27 #define __TERRALIB_WS_OGC_WMS_QT_WMSLAYERSELECTORDIALOG_H
28 
29 
30 //TerraLib
31 #include "Config.h"
32 
33 #include "../client/DataTypes.h"
34 #include "../../../../qt/widgets/dataset/explorer/DataSetTreeView.h"
35 #include "../client/WMSClient.h"
36 #include "WMSLayerDisplay.h"
37 #include "WMSLayerItem.h"
38 
39 #ifndef Q_MOC_RUN
40 #include "../../../../dataaccess/dataset/DataSetType.h"
41 #include "../../../../dataaccess/datasource/DataSourceInfo.h"
42 #include "../../../../dataaccess/datasource/DataSource.h"
43 #endif
44 
45 //QT
46 #include <QDialog>
47 #include <QTreeWidgetItem>
48 
49 // STL
50 #include <memory>
51 
52 namespace Ui { class WMSLayerSelectorDialogForm; }
53 
54 namespace te
55 {
56  namespace ws
57  {
58  namespace ogc
59  {
60  namespace wms
61  {
62  namespace qt
63  {
64 
65 
66  /*!
67  \class WMSLayerSelectorDialog
68 
69  \brief A dialog window to show GetCapabilities data from a WMS Server.
70  */
72  {
73  Q_OBJECT
74 
75  public:
76 
77  WMSLayerSelectorDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
78 
80 
81 
82  void set(const te::da::DataSourceInfoPtr& ds, bool useCheckableItems = false);
83 
84  std::vector<te::ws::ogc::wms::WMSGetMapRequest> getCheckedRequests();
85 
86  public slots:
87 
88  void currentLayerChanged(QTreeWidgetItem* current, QTreeWidgetItem* previous);
89 
90  void okPushButtonPressed();
91 
92  void imgFormatIndexChanged(const int& index);
93 
94  void timeDimIndexChanged(const int& index);
95 
96  void styleIndexChanged(const int& index);
97 
98  void crsIndexChanged(const int& index);
99 
100  void transparencyStateChanged(const int& state);
101 
102  void checkLayerItemChanged(QTreeWidgetItem* item, int column);
103 
104  private:
105 
106  void refreshLayerInfoTree(const te::ws::ogc::wms::Layer& currentLayer);
107 
108  void refreshLayerProperties();
109 
110  void refreshMapPreview();
111 
112  std::vector<WMSLayerItem*> getCheckedLayerItens();
113 
114  private:
115 
116  std::unique_ptr<Ui::WMSLayerSelectorDialogForm> m_ui;
118  std::unique_ptr<te::ws::ogc::WMSClient> m_client;
122  std::unique_ptr<WMSLayerDisplay> m_mapPreview;
124 
125  };
126 
127  }
128  }
129  }
130  }
131 }
132 #endif // __TERRALIB_WS_OGC_WMS_QT_WMSLAYERSELECTORDIALOG_H
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1438
std::unique_ptr< Ui::WMSLayerSelectorDialogForm > m_ui
QTreeWidgetItem extension to WMS Layers.
URI C++ Library.
The Layer WMS 1.3.0 struct.
Definition: DataTypes.h:212
A display QFrame to draw previews for WMS data.
std::unique_ptr< te::ws::ogc::WMSClient > m_client
std::unique_ptr< WMSLayerDisplay > m_mapPreview
A dialog window to show GetCapabilities data from a WMS Server.
The WMSLayerItem class is an extension of QTreeWidgetItem to handle WMS Layer creation.
Definition: WMSLayerItem.h:56
#define TEOGCWMSQTEXPORT
Definition: Config.h:66
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr