Loading...
Searching...
No Matches
OutputDataAccessItemWidget.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5TerraLib is free software: you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation, either version 3 of the License,
8or (at your option) any later version.
9
10TerraLib is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU Lesser General Public License for more details.
14
15You should have received a copy of the GNU Lesser General Public License
16along with TerraLib. See COPYING. If not, write to
17TerraLib Team at <terralib-team@terralib.org>.
18*/
19
20/*!
21 * \file src/terralib/vp/qt/OutputDataAccessItemWidget.h
22 *
23 * \brief Implements a widget used to return a Data Access object.
24 */
25
26#ifndef __TERRALIB_VP_QT_INTERNAL_OUTPUTDATAACCESSITEMWIDGET_H
27#define __TERRALIB_VP_QT_INTERNAL_OUTPUTDATAACCESSITEMWIDGET_H
28
29#include "../Config.h"
30
31// TerraLib Includes
32#include "../../dataaccess/datasource/DataSource.h"
33#include "../../dataaccess/datasource/DataSourceInfo.h"
34
35// STL Includes
36#include <memory>
37
38 // Qt Includes
39#include <QWidget>
40
41namespace Ui { class OutputDataAccessItemWidgetForm; }
42
43namespace te
44{
45 namespace da
46 {
47 class DataAccessPtr;
48 }
49
50 namespace vp
51 {
52 namespace qt
53 {
54 /*!
55 \class OutputDataAccessItemWidget
56
57 \brief Implements a widget used to return a Data Access object.
58 */
60 {
61 Q_OBJECT
62
63 public:
64
65 /*!
66 \brief Constructor.
67 */
68 OutputDataAccessItemWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
69
70 /*!
71 \brief Destructor.
72 */
74
75 public:
76
77 /*!
78 \brief Returns the internal widget
79
80 \return Pointer to Qt Widget OutputDataAccessItemWidget
81 */
82 Ui::OutputDataAccessItemWidgetForm* getForm() const;
83
84 /*!
85 \brief Used to get the output datasource given the user information
86
87 \return Pointer to terraLib DataSource
88 */
90
91 /*!
92 \brief Get DataAccess given the user defined parameters in the interface
93
94 \return TerraLib DataAccess object
95 */
97
98 //!< Resets the widget to its default clear state
99 void reset();
100
101 protected:
102
103 /*!
104 \brief Function used to register the new datasource into terralib datasource manager
105
106 \param filePath path of new file data source
107 \param dataSetName dataset name for the new data to be created
108
109 \return Return the terralib object with datasource metadata
110 */
111 te::da::DataSourceInfoPtr registerFileDataSource(const std::string& filePath, const std::string& dataSetName);
112
113 protected slots:
114
115 /*!
116 \brief Slot for target datasource tool button pressed
117 */
119
120 /*!
121 \brief Slot for target file tool button pressed
122 */
124
125 private:
126
127 std::unique_ptr<Ui::OutputDataAccessItemWidgetForm> m_ui; //!< Pointer to a internal Qt widget
128
129 bool m_toFile; //!< The result is in a file
130
131 te::da::DataSourceInfoPtr m_outputDatasourceInfo; //!< DataSource information metadata
132
133 te::da::DataSourcePtr m_outputDatasource; //!< DataSource information
134 };
135 } // end namespace qt
136 } // end namespace qt
137} // end namespace qt
138
139
140#endif // __TERRALIB_VP_QT_INTERNAL_OUTPUTDATAACCESSITEMWIDGET_H
141
Implements a widget used to return a Data Access object.
te::da::DataSourcePtr getOutputDataSorce()
Used to get the output datasource given the user information.
void onTargetFileToolButtonPressed()
Slot for target file tool button pressed.
te::da::DataAccessPtr getDataAccess()
Get DataAccess given the user defined parameters in the interface.
void onTargetDatasourceToolButtonPressed()
Slot for target datasource tool button pressed.
std::unique_ptr< Ui::OutputDataAccessItemWidgetForm > m_ui
Pointer to a internal Qt widget.
Ui::OutputDataAccessItemWidgetForm * getForm() const
Returns the internal widget.
te::da::DataSourcePtr m_outputDatasource
DataSource information.
te::da::DataSourceInfoPtr registerFileDataSource(const std::string &filePath, const std::string &dataSetName)
Function used to register the new datasource into terralib datasource manager.
te::da::DataSourceInfoPtr m_outputDatasourceInfo
DataSource information metadata.
OutputDataAccessItemWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Constructor.
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
boost::shared_ptr< DataSource > DataSourcePtr
Definition: DataSource.h:1449
TerraLib.
#define slots
#define TEVPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:61