From 253067c782955380bbf66ac0475dc954375b1ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 17 Aug 2013 13:40:51 +0200 Subject: Move all the things (YES. Move them.) Also, implemented some basic modlist logic, to be wired up. --- logic/BaseUpdate.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 logic/BaseUpdate.cpp (limited to 'logic/BaseUpdate.cpp') 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 -- cgit v1.2.3