Loading...
Searching...
No Matches
CreateLayerWidget.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/layer/utils/CreateLayerWidget.h
22
23\brief This interface is used to create new layer operation.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_LAYER_UTILS_INTERNAL_CREATELAYERWIDGET_H
27#define __TERRALIB_QT_WIDGETS_LAYER_UTILS_INTERNAL_CREATELAYERWIDGET_H
28
29// TerraLib
30#ifndef Q_MOC_RUN
31#include "../../../../dataaccess/datasource/DataSourceInfo.h"
32#include "../../../../datatype/SimpleProperty.h"
33#include "../../../../maptools/AbstractLayer.h"
34#endif
35#include "../../Config.h"
36
37//STL
38#include <memory>
39
40// Qt
41#include <QAction>
42#include <QMenu>
43#include <QSignalMapper>
44#include <QWidget>
45
46namespace Ui { class CreateLayerWidgetForm; }
47
48namespace te
49{
50 namespace qt
51 {
52 namespace widgets
53 {
54 class NewPropertyWidget;
55
56 /*!
57 \class CreateLayerWidget
58
59 \brief This interface is used to create new layer operation.
60 */
61 class TEQTWIDGETSEXPORT CreateLayerWidget : public QWidget
62 {
63 Q_OBJECT
64
65 public:
66
67 /*! Default Constructor */
68 CreateLayerWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
69
70 /*! Default Destructor */
72
73 public:
74
76
77 void setReferenceLayers(std::list<te::map::AbstractLayerPtr> refLayers);
78
79 bool createLayer(std::string& errorMessage);
80
82
83 void clear();
84
85 protected slots:
86
88
90
91 void onTableWidgetCellChanged(int row, int column);
92
94
96
98
99 void onRemoveAttrExecuted(int row);
100
101 protected:
102
104
105 private:
106
107 std::unique_ptr<Ui::CreateLayerWidgetForm> m_ui;
108
110
112
113 std::vector<te::dt::Property*> m_props;
114
116
117 QSignalMapper* m_removeMapper; //!< The mapper used to know which action was executed.
118 };
119
120 } // end namespace widgets
121 } // end namespace qt
122} // end namespace te
123
124#endif // __TERRALIB_QT_WIDGETS_LAYER_UTILS_INTERNAL_CREATELAYERWIDGET_H
This interface is used to create new layer operation.
std::vector< te::dt::Property * > m_props
CreateLayerWidget(QWidget *parent=0, Qt::WindowFlags f=0)
void setReferenceLayers(std::list< te::map::AbstractLayerPtr > refLayers)
te::map::AbstractLayerPtr getLayer()
std::unique_ptr< Ui::CreateLayerWidgetForm > m_ui
bool createLayer(std::string &errorMessage)
QSignalMapper * m_removeMapper
The mapper used to know which action was executed.
te::da::DataSourceInfoPtr m_outputDatasource
void onTableWidgetCellChanged(int row, int column)
te::qt::widgets::NewPropertyWidget * m_newPropWidget
void setDataSource(te::da::DataSourceInfoPtr dsInfo)
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