Loading...
Searching...
No Matches
TaskGraphicalCapabilities.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/process/qt/TaskGraphicalCapabilities.h
22 *
23 * \brief Defines a task capabilities of a task used in graphical components
24 */
25
26#ifndef __TERRALIB_PROCESS_QT_INTERNAL_TASKGRAPHICALCAPABILITIES_H
27#define __TERRALIB_PROCESS_QT_INTERNAL_TASKGRAPHICALCAPABILITIES_H
28
29#include "../../Config.h"
30
31#include "../../../common/AbstractFactory.h"
32
33//QT Includes
34#include <QIcon>
35#include <QPainterPath>
36
37//STL includes
38#include <memory>
39#include <string>
40
41namespace te
42{
43 namespace process
44 {
45 namespace qt
46 {
47 /*!
48 \class TaskGraphicalCapabilities
49
50 \brief Defines a task capabilities of a task used in graphical components
51 */
53 {
54 public:
56 const std::string& operationName
57 , const std::string& description
58 , const std::string& iconName
59 , const std::string& iconPath
60 );
61
62 //!< Destructor
64
65 //!< Returns the name of the operation
66 std::string getName() const;
67
68 //!< Returns the description of the operation
69 std::string getDescription() const;
70
71 //!< Returns the icon path
72 std::string getIconPath() const;
73
74 //!< Returns the icon of the operation
75 const QIcon& getIcon() const;
76
77 virtual QPainterPath getShape(QList<QPointF>& inHotPoints, QList<QPointF>& outHotPoints) const = 0;
78
79 virtual QRectF shapeBoundingRect() const = 0;
80
81 protected:
82
83 std::string m_operationName; //!< The name of the operation
84 std::string m_description; //!< The caption of the widget
85 std::string m_iconName; //!< The icon name of the operation
86 std::string m_iconPath; //!< The icon path of the operation
87 QIcon m_qIcon; //!< The icon of the operation
88
89 public:
90
92 };
93
94
95 /*!
96 \class VectorProcessingDialogCapabilitiesFactory
97
98 \brief Abstract factory used to create VectorProcessingDialogCapabilities.
99 */
100 class TEPROCESSEXPORT TaskGraphicalCapabilitiesFactory : public te::common::AbstractFactory < TaskGraphicalCapabilities, std::string >
101 {
102 public:
103
104 /*!
105 \brief Constructor.
106
107 \param factoryKey The key that identifies the factory.
108 */
109 TaskGraphicalCapabilitiesFactory(const std::string& factoryKey);
110
111 //!< Destructor
113 };
114
115 } //end namespace qt
116 }//end namespace process
117}//end namespace te
118
119
120#endif //__TERRALIB_PROCESS_QT_INTERNAL_TASKGRAPHICALCAPABILITIES_H
This class defines the interface of abstract factories without initializing parameters.
TaskGraphicalCapabilitiesFactory(const std::string &factoryKey)
Constructor.
Defines a task capabilities of a task used in graphical components.
std::string getName() const
Returns the description of the operation.
std::string m_description
The caption of the widget.
virtual QRectF shapeBoundingRect() const =0
TaskGraphicalCapabilities(const std::string &operationName, const std::string &description, const std::string &iconName, const std::string &iconPath)
Destructor.
virtual ~TaskGraphicalCapabilities()
Returns the name of the operation.
virtual QPainterPath getShape(QList< QPointF > &inHotPoints, QList< QPointF > &outHotPoints) const =0
std::string getDescription() const
Returns the icon path.
std::string m_iconName
The icon name of the operation.
std::string m_operationName
The name of the operation.
std::string getIconPath() const
Returns the icon of the operation.
std::string m_iconPath
The icon path of the operation.
TerraLib.
#define TEPROCESSEXPORT
Definition: Config.h:47