summaryrefslogtreecommitdiffstats
path: root/libmultimc/include/task.h
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-03-08 13:56:26 -0600
committerAndrew <forkk@forkk.net>2013-03-08 13:56:26 -0600
commit2d6e785e4ee8a8b837fe84f83972ec23a09564af (patch)
tree6afdac6e06f1ba8ae5c29f62b5a4a9bc1b696b12 /libmultimc/include/task.h
parent69040f923b0344de214d6f1fc4553d223df7d2d6 (diff)
downloadMultiMC-2d6e785e4ee8a8b837fe84f83972ec23a09564af.tar
MultiMC-2d6e785e4ee8a8b837fe84f83972ec23a09564af.tar.gz
MultiMC-2d6e785e4ee8a8b837fe84f83972ec23a09564af.tar.lz
MultiMC-2d6e785e4ee8a8b837fe84f83972ec23a09564af.tar.xz
MultiMC-2d6e785e4ee8a8b837fe84f83972ec23a09564af.zip
Implemented version lists.
Diffstat (limited to 'libmultimc/include/task.h')
-rw-r--r--libmultimc/include/task.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libmultimc/include/task.h b/libmultimc/include/task.h
index b1a3052d..fc5b1d25 100644
--- a/libmultimc/include/task.h
+++ b/libmultimc/include/task.h
@@ -34,6 +34,15 @@ public:
QString getStatus() const;
int getProgress() const;
+ /*!
+ * \brief Calculates and sets the task's progress based on the number of parts completed out of the total number to complete.
+ * This is essentially just shorthand for setProgress((parts / whole) * 100);
+ * \param parts The parts out of the whole completed. This parameter should
+ * be less than whole. If it is greater than whole, progress is set to 100.
+ * \param whole The total number of things that need to be completed.
+ */
+ void calcProgress(int parts, int whole);
+
public slots:
void setStatus(const QString& status);
void setProgress(int progress);