DataStoreTaskPropertyHandler.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/DataStoreTaskPropertyHandler.h
22 
23  \brief A data access handler to list task properties into a property browser
24 */
25 
26 #ifndef __TERRALIB_PROCESS_QT_INTERNAL_DATASTORETASKPROPERTYHANDLER_H
27 #define __TERRALIB_PROCESS_QT_INTERNAL_DATASTORETASKPROPERTYHANDLER_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 DataStoreTaskPropertyHandler
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 
94  void showDataSourceConnector();
95 
96  protected:
97 
102 
104  };
105 
106  /*!
107  \class TaskPropertyHandlerFactory
108 
109  \brief Abstract factory used to create Tasks property handlers.
110  */
112  {
113  public:
114 
115  /*!
116  \brief Constructor.
117 
118  \param factoryKey The key that identifies the factory.
119  */
121 
122  //!< Destructor
124 
125  protected:
126 
127  TaskPropertyHandler* build() override;
128 
129  };
130  }
131  }
132 }
133 
134 #endif // __TERRALIB_PROCESS_QT_INTERNAL_DATASTORETASKPROPERTYHANDLER_H
#define slots
A data access handler to list task properties into a property browser.
Wrapper function used to create taks. Used to avoid C++ to create multiple instances of the factory s...
A handler to list task properties into a property browser.
TerraLib.
A base class for values that can be retrieved from the data access module.
Definition: AbstractData.h:55
#define TEPROCESSEXPORT
Definition: Config.h:47
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr