Loading...
Searching...
No Matches
AbstractQtProgressViewer.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/qt/widgets/progress/AbstractQtProgressViewer.h
22
23 \brief A class that defines the interface of an abstract qt progress viewer.
24*/
25
26#ifndef __TERRALIB_QT_WIDGETS_PROGRESS_INTERNAL_ABSTRACTQTPROGRESSVIEWER_H
27#define __TERRALIB_QT_WIDGETS_PROGRESS_INTERNAL_ABSTRACTQTPROGRESSVIEWER_H
28
29// TerraLib
30#include "../../../common/progress/AbstractProgressViewer.h"
31#include "../Config.h"
32
33// Qt
34#include <QWidget>
35
36namespace te
37{
38 namespace qt
39 {
40 namespace widgets
41 {
42
43 /*!
44 \class AbstractQtProgressViewer
45
46 \brief A class that defines the interface of an abstract qt progress viewer.
47
48 \ingroup widgets
49 */
51 {
52 Q_OBJECT
53
54 public:
55
56 /*! \brief Default constructor. */
57 AbstractQtProgressViewer(QWidget* parent);
58
59 /*! \brief Virtual destructor. */
61
62 /*!
63 \brief Insert a new task in the progress viewer.
64
65 \param t Task pointer.
66 \param id Task identifier.
67
68 \note The Progress Viewer will NOT take the ownership of TaskProgress (t).
69 */
70 virtual void addTask(te::common::TaskProgress* t, int id) = 0;
71
72 /*!
73 \brief Removes a task from progress viewer container.
74
75 \param taskId Task identifier.
76 */
77 virtual void removeTask(int taskId) = 0;
78
79 /*!
80 \brief Cancel a task.
81
82 \param taskId Task identifier.
83 */
84 virtual void cancelTask(int taskId) = 0;
85
86 /*!
87 \brief Set task total steps.
88
89 \param taskId Task identifier.
90 */
91 virtual void setTotalValues(int taskId) = 0;
92
93 /*!
94 \brief Update the progress evaluation.
95
96 \param taskId Task identifier.
97 */
98 virtual void updateValue(int taskId) = 0;
99
100 /*!
101 \brief Update the progress message.
102
103 \param taskId Task identifier.
104 */
105 virtual void updateMessage(int taskId) = 0;
106
107 protected slots:
108
109 virtual void onSetProgressMessage(const std::string& message) = 0;
110
111 virtual void onSetProgressRange(int min, int max) = 0;
112
113 virtual void onSetProgressValue(int value) = 0;
114
115 virtual void onResetProgress() = 0;
116
117 signals:
118
119 void setProgressMessage(const std::string& message);
120
121 void setProgressRange(int min, int max);
122
123 void setProgressValue(int value);
124
126
127 };
128 } // end namespace widgets
129 } // end namespace qt
130} // end namespace te
131
132#endif //__TERRALIB_QT_WIDGETS_PROGRESS_INTERNAL_ABSTRACTQTPROGRESSVIEWER_H
A class that defines the interface of an abstract progress viewer.
This class can be used to inform the progress of a task.
Definition: TaskProgress.h:54
A class that defines the interface of an abstract qt progress viewer.
virtual void removeTask(int taskId)=0
Removes a task from progress viewer container.
virtual void onSetProgressMessage(const std::string &message)=0
virtual void setTotalValues(int taskId)=0
Set task total steps.
virtual void onSetProgressRange(int min, int max)=0
virtual void updateValue(int taskId)=0
Update the progress evaluation.
virtual void updateMessage(int taskId)=0
Update the progress message.
virtual void cancelTask(int taskId)=0
Cancel a task.
virtual void onSetProgressValue(int value)=0
virtual void addTask(te::common::TaskProgress *t, int id)=0
Insert a new task in the progress viewer.
void setProgressMessage(const std::string &message)
~AbstractQtProgressViewer()
Virtual destructor.
AbstractQtProgressViewer(QWidget *parent)
Default constructor.
TerraLib.
#define slots
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:63