summaryrefslogtreecommitdiffstats
path: root/logic/BaseUpdate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/BaseUpdate.cpp')
-rw-r--r--logic/BaseUpdate.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/logic/BaseUpdate.cpp b/logic/BaseUpdate.cpp
new file mode 100644
index 00000000..b086ab14
--- /dev/null
+++ b/logic/BaseUpdate.cpp
@@ -0,0 +1,13 @@
+#include "BaseUpdate.h"
+
+BaseUpdate::BaseUpdate ( BaseInstance* inst, QObject* parent ) : Task ( parent )
+{
+ m_inst = inst;
+}
+
+void BaseUpdate::updateDownloadProgress(qint64 current, qint64 total)
+{
+ // The progress on the current file is current / total
+ float currentDLProgress = (float) current / (float) total;
+ setProgress((int)(currentDLProgress * 100)); // convert to percentage
+} \ No newline at end of file