ProcessInspector.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/ProcessInspector.h
22 
23  \brief A QWidget to inspect each process items added to process
24 */
25 
26 #ifndef __TERRALIB_PROCESS_QT_INTERNAL_PROCESSINSPECTOR_H
27 #define __TERRALIB_PROCESS_QT_INTERNAL_PROCESSINSPECTOR_H
28 
29 #include "../../Config.h"
30 #include "../../Connector.h"
31 #include "../../Task.h"
32 
33 // Qt Includes
34 #include <QTreeWidget>
35 #include <QTreeWidgetItem>
36 #include <QWidget>
37 
38 // STL
39 #include <map>
40 
41 namespace te
42 {
43  namespace process
44  {
45  class Process;
46 
47  namespace qt
48  {
49  class ProcessManager;
50 
51  /*!
52  \class ProcessInspector
53 
54  \brief A QWidget to inspect each process items added to process
55 
56  */
57  class TEPROCESSEXPORT ProcessInspector : public QWidget
58  {
59  Q_OBJECT
60 
61  public:
62 
63  /*! \brief Default constructor. */
64  ProcessInspector(ProcessManager* manager, QWidget *parent = nullptr);
65 
66  /*! \brief Virtual destructor. */
68 
70 
71  public slots:
72 
73  void onAddedTask(const std::string& taskId);
74 
75  void onAddedConnector(const std::string& connectorId);
76 
77  void onResetedTaskId(const std::string& id, const std::string& newId);
78 
79  void onRemovedTask(const std::string& taskId);
80 
81  void onRemovedConnector(const std::string& connectorId);
82 
83  protected:
84 
85  void listParameters(QTreeWidgetItem* taskItemParent, const te::process::Task* task);
86 
87  void listConnectors(QTreeWidgetItem* taskItemParent, const te::process::Task* task);
88 
89  void addConnector(QTreeWidgetItem* taskItemParent, te::process::Connector* connector, bool inputConnectors);
90 
91  protected:
92 
94 
95  QTreeWidget* m_processTree;
96 
97  QTreeWidgetItem* m_processTreeItem;
98 
99  std::map<std::string, QTreeWidgetItem*> m_taskItemMap;
100  };
101  }
102  }
103 }
104 
105 #endif // __TERRALIB_PROCESS_QT_INTERNAL_PROCESSINSPECTOR_H
Abstraction that represents a Connector between parameters of a Task.
Definition: Connector.h:48
This class represents the description of a parameter.
Definition: Task.h:54
A QWidget to inspect each process items added to process.
void onAddedConnector(const std::string &connectorId)
void addConnector(QTreeWidgetItem *taskItemParent, te::process::Connector *connector, bool inputConnectors)
~ProcessInspector()
Virtual destructor.
void onRemovedTask(const std::string &taskId)
void onAddedTask(const std::string &taskId)
void listConnectors(QTreeWidgetItem *taskItemParent, const te::process::Task *task)
void setProcess(te::process::Process *process)
std::map< std::string, QTreeWidgetItem * > m_taskItemMap
void onRemovedConnector(const std::string &connectorId)
void listParameters(QTreeWidgetItem *taskItemParent, const te::process::Task *task)
ProcessInspector(ProcessManager *manager, QWidget *parent=nullptr)
Default constructor.
void onResetedTaskId(const std::string &id, const std::string &newId)
A QObject class to handle with process management.
TerraLib.
#define slots
#define TEPROCESSEXPORT
Definition: Config.h:47