summaryrefslogtreecommitdiffstats
path: root/logic/BaseUpdate.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-08-17 13:40:51 +0200
committerPetr Mrázek <peterix@gmail.com>2013-08-17 13:40:51 +0200
commit253067c782955380bbf66ac0475dc954375b1ff4 (patch)
treeca97e231fd3a764256d95b5fc8d08fc25ff72161 /logic/BaseUpdate.cpp
parent77e80665422c4e97e2286418ab55e20c4030023b (diff)
downloadMultiMC-253067c782955380bbf66ac0475dc954375b1ff4.tar
MultiMC-253067c782955380bbf66ac0475dc954375b1ff4.tar.gz
MultiMC-253067c782955380bbf66ac0475dc954375b1ff4.tar.lz
MultiMC-253067c782955380bbf66ac0475dc954375b1ff4.tar.xz
MultiMC-253067c782955380bbf66ac0475dc954375b1ff4.zip
Move all the things (YES. Move them.)
Also, implemented some basic modlist logic, to be wired up.
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