SaveSelectedObjectsWidget.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/SaveSelectedObjectsWidget.h
22 
23 \brief This interface is used to create a new layer based on a layer with selected objects.
24 */
25 
26 #ifndef __TERRALIB_QT_WIDGETS_LAYER_UTILS_INTERNAL_SAVESELECTEDOBJECTSWIDGET_H
27 #define __TERRALIB_QT_WIDGETS_LAYER_UTILS_INTERNAL_SAVESELECTEDOBJECTSWIDGET_H
28 
29 // TerraLib
30 #ifndef Q_MOC_RUN
31 #include "../../../../dataaccess/datasource/DataSource.h"
32 #include "../../../../dataaccess/datasource/DataSourceInfo.h"
33 #include "../../../../datatype/SimpleProperty.h"
34 #include "../../../../maptools/AbstractLayer.h"
35 #endif
36 #include "../../Config.h"
37 
38 // Qt
39 #include <QAction>
40 #include <QMenu>
41 #include <QSignalMapper>
42 #include <QWidget>
43 
44 namespace Ui { class SaveSelectedObjectsWidgetForm; }
45 
46 namespace te
47 {
48  namespace qt
49  {
50  namespace widgets
51  {
52  /*!
53  \class CreateLayerWidget
54 
55  \brief This interface is used to create a new layer based on a layer with selected objects.
56  */
58  {
59  Q_OBJECT
60 
61  public:
62 
63  /*! Default Constructor */
64  SaveSelectedObjectsWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
65 
66  /*! Default Destructor */
68 
69  public:
70 
71  /*! \brief Set parameters. */
73 
74  /*! \brief Update components with imput data. */
76 
77  void save(const bool createDataSet, te::da::DataSourcePtr dataSource,
78  te::da::DataSet* dataSet, te::da::DataSetType* dataSetType);
79 
81 
82  bool execute(std::string& errorMessage);
83 
84  protected slots:
85 
87 
89 
90  private:
91 
92  std::unique_ptr<Ui::SaveSelectedObjectsWidgetForm> m_ui;
93 
94  te::map::AbstractLayerPtr m_layer; //!< TerraLib layer auto ptr
95 
96  int m_srid; //!< SRID of in/out layer
97 
98  te::da::ObjectIdSet* m_oidSet; //!< Object Id Set.
99 
101 
103 
104  bool m_toFile;
105  };
106 
107  } // end namespace widgets
108  } // end namespace qt
109 } // end namespace te
110 
111 #endif // __TERRALIB_QT_WIDGETS_LAYER_UTILS_INTERNAL_SAVESELECTEDOBJECTSWIDGET_H
A class that models the description of a dataset.
Definition: DataSetType.h:73
A dataset is the unit of information manipulated by the data access module of TerraLib.
Definition: DataSet.h:114
This class represents a set of unique ids created in the same context. i.e. from the same data set.
Definition: ObjectIdSet.h:56
std::unique_ptr< Ui::SaveSelectedObjectsWidgetForm > m_ui
void setParameters(te::map::AbstractLayerPtr layer)
Set parameters.
void save(const bool createDataSet, te::da::DataSourcePtr dataSource, te::da::DataSet *dataSet, te::da::DataSetType *dataSetType)
te::map::AbstractLayerPtr getLayer()
te::da::ObjectIdSet * m_oidSet
Object Id Set.
SaveSelectedObjectsWidget(QWidget *parent=0, Qt::WindowFlags f=0)
bool execute(std::string &errorMessage)
te::map::AbstractLayerPtr m_layer
TerraLib layer auto ptr.
void updateWindowComponents()
Update components with imput data.
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
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