DataAccessTaskPropertyHandler.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/process/qt/DataAccessTaskPropertyHandler.h
22 
23  \brief A data access handler to list task properties into a property browser
24 */
25 
26 #ifndef __TERRALIB_PROCESS_QT_INTERNAL_DATAACCESSTASKPROPERTYHANDLER_H
27 #define __TERRALIB_PROCESS_QT_INTERNAL_DATAACCESSTASKPROPERTYHANDLER_H
28 
29 #include "../../Config.h"
30 
31 #include "TaskPropertyHandler.h"
32 
33 #include "../../../dataaccess/datasource/DataSourceInfo.h"
34 
35 namespace te
36 {
37  namespace dt
38  {
39  class AbstractData;
40  }
41 
42  namespace process
43  {
44  class TaskSharedPtr;
45 
46  namespace qt
47  {
48  class ProcessManager;
49 
50  /*!
51  \class DataAccessTaskPropertyHandler
52 
53  \brief A data access handler to list task properties into a property browser
54 
55  */
57  {
58  Q_OBJECT
59 
60  public:
61 
62  /*! \brief Default constructor. */
64 
65  /*! \brief Virtual destructor. */
67 
68  void setDefaultProperties(QtProperty* parent) override;
69 
70  protected:
71 
72  /*! \brief Function used to create the right property type given a param descriptor.
73 
74  \param paramDesc Param descriptor used to create the property
75 
76  \return QtProperty object.
77 
78  */
79  virtual QtProperty* createProperty(te::process::TaskSharedPtr task, te::process::ParameterDescriptor& paramDesc) override;
80 
81  /*! \brief Function used to set into qt property a terralib data.
82 
83  \param data TerraLib object data
84  \param property Qt property object
85  \param dataType TerraLib object data type
86 
87  */
88  virtual void setPropertyData(const te::dt::AbstractData* data, QtProperty* property, int dataType) override;
89 
90  public slots:
91 
92  virtual void setDlg(QWidget* parent, QtProperty* prop);
93 
95 
97 
98  protected:
99 
102  QtProperty* m_dataAccessProperty;
103 
105  };
106 
107  /*!
108  \class TaskPropertyHandlerFactory
109 
110  \brief Abstract factory used to create Tasks property handlers.
111  */
113  {
114  public:
115 
116  /*!
117  \brief Constructor.
118 
119  \param factoryKey The key that identifies the factory.
120  */
122 
123  //!< Destructor
125 
126  protected:
127 
129 
130  };
131  }
132  }
133 }
134 
135 #endif // __TERRALIB_PROCESS_QT_INTERNAL_DATAACCESSTASKPROPERTYHANDLER_H
te::process::qt::DataAccessTaskPropertyHandler::showDataSetSelector
void showDataSetSelector()
te::process::qt::DataAccessTaskPropertyHandler::m_dataSetConnectorProperty
QtProperty * m_dataSetConnectorProperty
Definition: DataAccessTaskPropertyHandler.h:101
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::process::qt::DataAccessTaskPropertyHandler::setDlg
virtual void setDlg(QWidget *parent, QtProperty *prop)
te::process::qt::TaskPropertyHandler
A handler to list task properties into a property browser.
Definition: TaskPropertyHandler.h:65
te::da::DataSourceInfoPtr
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
Definition: DataSourceInfo.h:107
te::process::qt::TaskPropertyHandlerFactory
Wrapper function used to create taks. Used to avoid C++ to create multiple instances of the factory s...
Definition: TaskPropertyHandler.h:149
te::process::qt::DataAccessTaskPropertyHandlerFactory::DataAccessTaskPropertyHandlerFactory
DataAccessTaskPropertyHandlerFactory()
Constructor.
te::process::TaskSharedPtr
Definition: Task.h:150
TaskPropertyHandler.h
te::process::qt::DataAccessTaskPropertyHandlerFactory::build
TaskPropertyHandler * build() override
Concrete factories (derived from this one) must implement this method in order to create objects.
te::process::qt::DataAccessTaskPropertyHandler::createProperty
virtual QtProperty * createProperty(te::process::TaskSharedPtr task, te::process::ParameterDescriptor &paramDesc) override
Function used to create the right property type given a param descriptor.
slots
#define slots
Definition: VirtualMachine.h:48
te::process::qt::DataAccessTaskPropertyHandler::showDataSourceConnector
void showDataSourceConnector()
te::process::qt::DataAccessTaskPropertyHandler::setDefaultProperties
void setDefaultProperties(QtProperty *parent) override
te::process::qt::DataAccessTaskPropertyHandler::DataAccessTaskPropertyHandler
DataAccessTaskPropertyHandler()
Default constructor.
te::dt::AbstractData
A base class for values that can be retrieved from the data access module.
Definition: AbstractData.h:56
te::process::qt::DataAccessTaskPropertyHandler::setPropertyData
virtual void setPropertyData(const te::dt::AbstractData *data, QtProperty *property, int dataType) override
Function used to set into qt property a terralib data.
te::process::qt::DataAccessTaskPropertyHandler
A data access handler to list task properties into a property browser.
Definition: DataAccessTaskPropertyHandler.h:57
te::process::qt::DataAccessTaskPropertyHandler::~DataAccessTaskPropertyHandler
virtual ~DataAccessTaskPropertyHandler()
Virtual destructor.
TEPROCESSEXPORT
#define TEPROCESSEXPORT
Definition: Config.h:47
te::process::qt::DataAccessTaskPropertyHandler::m_dsInfo
te::da::DataSourceInfoPtr m_dsInfo
Definition: DataAccessTaskPropertyHandler.h:104
te::process::ParameterDescriptor
Definition: ParameterDescriptor.h:50
te::process::qt::DataAccessTaskPropertyHandlerFactory::~DataAccessTaskPropertyHandlerFactory
virtual ~DataAccessTaskPropertyHandlerFactory()
te::process::qt::DataAccessTaskPropertyHandlerFactory
Definition: DataAccessTaskPropertyHandler.h:113
te::process::qt::DataAccessTaskPropertyHandler::m_dataAccessProperty
QtProperty * m_dataAccessProperty
Definition: DataAccessTaskPropertyHandler.h:102
te::process::qt::DataAccessTaskPropertyHandler::m_dataSourceConnectorProperty
QtProperty * m_dataSourceConnectorProperty
Definition: DataAccessTaskPropertyHandler.h:100