Loading...
Searching...
No Matches
TaskPropertyItem.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/property/TaskPropertyItem.h
22
23 \brief A base item to represent the process task properties items in property tree.
24 */
25
26#ifndef __TERRALIB_PROCESS_QT_INTERNAL_TASKPROPERTYITEM_H
27#define __TERRALIB_PROCESS_QT_INTERNAL_TASKPROPERTYITEM_H
28
29#include "../../Config.h"
30#include "../../ParameterDescriptor.h"
31
32 // TerraLib
33#include "../../../qt/widgets/propertybrowser/AbstractPropertyItem.h"
34
35// Qt
36#include <QColor>
37#include <QVariant>
38
39// QtPropertyBrowser
40#include <QtPropertyBrowser/QtProperty>
41
42namespace te
43{
44 namespace dt
45 {
46 class AbstractData;
47 }
48
49 namespace process
50 {
51 namespace qt
52 {
53 class ProcessManager;
54 class TaskPropertyItemListener;
55 class TaskPropertyHandler;
56
57 /*!
58 \class TaskPropertyItem
59
60 \brief A base item to represent the process task properties items in property tree.
61 */
62
64 {
65 Q_OBJECT
66
67 public:
68
69 /*! \brief Constructor */
70 TaskPropertyItem(QtTreePropertyBrowser* pb, TaskPropertyItemListener* listener, ProcessManager* manager, QColor c = QColor());
71
72 /*! \brief Destructor. */
74
75 /*! \brief Function used to set the Task. */
76 void setTask(const std::string& taskId);
77
78 void addListenerToProperty(QtProperty* p);
79
80 bool propertyHasListener(QtProperty* p);
81
82 protected:
83
84 /*! \brief Function used build toplevel task params properties . */
86
87 /*! \brief Function used clear task params properties . */
89
90 public slots:
91
92 virtual void valueChanged(QtProperty* p, const QVariant& qVariant) override;
93
94 void onRemovedTask(const std::string& taskId);
95
96 protected:
97
99
101
103 std::vector<QtProperty*> m_vecProperties;
104
105 std::string m_taskId; //!< Terralib Task object id.
106
107 QtProperty* m_taskItemProperty; //!< A qt main item for default task properties
108 QtProperty* m_inItemProperty; //!< A qt main item for input paramters from task
109 QtProperty* m_outItemProperty; //!< A qt main item for output paramters from task
110 };
111 }
112 }
113}
114
115#endif //__TERRALIB_PROCESS_QT_INTERNAL_TASKPROPERTYITEM_H
A QObject class to handle with process management.
A handler to list task properties into a property browser.
A base item to represent the process task items in property listener.
A base item to represent the process task properties items in property tree.
void addListenerToProperty(QtProperty *p)
TaskPropertyItemListener * m_listener
void onRemovedTask(const std::string &taskId)
QtProperty * m_inItemProperty
A qt main item for input paramters from task.
void buildProperties()
Function used build toplevel task params properties .
QtProperty * m_outItemProperty
A qt main item for output paramters from task.
QtProperty * m_taskItemProperty
A qt main item for default task properties.
std::string m_taskId
Terralib Task object id.
virtual ~TaskPropertyItem()
Destructor.
TaskPropertyItem(QtTreePropertyBrowser *pb, TaskPropertyItemListener *listener, ProcessManager *manager, QColor c=QColor())
Constructor.
void clearProperties()
Function used clear task params properties .
std::vector< QtProperty * > m_vecProperties
bool propertyHasListener(QtProperty *p)
virtual void valueChanged(QtProperty *p, const QVariant &qVariant) override
void setTask(const std::string &taskId)
Function used to set the Task.
A widget used to define the main property items that can be used to describe a se object.
TerraLib.
#define slots
#define TEPROCESSEXPORT
Definition: Config.h:47